http://stackoverflow.com/a/29652952
has body: I managed solving this issue by creating an extension : public class AsIsBundleOrderer : IBundleOrderer { public virtual IEnumerable&lt;FileInfo&gt; OrderFiles(BundleContext context, IEnumerable&lt;FileInfo&gt; files) { return files; } } internal static class BundleExtensions { public static Bundle ForceOrdered(this Bundle sb) { sb.Orderer = new AsIsBundleOrderer(); return sb; } } Then, you can register your bundle bundles.Add(new ScriptBundle("~/bundles/home") .Include("~/Scripts/leaflet-0.6.4.js") .Include("~/Scripts/oms.js") .Include("~/Scripts/home.js").ForceOrdered() );
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25428952
type: Answer
answers question: http://stackoverflow.com/q/25428952
score: 1
upvote count: 1

http://stackoverflow.com/q/25478175
upvote count: 3
has answer: http://stackoverflow.com/a/25569472
has comment: http://stackoverflow.com/comment/39909726
type: Question
score: 3
tagged with: hapi.js
tagged with: javascript
has body: So I'd like to check all http routes to my hapi rest api for a valid api key. I don't want to use an auth plugin as I will also have basic auth on some routes in addition to the api token check. I'm used to doing this as middleware in express, but what's the right way in hapi? Should I create my own plugin or instead use server.ext to accomplish this.. or should I do it yet another way? So far this is the way I've done it server.ext('onRequest', function (request, next) { //make sure its https if(request.headers['x-forwarded-proto'] &amp;&amp; request.headers['x-forwarded-proto'] === "http") { return next(Boom.badRequest('ssl is required')); } else { if (request.headers['x-api-key'] != apiToken) { return next(Boom.unauthorized('api key is incorrect')); } else { next(); } } });
has comment: http://stackoverflow.com/comment/39870752
has comment: http://stackoverflow.com/comment/39932056
has title: should I create a hapijs plugin or use server.ext to screen for an api-key in the header
answer count: 2
accepted answer: http://stackoverflow.com/a/25569472
downvote count: 0
has answer: http://stackoverflow.com/a/28632328
favorite count: 0
possible better answer: http://stackoverflow.com/a/28632328
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/39725650
score: 0
type: Comment
has text: on console it says document.GetElementByClass is not a function
type: AnswerComment
comment on: http://stackoverflow.com/a/25457996

javascript
tags question: http://stackoverflow.com/q/25512510
tags question: http://stackoverflow.com/q/25476939
tags question: http://stackoverflow.com/q/25469242
tags question: http://stackoverflow.com/q/25489612
tags question: http://stackoverflow.com/q/25532750
tags question: http://stackoverflow.com/q/25482880
tags question: http://stackoverflow.com/q/25438846
tags question: http://stackoverflow.com/q/25503060
tags question: http://stackoverflow.com/q/25446539
tags question: http://stackoverflow.com/q/25546282
tags question: http://stackoverflow.com/q/25502975
tags question: http://stackoverflow.com/q/25428561
tags question: http://stackoverflow.com/q/25494587
tags question: http://stackoverflow.com/q/25390392
tags question: http://stackoverflow.com/q/25459453
tags question: http://stackoverflow.com/q/25442387
tags question: http://stackoverflow.com/q/25431648
tags question: http://stackoverflow.com/q/25529640
tags question: http://stackoverflow.com/q/25432373
tags question: http://stackoverflow.com/q/25504325
tags question: http://stackoverflow.com/q/25400921
tags question: http://stackoverflow.com/q/25406754
tags question: http://stackoverflow.com/q/25442709
tags question: http://stackoverflow.com/q/25544780
tags question: http://stackoverflow.com/q/25407819
tags question: http://stackoverflow.com/q/25508288
tags question: http://stackoverflow.com/q/25511066
tags question: http://stackoverflow.com/q/25452497
tags question: http://stackoverflow.com/q/25514201
tags question: http://stackoverflow.com/q/25500316
tags question: http://stackoverflow.com/q/25511008
tags question: http://stackoverflow.com/q/25535335
tags question: http://stackoverflow.com/q/25521084
tags question: http://stackoverflow.com/q/25451014
tags question: http://stackoverflow.com/q/25472804
tags question: http://stackoverflow.com/q/25470048
tags question: http://stackoverflow.com/q/25459534
tags question: http://stackoverflow.com/q/25413937
tags question: http://stackoverflow.com/q/25458470
tags question: http://stackoverflow.com/q/25517323
tags question: http://stackoverflow.com/q/25411816
tags question: http://stackoverflow.com/q/25407529
tags question: http://stackoverflow.com/q/25418854
tags question: http://stackoverflow.com/q/25436274
tags question: http://stackoverflow.com/q/25393628
tags question: http://stackoverflow.com/q/25521443
tags question: http://stackoverflow.com/q/25466000
tags question: http://stackoverflow.com/q/25466257
tags question: http://stackoverflow.com/q/25505972
tags question: http://stackoverflow.com/q/25482884
tags question: http://stackoverflow.com/q/25476021
tags question: http://stackoverflow.com/q/25467478
tags question: http://stackoverflow.com/q/25441928
tags question: http://stackoverflow.com/q/25416681
tags question: http://stackoverflow.com/q/25544807
tags question: http://stackoverflow.com/q/25543382
tags question: http://stackoverflow.com/q/25420870
tags question: http://stackoverflow.com/q/25425592
tags question: http://stackoverflow.com/q/25520775
tags question: http://stackoverflow.com/q/25414226
tags question: http://stackoverflow.com/q/25516709
tags question: http://stackoverflow.com/q/25393927
tags question: http://stackoverflow.com/q/25437147
tags question: http://stackoverflow.com/q/25533303
tags question: http://stackoverflow.com/q/25408689
tags question: http://stackoverflow.com/q/25489931
tags question: http://stackoverflow.com/q/25412275
tags question: http://stackoverflow.com/q/25542280
tags question: http://stackoverflow.com/q/25498802
tags question: http://stackoverflow.com/q/25465943
tags question: http://stackoverflow.com/q/25458074
tags question: http://stackoverflow.com/q/25496178
tags question: http://stackoverflow.com/q/25526308
tags question: http://stackoverflow.com/q/25448556
tags question: http://stackoverflow.com/q/25456663
tags question: http://stackoverflow.com/q/25424011
tags question: http://stackoverflow.com/q/25453721
tags question: http://stackoverflow.com/q/25398395
tags question: http://stackoverflow.com/q/25456894
tags question: http://stackoverflow.com/q/25499935

http://stackoverflow.com/a/25483405
downvote count: 0
has body: Okk....it was my bad, the problem is when I submit empty form, the program crashes. For that, I need to put some check.
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25483078

http://stackoverflow.com/comment/39852921
score: 0
type: Comment
type: QuestionComment
has text: after $(this).addClass('selected'); if I add return false It works but it doesnt go to the page url which is in href.
comment on: http://stackoverflow.com/q/25526965

http://stackoverflow.com/comment/39670647
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25428561
type: QuestionComment
has text: @MelanciaUK, what's wrong with mixing Vanilla and jQuery?

http://stackoverflow.com/comment/39835280
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25498160
type: AnswerComment
has text: I like the way you think. +1 for finding a variant solution.

http://stackoverflow.com/comment/39844963
has text: @cookiemonster ya I get that in firefox it's not workig, but what is the reason, I don't know should I remove the OR part.
comment on: http://stackoverflow.com/a/25519255
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39618745
type: QuestionComment
comment on: http://stackoverflow.com/q/25400550
score: 0
has text: @HTTP - There's no error. But if I remove the array on the *HTML attributes* and in the *script*, comment would show up to all the data instead of just showing up on the current post.
type: Comment

http://stackoverflow.com/comment/39868388
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25524741
has text: This could have had an interesting answer if the questions would have been asked properly with some code. What I would do is to list all the video names (including their absolute paths) in a txt file. Then I would write a little php script that randomly returns one video out of the txt file into a `src` attribute of a ` ` tag for instance (with no javascript involved) PS. you are misunderstanding how `Math.random` works
score: 0

http://stackoverflow.com/q/25507910
type: Question
has comment: http://stackoverflow.com/comment/39818338
has answer: http://stackoverflow.com/a/25508057
tagged with: javascript
downvote count: 6
has comment: http://stackoverflow.com/comment/39819199
has comment: http://stackoverflow.com/comment/39818213
has comment: http://stackoverflow.com/comment/39818132
has comment: http://stackoverflow.com/comment/39818251
answer count: 1
score: -6
favorite count: 0
has comment: http://stackoverflow.com/comment/39818413
has body: I want to calculate 17% from 835 and after reduce from n the resulted number. But the resulted number is 693.5 and I want to show downwards to the nearest integer 693. The Math.floor should do that but I don't understand why the resulted number shown is 694. Thank you. function compute_active_users(n, b) { // Write your code here var s =b/100*n; var b =Math.floor(s); console.log(n-b); } compute_active_users(835,17);
has comment: http://stackoverflow.com/comment/39818286
has title: Method position error
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/25508057
tagged with: percentage

http://stackoverflow.com/q/25519889
has body: I use geojson from Cartodb to make a line on my map. How can I set some styling on this line? I'm not do familiar with javascript, so please bear with me. This is my code for the line including my wanted styling: var mystyle = { "color": "#fff", "weight": 10, "opacity": 0.4 }; var linelayer = L.mapbox.featureLayer() .loadURL('http://aftonbladet2.cartodb.com/api/v2/sql?format=GeoJSON&amp;q=SELECT ST_MakeLine(CDB_LatLng(latitude, longitude) ORDER BY created_date DESC) as the_geom FROM instagram') .addTo(map); Any help would be much much appreciated! Martin
downvote count: 0
tagged with: javascript
type: AnsweredQuestion
has title: Style geojson line in mapbox/leaflet
possible better answer: http://stackoverflow.com/a/34637924
favorite count: 0
has answer: http://stackoverflow.com/a/34637924
tagged with: mapbox
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/25520197
answer count: 2
tagged with: dictionary
tagged with: leaflet
tagged with: geojson
accepted answer: http://stackoverflow.com/a/25520197
score: 2

http://stackoverflow.com/a/25412976
type: Answer
answers question: http://stackoverflow.com/q/25409406
has body: Try: @business_process_history.map { |bp| [bp.period_day, bp.score] }
upvote count: 1
has comment: http://stackoverflow.com/comment/39684608
has comment: http://stackoverflow.com/comment/39685554
score: 1
downvote count: 0

http://stackoverflow.com/comment/39859977
comment on: http://stackoverflow.com/a/25530061
type: AnswerComment
has text: The author appears to begin with Lodash. It doesn't make much sense to return only one value when considering a non-sorted array. Hence my use of `filter`.
score: 0
type: Comment

http://stackoverflow.com/comment/39776340
score: 0
comment on: http://stackoverflow.com/q/25483587
type: Comment
has text: cool down, actually i am new in cordova and i just want to add text box into alert box/view as per image and i provide one link also, which is is smiler to my requirement. If you satisfy my these answer then go ahed.
type: QuestionComment

http://stackoverflow.com/q/25431943
possible better answer: http://stackoverflow.com/a/25432096
has title: checking for keyCode 13 in multiple text areas
score: -1
downvote count: 1
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have a page that has multiple forms depending on what group is being processed. All the forms are basically the same (I just inherited this project so I have not had a chance to try to convert to OOP) with a text area for additional notes. The issue is sometimes people are making lists separated by using return(enter). text area mark-up: Additional Note Using Javascript and JQuery, I am attempting to prevent that by means of an alert box to start: JS: $('#banote').keydown(function (e) { if (e.keyCode == 13) { $('#banote').css('border', '1px solid red'); alert("Do not use the return key in this field"); } }); As written it works, but i don't want to have to write a separate script for each text are id. there are 4 different fields like this one. I tried to use a class and then replace the $('#banote') with $(.addNote') and that did not work. How can I do this without repeating myself? Thanks for any assistance.
accepted answer: http://stackoverflow.com/a/25431994
favorite count: 0
tagged with: php
has answer: http://stackoverflow.com/a/25432096
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25431994

http://stackoverflow.com/comment/39650095
comment on: http://stackoverflow.com/q/25417483
type: Comment
type: QuestionComment
has text: add an async attrib to the pagead script tag. defer too.
score: 0

http://stackoverflow.com/a/25481621
has body: You can add .ease("linear") to get it to be smooth. Here is jsfiddle - http://jsfiddle.net/cuckovic/vnr1f9f8/3/
score: 3
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25480778
type: Answer
has comment: http://stackoverflow.com/comment/39770059

http://stackoverflow.com/comment/39865025
comment on: http://stackoverflow.com/q/25533668
score: 0
type: Comment
type: QuestionComment
has text: Try `console.log(0.99999999999999999)` and see for yourself.

http://stackoverflow.com/comment/39730406
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25457456
score: 0
has text: I don't really understand. what do you mean by "preserve contents of the spans" ? I Need to store this selection in a database then send it back to Javascript

http://stackoverflow.com/q/25441735
type: Question
tagged with: javascript
has body: i am trying to log a player into Facebook. I am using the Javascript SDK for logging a user in, and i copied the script directly from face books page: login page Facebook Login JavaScript Example <fb:login-button scope="public_profile,email" onlogin="checkLoginState();"> </fb:login-button> Try to post What i want, is that when i press that link i go to another page, that should do some server-side programming with Facebook. postace.php <?php require_once('vendor/autoload.php'); use Facebook\FacebookJavaScriptLoginHelper; use Facebook\FacebookSession; FacebookSession::setDefaultApplication('YOUR_APP_ID', 'YOUR_APP_SECRET'); $helper = new FacebookJavaScriptLoginHelper(); try { $session = $helper->getSession(); } catch(FacebookRequestException $ex) { // When Facebook returns an error echo "Error 1: " . $ex; } catch(\Exception $ex) { // When validation fails or other local issues echo "Error 2: " . $ex; } if ($session) { // Logged in echo "The user is logged in!!"; } else echo "not working"; ?> However, the above doesn't work. The $session variable is just null? I don't get this, since Facebook says that you should use that exact script (which i copied from them as well) to verify login if you used javascript, which i did? Any pointers on to what i did wrong? The login part on the javascript page works fine, and it says i am logged in. It is the server-side part on the other page that can't verify the user. Thanks in advance
score: 0
answer count: 1
tagged with: facebook-graph-api
type: UnansweredQuestion
tagged with: facebook
has answer: http://stackoverflow.com/a/25443400
tagged with: php
has title: PHP - Facebook API ask for permission

http://stackoverflow.com/comment/39729574
has text: Your server is sending JSON, not JSONP. JSONP looks like `callbackname({"branchName":"war140820rc1",...});`
comment on: http://stackoverflow.com/q/25460265
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39649165
comment on: http://stackoverflow.com/a/25416670
score: 0
type: AnswerComment
type: Comment
has text: Thanks for the effort, but like I said. The code is fine. otab is also initialized at the beginning. I tested this code snipped and it worked like it should. It is the combination of packing a .load function into another .load function(the page loader) that is causing problems.

http://stackoverflow.com/a/25432892
accepted answer of: http://stackoverflow.com/q/25430222
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Assume you are performing form validation.? Look at setting allowBlank: false and forceSelection:true
downvote count: 0
answers question: http://stackoverflow.com/q/25430222
has comment: http://stackoverflow.com/comment/39679293
score: 1

http://stackoverflow.com/comment/39804593
score: 0
comment on: http://stackoverflow.com/q/25500817
type: QuestionComment
type: Comment
has text: Do you need the complete JavaScript or JQuery code?

http://stackoverflow.com/a/25488193
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25487147
answers question: http://stackoverflow.com/q/25487147
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: First, your fiddle is broken. One, you link quicksand 1.3 and pair it with a recent jquery version it doesn't support. Two, you call out the easeInOutQuad without linking the jquery.easing.1.3.js. Three, you have scope issues, the filterData function is not defined globally. Your real problem, though, is this line in the documentation: attribute – attribute containing unique value able to identify same item within source and destination collection, default: 'data-id' None of your "stage" data lis have this attribute so it won't filter them properly. Add it and all seems to work: Item A-1 Item A-2 Item B-1 Item B-2 Updated fiddle.

http://stackoverflow.com/comment/39636828
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25409785
has text: @user1824508 If you use a `button`, you don't need a `form`. Otherwise, I believe you do... (?)
score: 1

http://stackoverflow.com/comment/39767436
score: 0
type: QuestionComment
has text: What does stringToDate function do? You are passing a Date value into getDifDate and then it looks like you are trying to convert it from string to date with d = stringToDate(d); which you don't need to do
type: Comment
comment on: http://stackoverflow.com/q/25480596

http://stackoverflow.com/comment/39611697
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25396846
has text: I wouldn't recommend doing it this way because it will update any attribute values with `*` in it

http://stackoverflow.com/comment/39747489
has text: I have added to clearValidation this: form.$setValidity("fromAddress",true); and it still not working
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25469743
type: AnswerComment

http://stackoverflow.com/a/25510849
downvote count: 0
answers question: http://stackoverflow.com/q/25502975
has comment: http://stackoverflow.com/comment/39828442
upvote count: 2
type: Answer
score: 2
has body: You cannot spy on jQuery because it is defined in your browser, not in your protractor test. Your protractor test is a node process that runs outside of the browser. It uses the webdriver protocol to communicate with the browser. I would recommend you to write a unit test in karma for this scenario.
has comment: http://stackoverflow.com/comment/39826263

http://stackoverflow.com/comment/39846450
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25523379
score: 0
has text: Thanks, but doesn't the above happen when the page has already loaded ? Unfortunately I need the meta tag to be added before the page loads - if it is possible at all.

http://stackoverflow.com/q/25492179
favorite count: 0
answer count: 1
downvote count: 1
upvote count: 22
tagged with: cryptojs
tagged with: aes
has body: I am trying to create a simple webpage with the goal to send and encrypted message to the server (which will create a file with that content), then a link is created and the user who receive the link provided will be able to see the encrypted value (since it provides the name of the file and the key). The message is encrypted using CryptoJS AES, and the result is Base64 encoded to be decoded after that, only the Base64 of the encrypted message and the encrypted message is sent to the server nothing else, and this is done using Javascript. My question here is. I have a message, let say "Hello World" which I encode using Base64, and it gives me this : 1ffffffff5a8ae57 If I send this value to a variable, and then just use that variable, it show a result : // Works ! var test = CryptoJS.enc.Base64.parse("Hello World"); alert(CryptoJS.enc.Base64.stringify(test)); Which is normal. But If I try to write directly the text (or just do a toString(), it doesn't work... which is also normal because the 'test' variable isn't a simple String variable) : // Doesn't work ! var test = CryptoJS.enc.Base64.parse("Hello World").toString(); alert(CryptoJS.enc.Base64.stringify(test)); But I need to use a String since it is based on a PHP $_GET Value which is then decoded using Javascript again. So my question is, how can I do this in order to encode a String and then decoded the result as a String ? This is my engine.js file : // Encrypt the message using a generated key function encrypt(message, key) { return CryptoJS.AES.encrypt(message, key); } // Encode String to Base64 function encodeBase64(value) { return CryptoJS.enc.Base64.parse(value.toString()); } // Decode String from Base64 Enconding function decodeBase64(encodedValue) { return CryptoJS.enc.Base64.stringify(encodedValue); } // Decrypt the message using the generated key function decrypt(encrypted, key) { return CryptoJS.AES.decrypt(encrypted, key).toString(CryptoJS.enc.Utf8); } // Generate the random key function generateKey(…
type: UnansweredQuestion
has title: Decode a Base64 String using CryptoJS
tagged with: php
score: 21
type: Question
has answer: http://stackoverflow.com/a/27707005
tagged with: javascript
tagged with: base64

http://stackoverflow.com/q/25479739
has body: var oModel = new sap.ui.model.odata.ODataModel(url, true, username, password); oModel.read('/', null, null, true, function(oData, oResponse) { var dataget = JSON.stringify(oData); var count = oData.results[0].Ort01; var Name1 = oData.results[0].Name1; var Kunnr = oData.results[0].Kunnr; alert(count + " " +Name1 + " " +Kunnr); }); here as you see I can get the variables inside parenthesis({ }); How to get the same variable objects outside the parenthesis something like this.. var oModel = new sap.ui.model.odata.ODataModel(url, true, username, password); oModel.read('/', null, null, true, function(oData, oResponse) { }); var dataget = JSON.stringify(oData); var count = oData.results[0].Ort01; var Name1 = oData.results[0].Name1; var Kunnr = oData.results[0].Kunnr; alert(count + " " +Name1 + " " +Kunnr); Can someone help me. Thank You
has answer: http://stackoverflow.com/a/25479838
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25486738
has answer: http://stackoverflow.com/a/25480000
upvote count: 1
has comment: http://stackoverflow.com/comment/39800586
has comment: http://stackoverflow.com/comment/39765781
has comment: http://stackoverflow.com/comment/39765743
score: 1
tagged with: sapui5
has comment: http://stackoverflow.com/comment/39765806
type: Question
has comment: http://stackoverflow.com/comment/39767755
has comment: http://stackoverflow.com/comment/39765687
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39765766
has title: How to get variables object out of bracket, or is there any way to globally declare variables
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/29212710

http://stackoverflow.com/comment/39718628
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25454516
score: 3
has text: Why did you comment out a line `//>`? Also, what's `elem`?

http://stackoverflow.com/q/25390210
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25391477
has body: I'm creating a new object orientation system and I need to access the variables of the parent of the macro. I have the following: macro module { rule { $i:ident { $e ... } } =&gt; { var $i = { $e ... } } } macro fn { rule { $i:ident { $e ... } } =&gt; { $e ... } } module x { fn name { } } I want be able to, in fn macro, have available the module name, in this case, x, because maybe I want to do something like $parentModule.prototype.myFunc. But if I do $e$e it doesn't works properly. Is it possible?
has title: access parents variable in Sweet.js
type: Question
tagged with: sweet.js
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25391477
score: 0
answer count: 1

http://stackoverflow.com/comment/39847710
score: 0
type: AnswerComment
type: Comment
has text: Thanks for your answer, actually this is the site i'm working on http://www.mtgmusic.no/ It is still not working on my end because there is a div below the name, in this site, the names are rayleeofficial , erikogkriss ,etc..so when I use your code, it does not delete the entire div. Any ideas please? :)
comment on: http://stackoverflow.com/a/25522821

http://stackoverflow.com/q/25432437
has comment: http://stackoverflow.com/comment/39677526
has comment: http://stackoverflow.com/comment/39677523
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39677522
has comment: http://stackoverflow.com/comment/39677590
score: 0
answer count: 2
has title: Arrays in function parameters?
has answer: http://stackoverflow.com/a/25432591
has answer: http://stackoverflow.com/a/25432495
type: UnansweredQuestion
has body: Is it possible to do the following (or an equivalent): function a(foo, bar[x]){ //do stuff here } Thanks in advance.

http://stackoverflow.com/a/25571039
score: 1
accepted answer of: http://stackoverflow.com/q/25549866
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39941113
has body: Developers might have might have binded an event with first drop down. I mean, after selecting option from first drop down on onblur event they might generate the dependency values in second drop down. So what you need to do is you need to fire an event on first drop down after choosing the option.
upvote count: 1
answers question: http://stackoverflow.com/q/25549866

http://stackoverflow.com/q/25506223
has title: Printing a PDF in an iframe using JavaScript in Firefox
tagged with: http://stackoverflow.com/tag/pdf
linked to: http://stackoverflow.com/q/6167995
answer count: 1
has comment: http://stackoverflow.com/comment/39815075
has comment: http://stackoverflow.com/comment/39814893
has answer: http://stackoverflow.com/a/28658127
favorite count: 0
linked to: http://stackoverflow.com/q/16239513
type: AnsweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/39818311
has comment: http://stackoverflow.com/comment/39815600
accepted answer: http://stackoverflow.com/a/28658127
has comment: http://stackoverflow.com/comment/39818228
type: Question
has body: I was wondering if it is possible to print the data of an object tag in html? For example I have an object like this: &lt;object id="myObject" data="myPDF.pdf"&gt;&lt;/object&gt; I have a PDF embedded in the object tag. I need to be able to print the PDF using a JavaScript function in Firefox. Placing the PDF in an iframe and printing does not work as Firefox will not let you access the frame's contents. Neither does using: myObject.contentWindow.print(); or document.getElementById("myObject").print(); Does anyone have any other suggestions? I am trying to figure out a way of printing just the data of the object (i.e. the PDF file) but have not found a solution so far. Using an iframe works for chrome and using an embed tag works for Internet Explorer, but I cannot find anything that will work in Firefox. Any help is much appreciated, thanks.
has comment: http://stackoverflow.com/comment/39815378
score: 5
has comment: http://stackoverflow.com/comment/39814772
upvote count: 5
tagged with: firefox
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39814989
has comment: http://stackoverflow.com/comment/39828775
tagged with: printing

http://stackoverflow.com/comment/39868385
comment on: http://stackoverflow.com/a/25534874
score: 0
type: AnswerComment
has text: You probably need to choose what you want. That example has the whole path and moves the marker along it in small increments. You have "real" data, I assume you want to show the current position. If you want you can write code to move each marker some fraction of the distance to its new position at a faster rate; but if you have lots of markers that is going to take a lot more processing power.
type: Comment

http://stackoverflow.com/q/25436368
tagged with: geojson
has answer: http://stackoverflow.com/a/25442873
type: AnsweredQuestion
tagged with: leaflet
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 1
upvote count: 13
tagged with: javascript
has title: leaflet - Looking for method of adding onEachFeature to existing geojson layer
has body: I'm working with geojson data in leaflet. In their guide at http://leafletjs.com/examples/geojson.html they write that there are two ways of adding geojson data to the map: "GeoJSON objects are added to the map through a GeoJSON layer. To create it and add it to a map, we can use the following code:" L.geoJson(geojsonFeature).addTo(map); "Alternatively, we could create an empty GeoJSON layer and assign it to a variable so that we can add more features to it later." var myLayer = L.geoJson().addTo(map); myLayer.addData(geojsonFeature); I am currently using the last method (I'm creating an empty layer and adds data to that). What I am doing right now is that I'm trying to add an onEachFeature function. Though I'm not getting it to work when using the myLayer.addData way of doing it. In my code I'm using this.geoJson.addData(geoJson, { onEachFeature: onEachFeature });. Where geoJson is the actual geoJson string and "this.geoJson" is the empty geoJson layer that's been created and added to the map. Though this is not working. But if I create a new geoJson layer at the same time I'm entering the geoJson data it all works: L.geoJson(geoJson, { onEachFeature: onEachFeature }).addTo(this.map); So what I'm mainly wondering is how I should do to make the onEachFeature function work when adding the data with the layer.addData function?
accepted answer: http://stackoverflow.com/a/25442873
favorite count: 0
downvote count: 0
score: 13

http://stackoverflow.com/a/25413691
type: Answer
has body: if the data shows in the request body of chrome dev console (or what ever dev console) then your error is server side. if using php you can catch the request body with this command. &lt;?php $request_body = file_get_contents('php://input'); ?&gt; if using another language i can not help you. i had a issue creating polymer form and sending the data to a db for storage. here is that post maybe it will help you. polymer form using paper-input and core-ajax
has comment: http://stackoverflow.com/comment/39648481
score: 0
answers question: http://stackoverflow.com/q/25395422

http://stackoverflow.com/a/25457883
answers question: http://stackoverflow.com/q/25457432
type: AcceptedAnswer
score: 0
has body: Call me lazy, but if you don't mind span being you selection marker tag, you can use rangy's cssApplier class. var cssApplier; $(document).ready(function() { rangy.init(); cssApplier = rangy.createCssClassApplier( "selectedText", {normalize: true, applyToEditableOnly:true}); }); $("#highlight").click(function(){ if(cssApplier != undefined) { cssApplier.toggleSelection(); } }); I use applyToEditableOnly here to make it only work in that specific div. (I'm not sure how cross-browser compatible that particular setting is. Worked in Chrome and Firefox though.) This uses position rather than selection text to decide what to mark. JS Fiddle Here: http://jsfiddle.net/zq1dqu3o/7/
type: Answer
accepted answer of: http://stackoverflow.com/q/25457432

http://stackoverflow.com/comment/39892715
type: Comment
has text: So $scope must be injected for all cases where we need that?
comment on: http://stackoverflow.com/a/25548347
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39613165
type: Comment
score: 1
has text: They bubble up the scope tree. The actual line in Angular's source is: `currentScope.$emit('$includeContentLoaded');`. And we know `$emit()` sends events UP the scope chain (`$broadcast()` sends them from the target scope DOWN). The "target scope" (the original scope the event was emitted/broadcast on) is accessible by accessing the `targetScope` property of the `$event` object that gets passed as the first argument to scope event handler functions.
type: AnswerComment
comment on: http://stackoverflow.com/a/25397414

http://stackoverflow.com/a/25494616
downvote count: 0
has comment: http://stackoverflow.com/comment/39816763
has comment: http://stackoverflow.com/comment/39794467
has comment: http://stackoverflow.com/comment/39794555
type: Answer
has comment: http://stackoverflow.com/comment/39794216
score: 1
has comment: http://stackoverflow.com/comment/39794444
has body: You can use setInterval to continuously update the countdown: setInterval(function(){ // update countdown }, 1000 * 60); // for every hour setInterval will cause the function you pass in to run continuously every hour (in this case).
has comment: http://stackoverflow.com/comment/39828855
upvote count: 1
answers question: http://stackoverflow.com/q/25494385

http://stackoverflow.com/q/25515654
has comment: http://stackoverflow.com/comment/39833851
type: Question
has comment: http://stackoverflow.com/comment/39833234
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39950502
has comment: http://stackoverflow.com/comment/39959662
tagged with: parse-platform
has body: I'm currently running into an issue creating or updating a large amount of users (200+) at once. Here's the issues of found so far: Existing solution - Keeping users as Users, I must fetch all users with my list of email addresses, saveAll() changes to users with the existing email addresses and then signUp() users who do not exist. The problem here is running into the request limit. Problematic solution - I believe I could use a saveAll() method if the users were not Users, but then I lose the ability to store passwords and use the signIn() method associated with it Problematic solution - User a background job: I haven't tried this but, "Jobs that are initiated after the maximum concurrent limit has been reached will be terminated immediately" scares me a bit as well. The reason I need this is because I need a company to be able to upload their users for use in our application. The users have information stored about them and can log in to check the information, so I would really like being able to use the User class. Another option would be to pay to up the request limit, but if we jump to creating/updating 2000+ users, we'll be right back to the same scenario...
type: UnansweredQuestion
answer count: 0
has title: Parse.com create or update many users

http://stackoverflow.com/a/25539310
has comment: http://stackoverflow.com/comment/39876658
has comment: http://stackoverflow.com/comment/39876537
has comment: http://stackoverflow.com/comment/39875822
answers question: http://stackoverflow.com/q/25539213
has comment: http://stackoverflow.com/comment/39876576
has comment: http://stackoverflow.com/comment/39876081
has comment: http://stackoverflow.com/comment/39876051
has comment: http://stackoverflow.com/comment/39875816
score: 0
upvote count: 1
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/39875787
has body: First off, separate the PHP processing. Now after getting the location using the callback then perform the AJAX. Sample Code: samepage3.php &lt;script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0.min.js"&gt;&lt;/script&gt; &lt;script&gt; function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } } function showPosition(position) { $("#getlat").val(position.coords.latitude); $("#getlon").val(position.coords.longitude); $.ajax({ url: 'request.php', type: 'POST', dataType: 'JSON', data:{ getlat: $("#getlat").val(), getlon: $("#getlon").val() }, success: function(response) { console.log(response); } }); } $(document).ready(function() { getLocation(); }); &lt;/script&gt; &lt;body&gt; &lt;input type="text" id="getlat" name="getlat" /&gt; &lt;input type="text" id="getlon" name="getlon" /&gt; request.php &lt;?php if($_SERVER['REQUEST_METHOD'] == 'POST') { $lat = $_POST["getlat"]; $lon = $_POST["getlon"]; echo json_encode(array('lat' =&gt; $lat, 'lon' =&gt; $lon)); exit; } ?&gt;
has comment: http://stackoverflow.com/comment/39875857

http://stackoverflow.com/q/25500466
has comment: http://stackoverflow.com/comment/39803995
accepted answer: http://stackoverflow.com/a/25500753
possible better answer: http://stackoverflow.com/a/25500810
has comment: http://stackoverflow.com/comment/39804024
has title: Asynchrous callback?
has answer: http://stackoverflow.com/a/25500810
has comment: http://stackoverflow.com/comment/39804027
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39804079
has comment: http://stackoverflow.com/comment/39804111
has body: How do I write my own asynchronous callback? Like in var a = function(str,callback) { setTimeout(function() { console.log('This should be first: ' + str + '.') },1000); callback(); } a('hello', function() { console.log('This should be second.'); } A link to a source is enough. I was here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise http://www.html5rocks.com/en/tutorials/es6/promises/ http://s3.amazonaws.com/es6-promises/promise-1.0.0.js http://code.jquery.com/jquery-1.11.1.js http://www.impressivewebs.com/callback-functions-javascript/ JSFIDDLE
has answer: http://stackoverflow.com/a/25500753
has comment: http://stackoverflow.com/comment/39804010
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39803980
favorite count: 0
has comment: http://stackoverflow.com/comment/39803905
has comment: http://stackoverflow.com/comment/39804058
has comment: http://stackoverflow.com/comment/39804133
type: Question
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/39804329
has comment: http://stackoverflow.com/comment/39804308
score: -2

http://stackoverflow.com/q/25436575
linked to: http://stackoverflow.com/q/25430855
has comment: http://stackoverflow.com/comment/39685416
has comment: http://stackoverflow.com/comment/39690871
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39707459
has body: I am attempting to develop a conversion website that takes a numeric value: 1,200.12 or 1.200,12 or 1200.12 or 1200,12 and have them all interpreted as 1200.12 by parseFloat. I would also like decimals to be able to be interpreted. 0.123 or 0,123 as 0.123 through a textarea and then parseFloat the number in order to perform calculations. These are the results I am getting: textarea input = 12,000.12 value after parseFloat = 12 Does parseFloat not recognize the formatting of the numbers? i get the same results with: textarea input: 12.000,12 value after parseFloat = 12 How do I solve this problem? It would seem I need to strip out the commas since parseFloat doesn't read beyond them and with european notation strip the decimals and change the comma to a decimal for parseFloat to read the input correctly. Any ideas on how to solve this? My guess is I would need to identify the string input as either european or american decimal notation and then perform the required actions to prepare the string for parseFloat. How would I go about achieving that? All contributions are appreciated. Using HTML5 and Javascript. This is my first website so please go easy on me. Best, RP To all contributors...Thank you! So far all the input has been sweet. I don't think we are going to be able to use a single replace statement to correctly strip both european and american notation so I think I should use REGEX somehow to determine the notation and then split into an if else statement to perform separate replace functions on each individual notation. var input, trim; input = "1.234,56" //string from textarea on page if(/REGEX that determines American Notation/.test(input){ trim = input.replace(/\,/,"");//removes commas and leaves decimal point); } else(/REGEX that determine European Notation/.test(input)/){ //would qualify input here rep = input.replace(/\./,"");//removes all decimal points); trim = rep.replace(/\,/,"."//changes the remaining comma to a decimal); } //now either notation sh…
possible better answer: http://stackoverflow.com/a/25436611
has answer: http://stackoverflow.com/a/25436848
has comment: http://stackoverflow.com/comment/39685695
accepted answer: http://stackoverflow.com/a/25436848
type: Question
tagged with: decimal
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39685686
has title: Why does my textarea (HTML) value show 12,000,000.11 but after parseFloat the value is only 12?
tagged with: number-formatting
favorite count: 0
has comment: http://stackoverflow.com/comment/39686063
answer count: 3
has answer: http://stackoverflow.com/a/25436638
has comment: http://stackoverflow.com/comment/39685572
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25436611
tagged with: parsefloat
has comment: http://stackoverflow.com/comment/39685801
downvote count: 0

http://stackoverflow.com/comment/39761184
type: Comment
comment on: http://stackoverflow.com/q/25473194
has text: @SLaks do you know a way you can make jsfiddle to show only the output window and hide all other 3 coding windows? (html, js, css) I have a requirement : only the final output window. By right it should be a web page. Since creating a web page, hosting, isn't an option at the moment I am looking for alternatives to share the jquery based animation.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39666654
type: Comment
has text: For the video you will just be using the file name as a string, since videos are not images, you can't say `var img4 = new Image()`. And note we will need to switch to the ` ` element. There is quite a bit complexity in this. I recommend asking this as a separate question. Due to how SO is organized; it's usually a bad idea to ask multiple question in a single post.
type: AnswerComment
comment on: http://stackoverflow.com/a/25413040
score: 0

http://stackoverflow.com/comment/39819484
score: 0
type: AnswerComment
type: Comment
has text: Please don't use `db.eval()`. Server-side javascript has lots of problems, including slowness, security vulnerability, and incompatibility with sharded collections. See more [in the docs](http://docs.mongodb.org/manual/reference/method/db.eval/).
comment on: http://stackoverflow.com/a/25428515

http://stackoverflow.com/q/25456269
has title: ng-show won't work in h2 tags, but works later in html code
has comment: http://stackoverflow.com/comment/39743064
has comment: http://stackoverflow.com/comment/39722092
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39722104
has answer: http://stackoverflow.com/a/25456356
type: Question
score: 0
answer count: 1
tagged with: javascript
has body: I am using angular with html5. I have the following code near the top of my page: Carry On!! Account deactivated. To reactivate, please click Here. It's part of a greeting. I basically want to check if the status of the user is active. If it is, then certain things on the page appear. If the status is deactivated, on hold, etc., then I want to tell them they need to reactivate their account to continue going. There's also a lot of account info on the page that I use ng-show/hide for that works perfectly. In sublime, I just selected all the open space where I wanted to type and typed them all up the same way so I don't think there's a problem with syntax. For folks who still want to see what ngShow/Hide I use later, here it is:
has comment: http://stackoverflow.com/comment/39727035
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25404989
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/39632248
tagged with: javascript
has body: would like to show time on my site with seconds counting, like this one. I know there is a lot of similar questions, but I was not able to find out a solution that would work for me. Problem is, all those javascript clock that handle timezone are done by offset. I am however using django timezones: "UTC", "Asia/Harbin", ... Javascript on default creates new date from local time, but I allow user to change his/hers timezone. How do I pass this changed timezone to javascript? I tried moment-timezone, but it somehow ignores .tz(). &lt;script&gt; function startTime() { document.getElementById('time').innerHTML = moment().tz("{{ TIME_ZONE }}").format('HH:mm:ss'); var t = setTimeout(function(){startTime()},500); } &lt;/script&gt; This way time is running, but changing timezone has no impact on time. How do I do this properly?
has title: javascript clock with timezone
has answer: http://stackoverflow.com/a/25408182
accepted answer: http://stackoverflow.com/a/25408182
favorite count: 0
tagged with: timezone
tagged with: momentjs

http://stackoverflow.com/q/25516768
upvote count: 0
has body: I'm trying to do something kind of like Google's embeddable pdf viewer except I want to be able to embed a website and be able to view that on my website. Specifically because I have many different teachers and they all use something called Planbook for their assignments, so I want to be able to view all of them at once. Also, I think it would help some other students. So, does anyone know of a way to do this?
accepted answer: http://stackoverflow.com/a/25516783
type: Question
has comment: http://stackoverflow.com/comment/39835114
has comment: http://stackoverflow.com/comment/39835098
tagged with: javascript
has answer: http://stackoverflow.com/a/25516783
has comment: http://stackoverflow.com/comment/39835537
has title: Embeddable Website Viewer
downvote count: 3
answer count: 1
favorite count: 0
score: -3
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/25493472
upvote count: 1
answer count: 1
has title: Rendering HTML data attributes on highcharts series
tagged with: javascript
type: AnsweredQuestion
tagged with: highcharts
downvote count: 0
score: 1
favorite count: 0
has body: Is there any way to render the series data (at least the point data) as HTML data attributes on the series object? E.g. &lt;g class="highcharts-markers highcharts-tracker" visibility="visible" zIndex="0.1" transform="translate(73,71) scale(1 1)" clip-path="none" style=""&gt; &lt;path fill="#f7a35c" d="M 860 178.07 L 864 186.07 856 186.07 Z" /&gt; &lt;path fill="#f7a35c" d="M 785 165.065 L 789 173.065 781 173.065 Z" /&gt; &lt;path fill="#f7a35c" d="M 710 138.3325 L 714 146.3325 706 146.3325 Z" /&gt; &lt;path fill="#f7a35c" d="M 636 110.155 L 640 118.155 632 118.155 Z" /&gt; &lt;path fill="#f7a35c" d="M 561 92.815 L 565 100.815 557 100.815 Z" /&gt; &lt;path fill="#f7a35c" d="M 486 89.92500000000001 L 490 97.92500000000001 482 97.92500000000001 Z" /&gt; &lt;path fill="#f7a35c" d="M 411 102.93 L 415 110.93 407 110.93 Z" /&gt; &lt;path fill="#f7a35c" d="M 336 126.77250000000001 L 340 134.7725 332 134.7725 Z" /&gt; &lt;path fill="#f7a35c" d="M 261 151.3375 L 265 159.3375 257 159.3375 Z" stroke-width="1" /&gt; &lt;path fill="#f7a35c" d="M 187 171.5675 L 191 179.5675 183 179.5675 Z" stroke-width="1" /&gt; &lt;path fill="#f7a35c" d="M 112 182.40500000000003 L 116 190.40500000000003 108 190.40500000000003 Z" /&gt; &lt;path fill="#f7a35c" d="M 37 184.5725 L 41 192.5725 33 192.5725 Z" /&gt; &lt;/g&gt; to: &lt;path fill="#f7a35c" d="M 860 178.07 L 864 186.07 856 186.07 Z" data-x=34 data-y=48 /&gt; where data-x and data-y are the points hypothetical values?
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25493683
accepted answer: http://stackoverflow.com/a/25493683

http://stackoverflow.com/a/25508916
has comment: http://stackoverflow.com/comment/39820656
type: Answer
accepted answer of: http://stackoverflow.com/q/25508721
has comment: http://stackoverflow.com/comment/39834511
score: 2
has comment: http://stackoverflow.com/comment/39820957
upvote count: 2
has comment: http://stackoverflow.com/comment/39833027
has comment: http://stackoverflow.com/comment/39821460
has comment: http://stackoverflow.com/comment/39821165
has comment: http://stackoverflow.com/comment/39834091
has comment: http://stackoverflow.com/comment/39852327
has comment: http://stackoverflow.com/comment/39820352
has body: First of all, next time you'd want to use developer tools (F12) and go to the console tab to see the errors. Now as to your specific problem, you can't run inline code in Chrome extensions. This will not work: Go to Profile! You need to write an external .js file and put all the event bindings of your buttons in there. So by the end of the process your .js file will be: function myClickFunction() { //click logic goes here } document.getElementById('myButton').addEventListener("click", myClickFunction); and your .html will look like this: Go to Profile!
answers question: http://stackoverflow.com/q/25508721
has comment: http://stackoverflow.com/comment/39820289
has comment: http://stackoverflow.com/comment/39822019
has comment: http://stackoverflow.com/comment/39822680
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39836562

http://stackoverflow.com/q/25532835
downvote count: 4
has title: Convert string to date in (Javascript)
has comment: http://stackoverflow.com/comment/39863911
answer count: 1
tagged with: javascript
favorite count: 0
has body: I want to convert string to date format yyyy/mm/dd string test="August 27 2014"; I want to convert to 2014/08/27
has comment: http://stackoverflow.com/comment/39866338
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25533004
score: -3
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39863808
has comment: http://stackoverflow.com/comment/39863660
has comment: http://stackoverflow.com/comment/39866636
accepted answer: http://stackoverflow.com/a/25533004

http://stackoverflow.com/comment/39846022
has text: the elements definitely exist. I also ran your code in case. How exactly do you suggest I use val?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25522800

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/25478791
tags question: http://stackoverflow.com/q/25405998
tags question: http://stackoverflow.com/q/25455784
type: Tag
tags question: http://stackoverflow.com/q/25483919

http://stackoverflow.com/a/25415839
has body: You aren't calling callback inside the iterator function. Take a look at the docs for eachLimit.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25415618
score: 0
accepted answer of: http://stackoverflow.com/q/25415618
type: Answer

http://stackoverflow.com/q/25389809
has answer: http://stackoverflow.com/a/25390876
favorite count: 0
tagged with: jquery-data
has body: Bottom Line: I'm having trouble retrieving the value of multiple data-attributes and inserting them as the text of a child element. Details: I've got a table with each tr "bucket" containing a particular number of three kinds of shapes (spheres, cubes, pyramids), which are stored in data-attributes. I've got a ul with corresponding lis for each shape. When a shape is checked, trs with more than 0 of that shape are highlighted. HOWEVER, I'm also trying to retrieve the number for each selected shape and display it in the td.contents element for each tr (i.e. "pyramids: 300, cubes: 50"), which is what I have been unsuccessful with. Here's the HTML - spheres cubes pyramids bucket 1 no shapes selected bucket 2 no shapes selected bucket 3 no shapes selected bucket 4 no shapes selected And JS (line 22 is where I'm having trouble) - (function() { //store tr elements var buckets = $('tr'); $('li').click(function () { //toggle checked class OK $(this).toggleClass('checked'); //reset classes and .contents text OK $(buckets).removeClass('active'); $('td.contents').text('no shapes selected'); //map the shape data attribute for all li elements //with class '.checked' OK var checkedShapes = $('.checked').map(function() { return $(this).data('shape'); }); //for each checked shape, filter tr elements with //more than 0 of that shape OK $.each(checkedShapes, function( index, value ) { var filteredBuckets = $(buckets).filter(function() { return $(this).data(value) > "0"; }); //add .active class to those tr elements OK $(filteredBuckets).addClass('active'); //get number of checked shapes (i.e. "pyramids: 300, cubes: 50") //and display in td.contents DOESN'T WORK $('tr.active td.contents').text($(this).parent('tr').data(value)); }); }); })(); And a jsFiddle: http://jsfiddle.net/a8gtrn63/33/ From what I understand in the docs for .data(), this should be retrieving the selected data attributes, but it isn't. I think there may be an issue with the value reference, but I'm having trouble se…
type: AnsweredQuestion
tagged with: custom-data-attribute
has comment: http://stackoverflow.com/comment/39599709
upvote count: 3
has answer: http://stackoverflow.com/a/25390679
type: Question
has title: Retrieving multiple data-attributes and setting as text of a child element
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39599598
answer count: 2
possible better answer: http://stackoverflow.com/a/25390876
score: 3
downvote count: 0
accepted answer: http://stackoverflow.com/a/25390679

http://stackoverflow.com/q/25436942
has title: Error code convention?
has answer: http://stackoverflow.com/a/25437012
type: Question
answer count: 2
tagged with: javascript
score: 0
type: UnansweredQuestion
has body: At the place where I used to work, our PHP developer set up a list with custom error numbers. We communicated over a REST interface (pure json). Example could be (random): 100 User not authenticated; 200 Date not defined; 210 Parent code not defined; 300 Database transaction failed; Etcetera, well you know; a long list. The purpose was that I interpreted these errors at the client, and took care of the necessary front-end actions accordingly. For a personal project, I would like to do the same, but I wonder if there are some conventions related to error codes.
tagged with: error-handling
tagged with: php
has answer: http://stackoverflow.com/a/25437283

http://stackoverflow.com/comment/39852882
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25526985
type: QuestionComment
has text: result should be display below the submit button

http://stackoverflow.com/comment/39757901
type: QuestionComment
type: Comment
score: 1
has text: Any code/html that you feel like sharing? Without those it'll be tricky for anyone to help you.
comment on: http://stackoverflow.com/q/25475704

http://stackoverflow.com/comment/39833089
type: QuestionComment
comment on: http://stackoverflow.com/q/25512510
type: Comment
has text: @Placplacboom, well that's the thing, different devices will have different pixel densities and sizes. It's quite difficult to account for those variations. Even Photoshop, has trouble doing this with it's "Print Size" button. (Print graphics are usually 300 DPI, whilst monitors are traditionally around 72 PPI.) So, from what I can tell Photoshop simply scales the preview to 1/4th of its original resolution which gives a better on-screen approximation of the actual print size of the document. You could try doing something along those lines, but expect artifacts and blurry text.
score: 1

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/25421633
tags question: http://stackoverflow.com/q/25547198
tags question: http://stackoverflow.com/q/25481036
tags question: http://stackoverflow.com/q/25410332
tags question: http://stackoverflow.com/q/25461885
tags question: http://stackoverflow.com/q/25418048
tags question: http://stackoverflow.com/q/25404544
tags question: http://stackoverflow.com/q/25522850
tags question: http://stackoverflow.com/q/25523817
tags question: http://stackoverflow.com/q/25476525
tags question: http://stackoverflow.com/q/25548303
tags question: http://stackoverflow.com/q/25448008
tags question: http://stackoverflow.com/q/25487566
tags question: http://stackoverflow.com/q/25395559
tags question: http://stackoverflow.com/q/25421107
tags question: http://stackoverflow.com/q/25526344
tags question: http://stackoverflow.com/q/25417093
tags question: http://stackoverflow.com/q/25491111
tags question: http://stackoverflow.com/q/25540260
tags question: http://stackoverflow.com/q/25427612
tags question: http://stackoverflow.com/q/25437372
tags question: http://stackoverflow.com/q/25467009
tags question: http://stackoverflow.com/q/25422001
tags question: http://stackoverflow.com/q/25467514
tags question: http://stackoverflow.com/q/25492036
tags question: http://stackoverflow.com/q/25400212
tags question: http://stackoverflow.com/q/25442295
tags question: http://stackoverflow.com/q/25410666
tags question: http://stackoverflow.com/q/25477330
tags question: http://stackoverflow.com/q/25503140
tags question: http://stackoverflow.com/q/25542793
tags question: http://stackoverflow.com/q/25539614
tags question: http://stackoverflow.com/q/25436770
tags question: http://stackoverflow.com/q/25444646
tags question: http://stackoverflow.com/q/25511975
tags question: http://stackoverflow.com/q/25455884
tags question: http://stackoverflow.com/q/25467462
tags question: http://stackoverflow.com/q/25426158
tags question: http://stackoverflow.com/q/25505930
tags question: http://stackoverflow.com/q/25479699
tags question: http://stackoverflow.com/q/25472425
tags question: http://stackoverflow.com/q/25528526
tags question: http://stackoverflow.com/q/25504309
tags question: http://stackoverflow.com/q/25498471
tags question: http://stackoverflow.com/q/25507969
tags question: http://stackoverflow.com/q/25512666
tags question: http://stackoverflow.com/q/25398005
tags question: http://stackoverflow.com/q/25431269
tags question: http://stackoverflow.com/q/25495044
tags question: http://stackoverflow.com/q/25391364
tags question: http://stackoverflow.com/q/25479722
tags question: http://stackoverflow.com/q/25472515
tags question: http://stackoverflow.com/q/25483767
tags question: http://stackoverflow.com/q/25481419
tags question: http://stackoverflow.com/q/25497525
tags question: http://stackoverflow.com/q/25545890
tags question: http://stackoverflow.com/q/25507573
tags question: http://stackoverflow.com/q/25522605
tags question: http://stackoverflow.com/q/25529743
tags question: http://stackoverflow.com/q/25415146
tags question: http://stackoverflow.com/q/25417431
tags question: http://stackoverflow.com/q/25425780
tags question: http://stackoverflow.com/q/25475738
tags question: http://stackoverflow.com/q/25434831
tags question: http://stackoverflow.com/q/25467925
tags question: http://stackoverflow.com/q/25539755
tags question: http://stackoverflow.com/q/25549543
tags question: http://stackoverflow.com/q/25422139
tags question: http://stackoverflow.com/q/25480119
tags question: http://stackoverflow.com/q/25522328
tags question: http://stackoverflow.com/q/25473270
tags question: http://stackoverflow.com/q/25418587
tags question: http://stackoverflow.com/q/25439708
tags question: http://stackoverflow.com/q/25441228
tags question: http://stackoverflow.com/q/25473734
tags question: http://stackoverflow.com/q/25495860
tags question: http://stackoverflow.com/q/25423336
tags question: http://stackoverflow.com/q/25482029
tags question: http://stackoverflow.com/q/25544559
tags question: http://stackoverflow.com/q/25548611

http://stackoverflow.com/comment/39601139
type: QuestionComment
has text: Just set action to empty.
comment on: http://stackoverflow.com/q/25391407
score: 1
type: Comment

http://stackoverflow.com/a/25436053
accepted answer of: http://stackoverflow.com/q/25436006
answers question: http://stackoverflow.com/q/25436006
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Instead of: /\ s(\d+?)/g you can use: /\bs\d+\b/g i.e. surrounded by word boundaries. Updated JsFiddle Your regex \ s\d+? will match a space followed by letter s and then 1 or more digits (non-greedy). That will just make s3 in first instance instead of s324.
has comment: http://stackoverflow.com/comment/39684656
upvote count: 1
has comment: http://stackoverflow.com/comment/39684586
has comment: http://stackoverflow.com/comment/39685040
has comment: http://stackoverflow.com/comment/39685095
score: 1

http://stackoverflow.com/q/25547743
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39891585
answer count: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39890939
score: 0
has body: I have problem with images, because they are showing under the conteiner Screen : http://i61.tinypic.com/117u5tv.png On the screen it's a white line ( div block) and this image should go inside it and have 10px padding between image and this white box. My html file: &lt;div class="tmp"&gt; &lt;#list slide_news_model as newsItem&gt; &lt;div class="outer"&gt; &lt;div class="inner"&gt; &lt;img width="100%" src="..." alt="" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/#list&gt; &lt;/div&gt; My css file .tmp { height:100%; width:100%; } .outer { height: 100%; width: 100%; } .inner { padding: 10px; position : relative; } .inner img { width: 100%; } My js file function cycleInit() { $('.tmp').cycle( { fx: '${slide_effect}', speed: ${slide_speed}, timeout: ${slide_timeout}, containerResize: 0, slideResize: 0, fit:1, pause:1 }); } cycleInit(); } I tried adding containerResize: 1 and as a result image is inside this white box, but the height of this white box is constant (what is wrong). I want all images having the same width
tagged with: jquery
tagged with: freemarker
has title: jquery cyclic, images wrong place, freemarker

http://stackoverflow.com/q/25411263
score: 2
downvote count: 0
tagged with: wmi
type: Question
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/25428097
accepted answer: http://stackoverflow.com/a/25428097
tagged with: environment-variables
has title: How to modify environment variables using WMI and JavaScript?
answer count: 1
favorite count: 0
has body: I need to access an environment variable and modify its value. I can access the variable using WQL ==> wmi.ExecQuery("Select * from Win32_Environment Where name='Path' And UserName='&lt;System&gt;'"); However, I am not sure how to modify and save the value. I am using: var reg = GetObject("winmgmts:/root/cimv2"); var paths = wmi.ExecQuery("Select * from Win32_Environment Where name='AA' And UserName='&lt;System&gt;'"); var items = new Enumerator(paths); var path = items.item(); path.VariableValue = path.VariableValue + ";" + "random"; path.Put_(); //(as per first answer received) But, I get this error: Access denied Code 80041003 Source SWbemObjectEx I have UAC disabled, not sure what to do here. Any help will be appreciated. Thanks.
tagged with: wmi-query
type: AnsweredQuestion

http://stackoverflow.com/q/25480596
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25480767
has comment: http://stackoverflow.com/comment/39767300
tagged with: javascript
has comment: http://stackoverflow.com/comment/39767436
tagged with: date
has answer: http://stackoverflow.com/a/25481232
possible better answer: http://stackoverflow.com/a/25480767
linked to: http://stackoverflow.com/q/1296358
score: 0
accepted answer: http://stackoverflow.com/a/25481232
has title: Past day date in javascript never show correct results
has body: i need a date in "YYYY-mm-dd" format from some days past. i write this function: function getDifDate(d, numd) { d = stringToDate(d); d.setDate(d.getDate() - numd); return d; } then in another part of the program i write: var tod = new Date(); switch(selPer.value) { case 1: x= getDifDate(tod, 2); break; case 2: x= getDifDate(tod, 15); break; default: //default code block } console.log("Data1: "+ x); but the x value, for example if i launch today my script return ever "25" What is wrong? Thanks in advance
type: AnsweredQuestion
tagged with: dom
linked to: http://stackoverflow.com/q/7763327

http://stackoverflow.com/q/25531071
possible better answer: http://stackoverflow.com/a/25531308
type: Question
has comment: http://stackoverflow.com/comment/39860403
has body: I have a web page, where in onLoad a list of anchor tags are created using jQuery (external javascript). (href and onclick events are also defined there). For example: Test1 Test2 Since it is created through external javascript file, I cannot edit this onLoad, neither the method definition of method1 Now I want method3 to be called after medthod1 is completed. Any help will be appreciated.
has comment: http://stackoverflow.com/comment/39860559
has comment: http://stackoverflow.com/comment/39860797
score: 0
linked to: http://stackoverflow.com/q/5183529
answer count: 2
has answer: http://stackoverflow.com/a/25531491
accepted answer: http://stackoverflow.com/a/25531491
has answer: http://stackoverflow.com/a/25531308
tagged with: javascript
tagged with: jquery
has title: Bind one more javascript method to the href in Anchor tag
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: onclick

http://stackoverflow.com/comment/39742070
comment on: http://stackoverflow.com/q/25464505
has text: @ezanker it is not good solution ..it is showing white screen when moving one tab to another
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25651848
answers question: http://stackoverflow.com/q/25511911
accepted answer of: http://stackoverflow.com/q/25511911
has body: I found the answer to the problem in the answer to the question Issue with custom geometry and face normal by mrdoob. So in short, one has to change the order in which the vertices are given to the faces, in order to control which way the normals are pointing. Thus, my code now looks like this: THREE.Box3Geometry = function (quadruplets, normals, debug) { THREE.Geometry.call(this); var constructee = this; // constructee = the instance currently being constructed by the Box3Geometry constructor buildPlane(quadruplets[0], normals[0], 0, debug); // px buildPlane(quadruplets[1], normals[1], 1, debug); // nx buildPlane(quadruplets[2], normals[2], 2); // py buildPlane(quadruplets[3], normals[3], 3); // ny buildPlane(quadruplets[4], normals[4], 4); // pz buildPlane(quadruplets[5], normals[5], 5); // nz function buildPlane(quadruplet, normal, materialIndex, debug) { if (debug) { console.log("materialIndex: ", materialIndex); console.log("normal: ", normal); } var offset = constructee.vertices.length; // populate the vertex array: constructee.vertices.push(quadruplet[0]); constructee.vertices.push(quadruplet[1]); constructee.vertices.push(quadruplet[2]); constructee.vertices.push(quadruplet[3]); // construct faceVertexUvs: var uva = new THREE.Vector2(0, 1); //(u:0, v:1), uvb: (u:0, v:0) uvc: (u:1, v:0), uvd: (u:1, v:1) var uvb = new THREE.Vector2(0, 0); var uvc = new THREE.Vector2(1, 0); var uvd = new THREE.Vector2(1, 1); // construct faces: var a = 0; // vertex: u:50, v:50 var b = 2; // vertex: u:50, v:-50 var c = 3; // vertex: u:-50, v:-50 var d = 1; // vertex: u:-50, v:50 // decide the ordering of the face vertices: var reference_vertex = a + offset; var x = constructee.vertices[reference_vertex].clone().sub(normal); // x: the normal relative to reference_vertex if (debug) { console.log("x: ", x); } var face_tangential_vector_b_a = constructee.vertices[b + offset].clone().sub(constructee.vertices[reference_vertex]); var face_tangential_vector_d_a = constructee.vertices[d …
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/25476939
possible better answer: http://stackoverflow.com/a/25485054
type: Question
has answer: http://stackoverflow.com/a/25485054
tagged with: javascript
has title: Dynamically allocating cssClass with knockout not working
score: 0
answer count: 2
has body: I have the following table defined: In my Javascript file, I am conditionally setting cssClass to various classes from a separate .css file as such: // my viewmodel is a list of timeslot objects. This is one instance timeslot.cssClass = "event-invite"; I have event-invite defined in a css file as such: .event-invite { background: #FFFF99; cursor: pointer; } However, none of this css is actually binding to my element. What is the correct way to bind the css class dynamically with knockout?
has answer: http://stackoverflow.com/a/25477566
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25477566
tagged with: knockout.js

http://stackoverflow.com/q/25407295
favorite count: 0
tagged with: multidimensional-array
has body: I've been unable to locate the correct solution to my problem here. I'd like to loop through the nested Products arrays to display each Product name. Is it possible with what I've written, or do I need to re-write it in a way that allows me to query what I need easier? [ { "category":"A", "products":[ { "id":1, "name":"Product 1", "description":"Description of my product 1." }, { "id":2, "name":"Product 2", "description":"Description of my product 2." }, { "id":3, "name":"Product 3", "description":"Description of my product 3." } ] }, { "category":"B", "products":[ { "id":4, "name":"Product 4", "description":"Description of my product 4 in cat B." }, { "id":5, "name":"Product 5", "description":"Description of my product 5 in cat B." }, { "id":6, "name":"Product 6", "description":"Description of my product 6 in cat B." } ] } ]
has title: JavaScript looping through multimensional JSON arrays
has answer: http://stackoverflow.com/a/25407437
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25407429
score: 1
has comment: http://stackoverflow.com/comment/39630863
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25407437
has answer: http://stackoverflow.com/a/25407899
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/25407899
answer count: 3
tagged with: arrays
downvote count: 0
linked to: http://stackoverflow.com/q/17298443
tagged with: javascript

http://stackoverflow.com/comment/39846798
score: 0
comment on: http://stackoverflow.com/q/25523350
type: Comment
type: QuestionComment
has text: Have you read the documentation for the library? There's no schema method. It looks like you're trying to drop-in neo4j in place of Mongoose, which won't work.

http://stackoverflow.com/q/25500782
has body: I have a JSON object in my scope as follows: $scope.props = { 'prop1': { 'att': 10 }, 'prop2': { 'att': 20 }, ... 'propN': { 'att': 42 } }; I bind this object to a select using ng-options: &lt;select ng-options="propName for (propName,propVal) in props" ng-model="selectedProp"&gt;&lt;/select&gt; The options prop1, prop2, etc. show up in the drop-down box. When I select one of these options, the propVal is stored in selectedProp. However, I need to store the actual property name, not its value. I can completely ignore the value - all I need is the selected property name string, such as "prop2". Is this possible in AngularJS?
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25500882
has answer: http://stackoverflow.com/a/25500882
accepted answer: http://stackoverflow.com/a/25501165
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25501165
type: Question
upvote count: 2
answer count: 2
tagged with: ng-options
tagged with: javascript
has title: Select only the property names of a JSON object with ng-options
downvote count: 1

http://stackoverflow.com/q/25472248
has answer: http://stackoverflow.com/a/25472344
has answer: http://stackoverflow.com/a/25472429
has answer: http://stackoverflow.com/a/25473065
upvote count: 1
possible better answer: http://stackoverflow.com/a/25472344
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25473045
score: 0
accepted answer: http://stackoverflow.com/a/25473065
favorite count: 0
has body: How do I make a div top to be the bottom of other div like this: I selected with firebug the div that I need the top to be always the bottom of &lt;div class="menu-banner"&gt; What CSS would do the trick, or I need to use jQuery for this? The target div and teh menu-banner div are both direct child of body. And that target is not child of menu-banner.
has comment: http://stackoverflow.com/comment/39751738
tagged with: css
answer count: 4
has title: How do I make a div top to be the bottom of other div
type: AnsweredQuestion

http://stackoverflow.com/comment/45230195
comment on: http://stackoverflow.com/q/25515319
score: 0
has text: One tip on method 2 is to make sure your file is saved on the system somewhere before you run it.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25525114
has comment: http://stackoverflow.com/comment/39851052
has comment: http://stackoverflow.com/comment/39849644
has title: How to get clicked option value of a multiple select, fired by .change() event
score: 0
has answer: http://stackoverflow.com/a/25525347
answer count: 1
tagged with: jquery
has body: I have a select multiple list: Option 1 Option 2 Option 3 I trigger the event on the select: $("select#List").change(function() { // do ajax stuff... }); I need to get the value of the clicked option that fired the change event. Example: if the option 1 is already selected, and I select the "option 2" that triggers the .change() event, I want get the value of "option 2". (I've already read this post Get clicked option in multiple dropdown, but it doesn't work for me).
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/10431381
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/39849546
duplicate of: http://stackoverflow.com/q/10431381
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39614440
type: QuestionComment
has text: ok i was fix it.. thanks very much guys.. (y) Agha Umair Ahmed, Ghost and hari..
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25397028

jquery
tags question: http://stackoverflow.com/q/25499370
tags question: http://stackoverflow.com/q/25543006
tags question: http://stackoverflow.com/q/25395460
tags question: http://stackoverflow.com/q/25547683
tags question: http://stackoverflow.com/q/25516507
tags question: http://stackoverflow.com/q/25437353
tags question: http://stackoverflow.com/q/25531623
tags question: http://stackoverflow.com/q/25507016
tags question: http://stackoverflow.com/q/25520862
tags question: http://stackoverflow.com/q/25444036
tags question: http://stackoverflow.com/q/25470246
tags question: http://stackoverflow.com/q/25470953
tags question: http://stackoverflow.com/q/25505187
tags question: http://stackoverflow.com/q/25463500
tags question: http://stackoverflow.com/q/25434244
tags question: http://stackoverflow.com/q/25543159
tags question: http://stackoverflow.com/q/25464854
tags question: http://stackoverflow.com/q/25397037
tags question: http://stackoverflow.com/q/25503490
tags question: http://stackoverflow.com/q/25409394
tags question: http://stackoverflow.com/q/25508266
tags question: http://stackoverflow.com/q/25506367
tags question: http://stackoverflow.com/q/25494464
tags question: http://stackoverflow.com/q/25430261
tags question: http://stackoverflow.com/q/25451624
tags question: http://stackoverflow.com/q/25492642
tags question: http://stackoverflow.com/q/25428612
tags question: http://stackoverflow.com/q/25449857
tags question: http://stackoverflow.com/q/25516838
tags question: http://stackoverflow.com/q/25530033
tags question: http://stackoverflow.com/q/25506949
tags question: http://stackoverflow.com/q/25515352
tags question: http://stackoverflow.com/q/25509317
tags question: http://stackoverflow.com/q/25444100
tags question: http://stackoverflow.com/q/25455992
tags question: http://stackoverflow.com/q/25442744
tags question: http://stackoverflow.com/q/25499721
tags question: http://stackoverflow.com/q/25429109
tags question: http://stackoverflow.com/q/25416080
tags question: http://stackoverflow.com/q/25412212
tags question: http://stackoverflow.com/q/25430197
tags question: http://stackoverflow.com/q/25546030
tags question: http://stackoverflow.com/q/25525706
tags question: http://stackoverflow.com/q/25449507
tags question: http://stackoverflow.com/q/25515239
tags question: http://stackoverflow.com/q/25416694
tags question: http://stackoverflow.com/q/25472469
tags question: http://stackoverflow.com/q/25501854
tags question: http://stackoverflow.com/q/25536717
tags question: http://stackoverflow.com/q/25416547
tags question: http://stackoverflow.com/q/25464429
tags question: http://stackoverflow.com/q/25510746
tags question: http://stackoverflow.com/q/25444903
tags question: http://stackoverflow.com/q/25536767
tags question: http://stackoverflow.com/q/25528301
tags question: http://stackoverflow.com/q/25444117
tags question: http://stackoverflow.com/q/25506113
tags question: http://stackoverflow.com/q/25493110
tags question: http://stackoverflow.com/q/25489289
tags question: http://stackoverflow.com/q/25427241
tags question: http://stackoverflow.com/q/25496928
tags question: http://stackoverflow.com/q/25482091
tags question: http://stackoverflow.com/q/25473509
tags question: http://stackoverflow.com/q/25447168
tags question: http://stackoverflow.com/q/25506695
tags question: http://stackoverflow.com/q/25482471
tags question: http://stackoverflow.com/q/25406090
tags question: http://stackoverflow.com/q/25463728
tags question: http://stackoverflow.com/q/25411154
tags question: http://stackoverflow.com/q/25495893
tags question: http://stackoverflow.com/q/25455971
tags question: http://stackoverflow.com/q/25436265
tags question: http://stackoverflow.com/q/25389809
tags question: http://stackoverflow.com/q/25542024
tags question: http://stackoverflow.com/q/25461954
tags question: http://stackoverflow.com/q/25501107
tags question: http://stackoverflow.com/q/25507806
tags question: http://stackoverflow.com/q/25417067
tags question: http://stackoverflow.com/q/25520451
tags question: http://stackoverflow.com/q/25534511

function
tags question: http://stackoverflow.com/q/25391137
tags question: http://stackoverflow.com/q/25400722
tags question: http://stackoverflow.com/q/25391100
tags question: http://stackoverflow.com/q/25448373
tags question: http://stackoverflow.com/q/25431603
tags question: http://stackoverflow.com/q/25475172
tags question: http://stackoverflow.com/q/25415256
tags question: http://stackoverflow.com/q/25471037
tag name: function
tags question: http://stackoverflow.com/q/25533692
tags question: http://stackoverflow.com/q/25451269
tags question: http://stackoverflow.com/q/25394066
tags question: http://stackoverflow.com/q/25537113
tags question: http://stackoverflow.com/q/25422307
tags question: http://stackoverflow.com/q/25408008
tags question: http://stackoverflow.com/q/25522318
tags question: http://stackoverflow.com/q/25510245
tags question: http://stackoverflow.com/q/25518118
tags question: http://stackoverflow.com/q/25427070
tags question: http://stackoverflow.com/q/25543382
tags question: http://stackoverflow.com/q/25493620
tags question: http://stackoverflow.com/q/25451292
tags question: http://stackoverflow.com/q/25501760
tags question: http://stackoverflow.com/q/25394823
tags question: http://stackoverflow.com/q/25453153
tags question: http://stackoverflow.com/q/25444127
tags question: http://stackoverflow.com/q/25484543
tags question: http://stackoverflow.com/q/25476929
type: Tag
tags question: http://stackoverflow.com/q/25408401
tags question: http://stackoverflow.com/q/25424028
tags question: http://stackoverflow.com/q/25423465
tags question: http://stackoverflow.com/q/25497658
tags question: http://stackoverflow.com/q/25421126
tags question: http://stackoverflow.com/q/25474464
tags question: http://stackoverflow.com/q/25445167
tags question: http://stackoverflow.com/q/25424923
tags question: http://stackoverflow.com/q/25479214
tags question: http://stackoverflow.com/q/25454014
tags question: http://stackoverflow.com/q/25514886
tags question: http://stackoverflow.com/q/25499263
tags question: http://stackoverflow.com/q/25493786
tags question: http://stackoverflow.com/q/25546868

http://stackoverflow.com/q/25513596
linked to: http://stackoverflow.com/q/4735342
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/39829037
answer count: 2
has comment: http://stackoverflow.com/comment/39829190
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39828754
score: 4
has title: jQuery loop through elements with class suffix
favorite count: 0
has answer: http://stackoverflow.com/a/25514013
linked to: http://stackoverflow.com/q/2220851
has answer: http://stackoverflow.com/a/25513684
accepted answer: http://stackoverflow.com/a/25513684
has comment: http://stackoverflow.com/comment/39828794
has body: I have a class suffix named fadecontent in a joomla 3.0 website, and i have to loop trough all div's that have this class suffix using the $.each() function. I tried this but it seems not to work with class suffixes. joomla docs: class suffix $('.fadecontent').each(function(i, obj) { with class suffix i mean this: exemple content How to archieve this? EDIT: the script is in the tag
linked to: http://stackoverflow.com/q/17417474
has comment: http://stackoverflow.com/comment/39829050
tagged with: joomla
has comment: http://stackoverflow.com/comment/39840135
has comment: http://stackoverflow.com/comment/39829285
linked to: http://stackoverflow.com/q/7046164
has comment: http://stackoverflow.com/comment/39828789
tagged with: each
possible better answer: http://stackoverflow.com/a/25514013
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39828998
has comment: http://stackoverflow.com/comment/39829054

http://stackoverflow.com/comment/39641293
comment on: http://stackoverflow.com/a/25412487
type: Comment
score: 1
has text: @Fataoulas: *"Because I tried alert(window.httpAccept) outside the function and got undefined"* And we are back at square one: You are trying to read the value **before** the callback was called. While it is possible the access it "outside" you don't really know *when* you can access if you don't work with the callback.
type: AnswerComment

http://stackoverflow.com/a/25541386
upvote count: 2
has comment: http://stackoverflow.com/comment/39879719
has comment: http://stackoverflow.com/comment/39879365
score: 2
has body: see this code. You need to convert string to date and use getTime function to get dates in milli seconds. var effectiveFrom = "2014-08-29"; var effectiveTo = "2014-09-31"; function daydiff(first, second) { return (second.getTime() - first.getTime()) / (1000 * 60 * 60 * 24) + 1; } var days = daydiff(new Date(effectiveFrom), new Date(effectiveTo)); console.log(days);
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25541291
type: Answer
accepted answer of: http://stackoverflow.com/q/25541291

http://stackoverflow.com/comment/39758897
has text: [segfault-handler](https://github.com/ddopson/node-segfault-handler) also handles "native core". As you can see, the [OP in the thread](https://github.com/joyent/node/issues/8208) that [Volune](http://stackoverflow.com/users/2191722/volune) linked to also used it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25475924
score: 0

http://stackoverflow.com/comment/39722459
type: QuestionComment
score: 0
has text: Yes. Its a text file with all these names and they are each on an individual line. and yes @PatrickEvans Sorry I meant to clarify that the latitude and longitutde were blank and the permalink is the only thing that needs to be filled in.
comment on: http://stackoverflow.com/q/25456428
type: Comment

http://stackoverflow.com/q/25466467
has body: I'm experiencing some issues while testing knockout. I'll be using knockout in a page that already has DOM. Essentially just adding multiple viewmodels to manage set of fields as JS Objects with Observable properties. I'm having some issues just loading a simple knockout test without wiping the rest of html content on the page. This doesn't seem normal. I was wondering if anyone would be able to point out the issue with this jsfiddle HTML: Why does it remove everything after input1? why? why are you removing my fields? Javascript: function myViewModel() { var self = this; self.personName = ko.observable('Bob'); //self.personAge = ko.observable(123); } ko.applyBindings(new myViewModel()); Thanks, Victor
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25466506
tagged with: knockout.js
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has title: Any idea why knockoutjs would remove all html content from a page?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25466506

http://stackoverflow.com/a/25523616
has body: Create a new array selectedShiftnumbers to store selected values. Then use ngRepeat to list it. HTML {{shiftnumber}} Script $scope.addShiftNumber = function(num){ $scope.selectedShiftnumbers = []; for(var i=0; i< num; i++) { $scope.selectedShiftnumbers.push(i); } } DEMO
has comment: http://stackoverflow.com/comment/39846978
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39846767
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25523396
answers question: http://stackoverflow.com/q/25523396
type: Answer
downvote count: 0

http://stackoverflow.com/q/25525398
tagged with: css
answer count: 4
score: 2
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/25525479
has comment: http://stackoverflow.com/comment/39850599
tagged with: javascript
upvote count: 2
has title: How to rewrite a url onlick in JQUERY? (JQuery)
has answer: http://stackoverflow.com/a/25525660
tagged with: jquery
favorite count: 0
has body: I have 4 divs that when clicked, it goes to a URL... Problem: When div winkel_name is clicked... the page is redirected with additional details. For example: the store page location is: www.rootdomain/store/ ... When div winkel_hover is clicked... it goes to www.rootdomain//store/storename/ How can i rewrite and sanitize the url to this output: www.rootdomain/store/storename ? <a href="<?=$arItem["CODE"]?>"><?=$arItem['NAME']?> 'S-Hertogenbosch While the javascript to make the url for winkel_hover is this... Please help me to sanitize my url to this output: www.rootdomain/store/storename ?
has answer: http://stackoverflow.com/a/25525775
tagged with: frontend
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25525843
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/34996557
answers question: http://stackoverflow.com/q/25544838
has body: If I'm reading this correctly, your question is very similar to another on the website. To quote an answer there: The Facebook app does not officially support deep linking so what you are trying to do is not possible (right now).
score: 1
upvote count: 1
downvote count: 0
type: Answer

http://stackoverflow.com/q/25481717
tagged with: arrays
downvote count: 0
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25482281
possible better answer: http://stackoverflow.com/a/25482157
has answer: http://stackoverflow.com/a/25482157
type: AnsweredQuestion
upvote count: 1
type: Question
has body: I have a working code, here: function simpleDist(pointA, pointB) { var x = pointA.x - pointB.x, y = pointA.y - pointB.y; return Math.sqrt(x*x + y*y); } function sortByDist(pointRef, pointArray) { var distancePairs = [], output = []; for(var p in pointArray) { var pointComp = pointArray[p]; distancePairs.push([simpleDist(pointRef,pointComp), p]); } distancePairs.sort(function(a,b) { return a[0]-b[0]; }); for(var p in distancePairs) { var pair = distancePairs[p]; output.push(pointArray[pair[1]]); } return output; } And this works, for what I'm doing. However, I'm wondering if there is a more simplified way to do it using Array.sort(). I have looked at several explanations of Array.sort() and it seems like it would need to accept 3 functions to perform what I need without the workaround here. I feel like I'm just being dense, though. Can you see any way to make this function faster, or more simplified?
has title: How to sort an Array of Points by their distance to a reference Point, in Javascript?
has answer: http://stackoverflow.com/a/25482281
tagged with: javascript
tagged with: sorting
answer count: 2

http://stackoverflow.com/q/25533737
tagged with: php
has comment: http://stackoverflow.com/comment/39865411
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39865473
accepted answer: http://stackoverflow.com/a/25534089
has comment: http://stackoverflow.com/comment/39865756
type: Question
has comment: http://stackoverflow.com/comment/39865698
has title: Displaying styled validation messages to user using AJAX
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25534089
tagged with: ajax
score: 0
has body: I'm new to AJAX and jQuery, Just for test I created this simple code. When the user enters their First Name and their Last Name it displays a message that says Thanks for entering everything correctly! in Bluish color, and when the user forgets to enter their First Name and their Last Name it displays an error that says You didn't entered anything in Red color or something similar And yeah I know it sounds stupid but this just testing... So here is my code: change_name.php: function displayError($error) { // Display a div with a class of error, We style it using CSS echo " $error "; } function displayMessage($message) { // Display a div with a class of message, We style it using CSS echo " $message "; } if (isset($_POST['first_name']) && isset($_POST['last_name'])) { if (empty($_POST['first_name']) && empty($_POST['last_name'])) { displayError('You didn\'t entered anything!'); } else if (empty($_POST['first_name'])) { displayError('You didn\'t entered your first name!'); } else if (empty($_POST['last_name'])) { displayError('You didn\'t entered your last name!'); } else { displayMessage('Thanks for entering everything correctly!'); } } JavaScript: $(document).ready(function(){ $('#nameChange').on('submit', function (e) { $.ajax({ type: 'POST', url: 'ajax/change_name.php', data: $(this).serialize(), success: function(data) { $('.result').empty().append(data); } }); e.preventDefault(); }); }); index.php jQuery AJAX Result: First Name: Last Name: My question is: Is it a good practice to display a and then add a class to it, so you can then style it using CSS? Is there a better way for doing this? Can't you just return a JSON response and access it using JavaScript? Thanks!
answer count: 1

http://stackoverflow.com/comment/39602750
comment on: http://stackoverflow.com/q/25392198
type: Comment
score: 2
type: QuestionComment
has text: I think you forgot to include what you've tried that isn't working

http://stackoverflow.com/comment/39631606
type: QuestionComment
comment on: http://stackoverflow.com/q/25406965
has text: Also, jQuery isn't defined everywhere on that site, just so you know. You probably want to include the proper ` ` element with specified source somewhere.
score: 0
type: Comment

http://stackoverflow.com/comment/39839742
type: QuestionComment
has text: @Amadan Well, sure, you can make it work, but it is taking developer convenience a little too far, imo.
comment on: http://stackoverflow.com/q/25518783
score: 0
type: Comment

http://stackoverflow.com/q/25524209
tagged with: regex
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25524315
type: Question
has title: How to use a regex to match the string regularexpression
has body: How to use a regular expression to match this string: regularexpression . How to exchange the first span of the contents and the contents of the second span. In my opinion, it can use jquery source code.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39847990
has comment: http://stackoverflow.com/comment/39847957
linked to: http://stackoverflow.com/q/1732348
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39847840

http://stackoverflow.com/comment/39896897
type: AnswerComment
has text: Ah ok, I will update with the "starts-with" option. Many thanks once again.
type: Comment
comment on: http://stackoverflow.com/a/25550484
score: 0

http://stackoverflow.com/q/25423757
tagged with: jquery
has answer: http://stackoverflow.com/a/25423844
favorite count: 0
accepted answer: http://stackoverflow.com/a/25423832
type: AnsweredQuestion
has body: So I have this layout : Comments To Do list / notes Comments Post it To do Here is jquery : and I want to be able to add posts which could be marked as resolved later. The problem is that the toggleClass function works only for the every second post and I can't understand why ?
downvote count: 1
type: Question
score: -1
has answer: http://stackoverflow.com/a/25423832
answer count: 2
has comment: http://stackoverflow.com/comment/39661027
upvote count: 0
possible better answer: http://stackoverflow.com/a/25423844
has title: jQuery functions works only for every second
tagged with: javascript

http://stackoverflow.com/a/25498595
answers question: http://stackoverflow.com/q/25498594
type: AcceptedAnswer
score: 0
has body: turns out I had defined GroupSchema.methods.add = function(user) { //TODO }; GroupSchema.methods.remove = function(user) { //TODO }; and left it empty which override the mongoose remove method -__- I love Javascript but this is one of those moments where protecting functions from override would have been nice. of course it wouldn't be simple, I would like to override a function and call it if I want, so it's not like I can complain about the feature. thought of sharing my experience out there so that I might save someone else the frustration. I think a good way to approach this from now on is to namespace my custom methods which is impractical or generally just leave a console.log on empty methods that are under construction so that I know if they're called.
type: Answer
accepted answer of: http://stackoverflow.com/q/25498594

http://stackoverflow.com/a/25511422
type: Answer
answers question: http://stackoverflow.com/q/25511148
score: 0
has body: D3pie is also a good option They also have a generator that you can use if you want to build your an example and work from there.

http://stackoverflow.com/comment/39882413
score: 0
type: QuestionComment
type: Comment
has text: Try to get your whole XHTML structure By NSString *html = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.outerHTML"]; then parse your desire data from HTML
comment on: http://stackoverflow.com/q/25526723

http://stackoverflow.com/q/25437485
has answer: http://stackoverflow.com/a/25437514
has comment: http://stackoverflow.com/comment/39687026
has body: For example, can I do this: for (var row = r-1; row &lt; r+2, row &lt; numRows, row &gt;= 0; row++)
has comment: http://stackoverflow.com/comment/39687038
type: Question
accepted answer: http://stackoverflow.com/a/25437514
type: AnsweredQuestion
has title: Could you test for multiple expressions in statement 2 of a javascript for statement?
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/q/25510176
has comment: http://stackoverflow.com/comment/39822600
type: Question
tagged with: modulo
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25510622
answer count: 1
favorite count: 0
tagged with: twitter-bootstrap
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25510622
score: 1
has body: I a trying to dynamically add rows and populate them with 3 col-sm-4 using a modulo against the number of objects in a returned object from a function. Code: function formatSeriesCard(series) { var card = ""; console.log(countProperties(series)); for (var i=0; i &lt; countProperties(series); i++) { if (i % 3 == 0 ) { card += "&lt;div class=\"row\"&gt;"; } card += "&lt;div class='col-sm-4' data-id="+i+"&gt;"; card += "&lt;div class='action-box'&gt;"; card += "&lt;h4&gt;" + '"' + series.name + '"' + "&lt;/h4&gt;"; card += "&lt;p&gt;"; Instead I'm getting each row nested within the previous. Thinking I need to test for the first one and last one. Thanks.
has title: Dynamically add bootstrap rows using modulo

http://stackoverflow.com/a/25537806
answers question: http://stackoverflow.com/q/25518233
has comment: http://stackoverflow.com/comment/39947411
has comment: http://stackoverflow.com/comment/39910626
has comment: http://stackoverflow.com/comment/39905114
type: Answer
has comment: http://stackoverflow.com/comment/39900621
has comment: http://stackoverflow.com/comment/39904892
has body: I have found the destroy() function to be extremely slow. At times with my code it would take the destroy function up to 10 seconds to actually destroy the nodes. If you aren't concerned with literally deleting the node from the layer/stage maybe try this: this.visual.setAttr('visible', 'false'); or this.visual.setAttr('opacity', 0); It's a bit hacky, but it will hopefully increase the performance on ipad.
score: 0

http://stackoverflow.com/comment/39624228
score: 0
type: AnswerComment
has text: Hey there! I did it like that but I get a 406 error. Don't know what's causing it. Any ideas? Thanks!
type: Comment
comment on: http://stackoverflow.com/a/25397623

http://stackoverflow.com/q/25415256
has comment: http://stackoverflow.com/comment/39646120
tagged with: instance
has answer: http://stackoverflow.com/a/25415341
has title: set variable to an instance of a function
possible better answer: http://stackoverflow.com/a/25415287
accepted answer: http://stackoverflow.com/a/25415357
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39646156
has comment: http://stackoverflow.com/comment/39646118
has comment: http://stackoverflow.com/comment/39646187
type: Question
score: 0
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/39646191
has answer: http://stackoverflow.com/a/25415357
answer count: 3
has body: I wrote this javascript expecting the following outcome: "X:10" function sprite() { var run= function() { window.setInterval(function(){ console.log("X:"+x.toString()); },gameSpeed); }; console.log("I'm Alive!"); run(); }; var instance=new sprite(); instance.x=10; Instead, It throws this error: "ReferenceError: x is not defined" What don't I understand here?
has answer: http://stackoverflow.com/a/25415287
has comment: http://stackoverflow.com/comment/39646163

http://stackoverflow.com/q/25536169
has answer: http://stackoverflow.com/a/25536197
tagged with: javascript
has answer: http://stackoverflow.com/a/25536329
tagged with: jquery
has comment: http://stackoverflow.com/comment/39870277
possible better answer: http://stackoverflow.com/a/25536261
downvote count: 0
has answer: http://stackoverflow.com/a/25536261
has title: Hide an element if it has two particular classes or only one of the clases
favorite count: 0
has comment: http://stackoverflow.com/comment/39869983
has comment: http://stackoverflow.com/comment/39870087
has answer: http://stackoverflow.com/a/25536213
answer count: 5
has answer: http://stackoverflow.com/a/25536241
tagged with: http://stackoverflow.com/tag/html
has body: I am looking to hide an HTML element if it has both classes or only the .more-options class, but if it only has the .show-required class do nothing. This is what I have HTML: ... ... ... I want it to only hide/show the second and third and leave the other one alone. Also to clarify it does need to have both classes or just .more-options for later code. any help would be appreciated. EDIT : I need this to be done with javascript/Jquery
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39870050
score: 1
has comment: http://stackoverflow.com/comment/39870010
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25536213

http://stackoverflow.com/comment/39779755
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25487456
has text: Alright thank you, but this seems to work only one time and if the property changes, the viewmode won't notice this.

http://stackoverflow.com/comment/39692352
comment on: http://stackoverflow.com/q/25440657
score: 0
has text: Can you post the relevant codes? You should have fallback formats.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39809095
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25503214
has text: The same goes for `Array.indexOf`. If support for IE8 is needed, one would have to polyfill, however we should stop supporting that old crap.
type: AnswerComment

http://stackoverflow.com/q/25503724
favorite count: 0
has comment: http://stackoverflow.com/comment/39810541
type: UnansweredQuestion
tagged with: regex
has comment: http://stackoverflow.com/comment/39809944
tagged with: livecycle
tagged with: forms
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has title: Regular Expression to allow brackets () to be valiadated
has answer: http://stackoverflow.com/a/25503785
score: 0
has body: Using Adobe Live cycle, I am creating a form which contains a telephone number field. The telephone number field should only accept numbers, plus symbols and brackets At the moment I have an expression for validation that accepts pluses and numbers but when I try to add brackets to it, it seems to break it. if (xfa.event.newText.match(/[^0-9+]/)) { xfa.event.change = ""; } Can someone point me into the right direction please. Thanks!!
tagged with: validation
answer count: 1

http://stackoverflow.com/comment/39772584
has text: getElementsByClassName returns an array. So this will not work.
type: Comment
comment on: http://stackoverflow.com/a/25483830
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39834240
score: 4
type: AnswerComment
has text: I'm getting a `XMLHttpRequest cannot load https://api.wit.ai/message?v=20140826&q=. No 'Access-Control-Allow-Origin' header is present on the requested resource.` How can I pass that header?
comment on: http://stackoverflow.com/a/25515976
type: Comment

forms
tags question: http://stackoverflow.com/q/25393468
tags question: http://stackoverflow.com/q/25510170
tags question: http://stackoverflow.com/q/25532693
tags question: http://stackoverflow.com/q/25487296
tags question: http://stackoverflow.com/q/25435146
tags question: http://stackoverflow.com/q/25480661
tags question: http://stackoverflow.com/q/25543241
tags question: http://stackoverflow.com/q/25422837
tags question: http://stackoverflow.com/q/25426821
tags question: http://stackoverflow.com/q/25432736
tags question: http://stackoverflow.com/q/25475571
tags question: http://stackoverflow.com/q/25421144
tags question: http://stackoverflow.com/q/25459984
tags question: http://stackoverflow.com/q/25430071
tags question: http://stackoverflow.com/q/25398864
type: Tag
tags question: http://stackoverflow.com/q/25462196
tags question: http://stackoverflow.com/q/25491346
tags question: http://stackoverflow.com/q/25498471
tags question: http://stackoverflow.com/q/25550250
tags question: http://stackoverflow.com/q/25395660
tags question: http://stackoverflow.com/q/25523218
tags question: http://stackoverflow.com/q/25507943
tags question: http://stackoverflow.com/q/25474937
tags question: http://stackoverflow.com/q/25537081
tags question: http://stackoverflow.com/q/25477166
tags question: http://stackoverflow.com/q/25542280
tags question: http://stackoverflow.com/q/25405033
tags question: http://stackoverflow.com/q/25477389
tags question: http://stackoverflow.com/q/25444109
tags question: http://stackoverflow.com/q/25446121
tags question: http://stackoverflow.com/q/25470246
tags question: http://stackoverflow.com/q/25546302
tags question: http://stackoverflow.com/q/25407913
tags question: http://stackoverflow.com/q/25459798
tags question: http://stackoverflow.com/q/25502110
tags question: http://stackoverflow.com/q/25457109
tags question: http://stackoverflow.com/q/25449337
tags question: http://stackoverflow.com/q/25545349
tags question: http://stackoverflow.com/q/25528818
tags question: http://stackoverflow.com/q/25439708
tags question: http://stackoverflow.com/q/25443160
tags question: http://stackoverflow.com/q/25516139
tags question: http://stackoverflow.com/q/25401830
tags question: http://stackoverflow.com/q/25491509
tags question: http://stackoverflow.com/q/25460238
tags question: http://stackoverflow.com/q/25540222
tags question: http://stackoverflow.com/q/25517325
tags question: http://stackoverflow.com/q/25394389
tags question: http://stackoverflow.com/q/25402772
tags question: http://stackoverflow.com/q/25392000
tags question: http://stackoverflow.com/q/25410688
tags question: http://stackoverflow.com/q/25422961
tags question: http://stackoverflow.com/q/25496768
tags question: http://stackoverflow.com/q/25461821
tags question: http://stackoverflow.com/q/25397037
tags question: http://stackoverflow.com/q/25507806
tags question: http://stackoverflow.com/q/25494522
tags question: http://stackoverflow.com/q/25550219
tags question: http://stackoverflow.com/q/25539437
tags question: http://stackoverflow.com/q/25500324
tags question: http://stackoverflow.com/q/25503724
tags question: http://stackoverflow.com/q/25492352
tags question: http://stackoverflow.com/q/25463060
tags question: http://stackoverflow.com/q/25534151
tags question: http://stackoverflow.com/q/25460002
tags question: http://stackoverflow.com/q/25413617
tags question: http://stackoverflow.com/q/25495153
tags question: http://stackoverflow.com/q/25442643
tags question: http://stackoverflow.com/q/25532565
tags question: http://stackoverflow.com/q/25467343
tag name: forms
tags question: http://stackoverflow.com/q/25545791
tags question: http://stackoverflow.com/q/25515973
tags question: http://stackoverflow.com/q/25391407
tags question: http://stackoverflow.com/q/25526044
tags question: http://stackoverflow.com/q/25531432
tags question: http://stackoverflow.com/q/25418000
tags question: http://stackoverflow.com/q/25414014
tags question: http://stackoverflow.com/q/25408080

http://stackoverflow.com/q/25396413
answer count: 1
has body: So I have a list of 9 icons with titles representing 9 different areas of service. Divided into three rows of three using floats etc. Each has a description below it (a couple of paragraphs). I have used 'visibility: hidden' and 'height: 0px' to hide the descriptions. (not at the same time.) I want to hover or mouseover the icon and have the description appear below it. I don't think I can use straight CSS (unless someone thinks otherwise) because I am triggering one element and changing another. Type of category Some content... Some more content... And we do that two more times per row. The CSS that is applied to these elements is as follows. .category_col1 {float:left; clear:left; width:32%; padding:.5em .5em .5em 0em; } .image-item-lead {width: 90%; margin-left:auto; margin-right:auto; display:block; } .cathead {visibility:visible; } .hide {height:0px; overflow:hidden; } The jQuery that I have tried is as follows: Surrounding all options $(document).ready(function(){ }); This works: $('#category1').mouseover(function(event){ $(#category1description).css('height','auto'); }); But obviously it shows up instantly, I would like it to show up gradually. I have tried: $('#category1').mouseover(function(){ $('#category1descrioption').slideToggle('slow'); }); $('#category1').mouseover(function(){ $('#category1descrioption').animate({height: auto}, {duration:1500}); }); $('#category1').mouseover(function(event){ $('#category1descrioption').transition({height: auto}, ease, 1500); }); I am definitely missing something here. I hope someone can help.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39610673
has title: How do I change an element with transition with jQuery when hovering on another element?
has answer: http://stackoverflow.com/a/25437166
tagged with: css-transitions
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/3508605
score: 0

http://stackoverflow.com/comment/39743751
has text: OMG Actually you helped a lot! LOLOLOL the plugin I'm using submits the form as soon as the button's clicked so this worked like a charm! Sorry for my stupid comment earlier.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25467511
type: AnswerComment

http://stackoverflow.com/q/25511911
has comment: http://stackoverflow.com/comment/39827370
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/10886818
has title: three.js shows no respect for my normals
tagged with: javascript
has body: I'm making a custom three.js geometry for non-orthogonal cubes. It is loosely based on the existing Box-geometry in three.js but has the absolute position of its vertices fed directly to it. I have a problem with three.js seemingly not respecting the normals that I pass to the faces of the geometry. When I console.log the normals just prior to assigning them to the faces, they look just fine: normal: Object { x=0, y=0, z=-1, more...} normal: Object { x=0, y=0, z=1, more...} These normals would be just fit for a straight cube's upper and lower sides. However, as can be seen from this screenshot (were I have tilted the camera appropriately), the first normal seems to have been applied to both surfaces: This is two sides of a cube of 200x200x200 centred on origo and orthogonal to all axes. The white line denotes the z-axis. Here follows my faulty geometry. The 'quadruplets' array contains six arrays with each four Vector3 instances. Each inner array delineates a side of the cube. THREE.Box3Geometry = function (quadruplets, normals, debug) { THREE.Geometry.call(this); var constructee = this; // constructee = the instance currently being constructed by the Box3Geometry constructor buildPlane(quadruplets[0], normals[0], 0, debug); // px buildPlane(quadruplets[1], normals[1], 1, debug); // nx // buildPlane(quadruplets[2], normals[2], 2); // py // buildPlane(quadruplets[3], normals[3], 3); // ny // buildPlane(quadruplets[4], normals[4], 4); // pz // buildPlane(quadruplets[5], normals[5], 5); // nz function buildPlane(quadruplet, normal, materialIndex, debug) { var offset = constructee.vertices.length; // populate the vertex array: constructee.vertices.push(quadruplet[0]); constructee.vertices.push(quadruplet[1]); constructee.vertices.push(quadruplet[2]); constructee.vertices.push(quadruplet[3]); // construct faceVertexUvs: var uva = new THREE.Vector2(0, 1); //(u:0, v:1), uvb: (u:0, v:0) uvc: (u:1, v:0), uvd: (u:1, v:1) var uvb = new THREE.Vector2(0, 0); var uvc = new THREE.…
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25512877
has answer: http://stackoverflow.com/a/25651848
accepted answer: http://stackoverflow.com/a/25651848
possible better answer: http://stackoverflow.com/a/25512877
tagged with: three.js

http://stackoverflow.com/q/25411065
has comment: http://stackoverflow.com/comment/39638221
has comment: http://stackoverflow.com/comment/39638419
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39638741
has comment: http://stackoverflow.com/comment/39638689
has title: jQuery fade in elements on scroll down
has comment: http://stackoverflow.com/comment/39639116
answer count: 0
score: 0
type: UnansweredQuestion
type: Question
has body: I`m trying make a jquery code ho fadeIn elemens on scroll down with slice function. There is my code var count = jQuery('#am-container a').size(); var lastScroll = 0; jQuery('#show').text(count); jQuery('#am-container a').hide(); jQuery('#am-container a').slice(0, 16).fadeIn(500); jQuery(window).scroll(function(event){ var st = jQuery(this).scrollTop(); if (st &gt; lastScroll){ jQuery("#am-container a").slice(16, count).fadeIn(500); } lastScroll = st; }); 16 elements appear as they should be, but when scroll down, nothing happens! maybe slice() isn`t the best way? Please help and sorry for bad English

http://stackoverflow.com/comment/39694237
comment on: http://stackoverflow.com/a/25430131
type: AnswerComment
score: 0
type: Comment
has text: Apologies, I was unclear (and actually mistaken about the details!) -- I've fixed this and hope that it answers your question now.

angularjs-orderby
tags question: http://stackoverflow.com/q/25525668
tag name: angularjs-orderby
type: Tag

http://stackoverflow.com/comment/39801030
comment on: http://stackoverflow.com/q/25498842
type: Comment
has text: @FelixKling That doesn't explain the problem in OP's code. And the documentation surprisingly does not explain what the `append()` method returns, which _is_ the root of the problem here.
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39871440
has text: I would suggest against using timeouts. Timeouts are hacks. They are highly platform dependent, and if a laggy platform (ala kindle or phone) runs it isn't guaranteed to fire after repeat has finished. The solution I gave, while more complex, is guaranteed to run when you expect it.
type: AnswerComment
score: 4
type: Comment
comment on: http://stackoverflow.com/a/25536863

http://stackoverflow.com/q/25536636
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25538999
type: AnsweredQuestion
has body: I'm trying to build a set of data for a Google scatter graph using data.join as follows: var tempData = newData(); var tempData2 = totalData; dataArray[dataCount] = tempData; var joinMark = countArray(dataCount); totalData = google.visualization.data.join(tempData2,tempData,'full',[[0,0]],[joinMark],[1]); dataCount = dataCount+1; Where newData() generates a dataTable from a database, column 0 is always a date and column 1 is always a number. I have been able to get this to work once, to display 2 variables on the graph, but trying to add any more causes my code to fail. BTW totalData is the variable passed to chart.draw() The countArray function returns 1 if both arrays have 2 columns (works fine), but for further additions I am returning a comma separated string 1,2... 1,2,3.. etc. This is based on my assumption that that last two variables in data.join are the column numbers from dataTable 1 and 2 respectively to be combined. Am I right in this assumption, or do I need a different variable in that location? Thanks Tom
has title: using google's data.join to interatively add data to a graph
type: Question
has answer: http://stackoverflow.com/a/25538999
tagged with: google-visualization
tagged with: javascript

http://stackoverflow.com/comment/39824059
score: 0
comment on: http://stackoverflow.com/q/25508564
type: Comment
type: QuestionComment
has text: BalusC I found the code in internet, that is the truth. The google chrome debugger show me error in this line $('span.delete').live('click', function()

http://stackoverflow.com/a/27415576
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/25415320
type: Answer
has body: use a j query wrapper $.ajax({ url: 'http://64.182.231.116/~spencerf/union_college/Upperclass_Sample_Menu.xml', // name of file you want to parse dataType: "xml", // type of file you are trying to read success: parse, // name of the function to call upon success error: function(){alert("Error: Something went wrong");} });
answers question: http://stackoverflow.com/q/25415320

http://stackoverflow.com/q/25485791
has title: change a php variable using POST
tagged with: javascript
score: -1
answer count: 1
favorite count: 0
has body: trying to change a php variable via js and echo back but its not working, been on it for days!! I have a function handleServerResponse() called below, that alerts connection status, and getting the ok at status 200 so cant understand why my php variabe is not changing! driving me insane! function process() // send the info to the server { if(xmlHttp) { try { xmlHttp.open("GET","myFile.php?phpvar="+jsvar,true); xmlHttp.onreadystatechange = handleServerResponse; //alerts connection status = all ok xmlHttp.send(null); } catch(e) { alert(e.toString()); } } } // server side script &lt;?php echo '&lt;?xml version="1.0" encoding = "UTF-8" standalone = "yes" ?&gt;'; $phpvar; $phpvar = $_GET['phpvar']; echo "new phpvar value = ".$phpvar; ?&gt; Any help at all would be greatly appreciated. Cheers
has answer: http://stackoverflow.com/a/25486205
has comment: http://stackoverflow.com/comment/39776314
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39776429
tagged with: php
has comment: http://stackoverflow.com/comment/39777312
has comment: http://stackoverflow.com/comment/39777576
has comment: http://stackoverflow.com/comment/39776455
has comment: http://stackoverflow.com/comment/39776295
has comment: http://stackoverflow.com/comment/39777111
downvote count: 1
tagged with: post
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/39776257

asset-pipeline
tags question: http://stackoverflow.com/q/25490699
tags question: http://stackoverflow.com/q/25451015
type: Tag
tags question: http://stackoverflow.com/q/25434205
tag name: asset-pipeline
tags question: http://stackoverflow.com/q/25390307
tags question: http://stackoverflow.com/q/25517583

http://stackoverflow.com/comment/39671270
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25428561
has text: @MelanciaUK, you should add it as an answer. :)

http://stackoverflow.com/q/25478097
tagged with: css
has answer: http://stackoverflow.com/a/25478252
upvote count: 0
has answer: http://stackoverflow.com/a/25478295
accepted answer: http://stackoverflow.com/a/25478295
tagged with: php
downvote count: 1
type: AnsweredQuestion
score: -1
possible better answer: http://stackoverflow.com/a/25478252
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39762604
has title: PHP Link Submit Loop
has body: I came up with a app idea that allows Link Searches for a website. I am trying to get the app to automatically save searches for the user. Here is some of my code that is written up. What I am trying to achieve is the ability to enter random links from websites that I like and display the links within the app and automatically save the inputs. Is there a way to save links within a page in PHP? Fairly new to PHP. Sorry! Here is a link - http://www.andulicsdesign.com/Blakes/Index.php Indeed Link Search App Job Title <?php echo ' ' . $_POST['message'] . ' '; ?> <?php $message=$_REQUEST['message']; echo $message; ?>
tagged with: javascript
favorite count: 0
tagged with: phpmyadmin
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39821619
type: AnswerComment
has text: when i do the alert on url is coming a success.
type: Comment
comment on: http://stackoverflow.com/a/25478872
score: 0

http://stackoverflow.com/comment/39634158
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25406239
score: 0
has text: and just in case: The url of the page i am loading in that page is imagine digital.nl/CMS/Editor/Homepage1.html

http://stackoverflow.com/comment/39614380
type: QuestionComment
comment on: http://stackoverflow.com/q/25398535
score: 0
has text: you seem to have syntax error on the lines 10 & 16 of your JavaScript??
type: Comment

http://stackoverflow.com/q/25544653
type: Question
tagged with: angularjs-directive
possible better answer: http://stackoverflow.com/a/25556701
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25556701
accepted answer: http://stackoverflow.com/a/25730864
has answer: http://stackoverflow.com/a/25721542
answer count: 4
favorite count: 0
tagged with: angularjs
has body: I have twelve web pages and each has a set of 7-10 buttons. The code behind and around the buttons is 6-7 lines of HTML. To simplify coding I made these into directives with a simple inline template in each directive. Is there much overhead when a page opens and it has to convert all my elements to directives? Also what is the process flow for doing this? Will it slow down the rendering of the page? How about what I am doing, is it a good practice for directives or is there a better way I could do it?
score: 13
has comment: http://stackoverflow.com/comment/40394705
upvote count: 13
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25730864
has title: Is there much overhead if I use directives compared to in-line HTML?
has answer: http://stackoverflow.com/a/25720979

http://stackoverflow.com/q/25412094
tagged with: google-app-engine
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25419890
tagged with: python
has title: Google+ Sign-In - Page accessible for logged in users only
has answer: http://stackoverflow.com/a/25412174
linked to: http://stackoverflow.com/q/13657162
possible better answer: http://stackoverflow.com/a/25412174
tagged with: google-signin
accepted answer: http://stackoverflow.com/a/25419890
type: AnsweredQuestion
tagged with: javascript
type: Question
tagged with: google-plus
has body: I decided to use social media benefits on my page and currently I'm implementing Google+ Sign-In. One of the pages on my website should be accessible for logged in users only (adding stuff to the page). I am logging user to website via JavaScript. I'm aware that javascript is executed on client-side but I am curious is it possible to restrict access to the certain page using only javascript.

http://stackoverflow.com/comment/39738844
comment on: http://stackoverflow.com/a/25465358
score: 0
has text: will mark it correct regardless but do you know how to make the keyCodes cross browser?
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25474803
favorite count: 0
has answer: http://stackoverflow.com/a/67823682
has title: Trying to use React.DOM to set body styles
score: 90
has answer: http://stackoverflow.com/a/79147472
has answer: http://stackoverflow.com/a/33247756
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25473414
has answer: http://stackoverflow.com/a/39889394
upvote count: 91
possible better answer: http://stackoverflow.com/a/66547345
downvote count: 1
type: Question
tagged with: reactjs
has comment: http://stackoverflow.com/comment/39756387
has answer: http://stackoverflow.com/a/65116745
tagged with: javascript
has comment: http://stackoverflow.com/comment/39756518
accepted answer: http://stackoverflow.com/a/25476647
has answer: http://stackoverflow.com/a/66547345
answer count: 7
has body: How can I use React.DOM to change styles on HTML body? I tried this code and it's not working: var MyView = React.createClass({ render: function() { return ( &lt;div&gt; React.DOM.body.style.backgroundColor = "green"; Stuff goes here. &lt;/div&gt; ); } }); If you execute this from the browsers console it works (but I need it working in ReactJS code): document.body.style.backgroundColor = "green"; Also see this question for similar but different solution: Change page background color with each route using ReactJS and React Router?
has answer: http://stackoverflow.com/a/25476647

http://stackoverflow.com/a/37675937
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25525980
has body: Since you are making the http request in the constructor, and the constructor is being run every time you run a test, then the httpBackend should be prepared to respond to this request every time. So in your beforeEach block you shoud be setting: notificationsRequest = $httpBackend.expectGET("api/v1/notifications").respond(200, {}); In your test cases, you can alter this response, by calling the respond method again, which overwrites the response set like this: it("should store all notifications from server on the client when success call to server", function () { //arrange notificationsRequest.respond(200, [{ a: 1, b: 2 }, { c: 3, d: 4 }]); $httpBackend.flush(); //act - done implicitly when controller is instantiated //assert expect(scope.allNotifications).toEqual([{ a: 1, b: 2 }, { c: 3, d: 4 }]); }); Now, all you need to do, is make sure that you are flushing the responses after each test. Given, this may not be convenient, but it must be done if you want to verifyNoOutstandingRequest since by definition of your constructor, there will be an outstanding request. I would suggest you do this by structuring your tests into nested suites, and for the ones that are not testing the retrieval of notifications, flushing the request in their own beforeEach block.

http://stackoverflow.com/comment/39660502
type: QuestionComment
type: Comment
has text: you can use trigger click on set Interval
score: 0
comment on: http://stackoverflow.com/q/25423432

http://stackoverflow.com/a/25497364
type: AcceptedAnswer
has body: The log shows you that you are not looking at what you should. You need to chain through the $promise returned by the Query, before looking for data. AdService.query().$promise.then(function(data) { $scope.ads = data; $scope.adsNotEmpty = ($scope.ads &amp;&amp; $scope.ads.length); }); ng-repeat at tha instance is iterating through the properties of the object returned by Query hance you see blank AD-
type: Answer
has comment: http://stackoverflow.com/comment/39839370
downvote count: 0
has comment: http://stackoverflow.com/comment/39802447
accepted answer of: http://stackoverflow.com/q/25497339
score: 3
answers question: http://stackoverflow.com/q/25497339
upvote count: 3

http://stackoverflow.com/a/25497681
has body: Actually, the cube is rendered black on a black background. You are rendering the scene first with no lights, and then again after adding a light. As stated in the Wiki article How to Update Things with WebGLRenderer, properties that can't be easily changed in runtime (once a material is rendered at least once) include the number and types of lights. Add the light to the scene before the first render, and everything will work as expected. If you must add the light after the first render, then you need to set material.needsUpdate = true; three.js r.68
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25497541
type: Answer
accepted answer of: http://stackoverflow.com/q/25497541
upvote count: 5
downvote count: 0
score: 5

http://stackoverflow.com/q/25530564
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39891879
score: 1
has comment: http://stackoverflow.com/comment/39859904
favorite count: 0
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/39883584
answer count: 2
has comment: http://stackoverflow.com/comment/39892195
upvote count: 1
possible better answer: http://stackoverflow.com/a/25530813
has comment: http://stackoverflow.com/comment/39872563
has answer: http://stackoverflow.com/a/25530813
has body: I am trying to implement Change Password feature in MVC (Rest server) application from the User Control Panel but because of some strange reason I can't scope values from form input. My html form: Save Cancel My formRow.html: {{name}} My formRow.js: collectionsApp.directive('formRow', function(){ return { restrict: 'E', replace: true, scope: { model: '=', name: '@', size: '@', type: '@' }, templateUrl: '/directives/formRow.html', link: function(scope, attrs, element) { } } }); My userController: $scope.changePassword = function() { if ($scope.newPassword === $scope.repeatedNewPassword) { userService.changePassword($scope.newPassword, $scope.currentPassword); } else { $scope.alerts.push({ msg : 'Passwords do not match!' }) } } And when I enter values in inputs and place breakpoints and trigger changePassword() in debug i get: If condition has passed with value of true because they are both undefined.
has answer: http://stackoverflow.com/a/25531051
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/39860117
has title: $scope doesn't picks up string from form input - AngularJS, JS
linked to: http://stackoverflow.com/q/25548611
downvote count: 0
tagged with: javascript
tagged with: rest
accepted answer: http://stackoverflow.com/a/25531051

http://stackoverflow.com/q/25501391
has answer: http://stackoverflow.com/a/53725410
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/47832176
score: 15
has answer: http://stackoverflow.com/a/37313379
has title: Shopify: get current logged in user ID in JavaScript
has answer: http://stackoverflow.com/a/58914633
tagged with: shopify
answer count: 7
has answer: http://stackoverflow.com/a/43767461
has answer: http://stackoverflow.com/a/33911476
has body: I'm trying to build an app for shopify and I'm interested if I can get the current logged user ID using javascript api or something similar. I was looking at the ajax api: http://docs.shopify.com/support/your-website/themes/can-i-use-ajax-api and I can see you can get the current products that the current user has added to his shopping cart, but nothing about the user ID. Is it possible, or am I missing something?
has answer: http://stackoverflow.com/a/25517450
accepted answer: http://stackoverflow.com/a/25517450
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/33911476
upvote count: 15
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/25530458
answers question: http://stackoverflow.com/q/25530321
type: Answer
downvote count: 0
score: 1
has body: var ids = ['colorchart1', 'colorchart2']; for(var j = 0; j &lt; ids.length; j++) { var t = document.getElementById(ids[j]).getElementsByTagName("td"); for ( var i = 0; i &lt; t.length; i++ ) t[i].onclick = getVal; } Or - use jQuery and give all your tables a "colorchart" class then use the $('.colorchart') selector.
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25530321

http://stackoverflow.com/q/25437308
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39688613
tagged with: ajax
type: UnansweredQuestion
tagged with: php
has body: I have what i thought was a very simple task, but I can't seem to get it working correctly. I'm hoping someone with a better understanding of Ajax can help me figure out where i'm going wrong. I have a simple input box on my page... &lt;form onchange="imgUpload();" &gt; File: &lt;input id='img' name="myfile" type="file" /&gt; &lt;/form&gt; Here is the function it calls... function imgUpload(){ if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { // document.getElementById("txtHint").innerHTML=xmlhttp.responseText; alert(xmlhttp.responseText); } } var imgFile = document.getElementById("img"); var formData = new FormData(); // Create a FormData instance formData.append("upload", imgFile.files[0]); //Add the file xmlhttp.open("POST","img_upload.php",true); xmlhttp.setRequestHeader("Content-type","multipart/form-data"); xmlhttp.send(formData); } My PHP page to process the POST currently does nothing more then echo back the array of the post... &lt;?php print_r($_POST); exit; ?&gt; My problem is when I get the result of the POST back, it's an empty array. Apparently I'm not actually sending the file to my processing page. Any insight on where i've gone wrong would be greatly appreciated. I have found several other posts on this forum and others that talk about the same issue or topic, but they don't seem to get me where I need to be. Thanks in advance!
answer count: 0
score: 0
has title: Ajax POST file upload
has comment: http://stackoverflow.com/comment/39686715

http://stackoverflow.com/q/25464239
has comment: http://stackoverflow.com/comment/39736890
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39736881
has title: Bind check box to an array item
answer count: 0
type: UnansweredQuestion
has body: Is there anyway that I can bind a checkbox to an array item so I can then write out a loop statement that shows only those array items whose checkbox is checked?
has comment: http://stackoverflow.com/comment/39736777
type: Question
tagged with: arrays

http://stackoverflow.com/q/25474906
tagged with: if-statement
linked to: http://stackoverflow.com/q/395618
has title: Which is better If-Else-If chain or multiple If
downvote count: 0
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/39756468
has answer: http://stackoverflow.com/a/25475174
favorite count: 0
has answer: http://stackoverflow.com/a/25475014
has comment: http://stackoverflow.com/comment/39757479
has answer: http://stackoverflow.com/a/25474948
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39799684
has body: Say I have a random number. Which is more efficient: if (num == 1) { } else if (num ==2) { } else if (num == 3) { } else if (num == 4) { } else if (num == 5) { } else {}; or if (num == 1) {}; if (num == 2) {}; if (num == 3) {}; if (num == 4) {}; if (num == 5) {}; is there much of a different performance-wise? Or should I do a switch chain?
has answer: http://stackoverflow.com/a/27334857
has answer: http://stackoverflow.com/a/25474977
has comment: http://stackoverflow.com/comment/39756453
has comment: http://stackoverflow.com/comment/39756467
type: Question
upvote count: 4

http://stackoverflow.com/a/25520779
score: 1
upvote count: 1
has body: Make sure your userQues is a form and that you do the serialize AFTER you added the inputs. Your code works, here: http://jsfiddle.net/9v3khbts/ HTML Serialize JS $(document).ready(function(){ function createDiv() { var count = 5; for (var i = 0; i < count; i++) { $('#userQues').append(" " + " Question A " + " " + " "); } }; createDiv(); $('#doSer').click(function(){ alert($('#userQues').serialize()) }) });
downvote count: 0
answers question: http://stackoverflow.com/q/25520451
has comment: http://stackoverflow.com/comment/39841962
has comment: http://stackoverflow.com/comment/39843053
has comment: http://stackoverflow.com/comment/39842148
type: Answer

http://stackoverflow.com/a/25398914
has comment: http://stackoverflow.com/comment/39648634
answers question: http://stackoverflow.com/q/25397003
has comment: http://stackoverflow.com/comment/39618142
has comment: http://stackoverflow.com/comment/39617755
score: 0
has comment: http://stackoverflow.com/comment/39617291
has comment: http://stackoverflow.com/comment/39617792
has comment: http://stackoverflow.com/comment/39617931
type: Answer
has body: Changes take place in the page, you post changes, fetch xml and update it. Now what you have against that.

http://stackoverflow.com/comment/39665979
comment on: http://stackoverflow.com/a/25424061
type: AnswerComment
has text: Nothing changed. same thing, not going to post data. just giving alert "Entering" That's it.
score: 0
type: Comment

http://stackoverflow.com/q/25447055
upvote count: 1
score: 1
tagged with: java
tagged with: struts
type: Question
has body: My code flow is as follows: When the user is selecting a particular year from a dropdown, the control goes to Javascript which takes the selected year and pass a particular URL. function ModelForYear() { var url = "modelforyear.do"; var e = document.getElementById("yearId"); var year = e.options[e.selectedIndex].text; url = url + "?yearId=" + year ; document.location.href = url; } This URL is mapped to an action class for doing some calculation and setting a variable value. However, after the calculation, I want my control to go back to the calling JSP page without resetting the selected year(Specifically the control should go back not as a new request but part of same request). I am using return mapping.findForward("searchLabelData"); but it is going to jsp as a new request it seems Could anyone help please....
answer count: 1
downvote count: 0
tagged with: jsp
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39710349
has title: Need to send control from Action Class to JSP
tagged with: action
has answer: http://stackoverflow.com/a/25490310
type: UnansweredQuestion

http://stackoverflow.com/q/25468424
tagged with: rotation
has body: I'm trying to make a few elements on my website rotate loopingly on hover. I've done it with css keyframe animation but when I mouse over or out, the element jumps uglingly. So I'm trying to do it with some fancy jQuery (since I already have it loaded on my page) and I came across this very helpful stack which the answer explains how to loop with the hover. BUT the explanation is for movement. I managed to move it around with hover, but would be cool to rotate (maybe even both, if it can handle it). Code for looping: $.fn.loopingAnimation = function(props, dur, eas) { if (this.data('loop') === true) { this.animate( props, dur, eas, function() { if( $(this).data('loop') === true ) $(this).loopingAnimation(props, dur, eas); }); } return this; // Don't break the chain }; $("#animate").hover(function(){ $(this).data('loop', true).stop().loopingAnimation({ 'margin-top': '50px'}, 500).loopingAnimation({'margin-top':'10px'},500); }, function(){ $(this).data('loop', false).stop(); // Now our animation will stop after fully completing its last cycle }); I then came across yet another stack which explains how to animate rotation with jQuery, but now I can't seem to be able to meld both codes together... code for rotate: $(document).ready(function (){ $({deg: 0}).animate({deg: 90}, { duration: 2000, step: function(now){ $("#rotate").css({ transform: "rotate(" + now + "deg)" }); } }); } ); I made a pen with both codes to get things easier. Anyone knows how to do it?
has comment: http://stackoverflow.com/comment/39744689
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39744778
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25468677
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15191058
type: Question
has comment: http://stackoverflow.com/comment/39744522
has title: Looping rotation on hover
has answer: http://stackoverflow.com/a/25468677
linked to: http://stackoverflow.com/q/2039750
has comment: http://stackoverflow.com/comment/39744478
score: 0

http://stackoverflow.com/comment/39692421
has text: Thanks a lot Snake.. For your help and support.. It worked like a charm.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25440189

http://stackoverflow.com/comment/40245110
has text: I had a similar issue, but I had :hover on the container element instead of the actual , putting :hover on the actual element helped
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25479789
score: 0

http://stackoverflow.com/q/25390307
tagged with: angularjs
favorite count: 0
tagged with: asset-pipeline
has title: How do I reference a static HTML rsource using the Grails Asset plugin?
has answer: http://stackoverflow.com/a/25390810
has answer: http://stackoverflow.com/a/25395092
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25390810
has body: I am using Grails 2.4.1 and the Grails Asset Pipeline Plugin version 1.9.7. I have a javascript file (it defines an AngularJS directive) which needs to reference a static HTML file (which will be used as the template for the AngularJS Directive). How do i reference the HTML file within the asset directory? Project Structure: grails-app assets javascripts directives hierarchyviewer.js hierarchyviewer.html Project Structure when using the Angular Template Asset pipeline grails plugin grails-app assets javascripts directives hierarchyviewer.js templates hierarchyviewer.tpl.html directivea.js contains: angular.module('HierarchyViewer', []).directive('hierarchyviewer',function(){ return { restrict: 'EA', scope: {}, replace: true, controller: function ($scope, $http) { }, templateUrl: 'hierarchyviewer.tpl.html' } }) However; when I try to load a page that references the directive, I get a 404 for the directives/directivea.html reference. How do I reference the template properly when using the Asset Pipeline plugin?
tagged with: grails
type: Question
upvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/25395092
downvote count: 0
tagged with: javascript
score: 4

http://stackoverflow.com/comment/39818495
type: AnswerComment
has text: Then it is a CORs problem. On the domain your trying to redirect to, you will need to send back some headers. `Access-Control-Allow-Origin: *` `Access-Control-Allow-Headers: accept, content-type` `Access-Control-Allow-Methods: GET, OPTIONS`
score: 0
comment on: http://stackoverflow.com/a/25492742
type: Comment

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

http://stackoverflow.com/comment/39793282
score: 1
comment on: http://stackoverflow.com/q/25494035
type: Comment
type: QuestionComment
has text: can you provide a jsfiddle?

http://stackoverflow.com/a/25511037
has comment: http://stackoverflow.com/comment/39824289
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25510796
answers question: http://stackoverflow.com/q/25510796
has comment: http://stackoverflow.com/comment/39824215
score: 6
type: Answer
has body: You could use JSON.parse to revert the string to an array, so: $('#dropdown').selectpicker('val', JSON.parse(strWard)); Edit, with single quotes fixed: var wards = dsFilterOptions.Wards.split(","); var strWard = '['; for (i = 0; i &lt; wards.length; i++) { strWard += '"' + wards[i] + '",'; } strWard = strWard.slice(0, -1); //remove last comma strWard += ']'; $('#dropdown').selectpicker('val', JSON.parse(strWard));
upvote count: 6

http://stackoverflow.com/comment/39670585
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25428113
has text: Essentially a duplicate of http://stackoverflow.com/questions/24189086/ember-accessing-parent-routes-model-from-controller/24189949#24189949, but a slight difference, so I'll copy and paste and show the diff

http://stackoverflow.com/comment/39878596
has text: I see you hiding photos not removing them. fadeOut does not remove them from the DOM, just animates a fade out then sets their display to none
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25540942
score: 1

http://stackoverflow.com/a/25490578
answers question: http://stackoverflow.com/q/25490562
upvote count: 3
type: Answer
score: 3
downvote count: 0
has body: use jQuery child selector. Try this: $('ul.first-ul &gt; li').length DEMO

http://stackoverflow.com/q/25429312
favorite count: 0
has body: I am passing an object to a web worker, and priot to passing it console.log pretty prints it with clickable properties. Now, inside web worker when I do a console.log I just get an [object Object] I can get the object printed like console.log(JSON.stringify(x)); but this is not the same as that pretty console log in the main window. How could I get that pretty print here as well? PS Meanwhile I found this answer web worker console.log as I was typing the question. So, console is not implemented for web workers?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/7251779
answer count: 0
downvote count: 0
score: 1
type: Question
has title: console.log is not pretty printing an object in web worker, instead it just shows [object Object]
tagged with: javascript
tagged with: web-worker
upvote count: 1
tagged with: console

http://stackoverflow.com/comment/39628569
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25406090
has text: This question appears to be off-topic because it is about the capability of javascript!!!?!

http://stackoverflow.com/q/25464854
answer count: 1
tagged with: select
has body: i have one problem, i want to use select element for change url of my list using the plugin https://github.com/sdepold/jquery-rss. This link, is my code with select, but not functional: http://jsfiddle.net/diegomachado/ktz5g892/ jQuery(function($) { $("#rss-feeds").rss("http://unsplash.com/rss", { limit: 10, layoutTemplate: '&lt;ul&gt;{entries}&lt;/ul&gt;', entryTemplate: '&lt;li&gt;{teaserImageUrl}&lt;/li&gt;', effect: 'slideFastSynced' }) })
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25464952
tagged with: javascript
tagged with: jquery
type: Question
has title: Using select for change url feed in jquery.rss
accepted answer: http://stackoverflow.com/a/25464952
score: 0
tagged with: rss-reader

http://stackoverflow.com/comment/53771036
has text: Also, if you want the text outside of the overlay box, all you need to do is adjust the "top" position. If the background stays white, you will also have to obviously change the color of the text. (I noticed, what I think was you asking for this on your comments above.)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/32958537
type: AnswerComment

http://stackoverflow.com/comment/73863359
type: QuestionComment
type: Comment
has text: I am having the same problem with Zend Framework 2. 3 years still no answer.
comment on: http://stackoverflow.com/q/25409804
score: 0

http://stackoverflow.com/comment/39729714
comment on: http://stackoverflow.com/a/25460266
type: AnswerComment
score: 0
type: Comment
has text: its mean the file script.js is not found u need to correct its path

http://stackoverflow.com/q/25443629
score: -2
has body: I have got this problem that is driving me crazy. I have made this Javascript function that is working in every browser and only in IE9 and lower I get this error. This is the error I got in dutch. SCRIPT5007: Kan de eigenschap value van een niet-gedefinieerde verwijzing of een verwijzing naar een lege waarde niet instellen This is the translated version: SCRIPT5007: Can the value property of an undefined reference or a reference to an empty value not set. This is my Javascript function: function Calculate() { var l = document.getElementById('aantal-caps').value; var l2 = document.getElementById('aantal-paraplu').value; var l3 = document.getElementById('aantal-blue-tooth').value; var l4 = document.getElementById('aantal-backpack').value; var result = l * 12 + l2 * 12 + l3 * 20 + l4 * 50; document.getElementById('totaal').innerHTML = result; document.aanvraag.totaal.value = result; var punten = 345; // Aantal spaarpunten van de klant. Die kan jij hier inschieten. var bereken = punten - result; if(bereken < 0) { bereken = 'Saldo niet toereikend'; document.getElementById("Submitform").disabled = true; } else { bereken = punten - result; document.getElementById("Submitform").disabled = false; } document.getElementById('punten-aantal').innerHTML = bereken; document.getElementById('uwpunten').innerHTML = punten; } window.onload=Calculate; This is my HTML table where I show the selected javascript values: Spaarpunten Uw aantal spaarpunten : 0 De huidige selectie kost u : 0 ------------------------------- ----- U heeft nog : 0 This is my selection form: Kies een product Kies het aantal <option value="1" <?php if(isset($_POST['Submitform']) && strip_tags($_POST['aantal-caps']) == "1") {echo "selected='selected'"; } ?>>1 <option value="2" <?php if(isset($_POST['Submitform']) && strip_tags($_POST['aantal-caps']) == "2") {echo "selected='selected'"; } ?>>2 <option value="3" <?php if(isset($_POST['Submitform']) && strip_tags($_POST['aantal-caps']) == "3") {echo "selected='select…
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39698706
has title: SCRIPT5007 Javascript error in IE9 and lower
favorite count: 0
upvote count: 0
has comment: http://stackoverflow.com/comment/39697858
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25444289
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/39764706
type: Question
downvote count: 2

http://stackoverflow.com/q/25425558
upvote count: 1
has title: React changes the html before rendering like changing the styles, adding span tags etc
score: 1
type: Question
has body: I am using qunit to test my react component, my first test case is to compare the html react is giving with what i am expecting. I am using React.renderComponentToString method to retrieve html being rendered. However i have noticed, react appends its own classes and styles. so to remove that i used regular expression var stripReactAttrs = / data-react[-\w]+="[^"]+"/g; So that I can get original/expected html, but it also does other manipulations like converting space into span tag, removing close input tags. Can someone please confirm me what is it that ReactJS does, so that I can prepare my expected html accordingly and can test my component?
tagged with: reactjs
downvote count: 0
tagged with: javascript
answer count: 1
tagged with: qunit
favorite count: 0
has answer: http://stackoverflow.com/a/25514880
type: UnansweredQuestion

http://stackoverflow.com/q/25406050
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39628402
favorite count: 0
has answer: http://stackoverflow.com/a/25406200
has title: Modify JS from clientside
type: UnansweredQuestion
upvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/39628143
tagged with: javascript
score: -1
has body: Just a newbie question: Is it possible to modify scripts written in JS from my browser Chrome and run it successfully? I keep getting an error: Uncaught TypeError: undefined is not a function onClick even when I only modified a single letter of an already existing function.
has comment: http://stackoverflow.com/comment/39628566

http://stackoverflow.com/q/25545336
has body: I have an iframe that needs to rezise it's height each time it is loaded, I tried so many examples but all of them worked fine on IE and Chrome but not FireFox, until I tried this one and it works on everything function autoResize() { var subscriptionFrame = jQuery("#frame_name_here"); var innerDoc = (subscriptionFrame.get(0).contentDocument) ? subscriptionFrame .get(0).contentDocument : subscriptionFrame.get(0).contentWindow.document; if (innerDoc.body.scrollHeight == 0) innerDoc.location.reload(true); subscriptionFrame.height(innerDoc.body.scrollHeight + 10); } &lt;iframe src="uploadFile.xhtml" class="upload-iframe" id="frame_name_here" onload="autoResize();"&gt;&lt;/iframe&gt; But there is a problem that this script calls the onload many times (recursive) , any idea why?
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39887807
has comment: http://stackoverflow.com/comment/39886113
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25546571
tagged with: http://stackoverflow.com/tag/html
tagged with: iframe
has comment: http://stackoverflow.com/comment/39886369
type: Question
has comment: http://stackoverflow.com/comment/39886125
has comment: http://stackoverflow.com/comment/39887993
has title: Iframe attribute onload is called many times
tagged with: javascript

http://stackoverflow.com/q/25517901
score: 0
tagged with: design-patterns
type: Question
has comment: http://stackoverflow.com/comment/39838019
has body: (Except the obvious dependency on jquery library of course.) My reason: not to introduce new entities/code if it is possible to make as simple as it is. E.g. example: var app = {}; app.modules = {}; app.mediator = $({}); // response example app.mediator.on( 'some-event', function ( e, data ) { console.log( 'gotcha!', data ); }); // module example app.modules.module = ( function ( mediator ) { // event trigger example mediator.trigger( 'some-event', data ); })( app.mediator );
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39837119
has comment: http://stackoverflow.com/comment/39837099
tagged with: mediator
has title: What pros and cons of using a construct $({}) as a mediator in module design?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39838091
answer count: 0

http://stackoverflow.com/comment/39646284
type: Comment
comment on: http://stackoverflow.com/a/25410491
has text: If the promise objects are actually just promises (and not methods that return promises) there's nothing wrong with calling .then multiple times on them. `foo = Promise.resolve('yay'); foo.then(bar1); foo.then(bar2);` would just end up having bar1 and bar2 called, in that order, exactly once.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39628082
score: 0
type: Comment
type: QuestionComment
has text: Set a smaller [tickInterval](http://api.highcharts.com/highcharts#yAxis.tickInterval) on yAxis.
comment on: http://stackoverflow.com/q/25390410

http://stackoverflow.com/comment/39879548
type: QuestionComment
comment on: http://stackoverflow.com/q/25541459
score: 0
has text: If i create the div outside of the innerHTML insertion then it will create a new subdiv, but the contents of the loop will be placed within the main div, outside of the subdiv, rather than nested in it
type: Comment

http://stackoverflow.com/q/25407819
answer count: 0
has body: Very simple question: Why does the following code return undefined values? function GetLocation(location) { Lat = location.coords.latitude; Lon = location.coords.longitude; gCoords = "gCoords: " + Lat + "," + Lon; gLat = Lat; gLon = Lon; $timeout(function() { calculate(); }); return [gCoords, gLat, gLon]; } var GPSInfo = navigator.geolocation.watchPosition(GetLocation); var info1 = GPSInfo[0] var info2 = GPSInfo[1] var info3 = GPSInfo[2] console.log( "gCoords: " + info1 + " gLat: " + info2 + " gLon: " + info3 ) The console logs this: gCoords: undefined gLat: undefined gLon: undefined Does anyone have any ideas on this? Thank's in advanced!!!
type: Question
has comment: http://stackoverflow.com/comment/39632067
tagged with: javascript
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39631998
type: UnansweredQuestion
tagged with: geolocation
has comment: http://stackoverflow.com/comment/39631728
tagged with: w3c-geolocation
has title: `navigator.geolocation.watchPosition()` returns undefined

http://stackoverflow.com/comment/39691674
type: QuestionComment
comment on: http://stackoverflow.com/q/25439717
score: 0
has text: `Object.prototype.toString.call(this)`
type: Comment

http://stackoverflow.com/q/25451039
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39712226
has comment: http://stackoverflow.com/comment/39711723
has comment: http://stackoverflow.com/comment/39712510
score: 1
has body: Is there a way to find out if an data- attribute is set to an empty value or if the value of it is not set at all? See this fiddle example (Check the console when clicking on the elements): http://jsfiddle.net/StephanWagner/yy8qvwfp/ undefined empty null value Im having the issue with the third example. I need to know if the attribute actually is set to an empty value or if it is not set at all. Is that actually possible? EDIT: The reason I'm asking is that I'm updating content with the attributes value, so data-test="" should update the content to an empty value, but data-test should do nothing at all
has comment: http://stackoverflow.com/comment/39712326
has comment: http://stackoverflow.com/comment/39711808
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39712238
has comment: http://stackoverflow.com/comment/39711742
has title: How can I find out if an data- attribute is set to an empty value?
has answer: http://stackoverflow.com/a/25451393
accepted answer: http://stackoverflow.com/a/25451393
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39712359
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39712319

http://stackoverflow.com/comment/39607539
has text: @abraham Indeed I thought of that. Care to add a second answer on `externally_connectable` ?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25393921

http://stackoverflow.com/q/25443086
has comment: http://stackoverflow.com/comment/39697532
has comment: http://stackoverflow.com/comment/39697996
has comment: http://stackoverflow.com/comment/39697966
tagged with: wordpress
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39697595
score: 1
has body: I am trying to loop a jquery script so that it affects all the post loaded. The script has a php variable in it so put it in the loop and thought that this was enough but instead it's only sort of applied only to the first post. Here's my php for the script &lt;?php $valutazione0 = simple_fields_get_post_value(get_the_id(), array(3, 1), true);?&gt; &lt;div class="postbackrotator" id="rotator-&lt;?php the_ID(); ?&gt;" style="height:43px;width:43px"&gt;&lt;canvas height="43" width="43" id="my-canvas"&gt;&lt;/canvas&gt;&lt;/div&gt; Here I'm getting a value from Simple Fields, it works fine in single.php for example. Below I have the script with the variable &lt;script type="text/javascript"&gt; jQuery(document).ready(function(){ $('#rotator-&lt;?php the_ID(); ?&gt;').rotator({ starting: 0, ending: &lt;?php echo($valutazione0)?&gt;, lineWidth: 1.5, fontSize: '13px', radius: 21 }); }); &lt;/script&gt; Everything is in the loop that loads the posts but it's not working. What am I doing wrong here? What is the proper way to apply a script to all the posts in the loop?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39698094
has comment: http://stackoverflow.com/comment/39698181
downvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39698025
favorite count: 0
has title: jQuery script in Wordpress loop
has comment: http://stackoverflow.com/comment/39696929
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25443146
tagged with: php

http://stackoverflow.com/a/25541099
has body: The closeButton option will always cause the modal to be closed when the corresponding button is clicked. And looking at the leanModal source, there doesn't seem to be any direct way to manipulate its event-handling callback. So if all you want to do is to keep the form modal opened if the fields are not filled, and let your server-side codes perform the validation you can just do the following: $('#loginform').submit(function(e){ if(!$('#username').val()) { $('#loginmodal').show(); } else console.log("Enter your username"); return false; }); Live demo on jsfiddle. Notice that I added an id to the form tag, and fixed some of the malformed HTML tags in the fiddle.
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25540705
downvote count: 0

http://stackoverflow.com/a/25480691
has comment: http://stackoverflow.com/comment/39767520
has comment: http://stackoverflow.com/comment/39768336
has body: You can use the HTML tag. e.g.: ...
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39767461
answers question: http://stackoverflow.com/q/25480640
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/39767477
score: 3
accepted answer of: http://stackoverflow.com/q/25480640

http://stackoverflow.com/comment/39795158
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25493271
type: Comment
has text: one correction, in 6th line instead of return today; should be return today.getFullYear() + "/" + (today.getMonth() + 1) + "/" + today.getDate(); apart from that the code works perfect!

http://stackoverflow.com/q/25399174
tagged with: jquery-masonry
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39616312
has title: Masonry not initialising correctly after ajax call
type: AnsweredQuestion
has body: I'm using this plugin to set a grid gallery. This gallery shows X number of images. These images are loaded into the HTML after an ajax call: $.ajax({ type:"POST", dataType:"html", contentType:"application/x-www-form-urlencoded", url:url, data:data, success:function(response) { $("#masonry-container").html(' '+response+' '); initialiceMasonry(); } ,timeout:10000 }); As you can see, after appending the server response it calls initialiceMasonry(); var container = $("#content"); container.masonry({ columnWidth:190, itemSelector:".item", gutter:8, }); After that initialisation the images are shown overlapped, looking for another questions about this plugin I found the option to use imagesLoaded but it returns me this error: Uncaught TypeError: undefined is not a function And selects the line where i call imagesLoaded From server i get this HTML: Section 1 Section 1 How can I initialise Masonry correctly to fix my overlapping problem?
accepted answer: http://stackoverflow.com/a/25399339
has comment: http://stackoverflow.com/comment/39615801
type: Question
has answer: http://stackoverflow.com/a/25399339
score: 0

http://stackoverflow.com/comment/39768851
has text: It says : Line No 35.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25480007
type: Comment

http://stackoverflow.com/a/25452577
has comment: http://stackoverflow.com/comment/39715049
has comment: http://stackoverflow.com/comment/39715230
has comment: http://stackoverflow.com/comment/39715607
has comment: http://stackoverflow.com/comment/39715603
type: Answer
has comment: http://stackoverflow.com/comment/39716692
downvote count: 1
has comment: http://stackoverflow.com/comment/39715092
has comment: http://stackoverflow.com/comment/39715028
has comment: http://stackoverflow.com/comment/39715154
score: 3
answers question: http://stackoverflow.com/q/25452544
has body: Use the starts with selector: $("[id^='slide']").each(...) Note though that this will match all elements with an ID that begins with "slide". The better solution is to assign a class to the elements you want to target, and select the class instead.
has comment: http://stackoverflow.com/comment/39714866
upvote count: 4
has comment: http://stackoverflow.com/comment/39715115
has comment: http://stackoverflow.com/comment/39716492
has comment: http://stackoverflow.com/comment/39715161
has comment: http://stackoverflow.com/comment/39714681
has comment: http://stackoverflow.com/comment/39715368
has comment: http://stackoverflow.com/comment/39714810
has comment: http://stackoverflow.com/comment/39715004
has comment: http://stackoverflow.com/comment/39715201
has comment: http://stackoverflow.com/comment/39714751
has comment: http://stackoverflow.com/comment/39714933

http://stackoverflow.com/comment/39797002
score: 0
type: AnswerComment
has text: For the request, can I use this code: `var xhr = new XMLHttpRequest(); xhr.open("GET", "http://api.steampowered.com/ISteamUser/GetFriendList/v0001/?key="+API_KEY+"&steamid=76561198041707719&relationship=all", false); xhr.send(); var data = JSON.parse(xhr.responseText); `
type: Comment
comment on: http://stackoverflow.com/a/25493226

http://stackoverflow.com/q/25479775
type: Question
accepted answer: http://stackoverflow.com/a/25480462
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25479828
tagged with: jquery
has answer: http://stackoverflow.com/a/25479828
answer count: 2
has body: How to make a wizard style like: http://www.codecademy.com/courses/web-beginner-en-HZA3b/0/1?curriculum_id=50579fb998b470000202dc8b (when open page then it shows a tooltip with "NEXT" button on it which explains how to use the application) I have searched for JQuery Wizard or Steps on Google but nothing similar found. I have tried to use http://thecodemine.org/# a formwizard and adapt to my website but with no result because it is for forms. If this isn't the place to ask questions as this, please tell me to delete.
tagged with: http://stackoverflow.com/tag/html
has title: JQueryTooltip Wizard
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25480462

http://stackoverflow.com/q/25433299
linked to: http://stackoverflow.com/q/6393632
has comment: http://stackoverflow.com/comment/39679125
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
has body: I have a Tab item. Which is kind of different, because it works vertically. FIDDLE Functionally it's working fine. Problem I am facing is if I click Tab 2 or Tab 3 , Tab item for these remain at the top. here is the quick Image: You can see I have selected tab 3 and "Tab3 item" is showing it the top. What I am wanting is "Tab item " should remain at the same level with "tab" So here "tab3 item" should in line with "tab3". I know this is Possible with CSS giving margin top on each of the tab item. But the problem is, there can be 100 of list. And for each of them giving margin can be a pain. So I was looking for a dynamic solution so that "tab item" follow related tab. Is this possible with jQuery ? I am not very good in jquery and I am looking for help. Any solution will be much appreciated. HTML tab1 tab2 tab3 tab1 Item tab2 Item tab3 Item JS for tab $(document).ready(function() { $("#content div").hide(); // Initially hide all content $("#tabs li:first").attr("id","current"); // Activate first tab $("#content div:first").fadeIn(); // Show first tab content $('#tabs li a').click(function(e) { e.preventDefault(); if ($(this).attr("id") == "current"){ //detection for current tab return } else{ $("#content div").hide(); //Hide all content $("#tabs li").attr("id",""); //Reset id's $(this).parent().attr("id","current"); // Activate this $( $(this).attr('href')).fadeIn(); // Show content for current tab } }); }); [Sorry for Bad English :)]
favorite count: 0
tagged with: tabs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25433477
tagged with: css
has comment: http://stackoverflow.com/comment/39679239
score: 1
has comment: http://stackoverflow.com/comment/39679456
upvote count: 1
type: Question
has title: jquery Tab content placement issue

http://stackoverflow.com/a/25414852
downvote count: 0
has comment: http://stackoverflow.com/comment/39648143
score: 63
upvote count: 63
type: Answer
answers question: http://stackoverflow.com/q/25414778
has body: You need to bind the handler to a static element, not the rows that can be added dynamically. So it should be: $("#paginatedTable").on("click", ".test .toggleTest", function ...);
accepted answer of: http://stackoverflow.com/q/25414778
has comment: http://stackoverflow.com/comment/39648373
has comment: http://stackoverflow.com/comment/39645385
has comment: http://stackoverflow.com/comment/39676993
type: AcceptedAnswer

http://stackoverflow.com/q/25454809
has comment: http://stackoverflow.com/comment/39719162
downvote count: 2
has comment: http://stackoverflow.com/comment/39719266
linked to: http://stackoverflow.com/q/5101948
type: Question
has body: Why does JavaScript has both undefined and null What purpose do they serve Why can't JavaScript use null for all unassigned values as Java?
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/39719380
has title: Undefined vs null in javascript
tagged with: javascript
linked to: http://stackoverflow.com/q/5076944
answer count: 1
duplicate of: http://stackoverflow.com/q/5076944
favorite count: 0
has answer: http://stackoverflow.com/a/25454855
type: UnansweredQuestion

http://stackoverflow.com/comment/39883203
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25543602
has text: Because you are breaking the code with line-break use \n\ or clear the spaces...

http://stackoverflow.com/a/25532121
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39863571
type: Answer
downvote count: 0
has body: To highlight the submenu link and its top most parent link use the following code: $(this).css("background-color","red"); $(this).parents("li").last().find("a:first").css("background-color","red"); The first line highlights the link. The second line will look for the top-most 'li' then select its immediate 'a' tag and highlight it UPDATE: To remove the highlight of the previous click use a CSS class: .highlight { background-color: red; } Then use the following code: $("#menu").find(".highlight").removeClass('highlight'); $(this).addClass('highlight'); $(this).parents("li").last().find("a:first").addClass('highlight');
has comment: http://stackoverflow.com/comment/39863318
accepted answer of: http://stackoverflow.com/q/25531623
score: 1
answers question: http://stackoverflow.com/q/25531623

http://stackoverflow.com/a/25453301
score: 0
type: AcceptedAnswer
has body: I left out the data-dom-cache="true" on &lt;div data-role="page" id="homepage" data-dom-cache="true"&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/25452497
has comment: http://stackoverflow.com/comment/39720814
answers question: http://stackoverflow.com/q/25452497
has comment: http://stackoverflow.com/comment/39721162

http://stackoverflow.com/q/25533654
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25534179
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39865335
has comment: http://stackoverflow.com/comment/39865288
has title: Angular, getting index of checked checkbox (or radio) in ng-repeat
has answer: http://stackoverflow.com/a/25534753
has body: I am creating a set of forms with ng-repeat, each form has a checkbox(might change to radio if that matters) and I am trying to manipulate the specific level that is checked. So what I am trying to do is pass the index of the checkbox (the index of itself within the ng-repeat. Let me show you what I mean {{parent.name}} So here I'm just repeating the name with the input under the ng-model="levelPicker". I am pushing a button outside of this which uses a function that I've set up that would only need to pass the checkbox's index within the repeat so it's like this - Submit Is there some way in angular to target the checked checkbox and get its index within the repeat? I am using this to add children within it. I've tried a few things but i'm not sure how to refer to it directly and get it's index (within angular). Any input would be much appreciated. Thanks!!

http://stackoverflow.com/a/33475550
upvote count: 6
answers question: http://stackoverflow.com/q/25441646
score: 6
has comment: http://stackoverflow.com/comment/54739899
downvote count: 0
has body: You can't remove resize handle without resize:none; property. But you can position a div on those dotted lines(resize handles). See Demo here textarea { position: relative; margin: 20px 0 0 20px; z-index: 1; } .wrap { position: relative; display: inline-block; } .handle-hide { height:12px; width:12px; position: absolute;background:#fff; bottom: 2px; right: 2px; pointer-events: none; z-index: 2; }
type: Answer

http://stackoverflow.com/comment/79948524
has text: has a solution been obtained?
comment on: http://stackoverflow.com/a/25484415
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25422068
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25421744
answers question: http://stackoverflow.com/q/25421744
type: Answer
downvote count: 0
score: 1
has body: Easy with HTML, CSS and a JavaScript line: HTML: Select a value Value1 Value2 a b c d e f g h CSS: #secondselect, #secondselect option { display: none; } #secondselect.value1, #secondselect.value2 { display: block; } .value1 option[value="a"], .value1 option[value="b"], .value1 option[value="c"], .value1 option[value="d"] { display: block !important; } .value2 option[value="e"], .value2 option[value="f"], .value2 option[value="g"], .value2 option[value="h"] { display: block !important; } See in action: http://jsfiddle.net/nukz3ns3/ UPDATED: Also you can do a function for change to default value when firstselect change: function setSecondSelect( select ){ var secondselect = document.getElementById('secondselect'); secondselect.className=select.value; secondselect.selectedIndex = (select.value === 'value1')?0:4; } See how it works: http://jsfiddle.net/nukz3ns3/1/

http://stackoverflow.com/a/25490072
has body: i had written a directive for exactly similar purpose csapp.directive("csReloadOn", ["$timeout", "$log", function ($timeout, $log) { var getTemplate = function () { return '&lt;div ng-if="doRefreshPageOnModeChange"&gt;&lt;div ng-transclude=""&gt;&lt;/div&gt;&lt;/div&gt;'; }; var linkFunction = function (scope, element, attrs) { scope.doRefreshPageOnModeChange = true; scope.$watch(attrs.csReloadOn, function (newVal, oldVal) { if (newVal === oldVal) return; $log.info("changed mode from : " + oldVal + ", to : " + newVal); scope.doRefreshPageOnModeChange = false; $timeout(function () { scope.doRefreshPageOnModeChange = true; }, 100); }); }; return { restrict: 'A', transclude: true, template: getTemplate, link: linkFunction }; }]);
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/39785013
answers question: http://stackoverflow.com/q/25489766
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25489766

http://stackoverflow.com/a/25474727
has comment: http://stackoverflow.com/comment/39786644
answers question: http://stackoverflow.com/q/25474229
type: Answer
has comment: http://stackoverflow.com/comment/39787437
has body: I think for the way you are creating the service is more appropiate for Service than for factory, even that will work. I would write my factory like below without using new: app.factory('myFactory', function () { var myDataModel = {}; myDataModel.name = name; myDataModel.results = []; myDataModel.isSearching = false; myDataModel.get = function (id) { myDataModel.isSearching = true; $http.get('url' + '?name=' + myDataModel.name + '&amp;id=' + id) .then(function (data) { myDataModel.results = data; myDataModel.isSearching = false; }); }; myDataModel.display = function () { alert('the result of ' + myDataModel.id + ' is:' + myDataModel.results.join(', ')); }; return myDataModel; });
has comment: http://stackoverflow.com/comment/39765126
score: 0

http://stackoverflow.com/comment/39897901
type: Comment
comment on: http://stackoverflow.com/q/25548707
type: QuestionComment
score: 0
has text: @Tim, Ok I will do that. But will this improve the processing? It will only make code more readable I think.

http://stackoverflow.com/a/25412163
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39644647
upvote count: 1
answers question: http://stackoverflow.com/q/25412059
type: Answer
has comment: http://stackoverflow.com/comment/39644947
has comment: http://stackoverflow.com/comment/39640388
has comment: http://stackoverflow.com/comment/39643794
has body: The blur function is removing the text from the label. You can stop that by simply using an if statement. if ( type[0].data != '' ) { $('.hover-test').html(tip[0].data); } Fiddle: http://jsfiddle.net/tvn4Ldmn/10/ If you want it so the value only stays after you click, you'll need to check if you have clicked as well. if ( type[0].data != '' || has_clicked == false ) { $('.hover-test').html(tip[0].data || ''); } Note: has_clicked is just an example. The "click" logic is not included in your code or fiddle. You might look at the stars for the class star-rating-on to determine if the user has clicked. I believe that would work. Update (based on comment by author) If you want the text to preserve the value that was originally clicked on, you'll want to use a variable. The variable should be the "fall back" that was mentioned above (replacing the empty string, ''). You need a variable that is within the scope of your other functions. You could use a global variable (window.variable_name), but that's not very clean. You can also just put the variable before the other functions. Read about variable scope for more info. var selected_rating = ''; Next, use that variable as the "fall back" for when no hover text is being displayed. Until you click on a star, this will be blank. $('.hover-test').html(tip[0].data || selected_rating); Finally, a couple of functions that will remember which star was previously clicked on, as well as support for the reset button. // Reset the selected rating: $('.rating').on('click', 'div.rating-cancel', function() { selected_rating = ''; $('.hover-test').html(''); }); // Remember a rating when it is selected: $('.rating').on('click', 'div.star-rating', function(e) { selected_rating = jQuery(this).find('a').attr('title'); $('.hover-test').html(selected_rating); }); Fiddle / Demo: http://jsfiddle.net/tvn4Ldmn/16/

http://stackoverflow.com/comment/39837644
score: 1
has text: If your project will work extensively with dates I recommend you having a look at http://momentjs.com
comment on: http://stackoverflow.com/q/25518239
type: Comment
type: QuestionComment

recursion
type: Tag
tags question: http://stackoverflow.com/q/25406601
tags question: http://stackoverflow.com/q/25456013
tag name: recursion
tags question: http://stackoverflow.com/q/25436413
tags question: http://stackoverflow.com/q/25465199
tags question: http://stackoverflow.com/q/25397554
tags question: http://stackoverflow.com/q/25456912
tags question: http://stackoverflow.com/q/25534906

http://stackoverflow.com/q/25436177
has title: Error loading external javascript files in jade layout in Angularjs
favorite count: 0
tagged with: angularjs
type: Question
answer count: 2
has body: I'm new at Angularjs and just want to load some external js files to work in my app (they're big so I don't want to put them directly into the controller). I tried to use ng-include(src='javascripts/javascriptfile.js') But I get these error messages Error: Syntax Error: Token 'js' is an unexpected token at column 28 of the expression [javascripts/javascriptfile.js] starting at [js]. TypeError: undefined is not a function The problem is, it works when I was using these files in express with no error messages, so I know it's not the javascript file, and when I try to use things like (script src= 'javascripts/javascriptfile.js') without the ng-include, nothing executes.
upvote count: 2
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/42827485
has answer: http://stackoverflow.com/a/25436315
score: 2
tagged with: pug
downvote count: 0

http://stackoverflow.com/q/25496064
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25496123
score: 0
has comment: http://stackoverflow.com/comment/39796234
has comment: http://stackoverflow.com/comment/39796257
has comment: http://stackoverflow.com/comment/39796355
has body: I may get hammered for this question because it's no doubt very basic Javascript. Please forgive the syntax, I want to see if my logic is right and if there is a better way. I'm attempting to create a Macro. The Macro should return the button choice made by the visitor, either Yes or No. On the particular page in question the website visitor is asked to click one of two buttons: a Yes button or a No button. Here they are: No Yes Here's my attempt to create a Macro. I've no doubt there is a better way. Please tell me. I'd like to track which button the visitor clicks: Is this "right"? Is my logic correct? Is there a simpler solution?
has comment: http://stackoverflow.com/comment/39796261
possible better answer: http://stackoverflow.com/a/25496123
has answer: http://stackoverflow.com/a/25496115
accepted answer: http://stackoverflow.com/a/25496115
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39796278
has title: Learning Javascript - A Yes|No Macro based on clicks

asp.net
tags question: http://stackoverflow.com/q/25409001
tags question: http://stackoverflow.com/q/25503459
tags question: http://stackoverflow.com/q/25512977
tags question: http://stackoverflow.com/q/25514467
tags question: http://stackoverflow.com/q/25509120
tags question: http://stackoverflow.com/q/25426259
tags question: http://stackoverflow.com/q/25487697
tags question: http://stackoverflow.com/q/25505113
tags question: http://stackoverflow.com/q/25392937
tags question: http://stackoverflow.com/q/25489902
tags question: http://stackoverflow.com/q/25505997
tags question: http://stackoverflow.com/q/25536180
tags question: http://stackoverflow.com/q/25406704
tags question: http://stackoverflow.com/q/25462435
tags question: http://stackoverflow.com/q/25500105
tags question: http://stackoverflow.com/q/25541907
tags question: http://stackoverflow.com/q/25407975
tags question: http://stackoverflow.com/q/25513597
tags question: http://stackoverflow.com/q/25537296
tags question: http://stackoverflow.com/q/25408353
tags question: http://stackoverflow.com/q/25518645
tags question: http://stackoverflow.com/q/25401886
tags question: http://stackoverflow.com/q/25545123
tags question: http://stackoverflow.com/q/25507622
tags question: http://stackoverflow.com/q/25507023
tags question: http://stackoverflow.com/q/25410470
tags question: http://stackoverflow.com/q/25474138
tags question: http://stackoverflow.com/q/25453743
tags question: http://stackoverflow.com/q/25545947
tags question: http://stackoverflow.com/q/25539663
tags question: http://stackoverflow.com/q/25423249
tags question: http://stackoverflow.com/q/25431269
tags question: http://stackoverflow.com/q/25515164
tags question: http://stackoverflow.com/q/25522374
tags question: http://stackoverflow.com/q/25538117
tags question: http://stackoverflow.com/q/25434328
tags question: http://stackoverflow.com/q/25498089
tags question: http://stackoverflow.com/q/25428931
tags question: http://stackoverflow.com/q/25438835
tags question: http://stackoverflow.com/q/25444332
tags question: http://stackoverflow.com/q/25508015
tags question: http://stackoverflow.com/q/25522030
tags question: http://stackoverflow.com/q/25455684
tags question: http://stackoverflow.com/q/25539077
tags question: http://stackoverflow.com/q/25523272
tags question: http://stackoverflow.com/q/25482554
tags question: http://stackoverflow.com/q/25540195
tags question: http://stackoverflow.com/q/25489931
tags question: http://stackoverflow.com/q/25489236
tags question: http://stackoverflow.com/q/25508437
tags question: http://stackoverflow.com/q/25422685
tags question: http://stackoverflow.com/q/25511760
tags question: http://stackoverflow.com/q/25431309
tags question: http://stackoverflow.com/q/25548707
tags question: http://stackoverflow.com/q/25506949
tags question: http://stackoverflow.com/q/25519023
tags question: http://stackoverflow.com/q/25525723
tags question: http://stackoverflow.com/q/25531570
tags question: http://stackoverflow.com/q/25488595
tags question: http://stackoverflow.com/q/25399443
tags question: http://stackoverflow.com/q/25500849
tags question: http://stackoverflow.com/q/25397003
tags question: http://stackoverflow.com/q/25539447
tags question: http://stackoverflow.com/q/25482746
tags question: http://stackoverflow.com/q/25465825
tags question: http://stackoverflow.com/q/25511286
tags question: http://stackoverflow.com/q/25408779
tags question: http://stackoverflow.com/q/25486334
tags question: http://stackoverflow.com/q/25505157
type: Tag
tags question: http://stackoverflow.com/q/25444350
tags question: http://stackoverflow.com/q/25408812
tags question: http://stackoverflow.com/q/25404915
tags question: http://stackoverflow.com/q/25481396
tags question: http://stackoverflow.com/q/25461613
tags question: http://stackoverflow.com/q/25489688
tags question: http://stackoverflow.com/q/25405543
tags question: http://stackoverflow.com/q/25405342
tags question: http://stackoverflow.com/q/25403447
tags question: http://stackoverflow.com/q/25392534

http://stackoverflow.com/comment/39713428
type: Comment
has text: TJ, thank you for your quick response. But this solution does not work. Would the button being inside of a list item be the reason?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25451756

http://stackoverflow.com/a/25455733
score: 0
has body: The one i use is google recaptcha its free and easy to implement. http://www.google.com/recaptcha/intro/
type: Answer
answers question: http://stackoverflow.com/q/25455684

http://stackoverflow.com/q/25402512
has body: I am using the latest version of socket.io (1.0.6) to make an online multiplayer game with Phaser and Node. My problem is that once the clients have connected, they will occasionally and at random, disconnect. There does not seem to be a specific case in which this happens. Sometimes it is while the game is completely idle, other times it is while all players are sending inputs to the server. By checking the debug output from socket.io, I found that the reason for the disconnects is a "ping timeout". Specifically, the following line is being fired from the socket.js library file: Socket.prototype.setPingTimeout = function () { var self = this; clearTimeout(self.pingTimeoutTimer); self.pingTimeoutTimer = setTimeout(function () { self.onClose('ping timeout'); // &lt;------------------------ }, self.server.pingInterval + self.server.pingTimeout); }; Is there a reason this would be happening? I am just testing my server over localhost, so I have no reason to think there would be any significant delay to cause a timeout. My sockets are set up in line with the chat app example on socket.io's website: Server: //http server setup var io = require('socket.io')(http); io.on('connection', function(socket){ //Game logic,socket listeners, io.emits }); Client: var socket = io(); //client side listeners, emissions back to server My question is firstly what are the possible reasons I would be getting a ping timeout intermittently? and secondly, is there any way for me to set the timeout time much longer / shorter to test out how this affects the frequency of disconnects I am getting?
answer count: 2
has comment: http://stackoverflow.com/comment/39628055
has title: Socket.io Random Disconnects (v1.0.6)
downvote count: 0
tagged with: websocket
tagged with: javascript
has answer: http://stackoverflow.com/a/26773911
has comment: http://stackoverflow.com/comment/62916631
tagged with: sockets
has comment: http://stackoverflow.com/comment/42120508
has comment: http://stackoverflow.com/comment/41926170
has comment: http://stackoverflow.com/comment/39685989
tagged with: node.js
favorite count: 0
has answer: http://stackoverflow.com/a/30089623
type: UnansweredQuestion
tagged with: socket.io
score: 14
has comment: http://stackoverflow.com/comment/42219716
upvote count: 14
type: Question
has comment: http://stackoverflow.com/comment/68586808

http://stackoverflow.com/a/25417454
has comment: http://stackoverflow.com/comment/39650480
has comment: http://stackoverflow.com/comment/39650498
has comment: http://stackoverflow.com/comment/39650402
has comment: http://stackoverflow.com/comment/39650082
has comment: http://stackoverflow.com/comment/39650057
has comment: http://stackoverflow.com/comment/39650270
answers question: http://stackoverflow.com/q/25417373
score: 0
has comment: http://stackoverflow.com/comment/39650048
has comment: http://stackoverflow.com/comment/39650104
has body: You were trying to access the data incorrectly. You need to pass the parameters just like you would do if you were making a GET request. So in the below code, the data variable can be accessed through the $_POST array, which stores the data you want. JAVASCRIPT var xhr = new XMLHttpRequest(); xhr.open("POST", "http://myajaxurl.com/lyric", true); var data1 = "data=lyric"; xhr.onreadystatechange = function() { if (xhr.readyState == 4) { console.log(xhr.responseText); } } xhr.send(data1); PHP &lt;?php if( isset($_POST['data']) ) { echo "test"; } ?&gt; EDIT The header issue can be solved like this var xhr = new XMLHttpRequest(); xhr.open("POST", "http://myajaxurl.com/lyric", true); var data1 = "data=lyric"; http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", data1.length); http.setRequestHeader("Connection", "close"); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { console.log(xhr.responseText); } } xhr.send(data1); source:http://www.openjs.com/articles/ajax_xmlhttp_using_post.php
has comment: http://stackoverflow.com/comment/39650218
has comment: http://stackoverflow.com/comment/39650074
has comment: http://stackoverflow.com/comment/39650103
has comment: http://stackoverflow.com/comment/39650776
type: Answer

http://stackoverflow.com/q/25451269
has comment: http://stackoverflow.com/comment/51383466
has body: I'm looking to do something a little bit fancy with constructor functions in Javascript, and I'm not quite sure how to do it. I want to be able to define Constructor functions, and then pass them into another function (a "modifer") like this: function OriginalConstructor() { // Do constructor things here // Like defining methods and properties } NewConstructor = modifyConstructor(OriginalConstructor); And the resulting "NewConstructor" should be functionally equivalent to this: function NewConstructor(id, data) { this.id = id; this.data = data; // Do stuff from the original constructor here // i.e. the same methods and properties defined in the original constructor } Does anybody know how to go about creating the "modifyConstructor" function?
score: 1
type: Question
linked to: http://stackoverflow.com/q/21243790
has answer: http://stackoverflow.com/a/25451456
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25451439
accepted answer: http://stackoverflow.com/a/25451439
has comment: http://stackoverflow.com/comment/39712254
possible better answer: http://stackoverflow.com/a/25451456
tagged with: abstraction
answer count: 2
upvote count: 1
tagged with: function
tagged with: javascript
favorite count: 0
has title: Dynamically modifying Constructors in JavaScript?
tagged with: arguments
has comment: http://stackoverflow.com/comment/39712727
tagged with: constructor
downvote count: 0

http://stackoverflow.com/q/25399077
favorite count: 0
has answer: http://stackoverflow.com/a/25399206
has title: Unterminated string literal issue with script
downvote count: 8
type: UnansweredQuestion
score: -8
has comment: http://stackoverflow.com/comment/39626892
has comment: http://stackoverflow.com/comment/39615271
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
has body: I'm testing script on latest firebug enabled firefox. The script below gives error message. You can see error message's screenshot below. on firebug &lt;script type="text/javascript"&gt; (function(L) { if (typeof(ar_cn) == "undefined") ar_cn = 1; var S = 'setTimeout(function(e){if(!self.CgiHref){document.close();e=parent.document.getElementById("ar_container_"+ar_bnum);e.parentNode.removeChild(e);}},3000);', j = ' type="text/javascript"', t = 0, D = document, n = ar_cn; L = 'http:' + L + escape(D.referrer || 'unknown') + '&amp;rnd=' + Math.round(Math.random() * 999999999); function _() { if (t++ &lt; 100) { var F = D.getElementById('ar_container_' + n); if (F) { try { var d = F.contentDocument || (window.ActiveXObject &amp;&amp; window.frames['ar_container_' + n].document); if (d) { d.write('&lt;sc' + 'ript' + j + '&gt;var ar_bnum=' + n + ';' + S + '&lt;/sc' + 'ript&gt;&lt;sc' + 'ript' + j + ' src="' + L + '"&gt;&lt;/sc' + 'ript&gt;'); t = 0 } else setTimeout(_, 100); } catch (e) { try { F.src = "javascript:{document.write('&lt;sc'+'ript" + j + "&gt;var ar_bnum=" + n + "; document.domain="" + D.domain + "";" + S + "&lt;/sc'+'ript&gt;');document.write('&lt;sc'+'ript" + j + " src="" + L + ""&gt;&lt;/sc'+'ript&gt;');}"; return } catch (E) {} } } else setTimeout(_, 100); } } D.write('&lt;div style="visibility:hidden;height:0px;left:-1000px;position:absolute;"&gt;&lt;iframe id="ar_container_' + ar_cn + '" width=1 height=1 marginwidth=0 marginheight=0 scrolling=no frameborder=0&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div id="ad_ph_' + ar_cn + '" style="display:none;"&gt;&lt;/div&gt;'); _(); ar_cn++; })('//ad.adriver.ru/cgi-bin/erle.cgi?sid=1&amp;ad=481915&amp;bt=43&amp;pid=1722467&amp;bn=1722467&amp;tail256='); &lt;/script&gt; What am I doing wrong?

http://stackoverflow.com/a/25492050
has comment: http://stackoverflow.com/comment/39788904
has comment: http://stackoverflow.com/comment/39788605
has comment: http://stackoverflow.com/comment/39788640
answers question: http://stackoverflow.com/q/25492003
has comment: http://stackoverflow.com/comment/39788862
has comment: http://stackoverflow.com/comment/39788944
type: Answer
score: 3
has body: What you want is impossible. Consider this situation: You email someone@example.com. They can view the email via: a) Desktop mail client b) Smartphone/tablet mail client c) Webmail All three will appear "different" to your server, depending on exactly which client they clicked on your link in. And if the user forwards the email to someone else, say otherperson@example.com, the EXACT same link will be in that person's mail file as well, and they can view it via the exact same options. You MIGHT be able to extract a username or some other personally identifiable datum from the refer IF they used webmail and the webmail system is stupid enough to have webmail.example.com/readmail?userid=someone But otherwise, no, you cannot assume anything about the incoming click, only that SOMEONE clicked on the link in SOME email.
upvote count: 3
has comment: http://stackoverflow.com/comment/39788624
downvote count: 0

http://stackoverflow.com/q/25534281
linked to: http://stackoverflow.com/q/15243990
has comment: http://stackoverflow.com/comment/39873337
favorite count: 0
has body: I can login to facebook, or google, or stackoverflow using this simple script (or a slight variation depending on the Ids). However, my company has a website and I can't login to that using powershell. $ie = New-Object -com InternetExplorer.Application $ie.visible=$true $ie.navigate("www.loginpage.com") start-sleep 1; # I was using this before, but it would never leave the loop... # while($ie.ReadyState -ne 4) {start-sleep -m 100} $ie.document.getElementById("username").value = "username" $ie.document.getElementById("password").value = "password" $ie.document.getElementById("loginform").submit() The only difference I think is that the website is on our "Intranet", not the internet, and for some reason powershell distinguishes between the two. But I'm not sure, I can still normally open up IE and go to the url and view source and see the tag ID's and whatnot. Does anyone know why I'm getting the following error when I use $ie.document.getElementById in this case. You cannot call a method on a null-valued expression. + CategoryInfo : InvalidOperation: (getElementById:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull I know the tags are: &lt;input name="username" id="username" langcode="EN" type="text"&gt; &lt;input name="password" id="password" type="password"&gt; Any ideas?
has comment: http://stackoverflow.com/comment/39866522
downvote count: 0
has comment: http://stackoverflow.com/comment/39866802
has comment: http://stackoverflow.com/comment/39873268
has comment: http://stackoverflow.com/comment/39869905
has answer: http://stackoverflow.com/a/34819741
accepted answer: http://stackoverflow.com/a/34819741
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39866898
has comment: http://stackoverflow.com/comment/39866514
tagged with: authentication
linked to: http://stackoverflow.com/q/11518036
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39872180
has title: Login to internal website via powershell
has comment: http://stackoverflow.com/comment/57381145
answer count: 1
tagged with: powershell
has comment: http://stackoverflow.com/comment/39866704
tagged with: javascript

http://stackoverflow.com/comment/39824863
type: Comment
has text: Furthermore, if `$` is undefined, how will `$(function())` be able to call it?
comment on: http://stackoverflow.com/a/25511499
score: 0
type: AnswerComment

http://stackoverflow.com/q/25502387
has answer: http://stackoverflow.com/a/25503402
has title: DataTables hyperlink on all rows in a column
has body: I am using DataTables to generate a table. There is a column containing order numbers. For example: ... I need every row in this column to have a hyperlink to view/order?id=? where ? is the contents of row in the Order No column. For example the first row would be a hyperlink to view/order?id=1321755 etc. What is the simplest way I can do so? Here is the code that I am using to initialize the DataTables: Order No ...
has answer: http://stackoverflow.com/a/35581932
type: Question
score: 9
upvote count: 9
tagged with: javascript
answer count: 2
tagged with: datatables
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/25478129
tagged with: cookies
tagged with: java
has comment: http://stackoverflow.com/comment/39762606
type: Question
tagged with: htmlunit
tagged with: javascript
score: 0
has body: I am trying to make a web scraper using my university's website. I am having trouble even loading the sign-in page because it says I do not have javascript and cookies enabled when I believe I do. WebClient webClient = new WebClient(BrowserVersion.CHROME); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setRedirectEnabled(true); webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.getOptions().setCssEnabled(false); webClient.getOptions().setUseInsecureSSL(true); webClient.getOptions().setThrowExceptionOnFailingStatusCode(false); webClient.getCookieManager().setCookiesEnabled(true); // Sign In Page final HtmlPage signInPage = webClient.getPage("https://eraider.ttu.edu/"); System.out.println(signInPage.getWebResponse().getContentAsString()); I am receiving the following message: This web site requires that JavaScript and Cookies be enabled in your web browser. We were unable to determine if your browser has these features enabled because META REFRESH failed. You need to make sure META REFRESH is enabled in your browser's security settings. If you need assistance, contact the TTU IT Help Desk at 806-742-HELP (4357). I was not able to figure out what meta refresh is. Update: I tried adding: new WaitingRefreshHandler().handleRefresh(signInPage, new URL("https://eraider.ttu.edu/"), 10); but only received this before receiving the same result as before: Aug 24, 2014 9:28:54 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Obsolete content type encountered: 'application/x-javascript'. Aug 24, 2014 9:28:55 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Obsolete content type encountered: 'text/javascript'. Aug 24, 2014 9:29:05 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Obsolete content type encountered: 'text/javascript'. Solved When using HtmlUnit, use WaitingRefreshHandler and make sure you wait until the page is fully loaded. When using Seleniu…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39762656
has title: Javascript and cookies are enabled, but they still aren't? Meta refresh?
has comment: http://stackoverflow.com/comment/39762625
answer count: 0

odata
tag name: odata
type: Tag
tags question: http://stackoverflow.com/q/25486738
tags question: http://stackoverflow.com/q/25549954
tags question: http://stackoverflow.com/q/25425029
tags question: http://stackoverflow.com/q/25471104

http://stackoverflow.com/comment/39625218
score: 0
has text: Thank you for the reply. I'm not fully understanding the post yet. How do I pass in the variable without losing the whole scope?
type: AnswerComment
comment on: http://stackoverflow.com/a/25404251
type: Comment

datetime
tags question: http://stackoverflow.com/q/25429568
tags question: http://stackoverflow.com/q/25497791
tags question: http://stackoverflow.com/q/25545812
tags question: http://stackoverflow.com/q/25407424
tags question: http://stackoverflow.com/q/25444095
tags question: http://stackoverflow.com/q/25534721
tags question: http://stackoverflow.com/q/25485650
tags question: http://stackoverflow.com/q/25476547
tags question: http://stackoverflow.com/q/25407934
tag name: datetime
tags question: http://stackoverflow.com/q/25470057
tags question: http://stackoverflow.com/q/25440973
tags question: http://stackoverflow.com/q/25447744
type: Tag
tags question: http://stackoverflow.com/q/25439379
tags question: http://stackoverflow.com/q/25389969
tags question: http://stackoverflow.com/q/25476349

http://stackoverflow.com/q/25509713
tagged with: html5-video
score: 0
tagged with: ipad
type: UnansweredQuestion
has title: Checking for end of video on iPad
has body: I can't seem to listen for onended on a video on iPad(Safari)...I want to remove a class that I was able to add when the play button was pressed, but I can't seem to track down when the video ends (works well every where else including iphone, just need it for iPad/Safari) link here: http://www.artandseek.net/meyerson/tour/ code snippet here $(".playBtn").click(function(){ var thisVideo = $(this).prevAll(".img-wrap").children(".togglePlay").get(0); thisVideo.onended = function(e) { $(this).fadeOut().parent(".img-wrap").removeClass("playing"); $(this).parent().next("h2").fadeIn(); classie.remove( thisVideo, 'tabletActive'); }; ...
linked to: http://stackoverflow.com/q/9874095
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25510143

http://stackoverflow.com/comment/39801142
has text: which plugin are you using?
type: QuestionComment
comment on: http://stackoverflow.com/q/25498923
score: 0
type: Comment

configuration-files
type: Tag
tag name: configuration-files
tags question: http://stackoverflow.com/q/25421345

http://stackoverflow.com/comment/39683941
type: AnswerComment
has text: I had tried the double slash before, but I was in doctype which is why it didn't work. Works now. Thanks.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25435063

http://stackoverflow.com/comment/39844396
comment on: http://stackoverflow.com/a/25521891
score: 0
type: AnswerComment
has text: @BakedInhalf updated :) remove `data-inset="false"` when you apply custom CSS.
type: Comment

http://stackoverflow.com/comment/39645458
comment on: http://stackoverflow.com/q/25414816
type: Comment
type: QuestionComment
has text: ok then try it just with the json.stringify section only
score: 0

http://stackoverflow.com/a/25426903
score: 2
upvote count: 2
has body: You should be tracking the mouse movement with the mousemove() event and check the last known position of the mouse on the movement of the div. Example: HTML &amp; CSS: .red-box { display : inline-block; position : absolute; width : 50px; height : 50px; top : 10px; left : 0px; background-color : red; } #wrapper { height: 100vh; width: 100vw; } &lt;div id="wrapper"&gt; &lt;div class="red-box"&gt;&lt;/div&gt; &lt;/div&gt; JavaScript: var posX = 0; var step = 10; var maxX = 200; var mouseX = -1; var mouseY = -1; var entered = false; var $box = $('.red-box'); setInterval(function () { posX += step; if (posX &gt;= maxX) posX = 0; $box.css("left", posX); var top = $box.offset().top; if (mouseX &gt;= posX &amp;&amp; mouseX &lt;= (posX + $box.width()) &amp;&amp; mouseY &gt;= top &amp;&amp; mouseY &lt;= (top + $box.height())) { console.log("mouse entered"); entered = true; } else if (entered) { console.log("mouse left"); entered = false; } }, 500); $("#wrapper").on("mousemove", function (e) { mouseX = e.pageX - $(this).position().left; mouseY = e.pageY - $(this).position().top; }).on("mouseleave", function() { mouseX = -1; mouseY = -1; }); FIDDLE Edit: Added a new mouseleave() event to the wrapper.
has comment: http://stackoverflow.com/comment/39667104
has comment: http://stackoverflow.com/comment/39667225
downvote count: 0
has comment: http://stackoverflow.com/comment/39667866
answers question: http://stackoverflow.com/q/25426251
type: Answer
has comment: http://stackoverflow.com/comment/39667571

http://stackoverflow.com/q/25393955
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25393984
upvote count: 1
downvote count: 1
type: Question
has title: How do I store a list of items referenced by key in javascript?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25393984
score: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39606312
has body: I need to be able to store a collection of items in javascript. I need to be able to delete them by key. This is a crud application. What's the best way to do this? Do I need to remove the item with a splice from a standard array and then update the array to remove the missing space?

http://stackoverflow.com/comment/39831838
has text: Related: [Is it possible to programmatically catch all events on the page in the browser?](http://stackoverflow.com/questions/5107232/is-it-possible-to-programmatically-catch-all-events-on-the-page-in-the-browser)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25515011
type: Comment

http://stackoverflow.com/comment/39641750
has text: I have a fiddle here http://jsfiddle.net/winsconsinfan/w5gwcskh/7/
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25412986

http://stackoverflow.com/a/25596686
type: AcceptedAnswer
has body: One hack is to actually add children items to the node but hide them with css. So you would do something like: #tree_element_id .x-grid-tree-node-leaf{ display:none; }
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25500247
answers question: http://stackoverflow.com/q/25500247
type: Answer
score: 3
downvote count: 0

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

http://stackoverflow.com/a/25407640
type: Answer
accepted answer of: http://stackoverflow.com/q/25407490
has comment: http://stackoverflow.com/comment/39631609
has body: If you're not using jquery, you can try this: &lt;script&gt; function getOption() { var obj = document.getElementById("mySelect"); document.getElementById("demo").innerHTML = obj.options[obj.selectedIndex].text; } document.addEventListener('DOMContentLoaded',function(){ getOption(); }); &lt;/script&gt; It's just calling your function once the page has loaded.
answers question: http://stackoverflow.com/q/25407490
score: 0
has comment: http://stackoverflow.com/comment/39631798
type: AcceptedAnswer

http://stackoverflow.com/comment/39847232
has text: Honestly Im not familiar with this kind of solutions, and you need to consider how you can communicaate your two layers. I advice you to check how to inject your response to javascript (generally) or use a json.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25479437

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/25461405
tags question: http://stackoverflow.com/q/25480778
tags question: http://stackoverflow.com/q/25548785
tags question: http://stackoverflow.com/q/25494170
tags question: http://stackoverflow.com/q/25434225
tags question: http://stackoverflow.com/q/25400925
tags question: http://stackoverflow.com/q/25395569
tags question: http://stackoverflow.com/q/25404694
tags question: http://stackoverflow.com/q/25395772
tags question: http://stackoverflow.com/q/25419709
tags question: http://stackoverflow.com/q/25457911
tags question: http://stackoverflow.com/q/25515631
tags question: http://stackoverflow.com/q/25414904
tags question: http://stackoverflow.com/q/25403735
tags question: http://stackoverflow.com/q/25527259
tags question: http://stackoverflow.com/q/25516259
tags question: http://stackoverflow.com/q/25429067
tags question: http://stackoverflow.com/q/25410138
tags question: http://stackoverflow.com/q/25398407
tags question: http://stackoverflow.com/q/25409462
tags question: http://stackoverflow.com/q/25450151
tags question: http://stackoverflow.com/q/25434971
tags question: http://stackoverflow.com/q/25504695
tags question: http://stackoverflow.com/q/25550476
tags question: http://stackoverflow.com/q/25511846
tags question: http://stackoverflow.com/q/25515127
tag name: svg
tags question: http://stackoverflow.com/q/25453175
tags question: http://stackoverflow.com/q/25450277
tags question: http://stackoverflow.com/q/25533555
tags question: http://stackoverflow.com/q/25478791
tags question: http://stackoverflow.com/q/25471790
tags question: http://stackoverflow.com/q/25507598
tags question: http://stackoverflow.com/q/25455432
tags question: http://stackoverflow.com/q/25455562
tags question: http://stackoverflow.com/q/25518380
tags question: http://stackoverflow.com/q/25531328
tags question: http://stackoverflow.com/q/25510233
tags question: http://stackoverflow.com/q/25404544
tags question: http://stackoverflow.com/q/25409141
tags question: http://stackoverflow.com/q/25534122
tags question: http://stackoverflow.com/q/25458783
tags question: http://stackoverflow.com/q/25478183
tags question: http://stackoverflow.com/q/25485951
tags question: http://stackoverflow.com/q/25509474
tags question: http://stackoverflow.com/q/25486808
tags question: http://stackoverflow.com/q/25487846
tags question: http://stackoverflow.com/q/25472656
tags question: http://stackoverflow.com/q/25417117
tags question: http://stackoverflow.com/q/25514386
tags question: http://stackoverflow.com/q/25483299
tags question: http://stackoverflow.com/q/25514664
tags question: http://stackoverflow.com/q/25406333
tags question: http://stackoverflow.com/q/25531713
tags question: http://stackoverflow.com/q/25448430
tags question: http://stackoverflow.com/q/25452322
tags question: http://stackoverflow.com/q/25542930
tags question: http://stackoverflow.com/q/25516078
type: Tag

http://stackoverflow.com/comment/39678622
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25432996
has text: @PatrickQ How can we detect the php loading with ajax?

http://stackoverflow.com/comment/39703868
type: AnswerComment
has text: thanks bro! I got it.I got reference from [here](http://www.noeltock.com/web-design/wordpress/events-custom-post-types-fullcalendar-json-wordpress/)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25445747

http://stackoverflow.com/comment/39747386
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25469987
has text: Good luck! Shall I tell you what I need? (A Java API for the raspberry pi camera) [ask]
type: Comment

http://stackoverflow.com/a/30347780
has body: It seems there are kiosk apps for ipad at least, which provide options to clear browser session automatically. So, if you are creating app for kiosks using ipad at least app are available which can solve the issue
accepted answer of: http://stackoverflow.com/q/25459995
type: Answer
answers question: http://stackoverflow.com/q/25459995
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/25408373
score: 2
answers question: http://stackoverflow.com/q/25407175
upvote count: 2
has comment: http://stackoverflow.com/comment/39636375
accepted answer of: http://stackoverflow.com/q/25407175
has body: There are at least two approaches you could use to accomplish this (I'm sure others may come up with more). Firstly, you can use a setTimeout to delay the second click and perform your validation prior to the first click happening. Here is an example: var shouldCancel = false; //First event //Without the setTimeout, this event would be triggered first. $("#button1").click(function (e) { setTimeout(function () { if (!shouldCancel) { alert("test2"); } // end if }, 500); }); //Second event $("#button1").click(function (e) { //Perform validation checks here... alert("test1"); shouldCancel = true; e.stopPropagation(); e.preventDefault(); }); The other alternative (my preference and less hacky), is to use a "validation" method that performs your check as part of your click. $("#button2").click(function (e) { // ..some operation that makes some check and assigns a value to the "shouldCancel" property below $(document).trigger("should-continue", { shouldBeCanceled: shouldCancel, callback: function () { alert("test2"); } }); }); $(document).bind("should-continue", function (e, data) { if (data.shouldBeCanceled) { e.stopPropagation(); e.preventDefault(); return; } else { alert("test1"); data.callback(); // Call the method specified by the caller } // end if/else }); Here is a JSFiddle that demonstrates these two methods: http://jsfiddle.net/xDaevax/3ucby35x/ Here are some useful links working with events in JS: http://javascript.info/tutorial/events-and-timing-depth Ensure jQuery event handler execution order JavaScript event handlers execution order http://www.quirksmode.org/js/events_advanced.html
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25455493
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25490104
has comment: http://stackoverflow.com/comment/39720998
type: Question
has title: Highchart doesn't dispaly a datarange even if there is data
has comment: http://stackoverflow.com/comment/39720735
accepted answer: http://stackoverflow.com/a/25490104
tagged with: highcharts
linked to: http://stackoverflow.com/q/25390410
tagged with: javascript
score: 0
has body: I have line highcahrt and it displays well except one of the data range. On the same page there is a chart and grid just under the chart. and task names sorted on yAxsis and each task name has starttime and endtime . And these results displays in the grid. one of the task name let's call mytask has start and endtime in json format like others. and it dispalys it in chart js file and in grid yAxis: { tickInterval: 1, labels: { formatter: function () { if (tasks[this.value]) { return tasks[this.value].name; } } }, } I debugged it and I can see its name here and in series I can see it is start and end time . But I can't see datarange on chart . I checked everything but no luck Any help appreciate [I would post images but my reputation is very low ]
answer count: 1
has comment: http://stackoverflow.com/comment/39771456

http://stackoverflow.com/a/26168977
type: Answer
score: 30
downvote count: 0
upvote count: 30
has body: This looks like it's trying several different injections, so I'll try and break them down one at a time: The First Injection ';alert(String.fromCharCode(88,83,83))// This injection attempts to terminate a JavaScript string literal (using '), then terminate the statement (with ;) and makes a call to alert(String.fromCharCode(88,83,83)) which will cause a popup box containing "XSS". The following // is an attempt to "comment out" the rest of the statement, so that a syntax error will not occur and the script will execute. The Second Injection ";alert(String.fromCharCode(88,83,83))// Like the first injection, but it uses " in an attempt to terminate a JavaScript string literal. The Third Injection --&gt;&lt;/SCRIPT&gt;"&gt;'&gt;&lt;SCRIPT&gt;alert(String.fromCharCode(88,83,83))&lt;/SCRIPT&gt; This attempts to do the following things: Terminate an HTML (or XML) comment (with --&gt;) Terminate an existing &lt;SCRIPT&gt; tag using &lt;/SCRIPT&gt; This is done to prevent the injected script causing a syntax error, which would prevent the injected script from executing. Terminate an HTML attribute and tag, using "&gt; Terminate an HTML attribute and tag, using '&gt; Inject JavaScript using &lt;SCRIPT&gt;alert(String.fromCharCode(88,83,83))&lt;/SCRIPT&gt; The Fourth Injection '';!--"&lt;XSS&gt;=&amp;{()} This is a common string used to test what, if any, filters and/or encoding are being used on user input. Typically, the source of the page after this injection will contain either &amp;lt;XSS or &lt;XSS. If the second is found, the application is most likely not filtering user input (as it allowed the addition of an arbitrary tag) and is likely vulnerable to XSS. To answer your more direct questions: why there's that repetition of 'alert(String.fromCharCode(88,83,83))' This is a common "Proof of Concept" function, that will cause a popup box to appear containing "XSS". If this occurs, the injected JavaScript was executed. why there's that repetition of 'alert(String.fromChar…
answers question: http://stackoverflow.com/q/25461418

angularjs
tags question: http://stackoverflow.com/q/25463409
tags question: http://stackoverflow.com/q/25478825
tags question: http://stackoverflow.com/q/25548793
tags question: http://stackoverflow.com/q/25537396
tags question: http://stackoverflow.com/q/25435995
tags question: http://stackoverflow.com/q/25456250
tags question: http://stackoverflow.com/q/25538114
tags question: http://stackoverflow.com/q/25524573
tags question: http://stackoverflow.com/q/25534182
tags question: http://stackoverflow.com/q/25405084
tags question: http://stackoverflow.com/q/25447102
tags question: http://stackoverflow.com/q/25408196
tags question: http://stackoverflow.com/q/25430698
tags question: http://stackoverflow.com/q/25513306
tags question: http://stackoverflow.com/q/25487761
tags question: http://stackoverflow.com/q/25481388
tags question: http://stackoverflow.com/q/25499153
tags question: http://stackoverflow.com/q/25490731
tags question: http://stackoverflow.com/q/25435329
tags question: http://stackoverflow.com/q/25501955
tags question: http://stackoverflow.com/q/25431767
tags question: http://stackoverflow.com/q/25476746
tags question: http://stackoverflow.com/q/25409734
tags question: http://stackoverflow.com/q/25543158
tags question: http://stackoverflow.com/q/25413145
tags question: http://stackoverflow.com/q/25533280
tags question: http://stackoverflow.com/q/25431766
tags question: http://stackoverflow.com/q/25416578
tags question: http://stackoverflow.com/q/25440978
tags question: http://stackoverflow.com/q/25523396
tags question: http://stackoverflow.com/q/25457859
tags question: http://stackoverflow.com/q/25537586
tags question: http://stackoverflow.com/q/25404598
tags question: http://stackoverflow.com/q/25394663
tags question: http://stackoverflow.com/q/25427241
tags question: http://stackoverflow.com/q/25488033
tags question: http://stackoverflow.com/q/25475674
tags question: http://stackoverflow.com/q/25395166
tags question: http://stackoverflow.com/q/25453331
tags question: http://stackoverflow.com/q/25408751
tags question: http://stackoverflow.com/q/25431130
tags question: http://stackoverflow.com/q/25448430
tags question: http://stackoverflow.com/q/25395642
tags question: http://stackoverflow.com/q/25447299
tags question: http://stackoverflow.com/q/25537525
tags question: http://stackoverflow.com/q/25472254
tags question: http://stackoverflow.com/q/25518994
tags question: http://stackoverflow.com/q/25536842
tags question: http://stackoverflow.com/q/25486261
tags question: http://stackoverflow.com/q/25417003
tags question: http://stackoverflow.com/q/25490398
tags question: http://stackoverflow.com/q/25469659
tags question: http://stackoverflow.com/q/25421126
tags question: http://stackoverflow.com/q/25403252
tags question: http://stackoverflow.com/q/25507210
tags question: http://stackoverflow.com/q/25534586
tags question: http://stackoverflow.com/q/25456754
tags question: http://stackoverflow.com/q/25496531
tags question: http://stackoverflow.com/q/25501135
tags question: http://stackoverflow.com/q/25407527
tags question: http://stackoverflow.com/q/25434358
tags question: http://stackoverflow.com/q/25517340
tags question: http://stackoverflow.com/q/25481248
tags question: http://stackoverflow.com/q/25396897
tags question: http://stackoverflow.com/q/25487811
tags question: http://stackoverflow.com/q/25422312
tags question: http://stackoverflow.com/q/25495730
tags question: http://stackoverflow.com/q/25413419
tags question: http://stackoverflow.com/q/25481122
tags question: http://stackoverflow.com/q/25431378
tags question: http://stackoverflow.com/q/25500782
tags question: http://stackoverflow.com/q/25454184
tags question: http://stackoverflow.com/q/25410860
tags question: http://stackoverflow.com/q/25549874
tags question: http://stackoverflow.com/q/25421469
tags question: http://stackoverflow.com/q/25414728
tags question: http://stackoverflow.com/q/25484543
tags question: http://stackoverflow.com/q/25533984
tags question: http://stackoverflow.com/q/25526536
tags question: http://stackoverflow.com/q/25499707

http://stackoverflow.com/a/25506598
accepted answer of: http://stackoverflow.com/q/25440794
answers question: http://stackoverflow.com/q/25440794
has comment: http://stackoverflow.com/comment/39889264
upvote count: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39838984
type: Answer
score: 3
has body: I think you are looking for this: http://isotope.metafizzy.co/

http://stackoverflow.com/q/25533602
tagged with: css
type: AnsweredQuestion
has body: I'm trying to resize and center dynamic content inside a div onLoad and on window resize to suit my liquid layout. Posting a link &lt; http://jsfiddle.net/h52tqaz2/"&gt;fJSFiddle &gt; due to easy understanding. Why doesn't it center all DIVs onLoad (but it centers when resize)? How can I make this scale according to the height of the window as well as according to the width of the window by maintaing its aspect-ratio? NOTE: The dynamic content are not the same size.
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has title: Resize and center dynamic content inside a div
has answer: http://stackoverflow.com/a/25533637
accepted answer: http://stackoverflow.com/a/25533637
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39885510
type: Comment
comment on: http://stackoverflow.com/a/25544660
score: 0
type: AnswerComment
has text: why don't you put this highcharts code in a function and call it when you click on that point on map?

http://stackoverflow.com/comment/39845665
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25522244
type: AnswerComment
has text: @ArunPJohny Would this remove the .instagram div or just remove the .name inside the .instagram div? I think that is what it does. What i want is to remove the whole .instagram div. :)

http://stackoverflow.com/q/25425048
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: Can someone please help? I seem to have two issues: page isn't scrolling and when trigger-scroll clicked 3x, .top is undefined. .hero-banner is a full screen slideshow. When .trigger-scroll is clicked, page needs to scroll to sections.scroll-here. When reached last section needs to scroll to top. Thanks in advance for your answers. HTML: full screen section some content some content some content JS: $(document).ready(function() { $('.page-scroller', function() { var $scrollSection = $('.scroll-here') var $scrollTrigger = $('.trigger-scroll') var nextSection = 0; $scrollTrigger.on( 'click', function() { $(this).removeClass('go-to-top'); // If at last section, scroll back to top on next click: if (nextSection >= $scrollSection.length) { $('html, body').animate({ scrollTop: 0 }, 1000); nextSection = 0; return; } // If you've already scrolled down and then click button, run a check // to find next section position so you don't go backwards: while ( $('body').scrollTop() > $($scrollSection[nextSection]).offset().top ) { nextSection++; } // If next section is the last, add class to rotate arrow graphic: if (nextSection === ($scrollSection.length - 1)) { $(this).addClass('go-to-top'); } // Move to next section and increment counter check: $( 'html, body' ).animate({ scrollTop: $($scrollSection[nextSection]).offset().top }, 1000); nextSection++; }); }); });
type: UnansweredQuestion
tagged with: scroll
upvote count: 1
has answer: http://stackoverflow.com/a/25437995
has title: JQuery Scroll to Next Section
score: 1
type: Question
downvote count: 0
answer count: 1

http://stackoverflow.com/q/25486283
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39777257
has body: Following is: appServlet-servlet.xml <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:cache="http://www.springframework.org/schema/cache" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd"> <!-- <annotation-driven /> --> <!-- <context:annotation-config /> --> <mvc:annotation-driven /> <context:component-scan base-package="com.interlace"/> </beans:beans> web.xml <?xml version="1.0" encoding="UTF-8"?> appServlet org.springframework.web.servlet.DispatcherServlet 1 appServlet / HelloController.java @Controller @RequestMapping("/welcome") public class HelloController { @RequestMapping("/hello") public ModelAndView helloWorld(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception { return new ModelAndView("/HelloWorld.jsp"); } } No mapping found for HTTP request with URI [/HelloWorld/welcome/hello] in DispatcherServlet with name 'appServlet' I am using spring 3.2.0 if have added all required jar files.I am using without maven.Please try to help me
type: UnansweredQuestion
has title: Spring 3.2.0 no uri found
has answer: http://stackoverflow.com/a/25487028
tagged with: java
type: Question
has answer: http://stackoverflow.com/a/25486707
has comment: http://stackoverflow.com/comment/39777162
tagged with: javascript

http://stackoverflow.com/q/25459621
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25459663
has comment: http://stackoverflow.com/comment/39728476
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39728485
has title: Can we find out div's height after it's rendered in .resize
has body: I have a structure like this, A2 and B2 have table's in them, B1 is just 4 checkboxes. I want A1 and A2 to be 50/50 % on the page, it works perfectly at the moment. But when someone resizes there browser window, my A1 gets much more height and sometimes much less height. JS // I will add it in a hour or so Question Can I find out height of B1 in method .resize when someone resizes there browser and this has to be happen before rendering as well as then I will size B2 based on B1 height.
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25459741
has comment: http://stackoverflow.com/comment/39728832
tagged with: javascript

http://stackoverflow.com/comment/39859561
type: Comment
type: QuestionComment
has text: I have separated fields for those digits. Each one has its own validation.
comment on: http://stackoverflow.com/q/25530489
score: 0

http://stackoverflow.com/q/25446353
tagged with: node.js
upvote count: 11
has body: As cowboy says down in the comments here, we all want to "write [non-blocking JavaScript] asynchronous code in a style similar to this: try { var foo = getSomething(); // async call that would normally block var bar = doSomething(foo); console.log(bar); } catch (error) { console.error(error); } " So people have come up solutions to this problem like callback libraries (eg async) promises event patterns streamline domains and generators. But none of these lead to code as simple and easy to understand as the sync-style code above. So why isn't possible for javascript compilers/interpreters to just NOT block on the statements we currently know as "blocking"? So why isn't possible for javascript compilers/interpreters to handle the sync syntax above AS IF we'd written it in an async style?" For example, upon processing getSomething() above, the compiler/interpreter could just say "this statement is a call to [file system/network resource/...], so I'll make a note to listen to responses from that call and in the meantime get on with whatever's in my event loop". When the call returns, execution can proceed to doSomething(). You would still maintain all of the basic features of popular JavaScript runtime environments single threaded event loop blocking operations (I/O, network, wait timers) handled "asynchronously" This would be simply a tweak to the syntax, that would allow the interpreter to pause execution on any given bit of code whenever IT DETECTS an async operation, and instead of needing callbacks, code just continues from the line after the async call when the call returns. As Jeremy says there is nothing in the JavaScript runtime that will preemptively pause the execution of a given task, permit some other code to execute for a while, and then resume the original task Why not? (As in, "why couldn't there be?"... I'm not interested in a history lesson) Why does a developer have to care about whether a statement is blocking or not? Computers are for automating stu…
has answer: http://stackoverflow.com/a/46088960
score: 9
has answer: http://stackoverflow.com/a/25470071
downvote count: 2
tagged with: error-handling
has title: Why couldn't popular JavaScript runtimes handle synchronous-looking asynchronous script?
has comment: http://stackoverflow.com/comment/39730232
has comment: http://stackoverflow.com/comment/39704538
accepted answer: http://stackoverflow.com/a/46088960
has answer: http://stackoverflow.com/a/25446750
tagged with: ecmascript-6
has comment: http://stackoverflow.com/comment/39731512
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25447289
tagged with: javascript
has answer: http://stackoverflow.com/a/25447289
favorite count: 0
type: Question
tagged with: asynchronous

http://stackoverflow.com/comment/39681209
score: 1
has text: This question is unanswerable. Encoding arbitrary binary data is one thing, keeping UTF-8 characters intact is something completely separate. What's to stop `0xe29c93` from being interpreted as ✓ when it shows up in your binary data?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25434191

http://stackoverflow.com/a/25536359
upvote count: 1
has body: You have to change your document.write line to something like this: document.write("" + String(i) + "");
answers question: http://stackoverflow.com/q/25536162
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/39770374
has text: I'm not using YouTube API. I'll use pure HTML5 @koopajah
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25482395
type: Comment

http://stackoverflow.com/comment/39717925
has text: It seems that Deploy To Cloud hasn't uploaded the UserControl files. Try deleting 'gxlastransfer.zip' from your Web folder and execute F5 from GeneXus. Are you sure that those files are inside folder shapes?
comment on: http://stackoverflow.com/q/25452134
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25509256
has body: Would it solve your problem if you add a "remove" line in your solution? E.g. : $("#droppable").droppable({ drop:function(e,ui){ if($(ui.draggable).parent().attr("id")!=$(this).attr("id")){ var clone = $(ui.draggable).clone(); clone.removeAttr("style"); clone.appendTo($(this)); $(ui.draggable).remove(); // Remove original element } }, revert:true }); Fiddle demo: http://jsfiddle.net/lparcerisa/xu2dm7gj/1/
answers question: http://stackoverflow.com/q/25508157
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25508157
downvote count: 0
type: AcceptedAnswer

flot
tags question: http://stackoverflow.com/q/25392667
tags question: http://stackoverflow.com/q/25421651
type: Tag
tags question: http://stackoverflow.com/q/25445350
tag name: flot
tags question: http://stackoverflow.com/q/25520793
tags question: http://stackoverflow.com/q/25477129

http://stackoverflow.com/comment/39765781
comment on: http://stackoverflow.com/q/25479739
type: Comment
type: QuestionComment
has text: @trainoasis—that doesn't declare them, it creates properties of the global object when that line of code executes.
score: 1

http://stackoverflow.com/a/25577859
type: Answer
upvote count: 3
score: 3
has body: If you were using TinyMCE 3.0 are now migrating to TinyMCE 4+, may be you can first try using their compat3x plugin, which will allow you to transition most of your old plugins without modifications as per their documentation available here: TinyMCE compat3x plugin
answers question: http://stackoverflow.com/q/25452897
downvote count: 0

http://stackoverflow.com/a/25473968
has comment: http://stackoverflow.com/comment/39754777
has comment: http://stackoverflow.com/comment/39756186
downvote count: 0
has body: There's no out-of-the box way of doing this. There are a couple of ways of doing this in a slightly different way using the CSS3 opacity property: First, add a CSS declaration in which you add an active class and a CSS3 transition: #menu ul a { opacity: 1; -webkit-transition: opacity 1s; /* For Safari 3.1 to 6.0 */ transition: opacity 1s; } #menu ul a.inactive { opacity: 0; -webkit-transition: opacity 1s; /* For Safari 3.1 to 6.0 */ transition: opacity 1s; } Then, have your JavaScript add the inactive class. Also, after one second, change the a to display: none. function showDiv(idInfo) { var newId = 'content' + idInfo; var sel = document.getElementById('contentDivs').getElementsByClassName('x'); for (var i=0; i&lt;sel.length; i++) { // Fade In all our currently viewable divs sel[i].className += 'inactive'; // If this is NOT our new div, hide after 1 second (transition time) if (sel[i].id !== newId) setTimeout(function () { sel[i].style.display = 'none'; }, 1000); } } var newEl = document.getElementById(newId); // Make sure our new element is being displayed newEl.style.display = 'block'; // Add the `inactive` class in order to make the opacity 0 newEl.className += 'inactive'; setTimeout(function () { // Remove the `inactive` className in order to trigger the fade in newEl.className = ''; }, 0); } window.onload = function() {showDiv('1');} You could also do this with JavaScript (NO CSS Required): function showDiv(idInfo) { var newId = 'content'+idInfo; var $elements = $('#contentDivs').find('.x'); $elements.fadeOut(1000, funciton () { var $newElement = $('#' + newId); $newElement.fadeIn(); }); } window.onload = function() {showDiv('1');}
upvote count: 2
has comment: http://stackoverflow.com/comment/39754919
type: Answer
has comment: http://stackoverflow.com/comment/39754908
score: 2
answers question: http://stackoverflow.com/q/25473863

http://stackoverflow.com/comment/39771155
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25482884
has text: what is the value returned from the server?
type: QuestionComment

http://stackoverflow.com/a/25536352
upvote count: 1
answers question: http://stackoverflow.com/q/25536280
has body: I have reproduce the scenario here : http://jsfiddle.net/u8juqycz/ &lt;input name="alc_val" value="test1"/&gt; &lt;input name="alc_val" value="test2"/&gt; &lt;input name="alc_val" value="test3"/&gt; var alc_val = new Array(); $("input[name=alc_val]").each(function(i){ alc_val[i]= $(this).val(); }); console.log(alc_val); It works. So you must have more than 3 textbox
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39870480
type: Answer

http://stackoverflow.com/q/25520842
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25520949
tagged with: javascript
has answer: http://stackoverflow.com/a/25521130
tagged with: jquery
score: -1
has title: Get div id's of all divs with a specific class
upvote count: 2
has body: I am trying to get div ids of all div elements having a specific CSS class. I am able to get [object HTMLDivElement] by using getElementByClass but I haven't been able to get id from this object. Basically, entirely I want to do is get div ids of all div elements that have a specific CSS class, get data-title of all div elements, match data-title of these div elements with a string, make display:none of all non-matching div elements. Here is what I have tried: function FilterFiles(filterItem) { var elements = document.getElementsByClassName("listItem"); for (var i = 0; i &lt; elements.length; i++) { alert(elements[i].id); // get div id of divs with data-title !=(not equal) filterItem // make display:none of matching divs } } Here is the Fiddle with actual HTML http://jsfiddle.net/6bo1rjrt/1/.
downvote count: 3
possible better answer: http://stackoverflow.com/a/25520926
has answer: http://stackoverflow.com/a/25521005
has answer: http://stackoverflow.com/a/25520926
favorite count: 0
has answer: http://stackoverflow.com/a/25520931
accepted answer: http://stackoverflow.com/a/25520931
answer count: 5
has comment: http://stackoverflow.com/comment/39841952

http://stackoverflow.com/q/25489648
tagged with: jquery
tagged with: ajax
tagged with: php
type: UnansweredQuestion
has title: Load more random posts on Wordpress using Ajax
tagged with: wordpress
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25491282
score: 0
answer count: 1
has body: I have 5 random posts on my Wordpress blog sidebar. I want to create a button that when ever it's clicked, ajax loads 5 more random posts under it. The problem is that I don't want to get the same random post more than once. I don't have an absolute plan about how to do it, I can maybe save posts id names or something like that, but I wonder if there is maybe a better efficient way to do it. Can somebody help me out with this? This is the load random posts I have on the sidebar, loads 7 posts: &lt;?php global $post; $args = array( 'posts_per_page' =&gt; 7, 'orderby' =&gt; 'rand', 'post_status' =&gt; 'publish', 'offset' =&gt; 1); $rand_posts = get_posts( $args ); $count_rand=0; foreach( $rand_posts as $post ) : setup_postdata( $post ); ?&gt; &lt;li&gt;&lt;h2 class="r-h2"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;&lt;p&gt;&lt;?php echo get_the_post_thumbnail($thumbnail-&gt;ID, 'medium'); //the_excerpt(); ?&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt; &lt;?php endforeach; wp_reset_postdata();

http://stackoverflow.com/comment/39682267
score: 0
has text: `\n` should be 100% valid.
comment on: http://stackoverflow.com/q/25434888
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/87661177
score: 0
has text: xhr.send only works when the parameter is a File object, not a FormData think. So I use jquery $.ajax, which allows post form data and files at the same time
type: QuestionComment
comment on: http://stackoverflow.com/q/25477495
type: Comment

http://stackoverflow.com/q/25503316
tagged with: prototype
has comment: http://stackoverflow.com/comment/39809665
has body: Please see the code below, it was working fine till today morning (26-Aug-2014). after that image is not visible. all the functions are working fine. function vehicleMarker(_description,_lat,_lng) { this._contentHTML = _description; this._markeroption = { position: new google.maps.LatLng(_lat, _lng), map: ObjViewmap.map, draggable: false }; this.setOptions(this._markeroption); this.updateLoc=function(_lat,_lng){ this.setPosition(new google.maps.LatLng(_lat, _lng)); }; google.maps.event.addListener(this, 'click', function (evt) { //click code here }); this.disposeMarker=function(){ google.maps.event.clearInstanceListeners(this); this.setMap(null); }; this.SetVehicleImage = function (vtype) { var imageurl = 'images/vehicle/' + vtype.toLowerCase() + '.png'; var image_a = new google.maps.MarkerImage(imageurl, new google.maps.Size(32, 32), new google.maps.Point(0, 0), new google.maps.Point(0, 32)); this.setIcon(image_a); this.getIcon().anchor.x = 16; this.getIcon().anchor.y = 16; }; } vehicleMarker.prototype = new google.maps.Marker(); //---------------------------------------------------------------------------- var v=new vehicleMarker('testdesc',11.555334,76.333223); v.SetVehicleImage('car'); if i remove v.SetVehicleImage('car'); , still not showing google default marker. the code will work if i remove the prototype. this was a working code, pls check. sample code in JSFiddle http://jsfiddle.net/prajithmp/90v8vqn6/1
answer count: 1
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has answer: http://stackoverflow.com/a/25505188
has comment: http://stackoverflow.com/comment/39810909
type: Question
has comment: http://stackoverflow.com/comment/39812171
type: AnsweredQuestion
has title: Google Map API - Custom Prototype marker Image not showing from today
accepted answer: http://stackoverflow.com/a/25505188

http://stackoverflow.com/q/25538452
has answer: http://stackoverflow.com/a/25538508
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39874101
has comment: http://stackoverflow.com/comment/39874303
type: Question
has comment: http://stackoverflow.com/comment/39874154
has comment: http://stackoverflow.com/comment/39874119
possible better answer: http://stackoverflow.com/a/25538484
tagged with: javascript
has answer: http://stackoverflow.com/a/25538485
has answer: http://stackoverflow.com/a/25538484
favorite count: 0
has comment: http://stackoverflow.com/comment/39874167
score: 0
has comment: http://stackoverflow.com/comment/39874385
has body: this is my code var text = ""; var text += "function "+ funcName + "(){"; var text += "\n"; and this is the error: **Uncaught SyntaxError: Unexpected token += ** How can I solve it?
has answer: http://stackoverflow.com/a/25538481
has title: Javascript syntax error token
accepted answer: http://stackoverflow.com/a/25538481
has comment: http://stackoverflow.com/comment/39874135
has comment: http://stackoverflow.com/comment/39874362
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39874117
answer count: 4

http://stackoverflow.com/comment/39633303
comment on: http://stackoverflow.com/q/25408666
score: 1
has text: http://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done/9350515#9350515
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25478167
type: Question
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25478275
has comment: http://stackoverflow.com/comment/39762660
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/39762712
tagged with: php
tagged with: css
upvote count: 0
has title: Set IDs through PHP
downvote count: 3
has body: I have the following code but it cannot be directly edited I want to set IDs for the iframes so they become like so I'm somewhat proficient in PHP but don't know how to do this; this would have to be in the code and set through some way. Help! :-)

http://stackoverflow.com/comment/39754022
type: AnswerComment
comment on: http://stackoverflow.com/a/25461321
type: Comment
has text: Sorry Mr. Barmar Problem is same.. :(
score: 0

http://stackoverflow.com/q/25392142
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25392244
has comment: http://stackoverflow.com/comment/39602803
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39603220
possible better answer: http://stackoverflow.com/a/25392244
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25392254
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39602802
favorite count: 0
has body: I have built out a Javascript calculator - which will help someone decide what type of investor they are based off their answers to 5 questions. Each answer to each question is assigned a value (1-5 points). As they are completing the quiz, their "points" are added up and displayed in a div. Right now, the points integer is displayed in the div via:divobj.innerHTML = "Total Risk Points: "+totalRiskPoints; and is displayed as the integer value (sum of all points per each answer) I want to convert the total risk point integer value into a word, for example - if the user's total risk points add up to 25 - I want it to display: "Aggressive Portfolio". So essentially, I need something that converts the integer to a specified word. Here is a link to the calculator - you can view the source from there. https://abgira.com/sites/all/themes/bluez-7.x-1.0/bluez/riskassessment.html
has title: How do I convert Javascript number variable to a specific word?
has comment: http://stackoverflow.com/comment/39602625
upvote count: 1
has comment: http://stackoverflow.com/comment/39602759
has answer: http://stackoverflow.com/a/25392380
has answer: http://stackoverflow.com/a/25392254

http://stackoverflow.com/q/25469976
linked to: http://stackoverflow.com/q/25019955
has comment: http://stackoverflow.com/comment/39747522
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/25470134
has comment: http://stackoverflow.com/comment/39747542
type: Question
has title: exec 'node app' hangs inside gulp task
has comment: http://stackoverflow.com/comment/39747487
has answer: http://stackoverflow.com/a/25470134
has body: This gulp task hangs on exec('node config/app') line. first exec works fine but the second just hangs. gulp.task('test', function(cb) { var exec = require('child_process').exec; exec('echo 3', function(err, stdout) { console.log(stdout); }); exec('node config/app', function(err, stdout, stderr) { console.log(stdout); var testemOptions = { file: 'testem.json' }; var t = new testem(); return t.startCI(testemOptions, function() { cb(); }); }); }); I can see the output 3 but no output is shown for the second console.log. I am trying to run my server before running the tests with testem. I've tried this similar solution but it doesn't work: Exec not returning anything when trying to run git shortlog with nodejs. Also I've recently asked a hanging testem gulp task question: Testem gulp task hangs after finished. Edit: My current solution is: gulp.task('test', /*['build'],*/ function(cb) { var spawn = require('child_process').spawn; var proc = spawn('node', ['config/app']); proc.stdout.on('readable', function() { var output = proc.stdout.read(); if (output &amp;&amp; output.toString().match('express listening')) { var testemOptions = { file: 'testem.json' }; var t = new testem(); t.startCI(testemOptions, function() { proc.kill(); cb(); }); } }); });
tagged with: testem
tagged with: javascript
has comment: http://stackoverflow.com/comment/39747555
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/25833879
tagged with: gulp
favorite count: 0
possible better answer: http://stackoverflow.com/a/25833879
linked to: http://stackoverflow.com/q/15564185
has comment: http://stackoverflow.com/comment/39747556
tagged with: node.js

http://stackoverflow.com/a/25486985
has comment: http://stackoverflow.com/comment/39780318
answers question: http://stackoverflow.com/q/25486933
type: Answer
score: 0
has body: I might be wrong but wouldn't the following work: var newElement = document.createElement("header"); newElement.innerHTML = "Stuff inside element"; existingElement.parentNode.insertBefore(newElement, existingElement.nextSibling);

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

http://stackoverflow.com/comment/39889964
type: QuestionComment
has text: You can't prevent the popup from closing on losing focus, so in general file ` `s don't work. The question you linked to is the closest to what might work.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25536011

http://stackoverflow.com/comment/39864859
has text: What content is returned from the AJAX call?
comment on: http://stackoverflow.com/q/25533569
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25483595
score: 0
has body: I have a javascript function that responds to click events The main issue is that I am calling the panel.js inside my plugin.php and nothing happens at all. BEFORE: panel.js $(document).ready(function(){ $(".next_panel").click(function(){ //Do something here return false; }); } This is the webpage (main.html) before I turned into plugin, notice how I load the JS, this works in my actual development. AFTER: Now this works as a normal site, however loading this into wordpress as a plugin has caused me some issues, the main one here is that I cannot seem to load the javacript. panel.js function panel(){ $(".next_panel").click(function(){ //Do something here return false; }); } This is the code in the plugin.php once I turned it into a plugin for wordpress, I can confirm wp_head is being called. wp_enqueue_script('panel', VS_PATH.'js/panel.js', array('jquery')); //This will run our function when wp_head is called. add_action('wp_head', 'vs_script'); function vs_get_panel() { $panels = ' '; return $panels; } function vs_insert_panel($atts, $content=null) { $panel = vs_get_panel(); return $panel; } add_shortcode('v_panel', 'vs_insert_panel'); function vs_script() { print ' '; } If you look at the last block of code in function vs_script(), this is where I have been recommended the way to get my javascript into the wordpress page once it renders. The plugin also has more to it, for example images and css, the thing is, all of that works, the css works fine, it's just the javascript that I cannot get working. After Kats advice: I still have no javascript loading, my click events are not being acted upon. plugin.php function my_js() { wp_enqueue_script('panel', VS_PATH.'js/panel.js', array('jquery')); } add_action('admin_enqueue_scripts', 'my_js'); add_action('login_enqueue_scripts', 'my_js'); //This will run our function when wp_head is called. add_action('wp_head', 'vs_script'); function vs_get_panel() { $panels = ' '; return $panels; } function vs_insert_panel($atts, $con…
answer count: 1
has title: Cannot load my javascript into wordpress plugin
tagged with: javascript
tagged with: plugins
tagged with: php
tagged with: wordpress
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25489231
type: Question
has answer: http://stackoverflow.com/a/25489231

http://stackoverflow.com/comment/39643162
has text: `alert()` dialog boxes can not be modified. You would have to make a custom javascript dialog to do this.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25413573
score: 2

http://stackoverflow.com/a/25548670
has comment: http://stackoverflow.com/comment/75665391
accepted answer of: http://stackoverflow.com/q/25548501
has comment: http://stackoverflow.com/comment/39896443
has comment: http://stackoverflow.com/comment/39895520
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 7
answers question: http://stackoverflow.com/q/25548501
upvote count: 7
has body: Comment can have two forms: // this is a comment /* this is a comment */ Unfortunately, both / and * are special characters in regular expressions, so they must be escaped. So we start with an empty match expression //g We set it to match the first form, // followed by any number of characters, which would be //.* but the slashes have to be escaped /\/\/.*/g The other form, /* followed by anything followed by */ is /*[^]**/ but we have to escape the literal slashes and asterisks \/\*[^]*\*\/ The two forms are then combined with a | character which denotes a "or": \/\/.*|\/\*[^]*\*\/ and inserted into the empty regex /\/\/.*|\/\*[^]*\*\//g

http://stackoverflow.com/comment/39707563
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25438149
has text: You can't have them in initialData unless you want to wait until all your remote calls come back before the call to highcharts() - the data simply isn't available, which is why you have to wait until they're all done and then call series.setData().
type: Comment

http://stackoverflow.com/q/25517182
tagged with: css
type: UnansweredQuestion
downvote count: 2
has title: Add spacing between numbers and letters
has answer: http://stackoverflow.com/a/25517197
type: Question
has comment: http://stackoverflow.com/comment/39837233
upvote count: 0
score: -2
answer count: 1
has body: how to add spacing if i write "12345test" output is "1 2 3 4 5 t e s t" This is my code Thanks a lot!
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25406088
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25395166
type: Answer
accepted answer of: http://stackoverflow.com/q/25395166
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39628864
has body: Scopes inherit from their parent scopes. The modal is created as a child of the scope that you passed in when initalising it (or on the $rootScope by default). When attempting to set a property directly on the scope, angular will automatically create it for you. However, if you try doing model.myProperty, if model doesn't exist on the child scope, it will travel up to the parent and correctly set it there (if it exists). A good description on how scopes work can be found here: https://github.com/angular/angular.js/wiki/Understanding-Scopes Here is a working sample without having to resort to using $parent. http://plnkr.co/edit/WeJqirLDOoFuTqJEHEdg &lt;input type="text" class="form-control" datepicker-popup="{{format}}" disabled ng-model="dateModal.date" is-open="dateModal.opened" ng-required="true" close-text="Close"/&gt;
has comment: http://stackoverflow.com/comment/39628653

http://stackoverflow.com/q/25393138
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/34783184
has body: I have a simple webpage which generates a random quote from my database upon refreshing the page. I wish to implement some AJAX and JQuery in order to generate quotes via the button rather than having to refresh the page. I have done some research but I am not sure how to implement this in Codeigniter. My current code is below... Page controller: public function index() { $this->load->model('quote_model', '', TRUE); $data['quotes'] = $this->quote_model->getRandom(); $this->load->view('home', $data); } The view: <?php include ('layout/header.php'); ?> <?php echo $quotes[0]['quote']; ?> <?php echo $quotes[0]['character_name']; ?> in <?php echo $quotes[0]['series_name']; ?> Generate quote <?php include ('layout/footer.php'); ?> Here is the function in the model I am retrieving the data from: function getRandom() { $query = $this->db->query(" SELECT * FROM quotes, characters, series WHERE quotes.series_id = series.series_id AND quotes.character_id = characters.character_id ORDER BY rand() LIMIT 1 "); return $query->result_array(); } Should I simply be using something like this? $("button").click(function(){ $.get( "Page/index", function( data ) { //output data to page element... } });
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25393896
tagged with: php
tagged with: codeigniter
has title: Codeigniter: Retrieving data on button click with Ajax
type: Question

http://stackoverflow.com/a/25396336
has comment: http://stackoverflow.com/comment/39610735
answers question: http://stackoverflow.com/q/25396269
has comment: http://stackoverflow.com/comment/39611197
has comment: http://stackoverflow.com/comment/39614322
type: Answer
has comment: http://stackoverflow.com/comment/39610613
has comment: http://stackoverflow.com/comment/39611297
has comment: http://stackoverflow.com/comment/39610582
has comment: http://stackoverflow.com/comment/39610960
has comment: http://stackoverflow.com/comment/39610713
score: 0
has body: Use this, It will enable every input on fifth click. $(document).ready(function () { var count = 0; $('#btn').click(function(){ if(count &gt; 3) $('input[type="text"]').attr('disabled',false); else $('input[type="text"]').attr('disabled',true).eq(count++).attr('disabled',false); }) }); DEMO
accepted answer of: http://stackoverflow.com/q/25396269
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39611327

http://stackoverflow.com/q/25493984
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/25494027
accepted answer: http://stackoverflow.com/a/25494027
upvote count: 15
possible better answer: http://stackoverflow.com/a/64086054
downvote count: 0
has title: Javascript: find word in string
linked to: http://stackoverflow.com/q/1789945
has comment: http://stackoverflow.com/comment/39792348
type: AnsweredQuestion
tagged with: cpu-word
has comment: http://stackoverflow.com/comment/39792373
has comment: http://stackoverflow.com/comment/39792473
linked to: http://stackoverflow.com/q/24718348
score: 15
tagged with: substring
has answer: http://stackoverflow.com/a/64084442
has comment: http://stackoverflow.com/comment/39792433
type: Question
has answer: http://stackoverflow.com/a/64086054
has body: Does Javascript have a built-in function to see if a word is present in a string? I'm not looking for something like indexOf(), but rather: find_word('test', 'this is a test.') -&gt; true find_word('test', 'this is a test') -&gt; true find_word('test', 'I am testing this out') -&gt; false find_word('test', 'test this out please') -&gt; true find_word('test', 'attest to that if you would') -&gt; false Essentially, I'd like to know if my word appears, but not as part of another word. It wouldn't be too hard to implement manually, but I figured I'd ask to see if there's already a built-in function like this, since it seems like it'd be something that comes up a lot.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39792420

http://stackoverflow.com/q/25479972
upvote count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/20447106
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39769226
answer count: 0
downvote count: 0
score: 1
type: Question
has title: How to place the text on center of path in d3js
has body: I am creating paths between the nodes and place the text between the paths. but it shows at node not on path. I have using following code for d3js var pathGroup = svg.append("g"); var path = pathGroup.selectAll("path") .data(links) .enter().append("svg:path") .attr('id', function(d){ return d.source.name}) .attr("class", function(d) { return "link " + d.type; }) var distance = pathGroup.selectAll('distance')//.append('svg:text') .data(links).enter().append('svg:text') .attr('class', 'distance')//.call(force.drag)//.attr('text-anchor','middle') .attr('dy','-30') var textPath = distance.append('svg:textPath') .attr('xlink:href', function(d){ return '#'+d.source.name}) .attr('startoffset','50%') .text(function(d) { return d.distance })
tagged with: javascript
has comment: http://stackoverflow.com/comment/39770137

http://stackoverflow.com/comment/39640123
has text: In your fiddle value stays after a star is clicked
type: QuestionComment
comment on: http://stackoverflow.com/q/25412059
type: Comment
score: 0

http://stackoverflow.com/q/25497525
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25497577
type: Question
has body: I have a submit form with a click button, once the submit form its clicked, I want to change a series of images within my html site. As of now I am using the following JS code but I am having trouble defining the appropriate success response. &lt;script type=text/javascript&gt; $(function() { $("#valueme").click(function() { $.ajax({ type: "GET", url: $SCRIPT_ROOT + "/mypythonscript/", contentType: "application/json; charset=utf-8", data: { input1: $('input[name="input1"]').val(), input2: $('input[name="input2"]').val(), }, success: function(data) { //$ ('#photo_link1_div').text(data.photo_link1); //$ ('#photo_link2_div').text(data.photo_link2); } }); }); }); &lt;/script&gt; The data that mypythonscript returns is a dictionary with the links to all the images that I want to change in the html site, i.e., mypythonscript returns {photolink1:'../static/img/myphoto1.jgp',photolink2:'../static/img/myphoto2.jgp'}. Using such data I'd like to change the background images in my html by changing the DIVs background image urls. As of now the DIVs in my html look like (ideally I do not have to change this part but rather the JS part): &lt;div id="photo_link1_div" style="background-image: url(../static/img/anotherphotowanttochange.jpg); background-repeat: no-repeat; width: 200px; height: 310px; background-size: 100% auto;" align="center"&gt;&lt;/div&gt;
answer count: 2
tagged with: javascript
tagged with: flask
has title: bootstrap/JS/Ajax after button click get form TO CHANGE images
score: 0
has answer: http://stackoverflow.com/a/25497577
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25497646
has answer: http://stackoverflow.com/a/25497646
tagged with: twitter-bootstrap
tagged with: css

http://stackoverflow.com/q/25393398
has comment: http://stackoverflow.com/comment/39605241
has answer: http://stackoverflow.com/a/25394050
upvote count: 2
answer count: 1
has body: I just started reading a book about ajax. I'm setting up a testing environment to run the code over the network to test the examples as should be, since we're talking Ajax. I've already known Ajax cross-domain issue, but why am I getting this cross-domain error? the url of the page that is requesting the resource is that: http://diegodesignertest.freeiz.com/teste2.php (url I typed in my browser) the request is performed this way: xhr.open("get", "http://diegodesignertest.freeiz.com/response.php", true); this code is contained in teste2.php and is requesting a response.php file (this make no sense I was just testing) isn't the same domain?
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39605092
has comment: http://stackoverflow.com/comment/39605284
tagged with: xmlhttprequest
tagged with: php
has title: Ajax cross-domain error, but I am using the same domain (CORS)
score: 2
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39605881
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39767126
type: QuestionComment
has text: Are you sure `this` is what you need? Maybe you handler should have argument list?
score: 0
comment on: http://stackoverflow.com/q/25480548
type: Comment

http://stackoverflow.com/comment/39685790
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25430524
has text: Nevertheless, from a UI point of view, you won't be able to know for sure that the cert is what it says it is. In a browser, everything that is designed to indicate whether the communication is secure or not is *outside* the scope of the page for a reason: you shouldn't be able to present a fake page with similar signs.

http://stackoverflow.com/comment/39714189
has text: :) ok I ll check it again let you know. Thanks
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25452082
score: 0

http://stackoverflow.com/a/25393837
has body: You are resetting your elementItem variable with = when you reach the primary type. Try appending every item in your list. Initialize the elementItem by var elementItem=''. var elements = [{ type: 'secondary', name: 'foo' }, { type: 'primary', name: "bar" }, { type: 'secondary', name: "glorp" }]; var elementItem = ''; $(elements).each(function () { if (this.type == 'primary') { elementItem += this.type + ' - ' + this.name + '&lt;br /&gt;'; } else { elementItem += this.type + ' - ' + this.name + '&lt;br /&gt;'; } }); $('#results').append(elementItem);
answers question: http://stackoverflow.com/q/25393730
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25393730
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25421684
has comment: http://stackoverflow.com/comment/39657281
type: AcceptedAnswer
downvote count: 0
has body: Try this: function (val, axis) { val = Math.round(val * 10) / 10; return val + '%'; } using toFixed will add additional zeros. Check the JSFiddle with values like 12.02 to see the difference. JSFIDDLE.
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/39657434
score: 3
accepted answer of: http://stackoverflow.com/q/25421651
answers question: http://stackoverflow.com/q/25421651

http://stackoverflow.com/q/25462228
upvote count: 2
tagged with: match
tagged with: excel
has title: How do I code the equivalent in JavaScript of "Application.Match" in VBA? - - for use in a numerical interpolation function
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/13605213
has answer: http://stackoverflow.com/a/25462911
has answer: http://stackoverflow.com/a/25506382
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/25462911
linked to: http://stackoverflow.com/q/18754096
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/25462907
tagged with: vba
has answer: http://stackoverflow.com/a/25462907
favorite count: 0
tagged with: interpolation
has body: I want to write an INTERPOLATION function in JavaScript in order to be able to use Google Sheets instead of Excel for a number of purposes. In Excel, I have this user defined function written in VBA: Function interpolate_1D(xreq As Single, x As Range, y As Range) As Single ' If we have variable y that is a function of x and have two ranges, x and y that give the values 'of y for particular values of x, we may need to find the value of y for a value of x not 'given in the table. 'For example, we may have power curve data for a wind turbine that gives the power output of a wind turbine 'for integer values of the wind speed. To find the output power at any other speed we could 'use this function, using as arguments: 'xreq: wind speed for which we wish to know the output power 'x: range containing the known wind speeds in ascending order 'y: range containing the known wind turbine powers Dim pointer As Integer Dim x0 As Single, y0 As Single, x1 As Single, y1 As Single pointer = Application.Match(xreq, x, 1) x0 = x(pointer) x1 = x(pointer + 1) y0 = y(pointer) y1 = y(pointer + 1) interpolate_1D = y0 + (xreq - x0) * (y1 - y0) / (x1 - x0) End Function I probably copied this from somewhere, such as Billo's book on Excel for Scientists and Engineers. It works very well, as does a 2D version of it that I wrote. I am fairly new to JavaScript, and I can't at the moment see how to get it to do the equivalent of the Application.Match (xreq,x,1) line, where it looks through the range of known x values and finds the position of the largest value that is smaller than the search value xreq. Once i have that position, I can do everything else. Any ideas?

http://stackoverflow.com/comment/39741267
comment on: http://stackoverflow.com/q/25466623
type: Comment
type: QuestionComment
has text: should I split it into outer function? would that help?
score: 0

http://stackoverflow.com/comment/39881038
type: Comment
has text: Thanks a lot, I'm a beginner in jQuerry :s
comment on: http://stackoverflow.com/a/25542342
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39648555
comment on: http://stackoverflow.com/q/25416583
type: Comment
type: QuestionComment
has text: @nnnnnn yes the lowest level child element. Relative and Absolute positioning would need to be accounted for.. any item covering another item due to positioning would need to select the highest z-index'ed item.. it looks like `elementFromPoint()` is exactly what i needed :)
score: 0

http://stackoverflow.com/q/25423916
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25424061
downvote count: 0
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25426116
has title: JSON Data log and sent to server
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
upvote count: 1
has body: I have a javascript function which generates JSON data at every certain second and then PUT it to a cloud server. 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. For example I want to log 50 data point in 10 second and then with timestamp I will PUT to a server Now JSON data is passed through var fromDatan. JSON data format is {"value":"-2.1282838391939194"} Now the code is: var acc; var watchID = null; function startWatch() { //set frequency of accelerometer update.1000 = 1 second var options = { frequency: 1000 }; watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options); } function stopWatch() { if (watchID) { navigator.accelerometer.clearWatch(watchID); watchID = null; } } //DISPLAY ACCELERATION DATA function onSuccess(acceleration) { acc = acceleration; var element = document.getElementById("accelerometer"); element.innerHTML = 'Acceleration X: ' + acceleration.x + '&lt;br /&gt;' + 'Acceleration Y: ' + acceleration.y + '&lt;br /&gt;' + 'Acceleration Z: ' + acceleration.z + '&lt;br /&gt;' + 'Timestamp: ' + acceleration.timestamp + '&lt;br /&gt;'; datalock(); } function postdata () { var accx = acc.x; alert(accx); var fromDatan = JSON.stringify(fromData); alert(fromDatan); //POST JSON DATA $.ajax({ url: "http://abcd.com", headers: { "X-API-KEY": "2b9asdedqedqxdqd7956e6f7a", "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)); } }); return false; } function datalock(){ alert("Entering"); fromData.push({ value: accx.toString(), }); if (fromData.length &gt;= 10) { postdata (); }; var fromData; } It is not working, although all other things are correct, the pushing I couldn't implement properly. Can anyone please help me out?

http://stackoverflow.com/comment/39708375
has text: The mathematical question is : how to build the two control points of the bezier so that the middle anchor is on the resulting bezier curve. It is a bit of math... Hopefully a S.O. member will have an idea...
score: 0
comment on: http://stackoverflow.com/q/25446539
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25466889
tagged with: typeahead.js
tagged with: typeahead
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26899833
score: 1
has title: Typeahead.js with remote data source
upvote count: 1
type: Question
has body: I have a json file which outputs {"data": ["A", "B", "C", "D", ...]} My typeahead.js script looks like var engine = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: { url: 'list.json', filter: function(list) { return $.map(list, function(person) { return { name: person }; }); } } }); engine.initialize(); $('.typeahead').typeahead(null, { displayKey: 'name', source: engine.ttAdapter() }); The typeahead.js script is activated correctly, but it interprets the data source as only one comma separated item instead of separate items. So instead of 'searching' through the elements "A", "B", "C" etc. it just gives me one suggestion "A, B, C, ...". What is wrong with my script? I have followed the examples at http://twitter.github.io/typeahead.js/examples/. If I change "name" to "value" both in datumTokenizer, filter and displayKey it wont get any items at all, but only output "undefined". I am pretty sure it's the filter option inside prefetch which doesn't work correctly.
tagged with: javascript
tagged with: twitter-typeahead
tagged with: jquery
has comment: http://stackoverflow.com/comment/39794649
linked to: http://stackoverflow.com/q/21530063

http://stackoverflow.com/comment/39796257
comment on: http://stackoverflow.com/q/25496064
score: 0
has text: since you suggest to forgive the syntax, I assume this is not working code? the `return` statement only works when inside a function, where something asks the function for data, and the function `return`s a result. here, you aren't asking for the data, so where would it be used?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39764405
type: Comment
comment on: http://stackoverflow.com/a/25461481
score: 0
type: AnswerComment
has text: yeah i wanted the 2nd element to be a group of images which i wanted to be disabled at first time

http://stackoverflow.com/comment/39669903
has text: @ThomasPowers hey, ok I change the submit input to a button and used an onClick event. The alert now shows. But then the page reloads and nothing else happens
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25428078

http://stackoverflow.com/comment/39818712
has text: No i don't need checkboxes directly bind to observable, it will automatically firing my getTasksFromServer function without user manually (click) submit form.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25507379

http://stackoverflow.com/q/25487293
tagged with: nonblocking
has comment: http://stackoverflow.com/comment/39779228
has title: Node.js: Code keeps running before web request finishes
tagged with: javascript
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/25487573
accepted answer: http://stackoverflow.com/a/25487573
has body: Here is the part of my code that's not working: var companiesUrls = []; var companiesUrls2 = []; request(site+companiesPath, function(err, resp, body){ if(!err &amp;&amp; resp.statusCode == 200){ var $ = cheerio.load(body); $('a', '#group-content').each(function(){ var url = $(this).attr('href'); companiesUrls.push(url); }); console.log(companiesUrls.length); } }); console.log(companiesUrls); for(var i=0;i&lt;companiesUrls.length;i+=2){ companiesUrls2.push(companiesUrls[i]); }; console.log(companiesUrls2); Here is the output that this code yields: [] [] 102 My theory is that node.js's "non-blocking" nature is causing the request to run after the rest of the code. And because of that my for loop gets the empty array instead of array that holds 102 items in it. How can I fix that?
favorite count: 0
has comment: http://stackoverflow.com/comment/39779237
tagged with: node.js
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question

http://stackoverflow.com/comment/40166228
score: 0
has text: I'm almost certain clearing my cache/temp files will fix it, but that will fix it only for me, not for the rest of my users encountering the problem. One of the other members of staff ran in to this problem and clearing the cache instantly fixed it. It seems to be more of just a temporary work-around though anyhow, he encountered the same problem again a few weeks later.
type: AnswerComment
comment on: http://stackoverflow.com/a/25673618
type: Comment

http://stackoverflow.com/a/25477063
accepted answer of: http://stackoverflow.com/q/25476999
has comment: http://stackoverflow.com/comment/39760571
answers question: http://stackoverflow.com/q/25476999
has comment: http://stackoverflow.com/comment/39760637
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/39776118
has comment: http://stackoverflow.com/comment/39760529
has comment: http://stackoverflow.com/comment/39760581
upvote count: 1
has comment: http://stackoverflow.com/comment/39760840
has comment: http://stackoverflow.com/comment/39760512
has body: Add a class name ("fading" for instance) to each link that you like to have this behavior and add the related div that should be toggled as an Attribute (relDiv="one" for instance). Also add a class to all related divs (class="relDiv" for instance). So your HTML must be look like this: Catergory styles brand This is my category This is styles This is main brands And use just this few JQuery lines for as many as menu you want: var currentDiv = 'one'; $(".fading").click(function(e){ e.preventDefault(); $this = $(this); if (currentDiv != $this.attr('relDiv')){ $("#" + currentDiv).fadeOut( "slow", function() { $("#" + $this.attr('relDiv')).fadeIn(); }); } currentDiv = $(this).attr('relDiv'); }); Check JSFiddle Demo
has comment: http://stackoverflow.com/comment/39760821

http://stackoverflow.com/comment/39891527
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25548268
type: Comment
has text: Could you show the code of 'hashtags()' in order to know what is happening? I supposed that 'wyssib()' is the WYSIWYG BBCode editor based on jQuery, but no idea of 'hashtags()'

http://stackoverflow.com/q/25434506
type: UnansweredQuestion
score: 6
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/25434805
has body: I am new to NodeJS. I am trying to download file from json object. I have json object that i received from Mongodb collection and I want to return json data as list in file. I tried to download file from my local machine and that codes works. But not able to understand how should i return file from json object. Do i need to use Buffer for this. So far I have below test code. //Write Member File exports.File = function(req, res){ var data = getdata(function(err, members){ //console.log(members); // var bf = buffer.Buffer(members, 'Binary').toString('base64'); // console.log(bf.length); // I get bf.length as 4 var file = 'C:/Docs/members.txt'; var filename = path.basename(file); console.log(filename); var mimetype = 'text/plain'; res.setHeader('Content-disposition', 'attachment; filename=' + filename); res.setHeader('Content-type', mimetype); var fileStream = fs.createReadStream(file); fileStream.pipe(res); }); };
has title: Download file from Json object in Node.js
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/35124669
answer count: 3
upvote count: 6
tagged with: node.js
has answer: http://stackoverflow.com/a/39182696

http://stackoverflow.com/comment/39630863
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25407295
has text: I think what you're looking for has been answered here : http://stackoverflow.com/questions/17298443/filter-json-for-unique-key-and-get-all-related-values
type: Comment

http://stackoverflow.com/q/25478441
favorite count: 0
has comment: http://stackoverflow.com/comment/39763266
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39763121
upvote count: 1
has title: Is it possible to use the same adobe edge animation in the same page?
score: 1
type: Question
tagged with: adobe-edge
has comment: http://stackoverflow.com/comment/39763163
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am new to adobe edge and want to know if it is possible to use the same animation more than once in the same page? What I mean here is I have parent div elements that hold each animation and I put a display:none style on each div page that I want to hide and then remove it when I want to show the animation. So I have the following: &lt;div&gt; &lt;!-- Adobe Edge animation ---&gt; &lt;/div&gt; &lt;div style="display:none"&gt; &lt;!-- Adobe Edge animation (same as above)---&gt; &lt;/div&gt; I alternate between the two divs setting the style and removing it. Since my animations are the same the reason I am doing this is I am using angularjs to inject in my data so that each animation plays with different data. What I am seeing is the last animation is shown and runs but only the CSS is shown for the first animation as it does not play. I think this is because JQuery is used to target specific elements and as we now have duplicates (same animation), the last animation is played. Is there a way I can overcome this? Can I modify the edge scripts generated to target only the elements which do not have the parent div without a class 'style:none'? Thanks

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

http://stackoverflow.com/a/25549344
type: AcceptedAnswer
downvote count: 0
has body: Services are instanced by Angular and then a reference of them is injected where ever it is asked for. Just change the code as following var app = angular.module('plunker', []); app.factory('Blog', function() { return { name: "", description: [ {value: ""}, {value: ""}, {value: ""} ], website: { name: "", url: "" }, helper1: function() { // implementation }, helper2: function() { // implementation } // many other helpers... } //return new Blog(); }); app.controller('MainCtrl', function($scope, Blog) { $scope.model = Blog; }); There is a slight difference in way in which services, factories and provider works. I hope you are clear on that other wise read this excellent article http://tylermcginnis.com/angularjs-factory-vs-service-vs-provider/ NEW plunkr http://plnkr.co/edit/FGOcPWVMeFDSyVtmv8Xd?p=preview The factory exposes a new method using which you can create new instances of Blog. I think its also because JSON filter is implemented you are not able to see all the values. Because decription and website and url are in proto of the object, it's not displaying it. I added a button for logging the model, you can see in the console that the value is changed Edit 2 Q: I don't understand why the JSON filter is not displaying the values ? A: I think it could be how its implemented, may be to make it light weight. Otherwise it has to walk through it's entire prototype chain Q: Why the values are placed into the proto because of the nature of Blog ? A: its because you add the values in the Blog's prototype and not inside Blog itself. It's how prototypical inheritence works in javascript. The advantage is think when you have to create 1000s of blog's instances. Now each instance can have the same methods and properties or to make it light weight, each instance can share the same object which is in its proto.(think of base class in OO language) Read this for more clarity https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain
accepted answer of: http://stackoverflow.com/q/25548793
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25548793
score: 1
has comment: http://stackoverflow.com/comment/39895101
has comment: http://stackoverflow.com/comment/39893799

http://stackoverflow.com/q/25462755
has body: I'm making a custom three.js geometry for non-orthogonal cubes. It is loosely based on the existing Box-geometry in three.js, but greatly simplified insofar that it only supports one segment per side and also has the absolute position of its vertices fed directly to it. I have problems both in wire frame rendering and texture rendering. In wire frame rendering I only get to see one of the six sides, as can be seen here: This is the snippet that I use for setting the material: if (woodTexture) { texture = THREE.ImageUtils.loadTexture( 'crate.gif' ); texture.anisotropy = makeRenderer.renderer.getMaxAnisotropy(); material = new THREE.MeshBasicMaterial( { map: texture } ); } else { material = new THREE.MeshBasicMaterial( { color: color, wireframe: true, side: THREE.DoubleSide } ); } I know for sure the path for crate.gif is valid, as it works for Box geometries. Here follows my faulty geometry. The 'quadruplets' array contains six arrays with each four Vector3 instances. Each inner array delineates a side of the cube. THREE.Box3Geometry = function (quadruplets, debug) { THREE.Geometry.call(this); var constructee = this; // constructee = the instance currently being constructed by the Box3Geometry constructor buildPlane(quadruplets[0], 0, debug); // px buildPlane(quadruplets[1], 1); // nx buildPlane(quadruplets[2], 2); // py buildPlane(quadruplets[3], 3); // ny buildPlane(quadruplets[4], 4); // pz buildPlane(quadruplets[5], 5); // nz function buildPlane(quadruplet, materialIndex, debug) { // populate the vertex array: constructee.vertices.push(quadruplet[0]); constructee.vertices.push(quadruplet[1]); constructee.vertices.push(quadruplet[2]); constructee.vertices.push(quadruplet[3]); // construct faceVertexUvs: var uva = new THREE.Vector2(0, 1); var uvb = new THREE.Vector2(0, 0); var uvc = new THREE.Vector2(1, 0); var uvd = new THREE.Vector2(1, 1); // construct faces: var a = 0; // vertex: u:50, v:50 var b = 2; // vertex: u:50, v:-50 var c = 3; // vertex: u:-50, v:-50 var…
accepted answer: http://stackoverflow.com/a/25474739
has title: Custom three.js geometry won't show it's face
downvote count: 0
tagged with: javascript
score: 1
type: AnsweredQuestion
favorite count: 0
has answer: http://stackoverflow.com/a/25474739
type: Question
tagged with: three.js
upvote count: 1
answer count: 1

indy
type: Tag
tag name: indy
tags question: http://stackoverflow.com/q/25442969

http://stackoverflow.com/comment/39730232
type: QuestionComment
has text: @StephenCleary I read the Wikipedia link you included. It's a little too "comp sci" for me, but it seems to me that reentrancy isn't a bad thing per se. The very definition includes "... and **safely** called again". [Searching for "unpredictable reentrancy"](http://goo.gl/kn1rG5) doesn't yield much, so there's a few too many pieces missing for me to make something out of your comment. I'm keen to learn though. If you find a moment, perhaps you could expand in an answer by explaining _how_ my suggestion would cause unpredictable reentrancy and why it is a bad thing.
score: 0
comment on: http://stackoverflow.com/q/25446353
type: Comment

http://stackoverflow.com/comment/104176825
type: AnswerComment
has text: That's the same idea I was thinking of.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25425190

http://stackoverflow.com/a/25526574
score: 0
answers question: http://stackoverflow.com/q/25526344
type: AcceptedAnswer
type: Answer
has body: Regular javascript was retired in recent WebView (more specifically Chromimum WebView). You can achieve the desired effect in the following way: 1) First of all make sure the javascript is enabled. I suggest also browsing the available methods in webview settings, since you may find more usueful and required things there: webview.getSettings.setJavaScriptEnabled(true) 2) Since 4.4 you do this by evaluateJavascript() which will asynchronously invoke the javascript and provide you with a callback: String exampleScript = "(function() { return \"example\"; }) ();" webView.evaluateJavascript(exampleScript, new ValueCallback&lt;String&gt;() { @Override public void onReceiveValue(String s) { Log.d("LogName", s); // Prints 'this' } }); 3) Pre 4.4 you can use the JavaScriptInterface described here. Make note of the extra @JavascriptInterface annotation which is required for the intrface to work correctly on post SDK17 devices.
accepted answer of: http://stackoverflow.com/q/25526344

http://stackoverflow.com/q/25459246
has answer: http://stackoverflow.com/a/25459279
type: Question
accepted answer: http://stackoverflow.com/a/25459279
score: 0
has comment: http://stackoverflow.com/comment/39727751
has comment: http://stackoverflow.com/comment/39727735
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jquery resizable & draggable not working at same time
has body: &lt;script&gt; $(document).ready(function(e) { $(function(){ $("#a").draggable(); $("#a").resizable(); }); }); &lt;/script&gt; &lt;style&gt; img{border:solid 1px #000; width:512px; height:512px;} &lt;/style&gt; &lt;img id="a" src="images/1.png" /&gt; I have an image use jquery resizable &amp; draggable. It's not working if I use both at same time.
type: AnsweredQuestion

sequelize.js
tags question: http://stackoverflow.com/q/25506798
type: Tag
tags question: http://stackoverflow.com/q/25525467
tag name: sequelize.js

http://stackoverflow.com/comment/39784995
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25450735
score: 0
has text: That was my thought as well. All of their e-commerce data is still in tact and haven't experienced any issues with it. I figure it will probably fix itself once we go live with UA, but I don't even know what I should be looking for in the mean time...

http://stackoverflow.com/comment/39814160
type: Comment
type: QuestionComment
score: 7
comment on: http://stackoverflow.com/q/25505930
has text: It would be better to find out from where this `s` stems from, rather than removing it after it has appeared.

http://stackoverflow.com/a/25476459
answers question: http://stackoverflow.com/q/25476412
has body: Unless the server provides a JSONP API, or allows configuring the Access-Control-Allow-Origin response attribute, you can't do anything besides requesting that your server requests the ZIP file, as the browser won't allow it.
type: Answer
score: 0

http://stackoverflow.com/q/25473254
has answer: http://stackoverflow.com/a/25473360
accepted answer: http://stackoverflow.com/a/25473360
has answer: http://stackoverflow.com/a/26548866
score: 0
answer count: 2
tagged with: winjs
tagged with: visual-studio-2013
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26548866
tagged with: windows-phone-8-emulator
tagged with: windows-phone-8.1
type: Question
has title: Test app settings in Windows Phone 8.1 emulator
has body: I'm new to WP8.1 developing so this might be a newbie question: I'm writing an app that have some settings, so i'm using these APIs: var applicationData = Windows.Storage.ApplicationData.current; var localSettings = applicationData.localSettings; As i can see from emulator everything works well if i save a value and then get it out later, even if i close the application with task manager (holding the back button of the emulator): if I run the app again it has the correct values saved. But if I shut down the emulator and re-launch the app from Visual Studio it starts with default values. Is it because the emulator is freshly created every time and my app installed every single time or something is wrong with my ApplicationData usage? I mean: if I use a true phone with these settings (don't have one now) will the customized settings saved even if i turn off the phone? Or I have to use some more "deep" API to permanently save an application setting? Thank you for your help! Gianluca
tagged with: javascript

http://stackoverflow.com/a/66831524
upvote count: 1
answers question: http://stackoverflow.com/q/25422584
score: 1
downvote count: 0
has body: My actual component wasn't visible due to *ngIf, and I was clicking on another component and expecting click to work. This can happen if you copy/paste code or work on existing code after long.
type: Answer

http://stackoverflow.com/comment/39652921
comment on: http://stackoverflow.com/a/25418825
score: 2
type: AnswerComment
type: Comment
has text: @BubbaYakoza - It seems like you're getting very close to [**TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡**](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags) now.

http://stackoverflow.com/q/25495485
has answer: http://stackoverflow.com/a/35404433
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39802788
has comment: http://stackoverflow.com/comment/39826088
tagged with: css
has comment: http://stackoverflow.com/comment/39815721
has title: How do I display a carousel of embedded Tumblr posts?
tagged with: tumblr
has comment: http://stackoverflow.com/comment/39827942
type: Question
has comment: http://stackoverflow.com/comment/39826144
has comment: http://stackoverflow.com/comment/39826054
has comment: http://stackoverflow.com/comment/39826347
tagged with: javascript
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/39826427
answer count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
has body: For a while, I was embedding the 3 latest Tumblr posts on my site--a blog image, title and post URL. The code I was using was working great: (Due to all of the Tumblr external resources I have to load, I can't get the JSFiddle to work :/ ). Now I'm trying to make a carousel of blog posts (instead of just 3): You click a "next" button, and the next 3 Tumblr blog posts load (optimally, they'd load, but if that's not possible, they could just display) Once you click "next", the next 3 blog posts take the place of the previous 3 If you click "previous", the previous 3 blog posts display What's the best way to repurpose my code--or ditch it completely--to achieve this Tumblr post carousel? The things I've tried don't get anywhere close to what I want to achieve, because I'm not very skilled at JavaScript. They're honestly not worth posting. Thanks in advance for the help, guys!
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39825700
has comment: http://stackoverflow.com/comment/39797630

http://stackoverflow.com/comment/39834077
has text: @Tee Thanks, I'll keep that in mind for future questions.
comment on: http://stackoverflow.com/q/25508721
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/35031958
has body: There is sample how i do it in Razor MVC MVC View Code &lt;div ng-controller='myController'&gt; &lt;input type="hidden" id="companyId" value="@Model.CompanyId"/&gt; &lt;/div&gt; Angular controller code, logging to console companyId value from the view app.Controller("myController",['$scope',function($scope){ console.log(document.getElementById('companyId').value); }]);
score: 0
answers question: http://stackoverflow.com/q/25543938
type: Answer

openlayers
tags question: http://stackoverflow.com/q/25440695
type: Tag
tags question: http://stackoverflow.com/q/25525723
tags question: http://stackoverflow.com/q/25542963
tag name: openlayers
tags question: http://stackoverflow.com/q/25464084

http://stackoverflow.com/a/25448990
answers question: http://stackoverflow.com/q/25448929
has body: You can use {{#if and else... Also, you can make the handler global and use it twice.
score: 0
type: Answer

http://stackoverflow.com/comment/39610972
comment on: http://stackoverflow.com/q/25396592
type: Comment
has text: I could be wrong, but shouldn't it still be `manager.use('/api/me', ...`
type: QuestionComment
score: 0

css
tags question: http://stackoverflow.com/q/25417020
tags question: http://stackoverflow.com/q/25537297
tags question: http://stackoverflow.com/q/25434106
tags question: http://stackoverflow.com/q/25435235
tags question: http://stackoverflow.com/q/25475020
tags question: http://stackoverflow.com/q/25489030
tags question: http://stackoverflow.com/q/25519658
tags question: http://stackoverflow.com/q/25542578
tags question: http://stackoverflow.com/q/25449263
tags question: http://stackoverflow.com/q/25393336
tags question: http://stackoverflow.com/q/25418035
tags question: http://stackoverflow.com/q/25429907
tags question: http://stackoverflow.com/q/25530985
tags question: http://stackoverflow.com/q/25488166
tags question: http://stackoverflow.com/q/25436269
tags question: http://stackoverflow.com/q/25476798
tags question: http://stackoverflow.com/q/25410970
tags question: http://stackoverflow.com/q/25465285
tags question: http://stackoverflow.com/q/25531328
tags question: http://stackoverflow.com/q/25503850
tags question: http://stackoverflow.com/q/25442869
tags question: http://stackoverflow.com/q/25529236
tags question: http://stackoverflow.com/q/25412230
tags question: http://stackoverflow.com/q/25501275
tags question: http://stackoverflow.com/q/25478329
tags question: http://stackoverflow.com/q/25493771
tags question: http://stackoverflow.com/q/25461158
tags question: http://stackoverflow.com/q/25513219
tags question: http://stackoverflow.com/q/25494035
tags question: http://stackoverflow.com/q/25467241
tags question: http://stackoverflow.com/q/25415434
tags question: http://stackoverflow.com/q/25527213
tags question: http://stackoverflow.com/q/25426251
tags question: http://stackoverflow.com/q/25529059
tags question: http://stackoverflow.com/q/25391149
tags question: http://stackoverflow.com/q/25484787
tags question: http://stackoverflow.com/q/25528144
tags question: http://stackoverflow.com/q/25531905
tags question: http://stackoverflow.com/q/25406239
tags question: http://stackoverflow.com/q/25528559
tags question: http://stackoverflow.com/q/25422400
tags question: http://stackoverflow.com/q/25525398
tags question: http://stackoverflow.com/q/25430437
tags question: http://stackoverflow.com/q/25444913
tags question: http://stackoverflow.com/q/25529093
tags question: http://stackoverflow.com/q/25503099
tags question: http://stackoverflow.com/q/25468199
tags question: http://stackoverflow.com/q/25533602
tags question: http://stackoverflow.com/q/25459361
tags question: http://stackoverflow.com/q/25472626
tags question: http://stackoverflow.com/q/25418860
tags question: http://stackoverflow.com/q/25492587
tags question: http://stackoverflow.com/q/25542188
tags question: http://stackoverflow.com/q/25406018
tags question: http://stackoverflow.com/q/25520749
tags question: http://stackoverflow.com/q/25520590
tags question: http://stackoverflow.com/q/25410332
tags question: http://stackoverflow.com/q/25544532
tags question: http://stackoverflow.com/q/25461885
tags question: http://stackoverflow.com/q/25531397
tags question: http://stackoverflow.com/q/25549016
tags question: http://stackoverflow.com/q/25523817
tags question: http://stackoverflow.com/q/25476525
tags question: http://stackoverflow.com/q/25477548
tags question: http://stackoverflow.com/q/25421107
tags question: http://stackoverflow.com/q/25445411
tags question: http://stackoverflow.com/q/25427612
tags question: http://stackoverflow.com/q/25422001
tags question: http://stackoverflow.com/q/25503140
tags question: http://stackoverflow.com/q/25436147
tags question: http://stackoverflow.com/q/25539614
tags question: http://stackoverflow.com/q/25467462
tags question: http://stackoverflow.com/q/25505930
tags question: http://stackoverflow.com/q/25472425
tags question: http://stackoverflow.com/q/25509046
tags question: http://stackoverflow.com/q/25504309
tags question: http://stackoverflow.com/q/25498471
tags question: http://stackoverflow.com/q/25512666
tags question: http://stackoverflow.com/q/25391364
tags question: http://stackoverflow.com/q/25497525

http://stackoverflow.com/q/25432540
type: Question
has answer: http://stackoverflow.com/a/54439521
answer count: 1
downvote count: 0
tagged with: javascript
score: 10
favorite count: 0
has comment: http://stackoverflow.com/comment/39679893
type: UnansweredQuestion
tagged with: three.js
has title: Draw dimension lines along with 3D cube using Three.js
has body: Can we draw "lines" with Cube to show "Dimensions" at run time? Here is how I have created the cube and getting dimensions from user and changing the cube at run time: http://jsfiddle.net/9Lvk61j3/ But now I want to show the Dimension, so the user knows what the length, width, and height is, which they will be changing. This is what I am trying to make as end result: Here is my code: HTML: Dimensions (pixels): Length Width Height Click me to change the Dimensions JS var shape = null; //Script for 3D Box // revolutions per second var angularSpeed = 0.2; var lastTime = 0; var cube = 0; // this function is executed on each animation frame function animate() { // update var time = (new Date()).getTime(); var timeDiff = time - lastTime; var angleChange = angularSpeed * timeDiff * 2 * Math.PI / 1000; //cube.rotation.y += angleChange; //Starts Rotating Object lastTime = time; // render renderer.render(scene, camera); // request new frame requestAnimationFrame(function () { animate(); }); } // renderer var container = document.getElementById("container"); var renderer = new THREE.WebGLRenderer(); renderer.setSize(container.offsetWidth, container.offsetHeight - 4); container.appendChild(renderer.domElement); // camera var camera = new THREE.PerspectiveCamera(60, container.offsetWidth / container.offsetHeight, 1, 1000); camera.position.z = 800; // scene var scene = new THREE.Scene(); scene.remove(); // cube cube = new THREE.Mesh(new THREE.CubeGeometry(1, 1, 1), new THREE.MeshLambertMaterial({ color: '#cccccc' })); cube.overdraw = true; cube.rotation.x = Math.PI * 0.1; cube.rotation.y = Math.PI * 0.3; scene.add(cube); // add subtle ambient lighting var ambientLight = new THREE.AmbientLight(0x319ec5); scene.add(ambientLight); // directional lighting var directionalLight = new THREE.DirectionalLight(0x666666); directionalLight.position.set(1, 1, 1).normalize(); scene.add(directionalLight); shape = cube; // start animation animate(); var $ = function(id) { return document.getElem…
upvote count: 10
has comment: http://stackoverflow.com/comment/39680873

http://stackoverflow.com/a/25532873
accepted answer of: http://stackoverflow.com/q/25532770
answers question: http://stackoverflow.com/q/25532770
score: 5
has body: It looks like you are not requiring the general angular library. Add in the head of your document before your javascript files.
type: AcceptedAnswer
upvote count: 5
type: Answer
downvote count: 0

http://stackoverflow.com/q/25393730
has body: See the example here - http://jsfiddle.net/jayblanchard/b2y1tagk/ With the following code I would think that I would get all three elements appended to result, but I don't. I get: primary - bar secondary - glorp var elements = [{ type: 'secondary', name: 'foo' }, { type: 'primary', name: "bar" }, { type: 'secondary', name: "glorp" }]; var elementItem; $(elements).each(function () { if (this.type == 'primary') { elementItem = this.type + ' - ' + this.name + '&lt;br /&gt;'; } else { elementItem += this.type + ' - ' + this.name + '&lt;br /&gt;'; } }); $('#results').append(elementItem); So I'm thinking that I should add the += operator to the first portion of the if condition, but when I do I get this: undefinedsecondary - foo primary - bar secondary - glorp It doesn't matter what order these are in when they are generated, they just all have to be there when complete. I feel sure that I am missing something obvious, can someone tell me what that is?
has title: Iterating through array and not all items are showing
downvote count: 1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25393837
possible better answer: http://stackoverflow.com/a/25393748
score: 0
has answer: http://stackoverflow.com/a/25393748
has comment: http://stackoverflow.com/comment/39605674
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25393837

simple-form
tags question: http://stackoverflow.com/q/25458665
tag name: simple-form
type: Tag

http://stackoverflow.com/a/25432438
answers question: http://stackoverflow.com/q/25431037
score: 0
has comment: http://stackoverflow.com/comment/41699431
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41699395
has comment: http://stackoverflow.com/comment/41690790
type: Answer
has comment: http://stackoverflow.com/comment/39680376
has comment: http://stackoverflow.com/comment/41692540
has body: You can define gradients in several directions, and even define the colors of each stop with CSS. It's better to define gradients under the defs tag in the SVG element. The direction of the linear gradient is given by the attributes x1, y1, x2 and y2. For instance, if you have x1 = 0, y1 = 1, x2 = 1 and y2 = 1, the gradient will be diagonal, from the upper left to the bottom right corner. Consider the following code: var div = d3.select('#svg-container'), svg = div.append('svg'); svg.attr('width', width).attr('height', height); // Create the svg:defs element and the main gradient definition. var svgDefs = svg.append('defs'); // Define the gradient from (0, 0) to (1, 0) (horizontal) var mainGradient = svgDefs.append('linearGradient') .attr('id', 'mainGradient') .attr('x1', 0).attr('y1', 1) .attr('x2', 0).attr('y2', 0); // Create the stops of the main gradient. Each stop will be assigned // a class to style the stop using CSS. mainGradient.append('stop') .attr('class', 'stop-left') .attr('offset', '0%'); mainGradient.append('stop') .attr('class', 'stop-right') .attr('offset', '100%'); // Use the gradient to set the shape fill, via CSS. svg.append('rect') .classed('filled', true) .attr('x', padding) .attr('y', padding) .attr('width', (width / 2) - 1.5 * padding) .attr('height', height - 2 * padding); Also, you don't need to set the stop colors in JavaScripts, you can configure them using CSS. &lt;style&gt; .stop-left { stop-color: #3f51b5; /* Indigo */ } .stop-right { stop-color: #009688; /* Teal */ } .filled { fill: url(#mainGradient); } &lt;/style&gt; The result: The complete code of this example is available as a gist. More details in the SVG linearGradient element in the MDN site. Regards,
accepted answer of: http://stackoverflow.com/q/25431037

http://stackoverflow.com/q/25409181
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39636058
has comment: http://stackoverflow.com/comment/39635404
answer count: 0
has comment: http://stackoverflow.com/comment/39635880
score: 1
has comment: http://stackoverflow.com/comment/39634679
upvote count: 1
type: Question
has title: Get focus on input form fields via Javascript
tagged with: javascript
tagged with: jquery
downvote count: 0
has comment: http://stackoverflow.com/comment/39635494
favorite count: 0
has body: I'm not able to get focus on input text fields via classic Javascript | jQuery: $('#exampleInputEmail1').focus(); or document.getElementById('exampleInputEmail1').focus(); You can test it directly on http://getbootstrap.com/css/#forms . FYI: I have already opened an issue on GitHub ( here ) about this question but in the meantime I'd ask if there is someone that already known a solution or a workaround. Thank you. max

http://stackoverflow.com/comment/39881227
has text: @user3630952 This will work in all browsers. Check it, it should works well perfectly.
type: AnswerComment
comment on: http://stackoverflow.com/a/25541359
score: 0
type: Comment

http://stackoverflow.com/comment/39961371
type: AnswerComment
comment on: http://stackoverflow.com/a/25578558
type: Comment
has text: Thanks Haig, I tried it out with jquery mobile to no avail. I have a bunch of other click events that are structured almost identically that work on a touch device, so I don't believe that's the issue. I have a weird feeling that it is triggering appropriately but the menu is being shown behind the rest of the site...
score: 0

http://stackoverflow.com/a/32685694
has body: I agree with hooligan's answer. For some reason, $sce.trustAsURL doesn't seem to work. Instead, $sce.trustAsResourceUrl('') did work for me.
has comment: http://stackoverflow.com/comment/54043884
answers question: http://stackoverflow.com/q/25543129
type: Answer
upvote count: 15
downvote count: 0
score: 15

typeerror
tags question: http://stackoverflow.com/q/25455009
tag name: typeerror
tags question: http://stackoverflow.com/q/25511012
type: Tag

http://stackoverflow.com/comment/39862022
type: Comment
comment on: http://stackoverflow.com/a/25531332
type: AnswerComment
has text: Thank you very much!! I had found that line before, however I thought it was PHP (I'm very new at this) code becasue of the $. Did not know that you could do this with javascript. Thanks!
score: 0

http://stackoverflow.com/q/25548358
has answer: http://stackoverflow.com/a/25548632
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25548447
tagged with: php
has answer: http://stackoverflow.com/a/25548515
has title: Can't pass Javascript array to PHP via Ajax
score: 1
has comment: http://stackoverflow.com/comment/39891898
has answer: http://stackoverflow.com/a/25548597
has answer: http://stackoverflow.com/a/25548387
has answer: http://stackoverflow.com/a/25548398
upvote count: 1
has answer: http://stackoverflow.com/a/25548530
type: Question
answer count: 8
linked to: http://stackoverflow.com/q/13735869
has body: I've been tearing my hair out at such a simple problem. I have the following JS array: var orderDetailsArray = new Array(); orderDetailsArray[0] = 'test 1'; orderDetailsArray[1] = 'test 2'; orderDetailsArray[2] = 'test 3'; orderDetailsArray[3] = 'test 4'; Then I have the following Ajax code to send this array to a PHP file $.ajax({ type: "POST", url: 'http://testdomain.com/file.php', data: JSON.stringify(orderDetailsArray), contentType: "application/json", success: function(data) { alert(data); } }); In my PHP file I have the following $orderDetailsArray = json_decode($_POST['orderDetailsArray']); echo $orderDetailsArray[0]; But for some reason alert(data) always just returns blank. I have no idea why this doesn't return the correct values. Any help would be really great. Thanks
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25548459

http://stackoverflow.com/a/27630962
downvote count: 0
has body: Use something like the sample below . I'm new to cakephp2 myself but I was able to access the js scripts function. sample $this-&gt;Js-&gt;Action();
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25479281
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25479281

http://stackoverflow.com/a/29061184
answers question: http://stackoverflow.com/q/25495585
has body: I use node-clone to create a deep copy of a required module beforeEach test. Now the tests will use the clone instead of the cached module. var clone = require('clone'); describe('config', function(){ var data; beforeEach(function() { data = clone(require('./lib.js')).data; }); it('should be able to add data', function() { data.entry = 'random data'; console.log(data); // expecting to get `{ entry: 'random data' }` }) it('should have empty data', function() { console.log(data); // expecting to get `{}` }) }); If you don't use a before or beforeEach hooks you should be able to do the same across multiple files by cloning as soon as possible in each test script. var clone = require('clone'), data = clone(require('./lib.js')).data;
score: 0
type: Answer

http://stackoverflow.com/comment/39670948
comment on: http://stackoverflow.com/q/25428905
has text: Well have you tried adding some `console.log()` calls to verify that (for example) "sec" really is being initialized properly?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25458232
has comment: http://stackoverflow.com/comment/39725717
upvote count: 0
has answer: http://stackoverflow.com/a/25458237
answer count: 1
favorite count: 0
type: AnsweredQuestion
downvote count: 2
type: Question
has body: Click me Click me 2 I try to select the closest class, I have tried closest(), but its not working. I tried next().next(), it works, anyone why?
score: -2
accepted answer: http://stackoverflow.com/a/25458237
tagged with: javascript
has title: Jquery select closest class
tagged with: jquery

http://stackoverflow.com/q/25430071
type: UnansweredQuestion
has body: I have a simple spam trap that asks users to type the color of something, currently the validation code is: if (theForm.color.value != "blue") { alert("Please Type The Color"); theForm.color.focus(); return (false); } Unfortunately, this will return false if a user uses caps like Blue or BLUE. Is there a simple way to add acceptable values such as; if (theForm.color.value != "blue" "Blue") or if (theForm.color.value != "blue, Blue, BLUE") Side Note: I'm unfamiliar with this language, what books would you suggest to get me started?
has answer: http://stackoverflow.com/a/25430173
tagged with: forms
type: Question
has title: Is there a way to add different answers to this validation
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39673166
tagged with: spam-prevention
linked to: http://stackoverflow.com/q/2140627
score: 0
tagged with: validation

http://stackoverflow.com/comment/39809944
type: QuestionComment
comment on: http://stackoverflow.com/q/25503724
has text: If this is for entry by an end user, you should probably allow for spaces and (depending upon which country you're validating for) hyphens too.
score: 0
type: Comment

http://stackoverflow.com/q/25468904
tagged with: ajax
has comment: http://stackoverflow.com/comment/39745476
has comment: http://stackoverflow.com/comment/40089625
has answer: http://stackoverflow.com/a/25757903
accepted answer: http://stackoverflow.com/a/25668037
type: Question
has answer: http://stackoverflow.com/a/25757458
tagged with: php
has answer: http://stackoverflow.com/a/25663248
has answer: http://stackoverflow.com/a/25727602
upvote count: 2
has answer: http://stackoverflow.com/a/25771096
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/40089583
possible better answer: http://stackoverflow.com/a/25655356
has answer: http://stackoverflow.com/a/25770095
downvote count: 1
has answer: http://stackoverflow.com/a/25655356
has title: Automatically check checkboxes that relate to that id in database
answer count: 9
has answer: http://stackoverflow.com/a/25668037
has body: Currently, I am working on the project using Codeigniter and facing a challenge that I am unable to resolve. Following is the view: As shown in above figure, there are multiple roles and permissions available. Each role has different permissions stored in the database. Also, user can have more than one role at a time. Currently, I am able to select multiple roles and permissions of the user and it can successfully add in to the database. But the problem is that each role already have its permissions stored in the database. So, i would like to make it more user friendly and sensible that when I check any User Role checkbox then using Jquery/Javascript it should automatically check all the relevant permissions checkboxes in order to make a sense that which role has what permissions. Any help ?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40159909
has answer: http://stackoverflow.com/a/25690237
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39745393
score: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/111262270
comment on: http://stackoverflow.com/a/45683145
score: 0
type: AnswerComment
has text: Object.keys needs null check
type: Comment

http://stackoverflow.com/comment/39630775
score: 0
has text: @SergiuParaschiv: The result of console.log(angular.element('.click#1')); is an empty array. If I run console.log(angular.element('.click#+randomRuta)); I get an array with a value like this: Object[td#81.click.monster], instead of just Object[]. How can the code below .click#1 work, and not the other one?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25406400

http://stackoverflow.com/comment/39741511
has text: Just tried it, it still goes from 2x3 to 6x1, without the 3x2
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25466741

geospatial
tags question: http://stackoverflow.com/q/25422857
type: Tag
tag name: geospatial

http://stackoverflow.com/comment/39628815
has text: Take a look here (comment 3): http://bugs.jquery.com/ticket/12097
score: 0
comment on: http://stackoverflow.com/q/25405998
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25441259
has comment: http://stackoverflow.com/comment/39694164
type: AnsweredQuestion
has body: I have no experience working with jQuery or Javascript, so I am picking this up on the file. I have to put a slider in an .ASCX page. This is part of the code in that .ascx file: <asp:Label ID="lblHeader" runat="server" CssClass="InputHeader" meta:resourcekey="lblHeader" /> <asp:Label ID="lblSliderLeft" runat="server" Text="L" CssClass="sliderLabelLeft" /> <asp:Label ID="lblSliderRight" runat="server" Text="R" CssClass="sliderLabelRight" /> At the top of the page, I have included this: Now my question is, how do I do stuff with this slider? How would I set its value from a function in my .cs file? How do I grab its value in the .cs file?
has title: Working with a simple javascript/jQuery UI element
has comment: http://stackoverflow.com/comment/39693411
type: Question
has comment: http://stackoverflow.com/comment/39693849
accepted answer: http://stackoverflow.com/a/25442655
has comment: http://stackoverflow.com/comment/39694203
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39693748
has answer: http://stackoverflow.com/a/25442655
tagged with: slider
answer count: 1
has comment: http://stackoverflow.com/comment/39693916
has comment: http://stackoverflow.com/comment/39693510

http://stackoverflow.com/comment/39697989
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25443534
has text: Where are you calling `animate` from the first time? Also, you probably want to bail out when percent reaches 100.

http://stackoverflow.com/comment/39637176
score: 0
type: QuestionComment
type: Comment
has text: @FelixKling: That is much more helpful! I'll explore for a minute and see if I can get it to work.
comment on: http://stackoverflow.com/q/25410332

http://stackoverflow.com/q/25462008
tagged with: database
tagged with: javascript
has comment: http://stackoverflow.com/comment/39733174
has body: I'm inserting rows into a database using jQuery. All data is inserted and finally I'm using mysql_affected_rows() like this: if(mysql_affected_rows()>0){ echo "1"; }else{ echo "2"; } For javascript code using this: function(data, textStatus) { $('#response').html(textStatus); if(data == 1){ $('#response').html("Registration successfull!!"); $('#response').css('color','green'); }else{ $('#response').html("Some Error Occurred"); $('#response').css('color','red'); } The rows are inserted into the database but it shows: Some Error Occurred UPDATED: Have to 2 files: article_add.php and article_add_process.php article_add.php Категория <?php $extract_category = "SELECT * FROM categories"; $select_category = mysql_query($extract_category); while($row_query = mysql_fetch_array($select_category)) { echo " ".$row_query['category']." "; } ?> Мярка <?php while($row_query = mysql_fetch_array($query)) { echo " ".$row_query['category']." "; } ?> Автоматично генериране на уникален код article_add_process.php <?php require_once("models/config.php"); if (!securePage($_SERVER['PHP_SELF'])){die();} require_once("models/header.php"); require_once("config.php"); $article = $_POST['article']; $category = $_POST['category']; $qty_unit = $_POST['qty_unit']; $code = $_POST['code']; $barcode = $_POST['barcode']; $textarea = $_POST['textarea']; $query=mysql_query("INSERT INTO articles(`article`,`id_cat`,`id_unit`,`code`,`barcode`,`info`) VALUES ('$article', '1', '1', '$code', '$barcode', '$textarea')"); if(mysql_affected_rows()>0){ echo "1"; }else{ echo "2"; } ?> I get this code from: Insert Record In Database Using jQuery And PHP
has comment: http://stackoverflow.com/comment/39733158
score: 0
tagged with: sql
has answer: http://stackoverflow.com/a/25464231
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39743180
has comment: http://stackoverflow.com/comment/39732662
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39758393
has title: Using mysql_affected_rows() with jQuery dosen't response message corectly
type: Question

http://stackoverflow.com/q/25548303
has body: In an HTML code , i have a form Tag : &lt;form id='my_form' action='url.hmtl'&gt; ... &lt;/form&gt; The corresponding JS object has a property named 'action', which contains the string 'url.html': my_form=document.getElementById('my_form'); console.log(form.action); The above code displays: url.hmtl But if i add a sub-object, say an input, inside the form, with id='action': &lt;form id='my_form' action='url.hmtl'&gt; &lt;input type="hidden" id="action" /&gt; &lt;/form&gt; Then form.action is now the JS object corresponding to the input. My questions : Is this behaviour normal ? Should I forbid myself to use the string 'action' as id of any input ? If there is such an input, is there any way to get the original property 'Action' of the form or is it lost for ever ?
tagged with: http://stackoverflow.com/tag/html
has title: Property of a JS dom object overwritten by a sub-object in the DOM tree?
tagged with: properties
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25548582
has answer: http://stackoverflow.com/a/25548920
tagged with: dom
type: Question
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25548582
possible better answer: http://stackoverflow.com/a/25549194
has answer: http://stackoverflow.com/a/25549194

detect
tags question: http://stackoverflow.com/q/25396449
type: Tag
tag name: detect

http://stackoverflow.com/comment/39893257
type: QuestionComment
type: Comment
has text: It's something about `$(window).resize(function(){window.location.href=window.location.href})`
score: 0
comment on: http://stackoverflow.com/q/25549012

http://stackoverflow.com/comment/39820472
type: Comment
has text: Thanks a lot! That really helped it positioned in the correct place upon entering the site. However, there is another problem now. The whole text 'Hong Hanh Dinh' immediately jumps upwards upon scrolling. I was trying to figure out what part of the code affects this. Do you think I should try modifying the CSS or the jQuery code in order to prevent this hiccup?
comment on: http://stackoverflow.com/a/25490551
score: 0
type: AnswerComment

http://stackoverflow.com/q/25486931
tagged with: dygraphs
type: UnansweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/38621476
type: Question
has body: I would like to control the x-axis intervals that are shown (and the vertical gridlines associate with each label point) but I have been unable to find way to do this. Dygraphs fills in x labels based on the over all x range by default, but I want more granularity. For instance if I want to present a month worth of data for July'14, I use dateWindow to set my bounds. By default Dygraphs gives me x intervals at 7/6, 7/13, 7/20, and 7/27 (the start of each week). But I want more labels and corresponding vertical lines; every 3 days for instance, instead of week start. Is this possible? I'm happy with how each x label is displayed (so I don't think it's label formatter). I just want more of them.
score: 3
tagged with: javascript
has title: Specifying dygraphs x interval ticks
has answer: http://stackoverflow.com/a/25649530
answer count: 3
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/34025518

http://stackoverflow.com/a/25391403
type: Answer
has body: Take a look at Google Places API - it's pretty straightforward - let me know if you have any questions. https://developers.google.com/maps/documentation/javascript/places
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39601274
answers question: http://stackoverflow.com/q/25391357
downvote count: 0

http://stackoverflow.com/comment/39703382
comment on: http://stackoverflow.com/a/25441532
type: AnswerComment
type: Comment
score: 0
has text: i am not Fixing the issue. if you find pls update for appreciation +1

http://stackoverflow.com/comment/39709803
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25449933
score: 0
has text: To answer your question, just write `var add = function () {};` and you're done. So maybe you should put a little more detail into your question, and we can put a little detail more in the answers :)

http://stackoverflow.com/comment/39774436
type: Comment
type: QuestionComment
has text: Are you using jQuery?
score: 0
comment on: http://stackoverflow.com/q/25484845

http://stackoverflow.com/a/25463497
downvote count: 0
has body: JSON does support arrays. I would change the format of your JSON to the following schema: { "question": "1. Question text", "audio": "path/to/audio.mp3", "answers": [{ "text": "Answer 1", "correct": true, }, { "text": "Answer 2", "correct": false }] } This way you can have multiple correct answers (i.e. the ones with the correct field set to true).
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25463372
has comment: http://stackoverflow.com/comment/39735302

http://stackoverflow.com/a/25514063
has body: I'm not sure I would use regex for this. I would create a custom function to handle urls of this type: function handleUrlTokens(url){ var parts = url.split('/').filter(function(o){return o!==''}) var params = {}; for (var i = 0; i &lt; parts.length; i+=2) { param[parts[i]] = parts[i+1]; } return params; } handleUrlTokens("/myMessages/v2/messages/I15/parts/0") //Object {myMessages: "v2", messages: "I15", parts: "0"} This would then be able to handle many different types of url, as long as the convention is /key/value/key/value. Edited because revenProdigalKnight's loop was better than mine.
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39829767
upvote count: 2
has comment: http://stackoverflow.com/comment/39829802
answers question: http://stackoverflow.com/q/25513856
downvote count: 0

http://stackoverflow.com/a/25445358
upvote count: 0
has body: For all who face such issues: You should always use Double quotes for HTML attributes value eg: For passing variables in a Javascript functions, you must use quotes (single quote preferably) for string. eg: somethingAwesome('work', 'life', 1); While embedding HTML and Javascript in PHP, you must not get confused with Quotes. PHP string + HTML element: $string = ' '; PHP string + HTML element with attributes: $string = ' '; PHP string + HTML element with attributes + Javascript Function: $string = ' '; PHP string + HTML element with attributes + Javascript Function with Parameters: $string = ' '; You are open to choose double or single quotes, but following one particular fashion will prevent you from getting confused. Also remember to Indent your code even in case of HTML in strings Solution for your issue: $resort[] = ' ID.$dyid.'" name="hotel_day'.$dyid.'" type="radio" value="'.$child_post->ID.'" onclick="AddHotel(\''.$p.'\', \''.$s.'\', '.$psid.', \''.$dyid.'\', '.$child_post->ID.', \''.$child_post->fields['price'].'\')" /> '.$child_post->post_title.' Rs:- '.$child_post->fields['price'].' ';
type: Answer
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/25444646

http://stackoverflow.com/a/25442590
answers question: http://stackoverflow.com/q/25417176
upvote count: 3
type: AcceptedAnswer
has body: In Mootools it is common to put options in the options object (http://mootools.net/docs/core/Class/Class.Extras#Options:setOptions). Take this example: var MyClass = new Class({ Implements: Options, options: { elementSize: 10 }, initialize: function(options){ this.setOptions(options); } }); var instance1 = new MyClass(); console.log(instance1.options.elementSize); // Returns 10 instance1.options.elementSize = 20; console.log(instance1.options.elementSize); // Returns 20 var instance2 = new MyClass({ elementSize: 15 }); console.log(instance2.options.elementSize); // Returns 15 In your example, the classes are initiated as Array variables, so you can change the options like so: rpbArrayB.rpbB1.options.elementSize = 20 Note that this might not always have the desired effect though. If the class takes the options on initialization and doesn't use them anymore afterwards, changing the options will have no effect on an initialized class. In that case you would have to re-initialize the class.
type: Answer
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25417176

http://stackoverflow.com/comment/39771406
type: Comment
has text: Actually I want the thumb (the round one) in another color and not the track. And my button listener is fine.
comment on: http://stackoverflow.com/a/25483086
type: AnswerComment
score: 0

http://stackoverflow.com/comment/88152169
type: Comment
has text: I started using the `filter` + `forEach` and ended up transforming it to a `reduce` like this. +1
comment on: http://stackoverflow.com/a/40924449
score: 1
type: AnswerComment

http://stackoverflow.com/q/25496564
has comment: http://stackoverflow.com/comment/39797262
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39797234
score: 0
accepted answer: http://stackoverflow.com/a/25496955
has comment: http://stackoverflow.com/comment/39797238
tagged with: google-chrome
has title: Chrome crashes on .html()/.append()
has comment: http://stackoverflow.com/comment/39797185
has comment: http://stackoverflow.com/comment/39797442
answer count: 1
has comment: http://stackoverflow.com/comment/39797384
has comment: http://stackoverflow.com/comment/39797378
has comment: http://stackoverflow.com/comment/39797125
tagged with: javascript
has comment: http://stackoverflow.com/comment/39797276
type: AnsweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/25496955
has body: When I try to replace the html of an element with $('#myDiv').html(s), Chrome crashes. It works in Firefox. Chrome tries to load ("waiting for localhost" or "waiting for extension AdBlock" or forever loading jQuery...) until it says the page has crashed. Why is this happening and how do I fix it? Further, if I don't alter the HTML from within the function, but instead use the console, it works! function genTables(rows, numItems) { var cols = parseInt(numItems / rows) + 1; s = ' '; for (i = 0; i < cols; i++) { for (j = 0; j < rows; j++) { s += ' foo '; } if ((i + 1) != cols) { s += ' '; } }; s += ' '; $('#myTables').html(s); // This crashes Chrome as well //$('#myTables').append($.parseHTML(s)); }
type: Question
has comment: http://stackoverflow.com/comment/39797101

http://stackoverflow.com/comment/87655299
type: Comment
score: 1
type: AnswerComment
has text: It works for the examples given - this isn't necessarily a Twitter-related question. If it is, or the hash tag syntax is more complicated than stated here, then I would agree something different may be needed. Answer is based off of the question without reading into it further.
comment on: http://stackoverflow.com/a/25538880

http://stackoverflow.com/a/25455626
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39722077
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39722127
score: 1
has comment: http://stackoverflow.com/comment/39722323
has comment: http://stackoverflow.com/comment/39722250
has body: Using auto should work for you: $('#t4_post_item_' + $number).css("height", "auto"); Fiddle: http://jsfiddle.net/xbtqmo0a/
accepted answer of: http://stackoverflow.com/q/25455603
answers question: http://stackoverflow.com/q/25455603
upvote count: 1

http://stackoverflow.com/comment/87991061
type: QuestionComment
has text: @MichelleTilley thank you for your answer :)
comment on: http://stackoverflow.com/q/25435720
score: 0
type: Comment

http://stackoverflow.com/q/25445351
has body: I have been looking for a way to initiate a file download of data that only exists within the code executing on the user's browser (as opposed to initiating a download from the server), and indicate the file name in the process. A search of StackOverflow turns up a number of promising posts that don't quite do what I need. This answer is not IE-compatible and doesn't allow specifying a file name anyway. This question provides a few ways to initiate downloads, but the answers that allow specifying a file name are not IE compatible and require user interaction, while other answers don't allow specifying a file name. Is there a way to initiate a file download from JavaScript that: Downloads client-side data Does not require the user to manually initiate the download Allows specifying the filename of the downloaded file
tagged with: javascript
upvote count: 4
score: 3
answer count: 1
has answer: http://stackoverflow.com/a/25445352
favorite count: 0
tagged with: download
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/9871357
accepted answer: http://stackoverflow.com/a/25445352
has title: How can I initiate a file download of client-side data and specify its file name?
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/10473932

http://stackoverflow.com/comment/39650458
comment on: http://stackoverflow.com/a/25410149
type: AnswerComment
score: 0
type: Comment
has text: Regarding the CSS issue with ::content in Firefox: You'll need to use `polyfill-next-selector` (http://www.polymer-project.org/docs/polymer/styling.html#at-polyfill). Here's an updated jsbin (http://jsbin.com/rijezabapuwe/3/edit)

http://stackoverflow.com/comment/39774684
comment on: http://stackoverflow.com/q/25484994
score: 4
type: Comment
type: QuestionComment
has text: is there any reason you can't just return the data in `json` format and tell jQuery to use `json` as the expected return type? MUCH easier for handling this type of data.

http://stackoverflow.com/q/25488318
type: Question
has title: WebRTC ICE candidate in Firefox
tagged with: firefox
answer count: 1
tagged with: javascript
tagged with: rtcdatachannel
upvote count: 1
has answer: http://stackoverflow.com/a/25489506
tagged with: webrtc
favorite count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: google-chrome
score: 1
has body: At the moment, I am playing around with WebRTC. My goal is to setup a datachannel between two browsers. Chrome-Chrome is working well. Now I am playing with Firefox-Firefox. Here is a MEW from my current code: var servers = { "iceServers": [{ "url": "stun:stun.l.google.com:19302" }] }; var RTCPeerConnection = window.mozRTCPeerConnection || window.webkitRTCPeerConnection; var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription; var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate; var peerConnection = new RTCPeerConnection(servers, { optional: [{ RtpDataChannels: true }] }); peerConnection.onicecandidate = function (event) { peerConnection.onicecandidate = null; console.log('ICE Candidate:', JSON.stringify(event.candidate)) }; var channel = peerConnection.createDataChannel("sendDataChannel", {reliable: false}); peerConnection.createOffer( function (offer) { peerConnection.setLocalDescription(offer); }, function (e) { } ); As soon setLocalDescription is called, the function onicecandidate is called (as expected). In Chrome 36 the event.icecandidate is something like: {"sdpMLineIndex":0,"sdpMid":"audio","candidate":"a=candidate:3430859439 1 udp 2122260223 xxx.xxx.xxx.xxx 59773 typ host generation 0\r\n"} In Firefox the event.icecandidate is just null. But I need to send that ICE candidate over the signaling channel to establish the connection.

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

http://stackoverflow.com/q/25518352
type: UnansweredQuestion
tagged with: php
score: 2
has answer: http://stackoverflow.com/a/25518471
type: Question
tagged with: laravel-4
answer count: 1
has body: I have a foreach loop which creates multiple textboxes and I have one submit button. After submit is hit I would like all the data to be sent to the controller. {{ Form::open(array('route' =&gt; 'shift.startdata_post', 'class' =&gt; 'form-horizontal')) }} &lt;tbody&gt; &lt;td&gt; {{ $game-&gt;name }} (Serial Number: {{ $game-&gt;serial }})&lt;/td&gt; &lt;td&gt; {{ Form::text('cash', null, array('autofocus' =&gt; 'autofocus', 'placeholder' =&gt; 'Amount in till')) }} &lt;/td&gt; &lt;td&gt; {{ Form::text('unsold', null, array('placeholder' =&gt; 'Amount of unsold tickets')) }} &lt;/td&gt; &lt;/tbody&gt; @endif Here is what it looks like: Right now its only sending the very last two textboxes and ignoring the first two. How do I get it to send all the textboxes. Does anyone have any ideas?
downvote count: 0
tagged with: javascript
has title: Make a form be dynamic?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2

http://stackoverflow.com/a/25442329
type: Answer
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/25427803
has body: I have found out that it is an optimization issue that the '.animate' function performs. When the page is 'hidden' - you're viewing another tab - jQuery will skip the animation steps because the viewer cannot actually see the animation. This is great for an actual animation but in this case when using sound, it jumps straight from 1 down to 0 skipping the steps in between. I cannot find this mentioned in the API which is slightly annoying. My current solution is to create my own 'animation' function to step down the level of sound in a recursive setTimeout loop.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25427803

http://stackoverflow.com/comment/39817400
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25506989
has text: As Ende Neu said you can use single quotes like this '<?php ... ?>'

http://stackoverflow.com/a/25465358
has comment: http://stackoverflow.com/comment/39738844
upvote count: 22
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/48366698
score: 22
has comment: http://stackoverflow.com/comment/39738863
has body: DEMO $scope.key = function($event){ console.log($event.keyCode); if ($event.keyCode == 38) alert("up arrow"); else if ($event.keyCode == 39) alert("right arrow"); else if ($event.keyCode == 40) alert("down arrow"); else if ($event.keyCode == 37) alert("left arrow"); } EDIT Change it from ng-keypress to ng-keydown. DEMO &lt;input ng-keydown="key($event)" /&gt;
has comment: http://stackoverflow.com/comment/39738822
has comment: http://stackoverflow.com/comment/48367203
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25464579
answers question: http://stackoverflow.com/q/25464579

http://stackoverflow.com/comment/136321288
type: Comment
comment on: http://stackoverflow.com/a/25530233
type: AnswerComment
score: 0
has text: This has quadratic time complexity O(n²).

http://stackoverflow.com/comment/39783599
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25489377
has text: Thanks ! I'm using your first option :)
type: Comment

http://stackoverflow.com/q/25526533
accepted answer: http://stackoverflow.com/a/25526607
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Best Way to set background color for a particular div
has comment: http://stackoverflow.com/comment/39852166
has comment: http://stackoverflow.com/comment/39852225
has comment: http://stackoverflow.com/comment/39852302
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25526646
tagged with: performance
has comment: http://stackoverflow.com/comment/39851991
has answer: http://stackoverflow.com/a/25526597
has answer: http://stackoverflow.com/a/25526633
has body: Consider I have ten thousand divs, which have default background color as grey, but when I click on a particular div the background color should be changed to green. Just for 5 elements I tried 1 2 3 4 5 JS: $('div').each(function(i, j){ console.log(j); $(j).click(function(index, ele){ $('div').css({'background-color': 'grey'}); $('div#'+index.currentTarget.id).css({'background-color': 'green'}); }); }); Fiddle This is working, but what if there is say like 10000 divs , performance will be an issue, and I want a better approach.
possible better answer: http://stackoverflow.com/a/25526646
type: Question
has answer: http://stackoverflow.com/a/25527118
tagged with: javascript
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/25526707
has answer: http://stackoverflow.com/a/25526607

http://stackoverflow.com/a/25505390
answers question: http://stackoverflow.com/q/25505356
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39815044
type: AcceptedAnswer
downvote count: 0
has body: I would recommend you, use Select2 instead of Chosen. Replace the first &lt;option&gt;&lt;/option&gt; with the below: &lt;option value=""&gt;&lt;/option&gt; It shows the default placeholder. Also, setting the data-placeholder="Select A User Group" doesn't just work. Add these too: data-placeholder="Select A User Group" placeholder="Select A User Group" And also, in the options, pass this: $(element).select2({ placeholder: "Select A User Group" }); Or, dynamically: $(element).select2({ placeholder: $(this).attr("placeholder") }); If you still insist using Chosen, here you go: $(element).chosen({ placeholder_text_multiple: $(this).attr("placeholder"), placeholder_text_single: $(this).attr("placeholder") }); But don't forget to change the first option this way: &lt;option value=""&gt;&lt;/option&gt;
accepted answer of: http://stackoverflow.com/q/25505356

http://stackoverflow.com/a/25490180
accepted answer of: http://stackoverflow.com/q/25489998
has body: You should modufy collection. Probably you should change parse method: yourCollection = Backbone.Collection.extend({ parse: function(data) { return data.models[0].attributes.collection.items; } }) When you use fetch Backbone parse result and add all elements what you return in parse.
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25489998
type: Answer

http://stackoverflow.com/q/25436093
type: Question
tagged with: tooltip
tagged with: javascript
has title: Bootstrap Tooltip not default
has comment: http://stackoverflow.com/comment/39693745
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39864582
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39684575
has comment: http://stackoverflow.com/comment/39684626
has body: Tooltip at an icon, but the style is ugly. I want to be like in this picture (default Bootstrap)
score: 1
has answer: http://stackoverflow.com/a/30503424
has comment: http://stackoverflow.com/comment/39686410

http://stackoverflow.com/a/25402380
accepted answer of: http://stackoverflow.com/q/25394909
answers question: http://stackoverflow.com/q/25394909
score: 0
type: AcceptedAnswer
has body: You'll want to use Ajax for this The Railscast you viewed, although helpful, is somewhat limited in the way that it will only allow you to add a single nested form each time -- Ajax #config/routes.rb resources :workouts do get "ajax_fields/:type", on: :collection end #app/models/workout.rb Class Workout &lt; ActiveRecord::Base ... def self.build type workout = self.new if type workout.send(type).build else workout.tempos.build workout.traditionals.build workout.emons.build end end end #app/controllers/workouts_controller.rb Class WorkoutsController &lt; ApplicationController def ajax_update @workout = Workout.build params[:type] render "form", layout: !request.xhr? end end #app/views/workouts/_form.html.erb &lt;%= form_for @workout do |f| %&gt; &lt;%= render "fields", locals: { f: f }, onject: params[:type] %&gt; &lt;%= f.submit %&gt; &lt;% end %&gt; #app/views/workouts/_fields.html.erb &lt;%= f.fields_for type.to_sym, child_index: Time.now.to_i do |t| %&gt; &lt;%= t.text_field :your_field %&gt; &lt;% end %&gt; #app/views/workouts/new.html.erb &lt;%= form_for @workout do |f| %&gt; &lt;%= render: "fields", locals: { f: f}, collection: ["tempos", "traditionals", "emons"], as: :type %&gt; &lt;%= ... dropdown code ...%&gt; &lt;%= f.submit %&gt; &lt;% end %&gt; -- This will allow you to send the following ajax request: #app/assets/javascripts/workouts.js.coffee $(document).on 'change', 'form .add_fields', (event) -&gt; type = $(this).val $.ajax url: "/workouts/ajax_fields/" + type, success: function(data) { $("form").append(data); // will have to work this out properly } }); This should give you the ability to append the extra fields you need to the application, which will then come back with the appropriate HTML for you to append to your DOM Hopefully you can appreciate the sentiment here - it might not work right out of the box!
type: Answer

http://stackoverflow.com/a/25453149
type: Answer
upvote count: 1
has body: Your idea of how to go about this looks good to me. To answer your questions in the list: Look at Grunt or Gulp for your preprocessing / minification needs. These are both excellent build tools. Grunt is more widely used, but Gulp is newer and gaining a lot of ground. I'd look at both and use the one that suits you. How to use a local bower dependency w/o publishing: In your main app's bower.json file, instead of putting a version number for your module, put the folder where it can be found on your local system, like so: { "dependencies": { "my-module": "/home/me/modules/my-module" } } To clarify, you refer to it as a "node package" in your question, but in reality, you are creating a Bower package. Node packages (published to npmjs.org) are for node, and unless processed with something like Browserify, won't run in the browser (and even then, the node package can't do anything the browser doesn't support, like file access.) Bower packages (published on bower.io) are specifically for the browser. You will however find packages that publish to both NPM &amp; Bower, such as jQuery or underscore, but you can't use the npm jquery package in the browser, it's built to run in node, and vice-a-versa.
score: 1
accepted answer of: http://stackoverflow.com/q/25437785
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25437785
downvote count: 0

http://stackoverflow.com/a/25533637
type: Answer
has body: Use ready instead of onload : $(document).ready(center_images); $(window).resize(center_images); function center_images() { var parent_width = $('.container').width(); $('.content').each(function() { var content_width = $(this).width(); var margin = (parent_width-content_width)/2; $(this).css('left', margin); }); } Check JSFiddle Demo
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25533602
answers question: http://stackoverflow.com/q/25533602
has comment: http://stackoverflow.com/comment/39865896
has comment: http://stackoverflow.com/comment/39865640
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25432557
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25432439
has body: JQuery is designed to have a scroll in that form. You could try out : https://github.com/ArthurClemens/jquery-page-scroll-plugin which supports constant speed scroll too.
upvote count: 1

http://stackoverflow.com/a/25448332
type: Answer
has body: You have to remove the option title var marker = new L.Marker(new L.LatLng(a[0], a[1])); instead of var marker = new L.Marker(new L.LatLng(a[0], a[1]), { title: title }); Ref: http://leafletjs.com/reference.html#marker
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25446082
accepted answer of: http://stackoverflow.com/q/25446082
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/39831075
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25514607
type: Comment
has text: How about using one global CSS for generic styles, then one local for each product that specifies the images?

http://stackoverflow.com/q/25544609
has comment: http://stackoverflow.com/comment/39884802
possible better answer: http://stackoverflow.com/a/25544911
has answer: http://stackoverflow.com/a/25544911
tagged with: javascript
has title: Javascript change dropdown list value
has comment: http://stackoverflow.com/comment/39885012
has body: $('a#noday').click(function() { for(g=1;g&lt;=10;g++) var ddl = document.getElementById('daySelect_'+g); var opts = ddl.options.length; for (var i=0; i&lt;opts; i++){ if (ddl.options[i].value == ""){ ddl.options[i].selected = true; break; } }) $('a#wed').click(function() { for(g=1;g&lt;=10;g++) var ddl = document.getElementById('daySelect_'+g); var opts = ddl.options.length; for (var i=0; i&lt;opts; i++){ if (ddl.options[i].value == "wed"){ ddl.options[i].selected = true; break; } }) Below is my select html code &lt;select class="form-control daySelect" id="daySelect_1" name="daySelect_1"&gt; &lt;option value=""&gt;Select&lt;/option&gt; &lt;option value="wed"&gt;Wed&lt;/option&gt; &lt;option value="sat"&gt;Sat&lt;/option&gt; &lt;option value="sun"&gt;Sun&lt;/option&gt; &lt;option value="satsun"&gt;Sat/Sun&lt;/option&gt; &lt;option value="wedsatsun"&gt;WedSatSun&lt;/option&gt; &lt;/select&gt; Below is my hyperlink html Set all to: &lt;a id="noday" href="#"&gt;&lt;span class="label label-info"&gt;No Day&lt;/span&gt;&lt;/a&gt;&amp;nbsp; &lt;a id="wed" href="#"&gt;&lt;span class="label label-info"&gt;Wednesday&lt;/span&gt;&lt;/a&gt;&amp;nbsp; I tried to click the hyperlink, but my dropdownlist selected does not change. I did try the alert to make sure my link work, and it manage to execute alert. My JsFiddle
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39885075
has answer: http://stackoverflow.com/a/25544845
tagged with: jquery
has comment: http://stackoverflow.com/comment/39884972
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25544845
score: 0

http://stackoverflow.com/comment/39820366
type: Comment
comment on: http://stackoverflow.com/a/25508624
type: AnswerComment
has text: I don't want the header to go to the top of the browser window. I just want it to remain in place inside of the div with class"box-with-header queries". I have multiple "box-widh-header" divs on the page and need them all to have sticky headers inside their boxes.
score: 0

http://stackoverflow.com/comment/50795941
comment on: http://stackoverflow.com/a/26644102
type: AnswerComment
has text: This does not seem to work, I don't get any progress logged but the PDF still loads?
type: Comment
score: 1

http://stackoverflow.com/q/25536605
tagged with: grails
score: 0
has answer: http://stackoverflow.com/a/25537455
answer count: 1
tagged with: jquery
has title: Grails order of function execution
has body: I have a formRemote that calls a function in my controller when it is submitted like this: &lt;g:formRemote name="editIndivRecForm" url="[controller: 'customer', action:'saveEditedIndividualRecord']" onSuccess="doResult();"&gt; This form is submitted by clicking on a button. Rather, a button that is clicked called 'save' will do other things among clicking the form's submit button via Javascript. Here is the click handler for this button: $('#save').click(function () { $("#uniqueId").prop('disabled', false); // Have to enable before form submission else it doesn't go back as a param to controller. $("#secondaryId").prop('disabled', false); $("#submit").trigger("click"); // formRemote's submit button $('#editIndivRecForm').reset; &lt;g:remoteFunction controller="customer" action="remediationSearch" update="content_area" params="{rerender: true}"/&gt; }); The problem I'm running into is that I need the function of my controller called by the click handler remediationSearch to run AFTER the function of the controller called by the formRemote's submission saveEditedIndividualRecord is done executing. But it is happening the other way around. And for some reason the function onSuccess="doResult();" doesn't even execute otherwise I was going to move the following code into its body to make things work the way I want: &lt;g:remoteFunction controller="customer" action="remediationSearch" update="content_area" params="{rerender: true}"/&gt; here is how doResult is now: function doResult() { console.log("done."); } the formRemote is submitted but the doResult function prints nothing to the console.
type: UnansweredQuestion
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39678783
comment on: http://stackoverflow.com/a/25432830
score: 0
type: AnswerComment
type: Comment
has text: You know everyone can make a form and submit it to a destination. right? And my "submit.php" , insert the submitted values into a db that just I know the username and password of that. Ok, so people can submit their own records.

http://stackoverflow.com/comment/97310682
type: Comment
comment on: http://stackoverflow.com/a/25530233
has text: and a nice trick to check for unique in an array of objects, you may convert it to a vetor BEFORE using this function: `const genres = this.state.movies.map(movie => movie.genre); const uniqueGenres = genres.filter((genre, index, arr) => index == arr.indexOf(genre)); return uniqueGenres; `
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39788002
type: Comment
type: QuestionComment
has text: @MikeChristensen Yes I tried this before doing JSON.stringify but the properties are passed as null.
comment on: http://stackoverflow.com/q/25491539
score: 0

http://stackoverflow.com/q/25509632
accepted answer: http://stackoverflow.com/a/25586255
type: Question
has body: I am developing an webview app that plays mp3's from a server. I have the following javascript that works on iOS, but fails on Android (testing on a new LG-D160, Android 4.4.2). On Android, the "play" event is never fired, although the "canplay" event does fire and the audio should start playing with the AudioEl1's play() method inside the "canplay" event. Which extra step should I take to get it to play on Android? Here is the PlayAudio() function: function PlayAudio() { var AudioEl1 = new Audio(); AudioEl1.addEventListener('loadedmetadata', function () { alert("loadedmetadata"); }); AudioEl1.addEventListener("canplay", function () { alert("going to play"); AudioEl1.play(); }); AudioEl1.addEventListener("durationchange", function () { alert("durationchange"); }); AudioEl1.addEventListener("loadeddata", function () { alert("loadeddata"); }); AudioEl1.addEventListener("progress", function () { alert("progress"); }); AudioEl1.addEventListener('loadstart', function () { alert("started loading"); }); AudioEl1.addEventListener('play', function () { alert("playing"); }); AudioEl1.src = "http://streams.greenhost.nl/cz/cz/rod/20140815-1600.mp3"; }
has title: Audio element refuses to fire "play" event on Android
answer count: 1
tagged with: javascript
score: 0
tagged with: android
type: AnsweredQuestion
tagged with: html5-audio
has answer: http://stackoverflow.com/a/25586255

http://stackoverflow.com/comment/39669652
score: 0
has text: Well, it appears to be bugged for me (I'm using Chrome). When I load the page, the images are big. Then I resize the window to less than 960 and they get smaller, but it isn't getting the old size back when I make the window bigger.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25428267

http://stackoverflow.com/comment/39878626
type: AnswerComment
comment on: http://stackoverflow.com/a/25500065
type: Comment
has text: Thanks DevDude, Not sure how this could help the problem I have. Here is the link to a small part of my code which causes the problem. [jsfiddle.net/6cs2uLrL/5/](http://jsfiddle.net/6cs2uLrL/5/) Please have a look at let me know if you spot the issue. Cheers mate
score: 0

http://stackoverflow.com/a/25482227
upvote count: 1
has body: TRY this: var gloabalFunc= function () { //onload function $('body').on(function () { fnLoad(); }); Hope this be helpful...
downvote count: 0
answers question: http://stackoverflow.com/q/25481656
type: Answer
score: 1

http://stackoverflow.com/q/25414231
has comment: http://stackoverflow.com/comment/39645204
has body: I am looking for a way to select/disable a single radio button in my base map. Here is my code. This creates the baseMap for myleaflet layer baseMap = { Map View: mapQuestOpenEnglish Satelite View: mapQuestAerial } mapControl = L.control.layers(baseMap) Eventually I add mapControl to the map and it produces the following html Map View Satelite View I want a way to be able to select/disable this radio button. Is there any easy way to do this? Any help is greatly appreciated
has comment: http://stackoverflow.com/comment/39645589
has title: Is there a way to disable a radio button in leaflets layer control?
answer count: 1
has comment: http://stackoverflow.com/comment/39645412
tagged with: css
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/39645279
tagged with: leaflet
tagged with: javascript
has comment: http://stackoverflow.com/comment/39645334
has answer: http://stackoverflow.com/a/25415096
type: Question

http://stackoverflow.com/comment/39731038
has text: 1. You must loop on the values to get this code working, OR 2. use different ng-model and use your previous code
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25460879

http://stackoverflow.com/comment/39758999
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25438123
has text: See http://bl.ocks.org/mbostock/3884955 for an example of Multi-Series Line Chart.

http://stackoverflow.com/q/25410990
score: 0
answer count: 2
has title: Convert today date in other format
possible better answer: http://stackoverflow.com/a/25411076
has answer: http://stackoverflow.com/a/25411076
accepted answer: http://stackoverflow.com/a/25411023
favorite count: 0
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14638018
linked to: http://stackoverflow.com/q/1056728
upvote count: 1
downvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/1056728
has comment: http://stackoverflow.com/comment/39637829
has comment: http://stackoverflow.com/comment/39637840
has comment: http://stackoverflow.com/comment/39637839
tagged with: javascript
tagged with: date
has body: How in JS can I convert this: var today = "2014-8-20"; to this: var today = "Wed Aug 20 2014 00:00:00 GMT-0400 (EDT)";
has answer: http://stackoverflow.com/a/25411023

string
tags question: http://stackoverflow.com/q/25392326
tags question: http://stackoverflow.com/q/25485405
tags question: http://stackoverflow.com/q/25493040
tags question: http://stackoverflow.com/q/25505972
tags question: http://stackoverflow.com/q/25454380
tags question: http://stackoverflow.com/q/25516605
tags question: http://stackoverflow.com/q/25457677
tags question: http://stackoverflow.com/q/25526880
tags question: http://stackoverflow.com/q/25540260
tags question: http://stackoverflow.com/q/25510184
tags question: http://stackoverflow.com/q/25510551
tag name: string
tags question: http://stackoverflow.com/q/25533941
tags question: http://stackoverflow.com/q/25440831
tags question: http://stackoverflow.com/q/25410607
type: Tag
tags question: http://stackoverflow.com/q/25545812
tags question: http://stackoverflow.com/q/25417037
tags question: http://stackoverflow.com/q/25475534
tags question: http://stackoverflow.com/q/25401903
tags question: http://stackoverflow.com/q/25438384
tags question: http://stackoverflow.com/q/25501969
tags question: http://stackoverflow.com/q/25441269
tags question: http://stackoverflow.com/q/25513856
tags question: http://stackoverflow.com/q/25519193
tags question: http://stackoverflow.com/q/25462521
tags question: http://stackoverflow.com/q/25472054
tags question: http://stackoverflow.com/q/25430701

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

http://stackoverflow.com/comment/39880165
has text: Yeah you see I will give you a accept it. I am a problem network. finally. Appreciation. Thank you.
score: 0
comment on: http://stackoverflow.com/a/25540938
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39633376
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25408666
score: 2
has text: checkout jquery when/then and promise: http://api.jquery.com/category/deferred-object/

http://stackoverflow.com/a/25425190
has comment: http://stackoverflow.com/comment/104176825
has body: var n = 4; //to get two random numbers between 0 and 3 var n3 = 2; //for example var n1 = Math.floor(Math.random(n-1)); var n2 = Math.floor(Math.random(n-2)); if(n1 &gt;= n3) { n1++; if(n2 &gt;= n3) n2++; if(n2 &gt;= n1) n2++; } else { if(n2 &gt;= n1) n2++; if(n2 &gt;= n3) n2++; } You need to compare n2 with the minimum of n1 and n3 first to ensure you do not have an equality: Suppose n1=1 and n3=2. If you get n2=1 and compare it first with n3, you won't increase n2 in the first step. In the second step, you would increase it since n2 &gt;= n1. In the end, n2 = 2 = n3. This algorithm guarantees to have a uniform distribution, and you only call twice Math.random().
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25424602
downvote count: 0

http://stackoverflow.com/comment/40415741
comment on: http://stackoverflow.com/a/25537021
has text: Second fiddle does not work in mobile. activeTouch is not always null. Could you please check it.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39759264
has text: You're misusing `this`.
type: QuestionComment
comment on: http://stackoverflow.com/q/25476373
score: 0
type: Comment

http://stackoverflow.com/a/25480480
downvote count: 0
type: Answer
has body: Here is the documentation that partially explains the issue you're facing: Events ... success (Local Event) This event is only called if the request was successful (no errors from the server, no errors with the data). ajaxSuccess (Global Event) This event is also only called if the request was successful. error (Local Event) This event is only called if an error occurred with the request (you can never have both an error and a success callback with a request). ajaxError (Global Event) This global event behaves the same as the local error event. This is the normal flow of events, i.e. any global event is called after local. But in case any callback throws exception, no other callback is called, because jQuery internally doesn't wrap the callback in try-catch (you may do this locally in your callback though). Another solution, as I've mentioned in comments, is dataFilter property of ajax options, which allows you to perform needed actions before any local callback (success or error) is called. Here is demo from my comments to the question, just in case: $.ajaxSetup({ dataFilter: function(data, type) { console.log('dataFilter called!'); return data; } });
upvote count: 3
answers question: http://stackoverflow.com/q/25441813
score: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25441813

http://stackoverflow.com/comment/39876525
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25537669
has text: The watch resets itself after every digest, so it basically says 150ms after the last digest fire initialised. This is tested and confirmed to only fire once.
score: 0

http://stackoverflow.com/a/33681099
type: Answer
score: 4
has body: It's possible to mimic behavior of following Handlebars keywords: @index, @key, @first, @last. @index Index of item: `{{item}}` is: `{{index}}` {{/each}} @key {{key}}: {{value}} {{/each-in}} @first You could also mimic behavior of @first using ember-truth-helpers addon and taking advantage of eq helper - thanks to kristjan reinhold for this idea: {{#if (eq index 0)}} &lt;!-- first element specific html --&gt; {{else}} &lt;!-- other html --&gt; {{/if}} {{/each}} Instead of (eq index 0) you can use (eq item array.firstObject). @last As dwickern suggested you can use Ember.Array.lastObject to mimic @last behavior. {{#if (eq item array.lastObject)}} &lt;!-- last element specific html --&gt; {{else}} &lt;!-- other html --&gt; {{/if}} {{/each}}
has comment: http://stackoverflow.com/comment/57281760
upvote count: 4
answers question: http://stackoverflow.com/q/25395355
has comment: http://stackoverflow.com/comment/57906662
downvote count: 0

http://stackoverflow.com/q/25408799
linked to: http://stackoverflow.com/q/4054075
has answer: http://stackoverflow.com/a/25408988
type: Question
answer count: 2
score: 5
has body: I will start with an apology about my poor English. I will try to be as clear as I can. :) I have a 3-dimensional array (just an array of 2-dimensional arrays). My goal is to take one of the 2-dimensional arrays, and rotate it 90° counterclockwise. It look like this: [1|2|3] [4|5|6] [7|8|9] I try to make it "rotate" like this: [3|6|9] [2|5|8] [1|4|7] I want to change the original array, so I figured that I need to create a copy of it so i will have a reference to work with. So, here is what I have done: var temp = []; var cube = [ [ ['A', 'A', 'A'], ['A', 'A', 'A'], ['A', 'A', 'A'] ], [ ['B', 'B', 'B'], ['B', 'B', 'B'], ['B', 'B', 'B'] ], [ ['C', 'C', 'C'], ['C', 'C', 'C'], ['C', 'C', 'C'] ], [ ['D', 'D', 'D'], ['D', 'D', 'D'], ['D', 'D', 'D'] ], [ ['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9'] ], [ ['F', 'F', 'F'], ['F', 'F', 'F'], ['F', 'F', 'F'] ] ]; function CCW() { temp = temp.concat(cube[4]); for(var i = 0; i &lt; 3; i++) for(var j = 0; j &lt; 3; j++) cube[4][i][j] = temp[j][2-i]; } CCW(); The copy of the original array should be in temp. Now, the problem is in this line: cube[4][i][j] = temp[j][2-i];. Instead of changing only the values of the array in cube, it changes also the values of temp. I tried to change temp = temp.concat(cube[4]); to temp = cube[4].slice(0); but it did not make any diffrence. How can I fix that? Thank you all. :)
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/39633659
has title: Create a duplicate of an array and manipulate the original
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39633881
accepted answer: http://stackoverflow.com/a/25408988
has answer: http://stackoverflow.com/a/25409055
possible better answer: http://stackoverflow.com/a/25409055
type: AnsweredQuestion
upvote count: 5

http://stackoverflow.com/comment/39748727
type: AnswerComment
type: Comment
has text: Can you help out on how and where to put this. So far I have this in the devtool panel.js: `document.querySelector('#insert').addEventListener('click', function() { sendObjectToInspectedPage({action: "script", content: "jquery.js"}); sendObjectToInspectedPage({action: "script", content: "messageback-script.js"}); }, false);` What Im saying is that there is nowhere a place to put that code...
comment on: http://stackoverflow.com/a/25470584
score: 0

angularjs-ng-include
tags question: http://stackoverflow.com/q/25518324
tags question: http://stackoverflow.com/q/25442394
type: Tag
tags question: http://stackoverflow.com/q/25397348
tag name: angularjs-ng-include

http://stackoverflow.com/comment/39831634
has text: You were right that I was trying to mix legacy and new, I've fixed that and updated my problem above. The core issue still exists.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25514437

http://stackoverflow.com/comment/39878296
has text: I do not understand what you are asking.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25540611
score: 0

http://stackoverflow.com/comment/39865018
has text: IE does even worse, but IE has never been the best when it comes to SVG anyways. Still, this is very reminiscent of IE's history of failing to parse unrecognized elements.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25533555
score: 0

http://stackoverflow.com/q/25535765
has body: I wish to keep certain JavaScript functions on the server and then send them via JSON as when required. I will then eval() these functions and use them accordingly. Now my problem is, If I minify the source file using Clojure or some other Obfuscation library then will the eval'ed function have any chance to conflict with my Obfuscated JS file? For Reference : src.js &lt;- Has the eval() call on an JSON property response.func = "function someAsyncFunc() { //that does nothing as of now ; }"; var zixuy = eval(response.func); //Notice the name of the variable, its a result of Obfuscation Now, once the function is eval'ed, are there any chances that there won't be any weird things that might happen within that function IF there are any variables within it that depend on the Parent's scope. If Yes, then is there a workaround/solution for the same? UPDATE: I was finally able to drill this basic sense into him after all.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39871643
score: 0
tagged with: eval
tagged with: obfuscation
tagged with: clojure
has comment: http://stackoverflow.com/comment/39870094
has title: eval and Obfuscation of JavaScript
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39869136
type: Question

http://stackoverflow.com/q/25403327
has comment: http://stackoverflow.com/comment/39622849
has body: I'm having a major problem with some JavaScript code. The code itself works perfectly when you're on the page, it does what its meant to do. However when the code is set to trigger a table I have within the script it triggers and displays the table but if I refresh or close the page and come back the whole thing has been set to its original start position. This is a shame because it's a good script if only I could fix this issue. I've attached a link to the current script. Any help with this would be much appreciated. Fiddle
type: Question
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/25403656
score: -2
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Javascript Code Keeps Resetting When Page Is Refreshed
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/25403421

http://stackoverflow.com/q/25457271
has body: I'm taking my first swing at designing a component with KO's 3.2 release. Currently, I am trying to create a grid and really want to expose the relevant markup to the programmer for the head and body section of the resulting table element that will be generated by the component. Here is an example of what I'm trying achieve in terms of desired syntactical flavor: The issue with this approach is that KO simply guts out the pht-dataGrid component when it initiates the rendering process. Question: Is there anyway to sidestep this behavior to achieve the effect I'm after?
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25466794
tagged with: knockout.js
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/25466794
tagged with: javascript
favorite count: 0
answer count: 1
has title: KO Component - Persist DOM elements within component binding

http://stackoverflow.com/q/25476373
has comment: http://stackoverflow.com/comment/39766893
has comment: http://stackoverflow.com/comment/39759258
has comment: http://stackoverflow.com/comment/39759270
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39759266
favorite count: 0
has body: In Crockford's book "Good Parts", he mentions to avoid using "new" because it is an anti-pattern, since the language is prototypal and not classical. However, using his advice, I am unable to use the prototype property. I tried several different things: // In the below example, we are unable to access the prototype property, because while parent is initialized with a function object, which has access to prototype property, when parent is executed, we return an object literal, which does not have access to that property. The error we get below is "TypeError: p.info is not a function". That happens because info is undefined for p, since p is an object literal. It is parent that has the prototype property. var parent = function(name, age){ var name = name || ""; var age = age || ""; var that = {}; that.name = function(){ return name; } that.age = function(){ return age; } return that; } parent.prototype.info = function(){ return "name: " + this.name() + " age: " + this.age(); } var p = parent("John",25); console.log("name: " + p.name() + " age: " + p.age() + " info: " + p.info()); // Here we suffer from the same problem above: var parent = function(name, age){ var name = name || ""; var age = age || ""; return { name: function(){ return name; }, age: function(){ return age; } } } parent.prototype.info = function(){ return "name: " + this.name() + " age: " + this.age(); } var p = parent("John",25); console.log("name: " + p.name() + " age: " + p.age() + " info: " + p.info()); // this won't work either because "p" will be undefined since the return value of the function is undefined. Besides, "this" would refer to the global object, which is window in browsers. var parent = function(name, age){ var name = name || ""; var age = age || ""; this.name = function(){ return name; } this.age = function(){ return age; } } parent.prototype.info = function(){ return "name: " + this.name() + " age: " + this.age(); } var p = parent("John",25); console.log("name: " + p.name() + " age:…
has answer: http://stackoverflow.com/a/25476783
has answer: http://stackoverflow.com/a/25476919
has comment: http://stackoverflow.com/comment/39759264
has comment: http://stackoverflow.com/comment/39759301
score: 2
upvote count: 2
type: UnansweredQuestion
has title: accessing prototype property without using "new" to instantiate function object
has comment: http://stackoverflow.com/comment/39759341

http://stackoverflow.com/a/25422041
type: Answer
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: Are you sure you have 3 checkboxes with id "c0", "c1" and "c2"? Some of these are not present on your page! Make sure that you call your function on document ready event: The example using jQuery $(document).ready(function(){ check(); });
accepted answer of: http://stackoverflow.com/q/25421997
has comment: http://stackoverflow.com/comment/39657925
answers question: http://stackoverflow.com/q/25421997

http://stackoverflow.com/q/25427415
score: 1
has title: phone number validation that accept only + and - signs
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25427889
tagged with: asp.net
type: Question
has answer: http://stackoverflow.com/a/25427529
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39668080
linked to: http://stackoverflow.com/q/9596925
favorite count: 0
upvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/39668021
downvote count: 1
has answer: http://stackoverflow.com/a/25427889
tagged with: c#
has body: i have to write the Regular expression that accept two signs only + and - and can be of any no. of digit but + should be the first sign if it is there
possible better answer: http://stackoverflow.com/a/25427639
has answer: http://stackoverflow.com/a/25427639
has comment: http://stackoverflow.com/comment/39667833
tagged with: javascript

http://stackoverflow.com/q/25411588
has title: Make result box appear after searchbar
downvote count: 2
type: Question
type: AnsweredQuestion
score: -2
accepted answer: http://stackoverflow.com/a/25411999
has body: So, I am creating a website and I need to make a result box appear with a list of possible results after the user searches something in the search bar. It's something like this: http://s24.postimg.org/4qqgz0t6d/Sem_T_tulo.png The results box will only appear after the user clicks the "search" button. I am only looking for the javascript code that makes that box appear. The search algorithm is another problem that I think I can handle. Do you guys know something that can help me? At least something where I can start from... Thanks.
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39639812
has answer: http://stackoverflow.com/a/25411999

http://stackoverflow.com/q/25458470
favorite count: 0
linked to: http://stackoverflow.com/q/21867162
tagged with: dynamic
has body: I am using parsley.js and I have to dynamically show/hide validation according to the data the user has selected. I have read this SO post to dynamically add or remove required fields to be validated by parsley, which was helpful. But how do I dynamically remove and add the maxlength for an input field? I have tried the following two options: $('input').attr('data-parsley-maxlength', 'true'); $('input').attr('data-parsley-maxlength', true); But the above gives the following error message: This value is too long. It should have true characters or fewer.
type: AnsweredQuestion
tagged with: parsley.js
downvote count: 0
score: 1
type: Question
tagged with: validation
linked to: http://stackoverflow.com/q/2860394
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25458582
accepted answer: http://stackoverflow.com/a/25458582
has title: How to dynamically add and remove maxlength validation by Parsley.js?
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/39805304
score: 0
has text: I would like to move it down dynamically, aka a bit lower without css.
type: QuestionComment
comment on: http://stackoverflow.com/q/25501164
type: Comment

http://stackoverflow.com/q/25408262
type: AnsweredQuestion
has title: pass reversed url to knockout.js model
tagged with: url
tagged with: javascript
type: Question
tagged with: python
score: 0
possible better answer: http://stackoverflow.com/a/29183914
answer count: 2
tagged with: django
has answer: http://stackoverflow.com/a/29183914
tagged with: knockout.js
has answer: http://stackoverflow.com/a/25413367
has body: I got django template with knockout.js bindings, with list which is should be filled as one press button: Show and some knockout model: function ItemsModel() { var self = this; self.items = ko.observableArray(); self.fillList = function() { // some download data logic ... } } Functon fillList gets data from server. It should send request to url. I use reversed url: {% url "app.views.get_items" %} What is the best way to pass that template-generated url to ItemsModel, so it knows where it should get the data? Pass it as parameter to model? function ItemsModel(url_get_items) { ... } Maybe pass it as parameter with click event? Or use submit binding instead? Show Something else? Is there any best way?
accepted answer: http://stackoverflow.com/a/25413367

http://stackoverflow.com/comment/39628734
has text: @Mahendra What I 'think' you want is to check whether your sight is up or not... If so then yes, without using AJAX (which is a part of JavaScript as standard) Muhammad Hassan's answer is probably the best way to go, if you did want to use AJAX, then Anant Dabhi's answer is probably the best. But a question can't be wrong, but your question confused me as to what you wanted to achieve. The higher the clarity, then, (generally) higher quality answers you're going to get.
score: 1
comment on: http://stackoverflow.com/q/25406090
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25486881
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25487234
tagged with: php
tagged with: laravel
type: Question
tagged with: javascript
has body: Ok, so the trigger for the autoload method is already working: window.onscroll = function(evt){ autoload(); }; autoload() function: function autoload(){ $.ajax({ //What do i need to do here to get data from //the URL and append it to #contentContainer? }) } The route is already done, feel free to adjust it to GET if you like: Route::post('/loadMore', 'HomeController@loadMore'); loadMore function: return View::make('partials.home'); If partials.home is a div in which css is applied, and some blade templating, but in the end. it returns a div which i need to append to #contentContainer. Have any questions? I would be happy to answer them!
score: 0
answer count: 2
has title: Ajax append more data from database when user scrolls laravel
has answer: http://stackoverflow.com/a/25507415
tagged with: jquery
tagged with: ajax

angular-ui-router
tags question: http://stackoverflow.com/q/25418403
tags question: http://stackoverflow.com/q/25548691
tags question: http://stackoverflow.com/q/25420947
tags question: http://stackoverflow.com/q/25530322
tags question: http://stackoverflow.com/q/25547834
tags question: http://stackoverflow.com/q/25453831
tags question: http://stackoverflow.com/q/25437101
tags question: http://stackoverflow.com/q/25442394
tag name: angular-ui-router
tags question: http://stackoverflow.com/q/25514691
tags question: http://stackoverflow.com/q/25494157
tags question: http://stackoverflow.com/q/25417757
tags question: http://stackoverflow.com/q/25543916
tags question: http://stackoverflow.com/q/25548798
tags question: http://stackoverflow.com/q/25435688
tags question: http://stackoverflow.com/q/25517811
tags question: http://stackoverflow.com/q/25454364
type: Tag
tags question: http://stackoverflow.com/q/25460670
tags question: http://stackoverflow.com/q/25546861
tags question: http://stackoverflow.com/q/25498806

angularjs-scope
tags question: http://stackoverflow.com/q/25454364
tags question: http://stackoverflow.com/q/25390047
tags question: http://stackoverflow.com/q/25537767
tags question: http://stackoverflow.com/q/25449304
tags question: http://stackoverflow.com/q/25418403
tags question: http://stackoverflow.com/q/25506525
tags question: http://stackoverflow.com/q/25518497
tags question: http://stackoverflow.com/q/25405702
tags question: http://stackoverflow.com/q/25505336
tags question: http://stackoverflow.com/q/25413071
tags question: http://stackoverflow.com/q/25484133
tags question: http://stackoverflow.com/q/25403336
tags question: http://stackoverflow.com/q/25530564
tags question: http://stackoverflow.com/q/25542880
tags question: http://stackoverflow.com/q/25432730
tags question: http://stackoverflow.com/q/25494620
tags question: http://stackoverflow.com/q/25490438
tags question: http://stackoverflow.com/q/25484698
tags question: http://stackoverflow.com/q/25482880
tags question: http://stackoverflow.com/q/25476021
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/25485911
tags question: http://stackoverflow.com/q/25405543
tags question: http://stackoverflow.com/q/25455220
tags question: http://stackoverflow.com/q/25510767
tags question: http://stackoverflow.com/q/25419058
tags question: http://stackoverflow.com/q/25404739
tags question: http://stackoverflow.com/q/25438673
type: Tag

http://stackoverflow.com/q/25494402
score: 4
upvote count: 4
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
has title: Interactively debugging a Node.js application on Heroku?
has body: My Node.js application runs correctly locally but it has errors once deployed to Heroku. I cannot use node-inspector to debug as it requires three ports, and Heroku allows only one port. https://discussion.heroku.com/t/how-to-debug-node-on-heroku-using-something-like-node-inspector/477/6 I cant use the debugger built into Node.js because I need a CLI to issue debugging commands. http://nodejs.org/api/debugger.html#debugger_debugger What is the best strategy for interactively debugging a Node.js application on Heroku?
type: Question
tagged with: debugging
tagged with: heroku
tagged with: node-inspector
has answer: http://stackoverflow.com/a/25530915
tagged with: javascript

http://stackoverflow.com/comment/39882453
has text: @Peter The function runs; however i want to be sure.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25543052

http://stackoverflow.com/a/25536375
accepted answer of: http://stackoverflow.com/q/25536307
has comment: http://stackoverflow.com/comment/39870428
upvote count: 7
has comment: http://stackoverflow.com/comment/39870512
downvote count: 0
type: AcceptedAnswer
has body: You could use the .grep function var arr2 = $.grep(arr, function( n, i ) { return i % 3 == 2; }); fiddle here
answers question: http://stackoverflow.com/q/25536307
type: Answer
score: 7

http://stackoverflow.com/comment/39662463
type: Comment
comment on: http://stackoverflow.com/q/25424553
score: 0
has text: You can use getElementsByClassName("class name"). Because Id is unique and classes can be used as common.
type: QuestionComment

http://stackoverflow.com/a/25444487
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25444117
accepted answer of: http://stackoverflow.com/q/25444117
type: AcceptedAnswer
downvote count: 0
has body: What you want to do is not allowed on Facebook. You cannot reward a user for sharing: https://developers.facebook.com/policy see section 4.5: Only incentivize a person to log into your app, like your app’s Page, enter a promotion on your app’s Page, or check-in at a place. Don’t incentivize other actions. It is also very bad practice in general, users should like or share something because they want to, not because they would get something for it.

http://stackoverflow.com/comment/39776798
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25486005
score: 0
has text: @MR.ABC can you share the code of a function you've changed?

http://stackoverflow.com/comment/39599316
has text: I updated jsfiddle with full version including leading zeros.
comment on: http://stackoverflow.com/a/25390041
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25501074
answers question: http://stackoverflow.com/q/25499416
has body: Be course your 3th code gets executed in "success". This only executes when "GetDetailsForLocationFromDB" has XMLHttpRequest.readyState = 4 AND XMLHttpRequest.status = 200. So only when ALL data is fetched it gives all data and adds all rows at once. So "all the rows are added to my dataTable when all data is completed" in your question is unavoidable if you do it this way. This is not an error, it works as designed. If you want a "row by row" update you will have make a separate call for each row (using $.each in "GetLocationsForDevice"). Using this will slow things down though, be warned.
type: Answer
score: 0

http://stackoverflow.com/comment/39885365
score: 0
comment on: http://stackoverflow.com/q/25544474
has text: @bralligator, if you're immediately removing all of the content of the cursor and then readding it.. the 'place' that was clicked is reset.. you may need to look at adding a short delay (~100ms) before re-applying the content however
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25401371
type: Question
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/28294215
tagged with: jquery
has body: Sorry for bad title, but I'm at a loss here. I am implementing akottr's dragtable jquery for reordering columns in a table, and have no luck, source code and demos here https://github.com/akottr/dragtable and here http://akottr.github.io/dragtable/ In the source .js file I put, $(document).ready(function () { $(".reorderable").dragtable(); }); And my table has reorderable in its class, which should have been all I need I get: Uncaught TypeError: undefined is not a function on $(".reorderable").dragtable(); in Chrome dev tools surprise surprise $(".reorderable").dragtable returns an undefined The demo works and is the same source files, am I missing something to register the dragtable method?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: jquery.dragtable.js, simple error, WTF solution
tagged with: widget
score: 0

http://stackoverflow.com/q/25440681
accepted answer: http://stackoverflow.com/a/25453016
has title: How do I get the expected bounds of an image to be drawn with transforms to canvas via drawImage()?
score: 0
has answer: http://stackoverflow.com/a/25453016
type: AnsweredQuestion
tagged with: drawimage
has body: I'm trying to draw an image using drawImage(), but with a matrix transform applied to it, like rotation or skew. Is there some way to get the expected bounds of this transformed image?
type: Question
tagged with: canvas
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25444913
upvote count: 2
has answer: http://stackoverflow.com/a/25445057
has answer: http://stackoverflow.com/a/25445012
accepted answer: http://stackoverflow.com/a/25449893
has title: image rotate 360 degree on click
type: Question
tagged with: jquery-mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/25448802
downvote count: 0
has answer: http://stackoverflow.com/a/25449893
favorite count: 0
has body: Need your help developers, I am using images as a menu. I just want when i click on image it rotate 360 degree and then another page is open. i try this. &lt;style&gt; .image { overflow: hidden; transition-duration: 0.8s; transition-property: transform; } .image:active { -webkit-transform: rotate(360deg); } &lt;/style&gt; html: &lt;img class="image" src="img path"&gt; in this code image rotation is depend on click time and i want user just click once image rotate 360 degree and the link page display. but this is not i want. I am using jqueryMobile and phonegap thanks in advance.
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
score: 2
type: AnsweredQuestion
tagged with: cordova
possible better answer: http://stackoverflow.com/a/25445012

http://stackoverflow.com/comment/39865213
has text: is it a special condition?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25533558
type: Comment

http://stackoverflow.com/q/25535563
has comment: http://stackoverflow.com/comment/40000638
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25606502
has comment: http://stackoverflow.com/comment/39998334
type: AnsweredQuestion
tagged with: ionic-framework
has body: I am creating simple mobile App using Ionic framework and AngularJs. I have AngularJs view for "single item". I that view I have: &lt;script&gt; js of social sharing plugin &lt;/script&gt; My social sharing plugin offers config for url and title of data that will be shared: &lt;script&gt; Init.share('.share, { url: '', title: '' }); &lt;/script&gt; How can I combine AngularJs interpolated data in script config, something like this (any sugestions): &lt;script&gt; Init.share('.share, { url: {{data.url}}, title: {{data.title}} }); &lt;/script&gt;
type: Question
has comment: http://stackoverflow.com/comment/39999661
has answer: http://stackoverflow.com/a/25606502
has comment: http://stackoverflow.com/comment/39986840
tagged with: javascript
has comment: http://stackoverflow.com/comment/39998199
has title: AngularJs template and content sharing
has comment: http://stackoverflow.com/comment/39986217
score: 0
answer count: 1

http://stackoverflow.com/comment/39758541
score: 0
comment on: http://stackoverflow.com/q/25475924
type: Comment
type: QuestionComment
has text: Strange, I've tried it on three machines here, all macs with v0.10.31, and they all give the same result.

http://stackoverflow.com/a/25507419
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40087902
answers question: http://stackoverflow.com/q/25505986
type: Answer
has body: As you mentioned that you are new to Worklight, I believe it is a good idea for you to invest some time studying the getting started material for Worklight available at: http://www.ibm.com/developerworks/mobile/worklight/getting-started.html It will give you a better understanding on how Worklight apps work. For your specific immediate needs you can focus on the Worklight server-side development and Authentication and security topics there. But is is worth to study them all for sure. A More direct answer: If you have a worklight adapter called LoginAdapter that contains a procedure called LoginProcedure you can use this code to call this adapter passing the user and password from your form In you HTML use something like: &lt;input type="Button" onClick="simpleLogin()" /&gt; And declare the function simpleLogin in the file js/main.js This is a sample of code that can go in your main.js file function simpleLogin(){ var user = document.getElementById("nome").value var password = document.getElementById("senha").value var invocationData = { adapter : 'LoginAdaper', procedure : 'LoginProcedure', parameters : [user,password] }; var options = { onSuccess : loginSuccess, onFailure : loginFailure }; WL.Client.invokeProcedure (invocationData, options); } function loginSuccess(){ alert("Login Success"); //whatever you want to do after success } function loginFailure(){ alert("Login Failure"); //whatever you want to do after failure } That is how you call an adapter procedure. But if you want to really secure your app with a real authentication mechanism, you should look at the getting-started module for authentication and security. That is more complex. Also note that you should not redirect to another html page. Worklight hybrid apps uses a model of a single page for the app. You need to either use one div for each page and them hide/show each one when needed or have different html files with code that will be injected into your single html page using jquery or any other java…
accepted answer of: http://stackoverflow.com/q/25505986
has comment: http://stackoverflow.com/comment/39823301

http://stackoverflow.com/comment/39814317
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25499997
has text: A short description in the answer would clarify what you mean.
score: 0

http://stackoverflow.com/comment/39763873
has text: Regarding `+this`, given that the method is on *Number.prototype*, in what case would *this* not be a number? And even if its *this* is set to a string (using *call*, *apply* or *bind*), then the internal operations convert it to a number anyway even if *input* and *base* are both strings (and *b* is not explicitly converted to a number anyway). :-)
type: AnswerComment
comment on: http://stackoverflow.com/a/25478572
score: 0
type: Comment

http://stackoverflow.com/comment/39851560
has text: @MDeSchaepmeester Wow! Never heard of that! Thank you, I learnt a new thing.
score: 0
comment on: http://stackoverflow.com/q/25525724
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25462822
score: 0
tagged with: grid
type: Question
has body: I have a grid stored in a one-dimensional array. The grid can be of variable size. I now have different blocks (2x2,2x3,2x4,3x3,3x4,3x5, 4x4 and so forth). How do I fill the grid in now? It can have unused spaces left in the end but what is the fastest way here without looping through the array over and over trying out sizes? For instance with this 5x5 grid. var g1 = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]
has answer: http://stackoverflow.com/a/25462987
tagged with: algorithm
tagged with: arrays
has title: How to fill a one-dimensional array grid with various blocks
tagged with: javascript
answer count: 1
has comment: http://stackoverflow.com/comment/39734325
type: UnansweredQuestion

http://stackoverflow.com/comment/39684626
comment on: http://stackoverflow.com/q/25436093
has text: Maybe your tooltip cannot fit the height of the remaining space above the target node.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39879687
comment on: http://stackoverflow.com/a/25541500
has text: this would work if I have only single combobox. But I have multiple comboboxes with same options. So I cannot just iterate over the `x-combo-list-inner`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25519319
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: image-uploading
answer count: 0
has body: i am trying to provide the upload button for field named as logo image.What i am doing is i am displaying the image name and next to image name i am providing the upload button to the user to upload/change image.BUt when i done the layouting for upload button in my system browser it was working fine .U can see the upper part of the attached image , but the same when i try to open in my friends system browser the alignment went horribly wrong. U can see below part in the attached image. This snapshot is taken from Chrome browser. Here is my HTML Code:- Click to Upload New Image Here is my JavaScript Code:- function changeImage(){ document.getElementById("logoImage").click(); } function sub(obj){ var file = obj.value; var fileName = file.split("\\"); document.getElementById("imageName").innerHTML = fileName[fileName.length-1]; } Here is my CSS:- #imageName{ position: absolute; left: 170px; font-family: calibri; width: 150px; padding-bottom: 5px; padding-top: 7px; -webkit-border-radius: 0px; -moz-border-radius: 0px; border: 0px dashed #BBB; text-align: center; background-color: #DDD; } #changeImage{ position: fixed; bottom: 379px; left:560px; font-family: calibri; width: 180px; padding-bottom: 5px; padding-top: 7px; -webkit-border-radius: 0px; -moz-border-radius: 0px; border: 1px dashed #BBB; text-align: center; background-color: #DDD; cursor:pointer; line-height: .5em; } as you can see in the snapshot the above one is working perfectly fine in my system but the same when i try to open in different system browser it was working wierdly. I tried my best to explain my problem.Let me know if anyone needs more input regarding this. Thanks
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/39840672
has title: UI alignment working different in different browser
type: Question
has comment: http://stackoverflow.com/comment/39842803
tagged with: javascript
has comment: http://stackoverflow.com/comment/39839597
tagged with: css-position

http://stackoverflow.com/a/25486624
answers question: http://stackoverflow.com/q/25476964
type: AcceptedAnswer
score: 1
type: Answer
upvote count: 1
has body: If you want dynamical row heights, ng-grid is not the best choice. It simulates a table layout with div grids that have a fixed height and are NOT measured at runtime. Better switch to a HTML table based solution like ng-table. Anyhow, regarding your question, this would be a solution: Use fixed rowHeight in gridOptions to best match your largest rowHeight Create a filter that replaces the spaces in the text &lt;br&gt; Use a cellTemplate that uses that filter Here is a simple filter: app.filter('splitAtSpaces', function() { return function(text, length, end) { if (text) { return text.split(' ').join('&lt;br&gt;'); } } }); This is the cellTemplate: var splitTpl = '&lt;div class="ngCellText" ng-bind-html="row.getProperty(col.field)|splitAtSpaces"&gt;&lt;/div&gt;' And here are the gridOptions with best (guessed) height values: $scope.gridOptions = { data: 'myData', rowHeight: 90, columnDefs: [{ field: 'name', displayName: 'Name', cellTemplate: splitTpl }, { field: 'age', displayName: 'Age' }] }; And a plunker to show how everything works together. NOTE: Look out for the inclusion and injection of ng-sanitize! If you are using another version of angularJs ng-bind-html may be obsolete/not implemented (Aargh, I lost track of this security measures a while ago!) If your output shows &lt;br&gt; instead of doing an actual line break look around on SO. There are MANY more answers to this issue. Uhh, yes. I nearly forgot to tell you how to change the css so the divider fits your new rowHeight: .ngVerticalBar { height: 100%; } Come back with more detailed questions once you get this running. But overall I strongly suggest you use an other table/grid directive.
accepted answer of: http://stackoverflow.com/q/25476964
downvote count: 0

http://stackoverflow.com/q/25394385
has answer: http://stackoverflow.com/a/25433312
has comment: http://stackoverflow.com/comment/39678959
upvote count: 0
answer count: 1
tagged with: hyperlink
tagged with: javascript
tagged with: jquery
score: -1
has title: Custom JQuery dynamic link creation
has comment: http://stackoverflow.com/comment/39636970
favorite count: 0
type: UnansweredQuestion
has body: I'm pretty new to js and having a hard time figuring out the best way to generate a custom url depending on what links are selected. You can view what I have done here. http://jsfiddle.net/1fz50z1y/26/ I will also paste my info here. var products = []; var quantity = []; qstring = ''; $('input.product-radio, select.products-howmany').change(function() { var $this = $(this) var $product = $(this).closest('.product-options-left'); var $radio = $product.find('input.product-radio'); var $select = $product.find('select.products-howmany') var qid = $select.val(); var pid = $radio.val(); currentStatus = $radio.prop('checked'), theString = ''; qString = ''; pString = ''; if (currentStatus) { products.push(pid); quantity.push(qid); if ($product.find('div.quantity').removeClass('q-hidden')) { //code } } else { products.splice(products.indexOf(pid), 1); quantity.splice(quantity.indexOf(qid), 1); $product.find('div.quantity').addClass('q-hidden'); } if ((products.length &gt; -1) || (quantity.length &gt; -1)) { if ((products.length === 0) || (quantity.length === 0)) { console.log("Q Length: " + quantity.length); pString += products[0]; qString += quantity[0]; console.log("qString = " + quantity); } else { pString = products.join('-p'); qString = quantity.join('_q'); if (quantity.length &gt; 1) { qString = quantity.splice(quantity.indexOf(qid), 1); pString = products.splice(products.indexOf(pid), 1); } console.log("+ Q Length: " + quantity.length); console.log("ADDING " + "p" + pString + "_q" + qString); } if ((qString == 'undefined') || (pString == 'undefined')) { $('a.options-cart').prop("href", "#"); } else { //$('a.options-cart').prop("href", "/cart/add/p" + theString + "_q" + qstring + "?destination=/cart"); //$('a.options-cart').prop("href", "/cart/add/p" + theString + "?destination=/cart"); $('a.options-cart').prop("href", "/cart/add/p" + pString + "_q" + qString + "?destination=/cart"); } } }); $('a.options-cart').click(function() { alert(qstring); var $this = $(this); hr…
tagged with: dynamic
downvote count: 1
type: Question

http://stackoverflow.com/a/25434141
accepted answer of: http://stackoverflow.com/q/25429386
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25429386
has comment: http://stackoverflow.com/comment/39712293
has comment: http://stackoverflow.com/comment/39700631
has comment: http://stackoverflow.com/comment/39683676
type: Answer
has comment: http://stackoverflow.com/comment/39710443
has comment: http://stackoverflow.com/comment/39712485
has comment: http://stackoverflow.com/comment/39712372
has comment: http://stackoverflow.com/comment/39684149
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39701218
has comment: http://stackoverflow.com/comment/39710760
has comment: http://stackoverflow.com/comment/39710562
has comment: http://stackoverflow.com/comment/39711162
has comment: http://stackoverflow.com/comment/39684709
has comment: http://stackoverflow.com/comment/39791836
has comment: http://stackoverflow.com/comment/39719597
has body: The solution is not to enhance the promises themselves, but the factories that create them. Use functional programming and/or aspect-orientated programming approaches to decorate the original function. This will not only be less errorprone, but more concise, composable and reusable. function decorate(makeThenable) { return function(...args) { … // before creating the thenable return makeThenable(...args).then(function(value) { … // handle fulfillment return …; // the resulting value }, function(error) { … // handle rejection return …; // (or throw) }); }; } var decorated = decorate(myThenablemaker); decorated(…).then(whenFulfilled, whenRejected); Example 1: function withAutoRetry(request, timeout) { return function() { var args = arguments; return request.apply(null, args).catch(function handle(e) { if (e instanceof Http503Error) // or whatever return request.apply(null, args).catch(handle); else throw e; }); }; } withAutoRetry(someRequest)().then(onSuccess, onError); withAutoRetry(function() { return someRequest().then(onSuccess, onAnyError); })().then(onSuccess, onNon503Error); Example 2: function withCache(request, hash) { var cache = {}; if (!hash) hash = String; return function() { var key = hash.apply(this, arguments); if (key in cache) return cache[key]; else return cache[key] = request.apply(this, arguments); }; } lib.getNameOrigin = withCache(function(args) { return Restangular.all('people').one(args.id).get('nameOrigin'); }, function(args) { return args.name; });
has comment: http://stackoverflow.com/comment/39715109

http://stackoverflow.com/comment/39782074
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25488639
type: Comment
has text: @NinaNa it has values related to the event and you've to compare it to your convenience.

http://stackoverflow.com/q/25465769
score: 2
has answer: http://stackoverflow.com/a/25465824
accepted answer: http://stackoverflow.com/a/25465824
type: AnsweredQuestion
has title: jQuery get Inner of a with a different classes using the .find() method
has body: I am trying to use jQuery to return a all the rows that are checked within my data table. A row is checked if span class="checked" (1st and 3rd row) and unchecked span class="" (2nd row). Is there a shortcut way using the jQuery .find() method to return all the rows. As opposed to iterating through all of the rows and comparing the span class attribute? I know i could just use find() to get all the rows. But is there a way to define inner elements in the jQuery find method? blah blah blah
type: Question
tagged with: find
possible better answer: http://stackoverflow.com/a/25465820
tagged with: javascript
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/25465820
has answer: http://stackoverflow.com/a/25465867

http://stackoverflow.com/comment/39680857
score: 0
comment on: http://stackoverflow.com/a/25431858
type: Comment
has text: Thank you @GGio. I will test this and update shortly!
type: AnswerComment

http://stackoverflow.com/a/25428259
upvote count: 1
answers question: http://stackoverflow.com/q/25426271
has comment: http://stackoverflow.com/comment/39670286
has body: I've made two different plunkers, the first one is a plain app just to do an example of routes magic with angular... First example, basic routes var app = angular.module('plunker', ['ngRoute']); app.controller('MainCtrl', function($scope) { $scope.technology = 'this is the tech page'; $scope.task = 'this is the task'; }); app.config(['$routeProvider', function($routeProvider) { $routeProvider .when('/technology', { templateUrl: 'technology.html', controller: 'MainCtrl' }) .when('/task', { templateUrl: 'task.html', controller: 'MainCtrl' }) .otherwise({ redirectTo: '/technology' }); } ]); The second example is an myApp example based on your application, it's basicaly your application but slightly different... Second example, your app // I like to keep the app.js file "clean", what means that this file will only // load the app modules and declare the DI of the app... var app = angular.module('myApp', [ 'ngRoute', // ngRoutes directive from angularjs 'myAppControllers', // controllers module, u can add how controllers wtv u need 'myAppRoutes', // routes module, you can keep the routes configs separated or in the same file ]); // start the modules, other way to do this is to put this lines in every // single controllers or route file, what is ugly angular.module('myAppRoutes',[]); angular.module('myAppControllers',[]);
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25426271
type: Answer
score: 1

http://stackoverflow.com/a/25426455
type: AcceptedAnswer
has body: Put input type submit button within your from and make hide that button from screen if you really don't need that. Now when you press Enter it would post your form data. Example: &lt;input type="submit" style="position: absolute; left: -9999px"/&gt;
score: 0
answers question: http://stackoverflow.com/q/25426157
type: Answer
accepted answer of: http://stackoverflow.com/q/25426157

http://stackoverflow.com/q/25431819
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: What would be the best way to turn a json object into a sorted HTML select (straight javascript only)? The format of the json can change if needed. I have been searching and most documentation says that object keys can not be sorted only arrays can be sorted, but I couldn't figure out how I would modify the structure of the json to make it an array and therefore easily sortable. var json = { "group3": [ {"value33": "label33"}, {"value13": "label13"}, {"value23": "label23"} ], "group1": [ {"value21": "label21"}, {"value31": "label31"}, {"value11": "label11"} ], "group2": [ {"value22": "label22"}, {"value12": "label12"}, {"value32": "label32"} ] }; Will become this: Label 11 Label 21 Label 31 Label 12 Label 22 Label 32 Label 13 Label 23 Label 33
has title: Best way with javascript to turn a json object into a sorted html select
has answer: http://stackoverflow.com/a/25433454
possible better answer: http://stackoverflow.com/a/25432165
tagged with: javascript
tagged with: sorting
upvote count: 2
answer count: 3
downvote count: 1
has answer: http://stackoverflow.com/a/25432173
favorite count: 0
has comment: http://stackoverflow.com/comment/39676556
has answer: http://stackoverflow.com/a/25432165
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25433454
has comment: http://stackoverflow.com/comment/39676498
score: 1

http://stackoverflow.com/comment/39882448
has text: Could you share a fiddle of what you've done so far on NVD3 so far.
comment on: http://stackoverflow.com/q/25541637
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25499337
has comment: http://stackoverflow.com/comment/39813412
type: Answer
has comment: http://stackoverflow.com/comment/39812676
answers question: http://stackoverflow.com/q/25499278
score: 0
has body: I suggest you use UglifyCSS and UglifyJS. You can also use an asset management framework for PHP like Assetic that uses these tools easily. The CSS cascading order is very important, the last declared is more relevant.

http://stackoverflow.com/q/25538689
has title: Object or Property is not supported
type: AnsweredQuestion
has body: I'm trying to standardize hacks in a library to use JavaScript to customize an Enterprise Platform that is very difficult to write client side code. Basically what I am trying to do, is allow a user to pass in the a reference to the data they want and regardless of how it's stored, I will try to get it using a couple of pre-defined methods. I know this process isn't pretty, but there aren't any alternatives for what we're trying to do. I'm using jQuery 1.6.2 and bound to this due to dependencies of other libraries. The following line: if ($('input[id^=' + lineItemAttributeId + ']').length &gt; 0) { is giving the following error: Object doesn't support this property or method in IE8, but no other platform. Services.prototype.getAttributeValue = function(docNum, variableName, defaultValue) { if (docNum == "1") { var quoteItemAttributeId = variableName; if ($('input[id*=' + quoteItemAttributeId + ']').length &gt; 0) { return $('input[id*=' + quoteItemAttributeId + ']').val(); } else if ($('textarea[id*=' + quoteItemAttributeId + ']').length &gt; 0) { return $('textarea[id*=' + quoteItemAttributeId + ']').val(); } else if ($('select[name*=' + quoteItemAttributeId + ']').length &gt; 0) { return $('select[name*=' + quoteItemAttributeId + ']').find("option:selected").val(); } else { return defaultValue; } } else { var lineItemAttributeId = docNum + "_" + variableName; if ($('input[id^=' + lineItemAttributeId + ']').length &gt; 0) { return $('input[id^=' + lineItemAttributeId + ']').val(); } else if ($('textarea[id*=' + lineItemAttributeId + ']').length &gt; 0) { return $('textarea[id*=' + lineItemAttributeId + ']').val(); } else if ($('select[name*=' + lineItemAttributeId + ']').length &gt; 0) { return $('select[name*=' + lineItemAttributeId + ']').find("option:selected").val(); } else { return defaultValue; } } }; I have tried: if ($('input[id=' + lineItemAttributeId + ']').length &gt; 0) { if ($('input[id*=' + lineItemAttributeId + ']').length &gt; 0) { with similar resu…
has comment: http://stackoverflow.com/comment/39874867
type: Question
has comment: http://stackoverflow.com/comment/39875158
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/39874686
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25539099
accepted answer: http://stackoverflow.com/a/25539099
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39874805
has comment: http://stackoverflow.com/comment/39874886
has comment: http://stackoverflow.com/comment/39875513

http://stackoverflow.com/a/25398720
type: Answer
upvote count: 1
downvote count: 1
score: 0
has body: Problem Part That is because when you define a variable &amp; don't initialize, it will be undefined. var list; //list is undefined here So when you are first time saying list += arr[i] So it is basically list = undefined + arr[0]; So last output will be 'undefined&lt;li&gt;...' Working Part You are saying var list = ''; So first time it will be list = '' + arr[0]; So last output will be '&lt;li&gt;...'
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25398677
answers question: http://stackoverflow.com/q/25398677

http://stackoverflow.com/q/25533192
has comment: http://stackoverflow.com/comment/40007650
has comment: http://stackoverflow.com/comment/40040544
tagged with: django-forms
has title: Django dynamically add form to formset with google map autosuggest
type: Question
tagged with: google-maps
tagged with: javascript
has answer: http://stackoverflow.com/a/25610712
has comment: http://stackoverflow.com/comment/40042187
tagged with: google-maps-api-3
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39914247
favorite count: 0
has comment: http://stackoverflow.com/comment/40007971
type: UnansweredQuestion
tagged with: django
has comment: http://stackoverflow.com/comment/40040662
downvote count: 0
score: 1
has body: I have a javascript to add form dynamic to a form set for django and it is working by clicking the Add form, it will add one more form to my django formset. But since in my empty form i have a field to use google map autosuggest: how to make it working for the location field in this extra forms too? edit: the empty form in short: {{ form.location.label }}: {{ form.location.errors }} {{ form.location }} thanks a lot.

http://stackoverflow.com/q/25411816
has comment: http://stackoverflow.com/comment/39640389
upvote count: 7
type: Question
accepted answer: http://stackoverflow.com/a/25412019
answer count: 2
downvote count: 0
has body: On desktop browsers, window.scroll fires off continuously as the browser is scrolled. However, in my testing on iOS and Android Chrome, it only fires when the scrolling has finished. I tried touchmove but that had the same behavior - only firing when the movement finished. Is there an event on mobile devices that fires continuously, like a desktop browser?
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39641393
has answer: http://stackoverflow.com/a/25412507
has comment: http://stackoverflow.com/comment/39639932
has answer: http://stackoverflow.com/a/25412019
has title: window.onscroll mobile equivalent?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25412507
score: 7

http://stackoverflow.com/q/25512316
has answer: http://stackoverflow.com/a/25512627
answer count: 1
type: UnansweredQuestion
tagged with: tomcat7
tagged with: java
has title: Set up catalina environment in ubuntu
type: Question
tagged with: javascript
tagged with: ubuntu
tagged with: servlets
score: 0
has body: I have set up Tomcat7 and now i am being told to set up the CLASSPATH for Java servlets in the .cshrc file.But i don't have any .cshrc files.SO where do i set them up.Will setting it up in bashrc work?Also my Catalina in in /etc so i should just point to the Catalina folder in /etc right? The path of my Catalina folder is: /etc/tomcat7 So the path set up by me should be: setenv CATALINA=/etc/tomcat7 However there are 2 tomcat7 folders one in /etc and another in /var. What should i do? I am trying to implement the last section on this http://www.tutorialspoint.com/servlets/servlets-environment-setup.htm.But it is highly unclear to me.

http://stackoverflow.com/q/25477044
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39760869
has comment: http://stackoverflow.com/comment/39760478
answer count: 0
upvote count: 3
has body: I'm using angular-foundation by madmimi (it's a angularjs port for the jquery part of zurb foundation) and I've ran into a bit of trouble with the Alert directive. I have a contact form with alerts in the top. These alerts are shown using ng-repeat on an Array found on the scope. ($scope.alerts). when I push an alert, it shows up immediately. But when I try to remove it using a function on the scope ($scope.close()) the ng-repeat view does not update. It clearly calls the function correctly and when I log the array afterwards it has succesfully deleted the alert. $scope.$apply throws an error $apply is already in progress(which is normal, as I call everything from within an angular context). Another weird thing is, when I type something into one of the form fields(which are binded to another scope object with ng-model) the ng-repeat view get updated.. anyone who can help me with this? been debugging this for hours now without success :( thanks in advance EDIT: First I created a little JSFiddle, but everything worked fine in there (just as it does on the demo site of angular-foundation) so I decided to put up a live demo of my project as there are some other libs used in the project as well as beefier controllers and stuff then there would be in a consolidated JSFiddle. I stripped most of the parts that have nothing to do with the problem so it's just 2 small controllers and some route settings for the js part. Demo can be found at: VG Demo To reproduce: scroll down to the contact form, button mash in some random data, press "verzenden" and there will pop up an alert. Press the X on the right and as you can see, no magic happening. If you do like magic, just make one of the fields you just filled in blank and you'll see the alert closes. The code can easily be seen by inspecting the source. Thanks in advance
type: Question
has comment: http://stackoverflow.com/comment/39893264
has title: AngularJS splicing array on $scope doesn't update view
tagged with: arrays
tagged with: angular-foundation
tagged with: javascript
has comment: http://stackoverflow.com/comment/39760977
has comment: http://stackoverflow.com/comment/67996234
score: 3
tagged with: zurb-foundation
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/79658910

http://stackoverflow.com/comment/39720262
comment on: http://stackoverflow.com/a/25454786
type: AnswerComment
score: 0
type: Comment
has text: `nextAll` only finds siblings. Since your `textarea` is not inside the `ul`, it isn't found. You need to use different `$(this).closest('ul').next().find('.comment')`.

http://stackoverflow.com/q/25481609
answer count: 1
downvote count: 0
has body: I'm using Knockout in combination with moment.js and C#. In C# i pass in a ISO formatted date by using: var jsonString = JsonConvert.SerializeObject(dataObject}, new IsoDateTimeConverter()); In my HTML file i'm doing the following to display my date in a formatted way: Hello Time: I always get Invalid date but when i use: Time: it just displays correctly Time: 2014-08-25T09:49:00 Anyone an idea what i'm doing wrong?
favorite count: 0
has answer: http://stackoverflow.com/a/25481635
has title: invalid date when using knockout.js and moment.js
has comment: http://stackoverflow.com/comment/39768952
tagged with: momentjs
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/25481635
tagged with: knockout.js
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39769126

http://stackoverflow.com/comment/39837608
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25518243
has text: Also, creating a [JSFiddle](http://jsfiddle.net/L0e6mxcp/) of your problem will often help to get you answers.

http://stackoverflow.com/comment/39641873
has text: remove the string around the regex, regex expression like that do not need quotes
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25412898

http://stackoverflow.com/q/25391364
score: -1
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39601097
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39601048
tagged with: css
has body: $(document).ready(function(){ var highestBox = 0; $('#clubs .bcbox').each(function () { if ($(this).height() > highestBox) { highestBox = $(this).height(); } }); $('#clubs .bcbox').height(highestBox); }); And the HTML is: short box A box with a lot of content, so that the heights aren't the same. Each .bcbox is half the width of #clubs, however height varies based on content. It works in most browsers, however in Chrome if I refresh the page the javascript doesn't work.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39601002
downvote count: 1
has title: Why does this javascript stop working on refresh?
has answer: http://stackoverflow.com/a/25391401

http://stackoverflow.com/comment/39811219
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25502068
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/60003/discussion-between-omar-and-jaskey).
score: 0

http://stackoverflow.com/comment/39784204
has text: @railsnewbie Yeah, you just have to remove the block that starts with $(".newtag").keydown(function(e){. Here is a new fiddle: http://jsfiddle.net/6xpoeth6/1/
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25488962
score: 0

http://stackoverflow.com/a/25421600
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25421578
has body: That's the starting with selector. Check here Selects elements that have the specified attribute with a value beginning exactly with a given string. There's other attributes selectors too check it here
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/39688449
score: 0
has text: Please re-open this question. The suggested duplicate does not answer this question for this scenario. Refer to @FelixKling for the correct answer.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25438238

http://stackoverflow.com/q/25401387
favorite count: 0
has answer: http://stackoverflow.com/a/25402262
accepted answer: http://stackoverflow.com/a/25402262
possible better answer: http://stackoverflow.com/a/37912345
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/37912345
upvote count: 5
type: Question
answer count: 2
score: 5
tagged with: autocomplete
has title: Jira like autocomplete for textarea
tagged with: user-interface
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I want to implement Jira like auto complete behavior for one of my pet project. Check following screenshot. I have searched hard for any existing plugin that could able to deliver it but couldn't find anyone. I have tried following things (JsFiddle Link): Add textarea and input(hidden initially) field elements. Bind a keyPress event on textarea Capture @ key and showing input field enabled with jQuery#autocomplete plugin with list of users HTML: &lt;div class='span12'&gt; &lt;textarea id='comments' class='span12'&gt;&lt;/textarea&gt; &lt;input id='users' class='span12 hide' /&gt; &lt;/div&gt; Script: $(function() { var users = [ "Ram", "Ramesh", "Rakesh", "Rahul", "Abhi", "Karan" ]; $('#comments').on('keypress', function(e){ if(e.keyCode === 64) { $( "#users" ).removeClass('hide'); $( "#users" ).autocomplete({ source: users }); } }); }); My questions are: How can we trigger @text to show auto-complete list with text as selected? After selecting the user, how we can insert that user name in the textarea?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25470470
accepted answer: http://stackoverflow.com/a/25471796
favorite count: 0
tagged with: ember.js
type: AnsweredQuestion
score: 1
has body: I've started learning Emberjs and i'have an error but have not found the problem : In my view named new.hbs have this : {{input value=name type="text" placeholder="Event name" size="50"}} Done In my model event.js have this : Kiksoo.Event = DS.Model.extend({ name: DS.attr( 'string' ), }); And in eventController.js have this : App.EventsNewController = Ember.ObjectController.extend({ actions: { create: function(){ alert(this.get('model')); var newEvent = this.store.createRecord('event', this.get('model')); newEvent.save(); } } }); But have the error : Uncaught Error: Assertion Failed: Cannot delegate set('name', s) to the 'content' property of object proxy : its 'content' is undefined. Thank's
upvote count: 1
type: Question
tagged with: ember-data
has title: Emberjs : get data from input
tagged with: javascript
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25471796

http://stackoverflow.com/q/25445405
has comment: http://stackoverflow.com/comment/39707055
has comment: http://stackoverflow.com/comment/39768266
has comment: http://stackoverflow.com/comment/39713551
linked to: http://stackoverflow.com/q/9044468
has comment: http://stackoverflow.com/comment/39706810
type: Question
has comment: http://stackoverflow.com/comment/39706915
tagged with: jquery-deferred
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39704635
tagged with: ajax
has body: I need to do some async ajax calls and in the end of every single one I push a number to an array when all ajax calls finished I call my callback function with this array. But can't figure out how to do so.. So I've tried to implement the deferred method in my code like shown here Ended up like this: function uploader(uploads, cb) { var def = []; var reslist = []; $.each(uploads,function(key,value){ if(!value.sync){ def.push(_upload(value)); } }); function _upload(upload){ var dfd = $.Deferred(); getAntrag(upload.timestamp, function(json) { $.ajax({ url: 'http://api.***.com/', type: "POST", data: { customer: json }, async: false, success: function(msg) { try { var res = JSON.parse(msg); } catch (err) { dfd.reject(); } if (res.mldgcode === '0000') { reslist.push(res.data.ident); dfd.resolve(); } else { dfd.reject(); } } }); }); return dfd.promise(); } $.when.apply($,def).done(function(){ console.log('all done'); cb(reslist); }); $.when.apply($,def).fail(function(args){ console.log('failargs',args); cb(args); }); } So but now the done handler is called before my dfd.resolve(). What do I miss here ?
has comment: http://stackoverflow.com/comment/39704660
has title: Jquery deferred - done doesn't wait for resolve()
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/39707750
has comment: http://stackoverflow.com/comment/39701804
answer count: 0
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39713478

http://stackoverflow.com/comment/39690959
has text: Your answer gave the value of this --> name : Jone, which is not what I was looking for.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25439790

http://stackoverflow.com/comment/39891585
has text: but i can't have fixed height. It should change dynamically depending on the height of image.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25547743

http://stackoverflow.com/comment/39819402
type: Comment
comment on: http://stackoverflow.com/a/25508524
score: 0
type: AnswerComment
has text: Can you please elaborate on extend method? Am I right that `extend` method is not a part of backbone.js but rather a part of JavaScript itself? When we call `Backbone.Model.extend()` do we take the function `Model` and add additional methods to the object which represents the function `Model`?

http://stackoverflow.com/comment/39602691
has text: well thanks.but here i just gave this.book array a length equal to the length of provided arguments using this.book=new Array(arguments.length)i didn't try to implement any array method on the arguments!!!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25391694

http://stackoverflow.com/a/72996373
has body: I know this is an old topic but I stumbled across it while having a similar issue with French characters. Any hard-typed HTML, the {{{body}}} wasn't working. I solved this on the handlebars call: The charset="utf-8" forces handlebars to generate an output in utf-8 encoding. This resolved all French characters on the entire page (including hard-typed content) and didn't break anything.
answers question: http://stackoverflow.com/q/25415380
score: 0
type: Answer

http://stackoverflow.com/a/25479429
answers question: http://stackoverflow.com/q/25479297
score: 0
type: Answer
has body: If I understood your question well then I think this can help you. $(function(){ function fadeMyContent() { $("#fff li").each(function(i, j){ if($(this).text() != "first"){ $("#fff li:first").fadeIn(700).delay(2000).fadeOut(700, function() { $(this).appendTo($(this).parent()); fadeMyContent(); }); } }); } fadeMyContent(); }); Just give it a try and let me know if this is what you wanted...

http://stackoverflow.com/comment/39635093
has text: I tried out your edit. The color still reverts after any mouseover or click. I can only assume that the color is not a result of an event, or .preventDefault() would be working in this occasion.
comment on: http://stackoverflow.com/a/25394838
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25527174
has answer: http://stackoverflow.com/a/25527210
accepted answer: http://stackoverflow.com/a/25527210
linked to: http://stackoverflow.com/q/15757750
has body: I'm trying to do what the title says following this example: How can I call PHP functions by JavaScript? However I can't get it to work. Here is the javascript function: &lt;script&gt; function errorInProyect(err){ if (document.getElementById("projname").value == ""){ document.getElementById("projname_status").innerHTML = "El nombre del proyecto no puede estar vacio"; } else{ jQuery.ajax({ type: "POST", url: 'addproject.php', dataType: 'json', data: {functionname: 'prueba'}, success: function (obj) { document.getElementById("projname_status").innerHTML = "El resultado fue " + obj.result; } }); } } &lt;/script&gt; And my addproject.php is: &lt;?php $res = array(); $res['result'] = "soy la prueba"; json_encode($res); ?&gt; and I know that the function is being called because the message in case of the empty string is being printed. What am I doing wrong?
tagged with: php
type: AnsweredQuestion
upvote count: 0
type: Question
tagged with: javascript
score: -1
has title: Calling a php script using ajax not working
possible better answer: http://stackoverflow.com/a/25527305
answer count: 2
has answer: http://stackoverflow.com/a/25527305
has comment: http://stackoverflow.com/comment/39853113
downvote count: 1
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/25426544
has comment: http://stackoverflow.com/comment/39666353
has title: Prevent user from refreshing page, redirection instead
has comment: http://stackoverflow.com/comment/39667312
tagged with: angularjs
type: Question
tagged with: http-redirect
has answer: http://stackoverflow.com/a/25427179
has comment: http://stackoverflow.com/comment/39669818
has answer: http://stackoverflow.com/a/25426689
has comment: http://stackoverflow.com/comment/39666078
tagged with: refresh
has comment: http://stackoverflow.com/comment/39666299
has answer: http://stackoverflow.com/a/25427868
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/821011
has body: I am creating a quiz web app, during game play I want to prevent the user from refreshing the page so the timer doesn't restart. My app auto-save score when the game is finished (when all questions answered or time is out), but the problem is when I refresh the page (before time is out) it is still working (the timer reboot, so the player can cheat and have extra time to think and answer, or even check correct answers) I tried to prevent refreshing events, I could deactivate F5 and reload button but hitting enter on the address bar is still working.. I realized that it is not possible to prevent all refreshing events, so I tried to think different: When the player click refresh, I want him to be redirected to main menu. The category played will be automatically deactivated (so refreshing will be considered as cheating) Any JS script can help me doing that? If you have any other suggestion for such type of app that will be good as well.
has comment: http://stackoverflow.com/comment/39666846
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/39743180
score: 0
has text: I get this code from: http://www.infotuts.com/insert-record-in-database-jquery-php/
type: Comment
comment on: http://stackoverflow.com/q/25462008
type: QuestionComment

http://stackoverflow.com/comment/39722686
score: 0
type: AnswerComment
has text: Thanks a lot! I'm still new to recursion, but your changes illustrate a good lesson on the topic. I had an idea why my code didn't work, and your solution is straightforward. Thanks again, and enjoy the upvote!
type: Comment
comment on: http://stackoverflow.com/a/25456134

http://stackoverflow.com/q/25390678
tagged with: http://stackoverflow.com/tag/html
has body: I have a website which contains a newsfeed much like facebook. This newsfeed makes use of infinite scrolling when the user reaches the bottom of the page. Everything works perfectly when the website is being viewed on a desktop browser, however when it is being viewed on a my iphone, the function does not fire unless I scroll to the firing point slowly. To clarify, if I scroll all the way to the bottom at normal speed, it goes past the point whereby the function should have fired and nothing happens. If I then scroll slowly back up the page slightly (100 pixels ish), the function will be called. Likewise if I happen to be scrolling down the page slowly, the function will be called. So it is when I scroll fast (or normal speed), that the function is not called. Here is the function I am using: &lt;script language="javascript"&gt; $(document).ready(function() { //Variable declarations for function $(window).scroll(function() { if($(window).scrollTop() == $(document).height() - $(window).height()) { //Function goes here } }) }); &lt;/script&gt; I tried replacing the if statement condition with the following condition which works in terms of getting the function to fire, but all the posts are loaded at once rather than loading 5 every time the user gets to the bottom of the page. if ($(window).scrollTop() &gt;= $(document).height() - $(window).height() - 60) Any ideas what the issue is?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25391210
upvote count: 1
score: 1
type: Question
has title: Ajax infinite scroll function not firing on mobile
has answer: http://stackoverflow.com/a/70605858
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/52612531
favorite count: 0
tagged with: ajax
answer count: 3

http://stackoverflow.com/q/25396846
has title: How do I remove (only) an asterisk from the inner text of an HTML component?
type: Question
has answer: http://stackoverflow.com/a/25396912
tagged with: html-table
has answer: http://stackoverflow.com/a/25397737
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39611697
has answer: http://stackoverflow.com/a/25397649
answer count: 4
possible better answer: http://stackoverflow.com/a/25396912
has body: I'm trying to figure out how to remove/replace an "asterisk" from the innerHTML of a &lt;td&gt; component. I have a which contains same free text and an input control. Assume in the following sample that &lt;td&gt; == this $(this)[0].innerHTML "*&amp;nbsp;&lt;input name="ctl00$MainContent$TxnDate" type="text" id="TxnDate" class="DetailTextBox dvFieldTypeDateTime dvRequiredField hasDatepicker validationFailed" style="width:250px;"&gt;&amp;nbsp;Required Field" How do I replace/remove the asterisk from the inner HTML? $(this)[0].innerHTML[0] I have tried: $(this)[0].innerHTML.replace(/\*/g, ''); But that seems to delete the current contents of my input control.
has comment: http://stackoverflow.com/comment/39611452
tagged with: innerhtml
accepted answer: http://stackoverflow.com/a/25396891
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25396891

http://stackoverflow.com/comment/39664987
comment on: http://stackoverflow.com/a/25426035
has text: problem is i have two more variables. So is there any better alternative than that?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25505261
type: UnansweredQuestion
has body: I'm using sorting/filtering jQuery plugin Isotope and also jQuery $.ajax() to dynamically load some new elements to the page that need to be sorted with Isotope. That library seems to set all the new sorted elements with absolute position and with fixed (left, top) position in order to perform sorting. The problem is that when you load the first set of elements with clear cache the the element positions in that absolute grid are incorrect (they are overlapping). This is caused by Isotope initialization. My (inexperienced) guess would be that the all the new DOM elements are not fully loaded by the time Isotope starts to calculate the future positions of the elements and there's where the in-accuracy comes in. If I do the exact same ajax request again it manages to calculate the positions correctly. EDIT #1 ajax reuqest var $isocont = $('#page-content-result'); var isoActive = false; $.ajax({ url: actionUrl + 'ajax', type: 'POST', data: searchData, success:function (data) { if(data.trim().length &gt; 0) { $('#page-content-result').hide().empty().html(data).fadeIn(600); initIsotope(); } else { var visible = $('#page-content-result').is(':visible'); if(visible === true) { $('#page-content-result').empty(); } $('#result-notif').show(); } } }); var initIsotope = function() { if(isoActive === true) { $isocont.isotope('destroy'); console.log('iso stop'); isoActive = false; } if(isoActive === false) { $isocont.isotope({ getSortData: { name: '.iso-docname', } }); console.log('iso start'); isoActive = true; } } Can someone explain the nature of this problem and give few hints for solution? Thnx!
has comment: http://stackoverflow.com/comment/39814100
type: Question
has comment: http://stackoverflow.com/comment/39820851
has title: DOM Elements loaded from ajax and (probably) not ready in time
has comment: http://stackoverflow.com/comment/39825183
tagged with: javascript
has comment: http://stackoverflow.com/comment/39824791
tagged with: dom
has comment: http://stackoverflow.com/comment/39818224
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25521231
tagged with: jquery-isotope
has comment: http://stackoverflow.com/comment/39818012
tagged with: jquery
has comment: http://stackoverflow.com/comment/39819392
has comment: http://stackoverflow.com/comment/39817007
has comment: http://stackoverflow.com/comment/39813575
tagged with: ajax
has comment: http://stackoverflow.com/comment/39818565

http://stackoverflow.com/comment/39832436
has text: Appears to work fine for me: http://jsfiddle.net/j30mddp2/. Can you reproduce the issue in a fiddle?
comment on: http://stackoverflow.com/q/25515304
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39665154
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25413040
has text: I'm using mp4 as the video format. I added this 4th variable: var img4 = new Image(); img4.src = "src/video.mp4"; Am I going to use both and tags in the HTML?

http://stackoverflow.com/q/25434612
answer count: 3
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39681680
possible better answer: http://stackoverflow.com/a/25434668
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/40221944
accepted answer: http://stackoverflow.com/a/40221944
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/25434807
has body: I want to $watch an object for changes on any of its properties and, when any of them changes, get its name (apart from newValue and oldValue). Is that possible?
has title: Angular $watch object and get property name
has comment: http://stackoverflow.com/comment/39681747
tagged with: javascript
has comment: http://stackoverflow.com/comment/39681669
has answer: http://stackoverflow.com/a/25434668

http://stackoverflow.com/a/25463415
has body: That is how closures work: They close over variables. function UTCDate(){ return new Date(Date.UTC.apply(Date, arguments)); } is private to your IIFE. You should better switch to The Revealing Module Pattern: var myDateApp=function(){ ... function UTCDate(){ return new Date(Date.UTC.apply(Date, arguments)); } ... return { ... UTCDate:UTCDate, ... }; }(); Then you could easily access the function UTCDate via myDateApp.UTCDate(). Or switch later on to AMD.
type: Answer
answers question: http://stackoverflow.com/q/25463225
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39735217
upvote count: 1

http://stackoverflow.com/comment/39736770
type: QuestionComment
score: 1
has text: Why are you doing that to the entire documentElement?
comment on: http://stackoverflow.com/q/25464258
type: Comment

http://stackoverflow.com/q/25525077
tagged with: node.js
tagged with: nonblocking
has title: Sorting code execution with Q-promises
has comment: http://stackoverflow.com/comment/39849335
has body: I have tried to sort my node.js code with Q-promise: var request = require('request'); var cheerio = require('cheerio'); var Q = require('q'); var companiesUrls = []; var url = ''; var companiesUrls2 = []; var carsUrls = []; var carsOwnerReview = {}; var carReviewUrl = []; var site = 'http://www.....' var companiesPath = '/companies' //step 1 function one() { var deferred = Q.defer(); request(site+companiesPath, function(err, resp, body){ if(!err &amp;&amp; resp.statusCode == 200){ console.log("Step 1 request was passed!"); var $ = cheerio.load(body); $('a', '#group-content').each(function(){ var url = $(this).attr('href'); companiesUrls.push(url); }); }; }); console.log("step 1 is finished"); deferred.resolve(); return deferred.promise; }; //step 2 function two() { var deferred = Q.defer(); for(var i=0;i&lt;companiesUrls.length;i+=2){ companiesUrls2.push(companiesUrls[i]); }; console.log("step 2 is finished"); deferred.resolve(); return deferred.promise; }; //step 3 function three() { var deferred = Q.defer(); for(var i=0;i&lt;companiesUrls2.length;i++){ request(site+companiesUrls2[i], function(err, resp, body){ if(!err &amp;&amp; resp.statusCode == 200){ console.log("Step 3 request was passed!"); var $ = cheerio.load(body); $('h3.edition-title').children().children().each(function(){ var url = $(this).attr('href'); carsUrls.push(url); }); }; }); }; console.log("step 3 is finished"); deferred.resolve(); return deferred.promise; }; //step 4 function four() { var deferred = Q.defer(); for(var i=0;i&lt;carsUrls.length;i++){ carReviewUrl.push(carsUrls[carsUrls.length-1].slice(0,-7)+'/owner-reviews'); }; console.log("step 4 is finished"); deferred.resolve(); return deferred.promise; }; //step 5 function five() { var deferred = Q.defer(); for(var i=0;i&lt;carReviewUrl.length;i++){ request(site+carReviewUrl[i], function(err, resp, body){ if(!err &amp;&amp; resp.statusCode == 200){ console.log("Step 5 request was passed!"); var $ = cheerio.load(body); var model = $('#page-…
has comment: http://stackoverflow.com/comment/39849281
has comment: http://stackoverflow.com/comment/39849271
type: Question
has comment: http://stackoverflow.com/comment/39849250
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39849836
has comment: http://stackoverflow.com/comment/39849262
linked to: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/39849278
tagged with: promise
answer count: 0
has comment: http://stackoverflow.com/comment/39849311
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39849375

http://stackoverflow.com/q/25537113
tagged with: function
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25537224
possible better answer: http://stackoverflow.com/a/25537196
has title: Conflicts with jquery scripts
has answer: http://stackoverflow.com/a/25537196
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39871909
has comment: http://stackoverflow.com/comment/39871826
has comment: http://stackoverflow.com/comment/39871895
type: Question
has answer: http://stackoverflow.com/a/25537224
tagged with: javascript
has comment: http://stackoverflow.com/comment/39871867
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39871896
has body: I'm a new JQuery programmer, here is my head code: this script works perfectly, but when i add these other three scripts in the page: che console error gave me: Uncaught TypeError: undefined is not a function on '$(document).ready(myfunction);' line. what is the error? Is a conflict problem?

http://stackoverflow.com/comment/39650218
has text: I start to see something when I addded this xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); but how to escape those html tag? json encode my echo in my php file?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25417454

http://stackoverflow.com/q/25390923
answer count: 1
tagged with: asynchronous
tagged with: callback
accepted answer: http://stackoverflow.com/a/25391116
tagged with: node.js
type: AnsweredQuestion
has title: Nested callbacks in a loop
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/25391116
tagged with: javascript
has body: I'm facing this nested resource access to mongodb in Node.JS I need to access to resources (let's call "resource_a") and their related sub-resources of the "resource_a" (let's call "resource_b"). I have a set of resource_b for each resource_a. The code above is not working since it calls the callback on the first iteration. What is the best choice to get callback called as soon as all the resourceB calls are solved? Thanks, franco function someFunction(err, callback){ resourceA.find({}, function(err, resources_a){ for(var resource in resources_a) { resourceB.find({"resourceA_Id":resources[resource]._id}, function(err, resources_b){ // here some operation callback(null, {"result":"..."} } }); }
score: 0

http://stackoverflow.com/comment/42380535
comment on: http://stackoverflow.com/a/26915945
has text: add suggestions in comment
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39783633
comment on: http://stackoverflow.com/a/25489526
type: Comment
has text: It should also be `<` and not `<=`: `i < x.length` and `n < y.length)`.
score: 1
type: AnswerComment

http://stackoverflow.com/q/25507980
possible better answer: http://stackoverflow.com/a/25511850
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39818938
favorite count: 0
accepted answer: http://stackoverflow.com/a/25508051
tagged with: ruby
has body: Create if @image.save format.html { redirect_to vote_path(@image) } format.js { render :js =&gt; "my_function();" } end so I'd like to fire up a function after the redirect has happened, but this doesn't work. Are there any other methods I could try and could you suggest me any please? Thank you.
type: Question
has comment: http://stackoverflow.com/comment/39819160
answer count: 2
has comment: http://stackoverflow.com/comment/39818803
has title: How to execute JS after redirect in a controller (Rails)?
upvote count: 3
tagged with: ruby-on-rails
downvote count: 1
has answer: http://stackoverflow.com/a/25508051
has answer: http://stackoverflow.com/a/25511850
tagged with: javascript

http://stackoverflow.com/a/25642087
answers question: http://stackoverflow.com/q/25483024
score: 0
type: AcceptedAnswer
type: Answer
has body: I've solved this issue placing in the html page this and then the jquery function becomes function pickDialog() { var message = " " $("#pickDialog").dialog({ modal: true, width: dWidth, height: dHeight, title: 'Seleziona' }).html(message); } The other code is unchanged. I don't know why but this solved the issue.
accepted answer of: http://stackoverflow.com/q/25483024

http://stackoverflow.com/comment/39637225
comment on: http://stackoverflow.com/q/25409987
type: Comment
has text: Hello quantumwannabe, thanks, the question is similar yes I think, but the solutions there are based on 'window.home()', and that is not working anymore...I tried it and it doesn´t work...so that´s why I am asking for help.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25525980
has title: Make $httpBackend ignore any requests made to server
has answer: http://stackoverflow.com/a/37675942
has body: I have the following controller (notice that at instantiation time I make an explicit call to $scope.getNotifications()): bla.controller("myctrl", [ "$scope", "$http", "configs", function ($scope, $http, configs) { $scope.getNotifications = function () { $http.get("bla/blabla").success(function (data) { }); }; $scope.removeNotification = function (notification) { var index = $scope.allNotifications.indexOf(notification); $scope.allNotifications.splice(index, 1); }; $scope.getNotifications(); } ]); Then I make some unit tests (notice that the controller gets instantiated in the before each): describe("blaController", function () { var scope, $httpBackend; beforeEach(module('bla')); beforeEach(inject(function ($controller, $rootScope, _$httpBackend_) { scope = $rootScope.$new(); $httpBackend = _$httpBackend_; $controller('blaCtrl', { $scope: scope }); })); afterEach(function(){ //assert $httpBackend.verifyNoOutstandingExpectation(); $httpBackend.verifyNoOutstandingRequest(); }); it("should get all notifications from server when instantiated", function () { //arrange $httpBackend.expectGET("api/v1/notifications").respond(200, {}); $httpBackend.flush(); //act - done implicitly when controller is instantiated }); it("should store all notifications from server on the client when success call to server", function () { //arrange $httpBackend.whenGET("api/v1/notifications").respond(200, [{ a: 1, b: 2 }, { c: 3, d: 4 }]); $httpBackend.flush(); //act - done implicitly when controller is instantiated //assert expect(scope.allNotifications).toEqual([{ a: 1, b: 2 }, { c: 3, d: 4 }]); }); Everything is fine until now. All tests pass. But when I add a new test (see bellow) that does not require any HTTP calls it fails because in the afterEach() it verifies for expecations but there are no expectations set in the removeNotification(). This is the error message from karma: PhantomJS 1.9.7 (Windows 8) notificationCenterController removeNotification should remove the given notification…
tagged with: angularjs
has comment: http://stackoverflow.com/comment/62827133
score: 6
tagged with: unit-testing
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39851057
has answer: http://stackoverflow.com/a/37675937
accepted answer: http://stackoverflow.com/a/37675942
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/39851888
tagged with: javascript
tagged with: jasmine
has answer: http://stackoverflow.com/a/37675037
tagged with: httpbackend
answer count: 3
possible better answer: http://stackoverflow.com/a/37675037
upvote count: 6
favorite count: 0
has comment: http://stackoverflow.com/comment/39851091

http://stackoverflow.com/a/25541164
score: 4
has comment: http://stackoverflow.com/comment/39880964
answers question: http://stackoverflow.com/q/25540997
has comment: http://stackoverflow.com/comment/39880147
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39880021
has comment: http://stackoverflow.com/comment/39881246
upvote count: 4
has comment: http://stackoverflow.com/comment/39880404
has body: Use the snippet below to search within a given column for a certain term. Example No. Column 1 Column 2 345678917 Test 1 one_test1@gmail.com 3512376894 Test 2 two.test2@hotmail.com // JavaScript window.onload = function(){ var term = "3512376894"; // term you're searching for var column = 0; // which column to search var pattern = new RegExp(term, 'g'); // make search more flexible var table = document.getElementById('dataTable'); var tr = table.getElementsByTagName('TR'); for(var i = 0; i < tr.length; i++){ var td = tr[i].getElementsByTagName('TD'); for(var j = 0; j < td.length; j++){ if(j == column && td[j].innerHTML == term){ // for more flexibility use match() function and the pattern built above // if(j == column && td[j].innerHTML.match(pattern)){ console.log('Found it: ' + td[j].innerHTML); } } } }; Output: Found it: 3512376894 Working jsBin or jsFiddle or this version jsFiddle Verions 4 | Verions 5 | Verions 6
downvote count: 0
has comment: http://stackoverflow.com/comment/39880060
has comment: http://stackoverflow.com/comment/39885128
has comment: http://stackoverflow.com/comment/39937625
has comment: http://stackoverflow.com/comment/39915663
accepted answer of: http://stackoverflow.com/q/25540997

http://stackoverflow.com/q/25393164
answer count: 1
has title: Execute a jQuery function after an Ajax response made by a different JS library
has comment: http://stackoverflow.com/comment/39605022
has comment: http://stackoverflow.com/comment/39640133
type: AnsweredQuestion
tagged with: prototypejs
has answer: http://stackoverflow.com/a/25439332
has body: I have to use jQuery mobile on an application that uses Prototype JS. After an Ajax response (initiated using prototype) new elements are brought into the page so jQuery mobile doesn't recognize them and no classes are applied to these. I want to execute a jQuery function after this ajax event. (I'm also unsure if it'd be correct to use jquery's .on('pageinit') in this instance. onSuccess: function(transport) { try { if (transport.responseText.isJSON()) { var response = transport.responseText.evalJSON(); var needUpdate = true; if (response.error) { alert(response.message); needUpdate = false; } if(response.ajaxExpired &amp;&amp; response.ajaxRedirect) { setLocation(response.ajaxRedirect); needUpdate = false; } if (needUpdate){ if (response.content){ $(categoryContainer).update(response.content); } if (response.messages){ $(messagesContainer).update(response.messages); } } } else { $(categoryContainer).update(transport.responseText); } } catch (e) { $(categoryContainer).update(transport.responseText); } } }); I've been struggling for several hours with this. and I've found questions regarding Ajax requests made by jQuery, but nothing when prototype is handling the ajax requests. I know it's not the most optimal way to do it but in this instance is fully justified. Any help is greatly appreciated.
type: Question
has comment: http://stackoverflow.com/comment/39607667
has comment: http://stackoverflow.com/comment/39605240
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
accepted answer: http://stackoverflow.com/a/25439332
has comment: http://stackoverflow.com/comment/39607292

http://stackoverflow.com/a/25485192
has comment: http://stackoverflow.com/comment/39775083
has comment: http://stackoverflow.com/comment/39775062
has comment: http://stackoverflow.com/comment/39778950
has comment: http://stackoverflow.com/comment/39775131
upvote count: 2
has comment: http://stackoverflow.com/comment/39779049
answers question: http://stackoverflow.com/q/25484994
has comment: http://stackoverflow.com/comment/39775086
type: Answer
has comment: http://stackoverflow.com/comment/39778981
has body: Create the array in php like this : while ($row = mysqli_fetch_array($rows)) { $arr[] = $row; } echo json_encode(array("data" =&gt; $arr)); Then in your javascript just decode the data and use it in your code as you like it. For example : var arr = $.parseJSON(data); arr.itemName will return the item name arr.itemprice will return the item price Remember you have use the above code inside of $.each() Hope this helps you.
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39775098

http://stackoverflow.com/comment/39605102
score: 1
comment on: http://stackoverflow.com/q/25393059
type: Comment
type: QuestionComment
has text: As @Diodeus suggested, libraries and frameworks might be better. I would suggest you looking at Angular. Also, why XML? JSON is easier to parse and use from the browser.

http://stackoverflow.com/q/25503140
has answer: http://stackoverflow.com/a/25503211
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/43495095
type: UnansweredQuestion
has title: Fixed header moves down in IPhone wrapper while scrolling
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/43476840
type: Question
tagged with: iphone
has comment: http://stackoverflow.com/comment/43453238
downvote count: 0
tagged with: javascript
has body: I have created an Iphone wrapper for my single page web application like below When we reach at the top after scrolling down the container the header moves down and a white space on the top. I can reproduce this issue in IPhone wrapper only. In browser the header will fixed correctly. is there any specific reason for this issue or is this is the default behavior of IPhone? if not how can i resolve this? Css i have applied to the header is position: fixed; z-index: 1; width: 100%; top: 0;

http://stackoverflow.com/comment/39710904
type: QuestionComment
has text: possible duplicate of [Add click event on window, but ignore all links that start with https](http://stackoverflow.com/questions/25445857/add-click-event-on-window-but-ignore-all-links-that-start-with-https)
comment on: http://stackoverflow.com/q/25450649
score: 0
type: Comment

http://stackoverflow.com/comment/39854136
has text: First of all, you need to learn the difference between POST and GET …
comment on: http://stackoverflow.com/q/25526880
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/39690812
type: AnswerComment
score: 0
type: Comment
has text: Explain second question. "Come out" - of what? What do you mean here?
comment on: http://stackoverflow.com/a/25437942

http://stackoverflow.com/a/25494805
score: 1
answers question: http://stackoverflow.com/q/25494737
downvote count: 0
type: Answer
upvote count: 1
has body: Instead of doing large DOM replacements, consider using classNames and CSS instead, f.ex: Big Logo Navigation Search And the JS, something like: $(window).scroll(function() { var isSmall = /* true/false; detect scrolling distance */; $('#menu').toggleClass('small', isSmall); }) This will toggle the class small to the #menu container when a certain scrolling distance has been detected. The CSS could look something like: #logo{height:100px} /* default (big) */ #menu.small #logo{height:60px} /* small */ These are just examples, you’ll need to figure out the implementation for your design yourself :) Using CSS also gives you the benefit of doing fancy schmancy animations later on.

http://stackoverflow.com/q/25406761
has comment: http://stackoverflow.com/comment/39629809
has answer: http://stackoverflow.com/a/25406904
type: AnsweredQuestion
has body: I have such variant's off html p-container: sometime so: dsf but somethime's it's so: Винил для некоторых владельцев авто - больше чем просто тюнинг and all my javascript code is for first div in P-tag. Could i check for div (class="caption left") it's parent: did it include style="text-align:center" or not? Could it be written in jQuery or not? And how?
accepted answer: http://stackoverflow.com/a/25406904
type: Question
score: 0
has answer: http://stackoverflow.com/a/25406857
possible better answer: http://stackoverflow.com/a/25406856
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25406856
has title: jQuery if condition with parent style attr
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39630034

http://stackoverflow.com/a/25497634
answers question: http://stackoverflow.com/q/25497576
type: Answer
has comment: http://stackoverflow.com/comment/39799072
score: 1
has comment: http://stackoverflow.com/comment/39799443
upvote count: 1
has body: I have updated your code , plz see this JSFiddle http://jsfiddle.net/hLuk2bhx/22/ Code changed $("textarea#desp").val(); -&gt; $("#desp").val(''); //You have to assign an "" empty string as its value to clear the textarea content esle -&gt; else Added html as below &lt;input type="hidden" id="previouschecked" name="previouschecked" value="" / &gt; And I have added an input[hidden] to storethe previous value, So it should looks like $("input[type='radio']").click(function(e) { if ( $(this).val() !=$("#previouschecked").val()){ $("#desp").val(''); } $("#previouschecked").val($(this).val()); }); Since you have an ID on your textarea so you can use $("#desp") directly "esle" is a typo so your code is broken that won't run correctly
downvote count: 0
has comment: http://stackoverflow.com/comment/39799358

http://stackoverflow.com/q/25531903
has comment: http://stackoverflow.com/comment/39862057
has comment: http://stackoverflow.com/comment/39862029
score: -2
has comment: http://stackoverflow.com/comment/39861937
tagged with: javascript
has comment: http://stackoverflow.com/comment/40032159
has comment: http://stackoverflow.com/comment/39862010
has title: What use does the ID have in style tag
has comment: http://stackoverflow.com/comment/40032215
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39862105
has comment: http://stackoverflow.com/comment/39862233
has comment: http://stackoverflow.com/comment/39862175
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39861962
type: AnsweredQuestion
has body: So my question is: Why should I give a class / id to a style tag (I suppose in order to identify it, of course), what use can I give the ID / class that style tag is taking? Is it useful for something? Because Twitter identifies the user custom style with an ID. Maybe jQuery interaction or something? &lt;style class="hello" id="id"&gt; ... &lt;/style&gt;
downvote count: 3
has answer: http://stackoverflow.com/a/25532053
accepted answer: http://stackoverflow.com/a/25532053
upvote count: 1
type: Question

http://stackoverflow.com/a/25475123
has comment: http://stackoverflow.com/comment/39756919
has comment: http://stackoverflow.com/comment/39757147
downvote count: 0
answers question: http://stackoverflow.com/q/25475001
score: 1
has comment: http://stackoverflow.com/comment/39756821
type: Answer
upvote count: 1
has body: It works just fine both in Chrome and Firefox. Chrome Version 36.0.1985.143 m Firefox 31

http://stackoverflow.com/a/25452371
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25451952
has comment: http://stackoverflow.com/comment/39724962
answers question: http://stackoverflow.com/q/25451952
has body: I think this line var say = Math.floor(Math.random() * freash.length+1) + 1; should be var say = freash[Math.floor(Math.random() * freash.length)]; Also consider the shortcut var say = freash[Math.random() * freash.length | 0];
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39721624

http://stackoverflow.com/comment/39603645
comment on: http://stackoverflow.com/q/25392534
score: 0
type: QuestionComment
type: Comment
has text: btw, how @NawedKhan says, if you use selector in separate js file, css class selector should be the best approach

yahoo
type: Tag
tag name: yahoo
tags question: http://stackoverflow.com/q/25420345

http://stackoverflow.com/comment/39868387
type: QuestionComment
comment on: http://stackoverflow.com/q/25535405
score: 1
has text: That fiddle link is empty.
type: Comment

http://stackoverflow.com/comment/39765743
has text: can you suggest me how to declare globally
score: 0
comment on: http://stackoverflow.com/q/25479739
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25475713
has body: For one, i don't think you should have 2 submit buttons, but have an other mechanism in place, for the two different submit actions, however, that aside, i'll give you a jQuery answer since it's faster: $(document).on('submit','.my-form',function(e){ e.preventDefault(); $.ajax({ url: "processing_page.php", type : 'get', data: { name : $('.full_name').val(), address: $('.address').val }, dataType: 'json' }).success(function(data){ // do something here console.log(data); //this is an object in my example }); }); You'll also need a php processing page (named processing_page.php in my example) to get back some data. For example (didn't go through all the verification steps on either side, but you'll get the gist of it): &lt;?php $myData = ['name' =&gt; '', 'address' =&gt; '']; $name = $_POST['name']; $address = $_POST['address']; $myData['name'] = $name; $myData['address'] = $address; echo json_encode($myData); ?&gt; Reason for the long answer is so that you can verify your code at the basic level. Hope i didn't make any typos.
type: Answer
accepted answer of: http://stackoverflow.com/q/25475571
answers question: http://stackoverflow.com/q/25475571
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39683601
score: 0
has text: I still can not access all of your dependencies, as kusaba.js references several php files, but I can confirm that `hide_ask_div` worked for me. Hopefully you can find a solution to your problem.
type: Comment
comment on: http://stackoverflow.com/q/25434390
type: QuestionComment

http://stackoverflow.com/q/25442599
answer count: 1
has body: There are fixed three columns in it. The rows are added dynamically and may go up-to few thousands also. I should also be able to iterate through the array and filter Id &amp; Values based on level. Is this possible ? How?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25443810
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/39695939
linked to: http://stackoverflow.com/q/966225
type: Question
has comment: http://stackoverflow.com/comment/39698052
has comment: http://stackoverflow.com/comment/39696041
accepted answer: http://stackoverflow.com/a/25443810
has comment: http://stackoverflow.com/comment/39695958
score: 0
has title: How do I create a multi-dimensional array in Javascript like shown in this picture?

http://stackoverflow.com/comment/39740008
type: AnswerComment
has text: @user1809836 No, you shouldn't. It's the factory pattern. `Plugin` is used to insatiate the object that really handles the calls to the jQuery plugin, it's a bit like a bridge. It's similar to this: http://learn.jquery.com/jquery-ui/widget-factory/
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25465889

http://stackoverflow.com/comment/39636568
score: 0
type: Comment
type: QuestionComment
has text: What you are trying to do is: `myArrayOfOjects[i].onclick = (function() { myFunction(i); });`, however what you really need to do is understand closures, which is the question I linked to in the other comment.
comment on: http://stackoverflow.com/q/25410332

http://stackoverflow.com/a/25473922
type: Answer
has body: May be jquery toggle make it. $(document).ready(function() { $(document).scroll(function() { var top = $(document).scrollTop(); var viewport = $("#welcome").height(); if (top &gt;= viewport ) { $('#header').addClass("fixed"); } else if ($('#header').hasClass('fixed')) { $('#header').removeClass('fixed')} }); }); http://jsfiddle.net/molo4nik11/zvom6o5w/
has comment: http://stackoverflow.com/comment/39755257
score: 0
answers question: http://stackoverflow.com/q/25473732

http://stackoverflow.com/comment/39706260
type: QuestionComment
has text: sorry I missed you title option. See answer
comment on: http://stackoverflow.com/q/25446082
score: 0
type: Comment

http://stackoverflow.com/comment/39833433
type: Comment
comment on: http://stackoverflow.com/a/25515813
has text: yes, if you don't implement your own `close` method, like I did. See my answer.
type: AnswerComment
score: 0

http://stackoverflow.com/a/25474598
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25457871
score: 0
answers question: http://stackoverflow.com/q/25457871
has body: OK, so it looks like this whole issue stemmed from the fact that Wordpress doesn't understand $ as a jQuery variable since its default enqueued version of jQuery runs in no-conflict mode. Replacing all the '$' signs with 'jQuery' solves the problem, or you can wrap it in a function and map it to $ like this which is what I did - http://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/ Not sure how I missed this, but if anyone else is having difficulty getting infinite scrolling working in Wordpress, it worked like a charm after hours of puzzling over why it wasn't working!
type: Answer

http://stackoverflow.com/q/25515634
score: 0
accepted answer: http://stackoverflow.com/a/25516013
answer count: 3
tagged with: jquery
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/18769109
has answer: http://stackoverflow.com/a/25516013
tagged with: ruby-on-rails
possible better answer: http://stackoverflow.com/a/25515984
type: Question
has answer: http://stackoverflow.com/a/25515984
has answer: http://stackoverflow.com/a/48598232
has title: Rails Project: jQuery Plugin not loading until refresh
tagged with: javascript
has body: I building an app in Rails 4. I have the below JS plugins on my show page but they seem to work only when I manually reload the page. I read that this might be due to turbolinks but since these plugins are in the body and not the head, it doesn't seem like a turbolinks issue. I even tried pasting these in the head and the footer tags but these gave me the same issue. Sometimes, one of the plugins loads and the other doesn't. The first plugin below are AddThis social buttons and the other is an image gallery. Any suggestions? Demo page http://mktdemo.herokuapp.com/listings/45 &lt;script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ashfaaq"&gt; &lt;/script&gt; &lt;script&gt; jQuery(document).ready(function($) { $('#gallery-1').royalSlider({ fullscreen: { enabled: true, nativeFS: true }, controlNavigation: 'none', autoScaleSlider: true, autoScaleSliderWidth: 960, autoScaleSliderHeight: 850, imageScaleMode: 'fit-if-smaller', navigateByClick: true, numImagesToPreload:2, arrowsNav:true, arrowsNavAutoHide: true, /* arrowsNavHideOnTouch: true, */ keyboardNavEnabled: true, fadeinLoadedSlide: true, globalCaption: false, globalCaptionInside: false, loop: true, thumbs: { appendSpan: true, firstMargin: true, paddingBottom: 4 } }); }); &lt;/script&gt;

http://stackoverflow.com/q/25548105
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/25548184
accepted answer: http://stackoverflow.com/a/25548243
answer count: 3
has comment: http://stackoverflow.com/comment/39891285
favorite count: 0
type: AnsweredQuestion
has body: var currentClass = ((elementArray[count]['Name'] === entityName) ? "'context-li-current-background'" : "' context-li-item-background-default'"); " " + elementArray[count]['Text'] + " "; um conditionally trying to add a class to my li element by jquery side, but above code give Alphabe I found that the class string is breaking here I do not know how to append the conditionally checked value, It will be a great help if any one could suggest a way
has answer: http://stackoverflow.com/a/25548397
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25548243
upvote count: 0
has comment: http://stackoverflow.com/comment/39891214
has title: String variable adding Javascript
possible better answer: http://stackoverflow.com/a/25548184
tagged with: javascript

http://stackoverflow.com/comment/39746220
type: Comment
has text: I set async: false and it's working now. In my case, since it's a menu, ajax call want be reading more than 10-15 items from the database. Therefore, I believe there want be a serious performance issue.
type: AnswerComment
comment on: http://stackoverflow.com/a/25468973
score: 0

http://stackoverflow.com/a/25486354
has body: You should pass the item as parameter of numberOfPages method, or its index. redefine your method like this: $scope.numberOfPages = function(item) { return Math.ceil(item.newitems.length / $scope.pageSize); }; and on your view, call it passing the item. {{ numberOfSavedPages(item) }} Or, use the $index $scope.numberOfPages = function(index) { return Math.ceil($scope.items[index].newitems.length / $scope.pageSize); }; /// view {{ numberOfSavedPages($index) }}
answers question: http://stackoverflow.com/q/25484116
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25484116
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/45021702
score: 0
type: AnswerComment
has text: "1.1" is recommended to test, works where needed, but returnes a wrong "true" on android 4+
type: Comment
comment on: http://stackoverflow.com/a/25455531

http://stackoverflow.com/q/25545582
downvote count: 0
has answer: http://stackoverflow.com/a/29971203
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25545880
tagged with: angularjs
linked to: http://stackoverflow.com/q/20305615
accepted answer: http://stackoverflow.com/a/25545880
type: AnsweredQuestion
has body: I am trying to use angular $http.patch() function to call a API URl As recommended by these answers - 1 and 2 i have set Content-Type headers to application/json in the config. But still i get the error: undefined is not a function I am missing here something? Below is my code where the error is throwing up (Note: I have injected $http in my service and other methods GET,POST,PUT,DELETE are working fine): deleteAll: function (data) { // custom service function url = $rootScope.config.api.stack.add_stack; return $http.patch(url,angular.toJson(data)); // error thrown here in firebug } AngularJs version: v1.2.16 Even i tried using the latest angularjs version but still its not woking &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"&gt;&lt;/script&gt;
linked to: http://stackoverflow.com/q/20000176
type: Question
upvote count: 4
has title: Angularjs PATCH - undefined is not a function
answer count: 2
possible better answer: http://stackoverflow.com/a/29971203

http://stackoverflow.com/comment/39801910
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25499163
has text: " For example read private messages, post status updates," - this are the part should be taken care by facebook authentication. Any ajax call from facebook domain also need authentication. My question is if any javascript file or css which can be accessed via script or link html tag why it is not accessible via ajax call? Why cross-domain link/script tag is allowed and not ajax?

http://stackoverflow.com/comment/39710924
has text: possible duplicate of [How to detect a click outside an element?](http://stackoverflow.com/questions/152975/how-to-detect-a-click-outside-an-element)
score: 0
comment on: http://stackoverflow.com/q/25450649
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40077107
type: Comment
has text: The layers are stored on my Google Drive as a GeoJSON. I've added a color field with values. It would be nice to be able to change the color values for the layers easily. Thanks,
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25457065

http://stackoverflow.com/q/25510818
type: Question
has title: Reading an XML file on the client using JavaScript
tagged with: javascript
score: 0
answer count: 1
tagged with: file-upload
tagged with: parsing
has answer: http://stackoverflow.com/a/25511075
tagged with: angularjs
type: UnansweredQuestion
has body: I am very new to JavaScript and am attempting to read an xml file which will be uploaded by the user but running into difficulties in referencing the file. Eventually I will want to parse the XML contents, update it and then make available for download again. My HTML file: Upload for Reading controller.js myApp.controller('myCtrl', ['$scope', 'fileUpload', function($scope, fileUpload){ $scope.uploadFile = function(){ var file = $scope.myFile; console.log('file is ' + JSON.stringify(file)); parser=new DOMParser(); var xmlDoc=parser.parseFromString(file,"text/xml"); var length=xmlDoc.length; console.log(length); Result: file is {"name":"books.xml","lastModifiedDate":"2014-08-26T16:20:03.685Z","size":818,"type":"text/xml"} length xmlDoc.length:undefined However the above shows xmlDoc.length is undefined. Your help is greatly appreciated.
tagged with: http://stackoverflow.com/tag/xml

http://stackoverflow.com/comment/39684695
has text: http://jsfiddle.net/robertrozas/ufcbecbu/
comment on: http://stackoverflow.com/q/25436040
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25401512
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25401571
has title: Jquery, read data attribute from all divs that match proper pattern
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
tagged with: coffeescript
type: Question
possible better answer: http://stackoverflow.com/a/25401599
has answer: http://stackoverflow.com/a/25401599
has answer: http://stackoverflow.com/a/25401571
has body: I have html code that looks like this: asdsad asd asdsad asd And now I want to iterate through all this selects and when one of this change this value alert this date-price attribute. I trying to do this with the following code: $('[id*="product"]').each -> $(this).change -> alert $(this).attr("data-price") But It gaves me undefined instead of this data-price value.
tagged with: javascript
answer count: 2

http://stackoverflow.com/a/25505217
has comment: http://stackoverflow.com/comment/39813563
answers question: http://stackoverflow.com/q/25505113
has comment: http://stackoverflow.com/comment/39813427
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39813930
has body: As an alternative, you can use Focus() method on your first Dropdownlist selection, Consider this is an example On Code Behind Protected void ddlstate_click(object sender, Eventargs e) { ddlcity.Focus(); } It will do the trick as you want.
has comment: http://stackoverflow.com/comment/39813126
has comment: http://stackoverflow.com/comment/39813071

http://stackoverflow.com/q/25463248
has comment: http://stackoverflow.com/comment/39734863
upvote count: 1
has comment: http://stackoverflow.com/comment/39734865
type: AnsweredQuestion
has body: Given the following object: var MyObject = function(field1, field2) { this.field1 = field1; this.field2 = field2; } MyObject.prototype.setField1 = functioin(field1) { this.field1 = field1; } MyObject.prototype.apply = function() { ... this.setField1("hello"); log("field1: " + this.field1); // field1 has not been set to "hello" } I want to change the value of field1... but the code above doesn't seem to work. Am I missing something? Tx. EDIT OK, it's worth providing you with the real case. Here below is my customization of Swagger for dealing with JWT: var TokenAuthorization = function(appId, value) { this.appId = appId; this.value = value; this.type = null; this.expirationTime = null; }; TokenAuthorization.prototype.set = function(value, type, expirationTime) { this.value = value; this.type = type; this.expirationTime = expirationTime; }; TokenAuthorization.prototype.apply = function(obj, authorizations) { var now = Math.round(new Date().getTime() / 1000); var appId = this.appId; var value = this.value; var type = this.type; var expirationTime = this.expirationTime; if (value == null || (type == "browse" &amp;&amp; this.expirationTime &lt;= now)) { var baseUrl = "http://localhost:9000/auth"; $.ajax({ type: "GET", url: baseUrl + "/apps/" + appId + "/apikey" }).done(function(data) { $.ajax({ type: "POST", data: JSON.stringify({ principal: appId, secret: data.apiKey }), url: baseUrl + "/apps/credentials", contentType: "application/json" }).done(function(data) { value = data.token; $.ajax({ type: "GET", headers: { "Authorization": "Token " + value }, url: baseUrl + "/users/credentials" }).done(function(data) { type = data.token.header.typ.split('/')[1], expirationTime = data.token.claims.exp }) }) }); } this.set(value, type, expirationTime); log("token: " + this.value); // value is null log("typ: " + this.type); // type is null log("exp: " + this.expirationTime); // expirationTime is null obj.headers["Authorization"] = "Token " + this.value; return true; }; The code abo…
has answer: http://stackoverflow.com/a/25464632
downvote count: 3
has comment: http://stackoverflow.com/comment/39734981
accepted answer: http://stackoverflow.com/a/25464632
type: Question
has comment: http://stackoverflow.com/comment/39734942
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39734906
has comment: http://stackoverflow.com/comment/39734886
answer count: 1
has comment: http://stackoverflow.com/comment/39735230
favorite count: 0
has title: JavaScript: How to keep data returned by a set of REST calls for later use

http://stackoverflow.com/a/25474022
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25472055
answers question: http://stackoverflow.com/q/25472055
type: Answer
has comment: http://stackoverflow.com/comment/39755294
has body: Your guess is correct. The label value may not be collected using request.getParameter("lid"). Instead you could add a hidden input to pass along the value. Replace <%=n%> with <%=n%> <input type="hidden" name="lid" value="<%=n%>" >
has comment: http://stackoverflow.com/comment/39755324

primefaces
tags question: http://stackoverflow.com/q/25508564
tags question: http://stackoverflow.com/q/25459272
tags question: http://stackoverflow.com/q/25393764
tags question: http://stackoverflow.com/q/25403709
tags question: http://stackoverflow.com/q/25401356
tags question: http://stackoverflow.com/q/25498449
tag name: primefaces
tags question: http://stackoverflow.com/q/25443723
tags question: http://stackoverflow.com/q/25455977
tags question: http://stackoverflow.com/q/25503771
tags question: http://stackoverflow.com/q/25396306
type: Tag
tags question: http://stackoverflow.com/q/25441287

http://stackoverflow.com/q/25409404
has answer: http://stackoverflow.com/a/25409546
has answer: http://stackoverflow.com/a/25409486
has comment: http://stackoverflow.com/comment/39634790
linked to: http://stackoverflow.com/q/5002966
answer count: 3
downvote count: 0
duplicate of: http://stackoverflow.com/q/5002966
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39634827
has body: /**Script**/ function AnimateFish() { var Fish3 = $("#fish1").not(".HoverFish"), theContainer = $("#container"), maxLeft = theContainer.width() - Fish3.width() - 50, maxTop = theContainer.height() - Fish3.height(), leftPos = Math.floor(Math.random() * maxLeft), topPos = Math.floor(Math.random() * maxTop) + 100, imgRight = "Assets/fish-glow3-right.gif", imgLeft = "Assets/fish-glow3.gif"; if (Fish3.position().left &lt;= leftPos) { $(this).css("background-image", 'url("' + imgRight + '")'); } else { $(this).css("background-image", 'url("' + imgLeft + '")'); } Fish3.animate({ "left": leftPos, "top": topPos }, 1800, AnimateFish); } AnimateFish(); Hi here the id "#fish1" that will generate dynamically like #fish1, #fish2 #fish3 ... actually i want this function should be run for all the id's that generate please give me the slution and ONE MAIN PROBLEM FISH IS GOING REVERSE FOR THIS CODE I TRIED LOT PLZ CAN U PPL HELP ME...
has comment: http://stackoverflow.com/comment/39634746
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25409847
upvote count: 1
type: Question
has title: how to loop the dynamically generated id?
linked to: http://stackoverflow.com/q/5376431
score: 1

http://stackoverflow.com/a/25462281
accepted answer of: http://stackoverflow.com/q/25462167
answers question: http://stackoverflow.com/q/25462167
has body: What is your directory structure? Where is the JS and where is the HTML file? Are they right besides each other in the same folder? If yes, try changing src of your script tag like:
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25416300
has body: Let’s say based on a condition I want a certain JavaScript tag to be added to the HTML. script1 = '&lt;div id="render_div"&gt;&lt;/div&gt;&lt;script src="script1"&gt;&lt;/script&gt;'; script2 = '&lt;div id="render_div"&gt;&lt;/div&gt;&lt;script src="script1"&gt;&lt;/script&gt;'; var someCondition = 0; if (someCondition == 0) { //only render script1; } else { //only render script2 } I am thinking of using document.write(script1); but don't think that's the best way. Below is the condition: Using an API I am grabbing how many images a user folder has. So if the count is 0 then I want to render script 2. If the count is more than 1 then I want to render script 1.
has answer: http://stackoverflow.com/a/25416380
has comment: http://stackoverflow.com/comment/39647879
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39647906
has comment: http://stackoverflow.com/comment/39647910
has answer: http://stackoverflow.com/a/25416415
score: 1
has answer: http://stackoverflow.com/a/25416359
has title: In an JavaScript If/else statement, how can I render a script tag based on the condition?
upvote count: 1
has comment: http://stackoverflow.com/comment/39648063
accepted answer: http://stackoverflow.com/a/25416380
type: Question
has comment: http://stackoverflow.com/comment/39648176
possible better answer: http://stackoverflow.com/a/25416359
tagged with: if-statement
tagged with: javascript
has comment: http://stackoverflow.com/comment/39647885
has comment: http://stackoverflow.com/comment/39648042
has comment: http://stackoverflow.com/comment/39648057
answer count: 3
has comment: http://stackoverflow.com/comment/39648121
downvote count: 0
linked to: http://stackoverflow.com/q/8085111
favorite count: 0

http://stackoverflow.com/q/25407042
possible better answer: http://stackoverflow.com/a/25407083
score: 1
has answer: http://stackoverflow.com/a/25407146
accepted answer: http://stackoverflow.com/a/25407146
answer count: 2
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39630209
favorite count: 0
has answer: http://stackoverflow.com/a/25407083
has title: Move content on window resize
has body: I am using the following jQuery to move content from the top of the main content column in mobile view to the top of the sidebar when in desktop view. if (ww &gt;= 768) { $( '#move-me' ).insertBefore($( '#top-widget' ) ); } Here's a fiddle: http://jsfiddle.net/richerimage/co6nw6va/1/ This works fine on page load, but I'd like the content to be able to move back and forth on window re-size Like all things, I guess this is easy if you know how! :) Any help is greatly appreciated With thanks Richard p.s. also, is there a way to move the content to the top of the #sidebar without the need to reference the #top-widget?
type: Question
tagged with: window-resize
type: AnsweredQuestion

http://stackoverflow.com/comment/39707816
type: AnswerComment
comment on: http://stackoverflow.com/a/25449027
type: Comment
has text: …and even `Store.save()` does return `undefined`.
score: 0

http://stackoverflow.com/comment/39739591
type: Comment
type: QuestionComment
score: 0
has text: @Pointy Yeah. That is the problems. The website only showing the top header content. The same content showing in my phone. But the site has many content to show. Can you tell me, How can I fix the problems?
comment on: http://stackoverflow.com/q/25465561

http://stackoverflow.com/a/44916154
downvote count: 0
answers question: http://stackoverflow.com/q/25438859
type: Answer
score: 1
upvote count: 1
has body: { camera: true } is missing from the example code. As previous answers mention, include tracking.track('#myVideo', colors, { camera: true });

tabs
tags question: http://stackoverflow.com/q/25502110
type: Tag
tags question: http://stackoverflow.com/q/25452944
tags question: http://stackoverflow.com/q/25543243
tags question: http://stackoverflow.com/q/25473393
tags question: http://stackoverflow.com/q/25457471
tags question: http://stackoverflow.com/q/25433299
tags question: http://stackoverflow.com/q/25446843
tag name: tabs
tags question: http://stackoverflow.com/q/25392223
tags question: http://stackoverflow.com/q/25401900

http://stackoverflow.com/comment/39742423
score: 0
type: Comment
type: QuestionComment
has text: For dynamically added items you must register the click event after you have created the element which is a pain. In such cases I prefer using an inline handler such as onclick="callFunction()".Most people are against the usage of inline event handlers. But for cases such as yours I prefer an inline handler
comment on: http://stackoverflow.com/q/25467261

http://stackoverflow.com/a/25502963
upvote count: 1
answers question: http://stackoverflow.com/q/25502883
has body: did you consider closing the .ready function properly?
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39808495
score: 1
has comment: http://stackoverflow.com/comment/39808771

http://stackoverflow.com/q/25424923
has comment: http://stackoverflow.com/comment/39663069
downvote count: 0
tagged with: global
has comment: http://stackoverflow.com/comment/39663285
favorite count: 0
score: 5
has body: Is to disable the global variable in the function that I want. I would make like Expenssion of Adobe After Effect example code : function privateFunction(){ return window; } then normally : result : Window Object but I want then : result : undefined What should I do? please help me I want blocking global variable access in function;
has answer: http://stackoverflow.com/a/25425082
has comment: http://stackoverflow.com/comment/39663146
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39662994
type: Question
possible better answer: http://stackoverflow.com/a/25425070
linked to: http://stackoverflow.com/q/12118971
answer count: 2
has answer: http://stackoverflow.com/a/25425070
accepted answer: http://stackoverflow.com/a/25425082
tagged with: function
upvote count: 5
tagged with: javascript
has title: JS: How can I prevent access to the global variables do?
linked to: http://stackoverflow.com/q/23177039

http://stackoverflow.com/comment/39659572
has text: Try to pass an object instead of primitive values since it could be a consequence of a directive creating a child scope.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25422312

http://stackoverflow.com/comment/105520094
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/45766458
score: 1
has text: I concurr. Great solution to use with eslint for dev and production mode. You shall not pass console.log! (staff and sword in hand)

http://stackoverflow.com/comment/39731572
score: 0
has text: @DaveNewton I know what the alert is supposed to do, what I would like to understand is **how** this 'break out of various quotes, tags, etc.' works, could you explain me it please, if you know it?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25461418

http://stackoverflow.com/a/25455022
type: Answer
answers question: http://stackoverflow.com/q/25454877
has body: Using JQuery, it may be easier if you changed a few things: Remove the onClick method from your select element Give your select element a unique id Use the Jquery syntax to get elements by id $("#elementId") Add a div or span to show your result The following is a working example: HTML Brock University Carleton University Centennial JQuery $(document).ready(function () { $("#locationSelect").change(function () { $("#displayText").html($(this).val()); }); }); Working Example You can see a working example on JsFiddle. Explanation $(document).ready() - The document is ready for manipulation $("#locationSelect").change - Handles the change event on an element with an id of locationSelect. $("#displayText").html - Gets or sets the html for an element with an id of displayText $(this).val() - The value of whatever element we are currently working on (in this case, the option that was selected) Resources JQuery Document Ready JQuery Change Jquery Html Jquery Val Follow-Up: You need an open and closing
has comment: http://stackoverflow.com/comment/39725330
has comment: http://stackoverflow.com/comment/39723820
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25454877

http://stackoverflow.com/comment/39770512
has text: hahah @JonDinham She is from Albania. Me too. https://www.youtube.com/watch?v=mMs_XJT6YFc
comment on: http://stackoverflow.com/q/25482395
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/a/25418486
answers question: http://stackoverflow.com/q/25416219
score: 0
type: Answer
has body: If you are not on a name-based virtual host environment you can just start your Node.js server and it will be available to the world from the defined port. But if the server IP address runs many services using different domain names and you want your Node.js server to reply only from http://example.com:8001 you can use e.g. the vhost module on your node server to listen to specific domain only: var express = require('express'), host = require('vhost'); var app = express(); app.get('/', function(req, res) { res.send("Hello from vhost"); }); var main = express(); main.use(vhost('example.com', app)); if (!module.parent) { main.listen(8001); } You can also proxy the requests through a web server like Apache or nginx, but to have the service responding from port 8001 you would need to bind the web server to port 8001 in addition to 80 you are already using, and run your Node.js server on some other port. Generally people prefer using the standard HTTP port and use a web server to reverse proxy traffic to the Node.js server running on a non-privileged port. As you already have the PHP application on your domain name you would then follow advice by @SamT and run your Node.js application from e.g. http://mynodeapp.example.com

http://stackoverflow.com/q/25440918
favorite count: 0
has comment: http://stackoverflow.com/comment/39692978
has comment: http://stackoverflow.com/comment/39692899
type: Question
has comment: http://stackoverflow.com/comment/39692902
answer count: 2
has comment: http://stackoverflow.com/comment/39692950
has answer: http://stackoverflow.com/a/25441098
upvote count: 7
tagged with: location-href
has comment: http://stackoverflow.com/comment/39693024
tagged with: cross-site
tagged with: fortify
linked to: http://stackoverflow.com/q/24078332
tagged with: javascript
type: UnansweredQuestion
has body: Here in my javascript function im using location.href as follows location.href = "../Floder1/result.jsp"; it is working fine but when i used fortify tool it is showing Cross-site Scripting which can result in the browser executing malicious code. how to protect this from cross site scripting. Thank you very much,your answer will be very much appreciated.
has comment: http://stackoverflow.com/comment/39693092
has comment: http://stackoverflow.com/comment/39693009
downvote count: 0
has title: how to protect location.href from cross site scripting in javascript?
score: 7
has answer: http://stackoverflow.com/a/65755962

http://stackoverflow.com/comment/39734942
type: Comment
type: QuestionComment
score: 2
has text: You have a typo in your code : functioin => function. It could not working because of that error.
comment on: http://stackoverflow.com/q/25463248

http://stackoverflow.com/a/25475518
answers question: http://stackoverflow.com/q/25473393
score: 0
has comment: http://stackoverflow.com/comment/39767145
has body: Try this out, i didnt test it. I also use getWeakReference so if your document is unloaded, it won't stay open in memory. var arrPages = []; //Open the tab newTabBrowser = gBrowser.getBrowserForTab(gBrowser.addTab(inURL)); newTabBrowser.addEventListener("DOMContentLoaded", DOMloadedFunction, true); // DOMContentLoaded eventhandler DOMloadedFunction: function(event) { // store the tab arrPages.push(Cu.getWeakReference(event.target)); } // Later the array is processed... oPage = arrPages.shift(); var contDoc = oPage.get(); if (contDoc) { //test if tab is still open contDoc &lt; --Do some stuff with DOM object. } // Now close the tab oPage.close() // this is what I want to do, but I can't figure out how var DOMWin = contDoc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShellTreeItem) .rootTreeItem .QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindow); if (DOMWin.gBrowser) { if (DOMWin.gBrowser.tabContainer) { DOMWin.gBrowser.removeTab(DOMWin.gBrowser.getTabForContentWindow(contDoc.defaultView)); } else { DOMWin.close(); //no tabs probably a popup window of some kind } } else { DOMWin.close(); //close window as its probably a popup window of some kind with no tabs }
type: Answer

http://stackoverflow.com/comment/39708401
has text: I assume you have the paths to the images loaded somewhere? Like in an array, or object, or something?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25449343

http://stackoverflow.com/q/25510781
answer count: 1
has comment: http://stackoverflow.com/comment/39823898
has comment: http://stackoverflow.com/comment/39823842
tagged with: javascript
type: UnansweredQuestion
has body: I'm using a simple "Roll The Dice" script. I'm running into some brick walls when trying to save the results of the roll. Is there any way for me to save the results of the dice roll? CSV is probably the easiest choice with the headers for the columns being "Date" "Name" "Result". I need this to run without any special server side stuff, its simply html stored on a shared network drive, I don't have full admin access to. Thanks for any advice! EDIT: Forgot to mention, I could potentially have the dice roll result added to a form and then the form data written to CSV. So maybe this could be simplified?
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/39823659
has comment: http://stackoverflow.com/comment/39823592
has comment: http://stackoverflow.com/comment/39823570
has comment: http://stackoverflow.com/comment/39823995
type: Question
has comment: http://stackoverflow.com/comment/39823715
has answer: http://stackoverflow.com/a/25511453
has title: Capturing data from a script
score: 0

http://stackoverflow.com/comment/39834118
comment on: http://stackoverflow.com/q/25516030
score: 0
has text: Sure http://jsfiddle.net/hwvvu2rg/ thanks
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25437843
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25437353
has comment: http://stackoverflow.com/comment/39687864
answers question: http://stackoverflow.com/q/25437353
has comment: http://stackoverflow.com/comment/39687677
upvote count: 2
type: AcceptedAnswer
has body: You are looking for the hashchange event. $(window).on("hashchange", function () { // inspect the hash and do your stuff });

http://stackoverflow.com/comment/39819550
has text: The click fills the data from the selected option into the form. Catching the event prevents the dropdown form closing. It's a bootstrap dropdown. The values are visible on the screen, but the problem is when the submit button is clicked: the form is posted to the server but the parameters ipAddress, and tcpPort that should be in the request, are not.
score: 0
comment on: http://stackoverflow.com/q/25507806
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25449507
upvote count: 1
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25449725
accepted answer: http://stackoverflow.com/a/25449725
has answer: http://stackoverflow.com/a/25449869
type: AnsweredQuestion
tagged with: jquery-ui
possible better answer: http://stackoverflow.com/a/25449869
type: Question
has title: Can't load AJAX content in jQuery dialog
answer count: 2
linked to: http://stackoverflow.com/q/25382590
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: jquery-ui-dialog
score: 0
has body: I got this dynamically created JQueryUI dialog from this thread that loads content via Ajax from . But I found there is an issue with the following code. Even though AJAX request is successfully made as shown in Console, the content isn't able to append to the dialog container. Can anyone find out what's problem with the load function at this line: dialog.load($(this).attr('href') + ' #content').dialog I have tried dialog.append($(this).data('source') + ' #content').dialog dialog.text($(this).data('source') + ' #content').dialog and they work. Code: var loading = $(' '); $(document).ready(function () { $(document).ready(function () { $('button').click(function () { $(this).next('.area').append('Click'); }); $(document).on('click', '.open_dia', function (evt) { var dialogid = 'dialog_'+$(this).attr('id'); var dialog = null; if ($('#'+dialogid.toString()).length == 0) { dialog = $(' ').append(loading.clone()); dialog.load($(this).attr('href') + ' #content').dialog({ title: $(this).attr('title'), width: 500, height: 300 }); } else { dialog = $('#'+dialogid.toString()); } dialog.dialog('open'); return false; }); });

http://stackoverflow.com/q/25447281
has title: How to Sort Gmail by sender?
tagged with: gmail
has body: I have sorted all emails in Gmail by sender with JavaScript using JQuery, XPath and TinySort function sort(){ $mails = jQuery(document).xpath("//tr[td/div/span[@email]]"); $mails.tsort("td.yX&gt;div.yW&gt;span",{attr:'email'}); } Now when I select an email, Gmail scrolls to the original location of that email. And if I shift select a few sorted emails, all emails between the original email locations get selected. I have tried debugging Gmail in both Chrome and Firefox but can not find the indexes.
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/78517115
has comment: http://stackoverflow.com/comment/39704379
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/138421327
tagged with: javascript
has comment: http://stackoverflow.com/comment/138403163
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39704893
favorite count: 0

http://stackoverflow.com/comment/39872799
type: Comment
type: QuestionComment
has text: When an the user changes via Authentication controller, you need to refresh the other controller? In reality you have a service which `StepsDataController` uses to fetch the current user information and both the controllers are on the same page at a time?
comment on: http://stackoverflow.com/q/25537321
score: 0

http://stackoverflow.com/comment/45081449
has text: This is a good question without a good answer. It should have more votes.
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/25510439
type: Comment

http://stackoverflow.com/q/25498116
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39799873
has comment: http://stackoverflow.com/comment/39800497
has comment: http://stackoverflow.com/comment/39799821
has answer: http://stackoverflow.com/a/25498436
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25498221
has body: the following code is working fine with any start time and end time but when i give the end time 12 am or 12 pm the following code not giving the correct output. var startTime = $("#txtStartTime").val(); eg. 7:00 PM var from = new Date("November 13, 2013 " + startTime); from = from.getTime(); eg. 1384349400000 var endTime = $("#txtEndTime").val(); eg. 12:00 AM or 12:00 PM var to = new Date("November 13, 2013 " + endTime); to = to.getTime(); eg. 1384281000000 if (from > to || from == to) { html += " Start-time must be smaller than End-time "; } for example : when i give start time 7:00 PM and end time 12:00 AM or 12:00 PM it shows me Start-time must be smaller than End-time. Can you please tell me how can i fix it. Thanks in advance.
type: Question
tagged with: javascript
has title: start date is less than end date?
tagged with: jquery

http://stackoverflow.com/comment/39606313
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25394005
has text: No luck. Would errors form the `fs.createWriteStream` bubble up to the `gz.on error`?
score: 0

http://stackoverflow.com/q/25520590
favorite count: 0
possible better answer: http://stackoverflow.com/a/25520628
tagged with: css
has body: I have a DIV which holds an and a to get a nice header. Below is a collapsibleset. Problem is that it has ui-corner-all class. If I remove the class I will no longer have rounded corners on my collapsibleset. Trying to add ui-corner-bottom instead but nothing happens. $("#mydiv ul").append( " " +" " +" Section 1 " +" I'm the collapsible content for section 1 " +" " +" " +" Section 2 " +" I'm the collapsible content for section 2 " +" " +" " +" Section 3 " +" I'm the collapsible content for section 3 " +" " +" " ).trigger("create"); // not working -> //$("#mydiv div").removeClass("ui-corner-all").addClass("ui-corner-bottom").trigger("create");
has title: jQuery Mobile remove top rounded corners
downvote count: 0
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25521891
accepted answer: http://stackoverflow.com/a/25521891
tagged with: jquery-ui
score: 1
has answer: http://stackoverflow.com/a/25520628
answer count: 2
upvote count: 1
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery

html5-canvas
tags question: http://stackoverflow.com/q/25541637
tags question: http://stackoverflow.com/q/25476612
tags question: http://stackoverflow.com/q/25459828
tags question: http://stackoverflow.com/q/25513459
tags question: http://stackoverflow.com/q/25442709
tags question: http://stackoverflow.com/q/25423324
tags question: http://stackoverflow.com/q/25548233
tags question: http://stackoverflow.com/q/25415704
tags question: http://stackoverflow.com/q/25484085
tag name: html5-canvas
tags question: http://stackoverflow.com/q/25505254
type: Tag
tags question: http://stackoverflow.com/q/25513485
tags question: http://stackoverflow.com/q/25528081
tags question: http://stackoverflow.com/q/25398991

http://stackoverflow.com/comment/39602628
has text: Not if that block comes after the point at which you're outputting it to the page.
type: Comment
comment on: http://stackoverflow.com/q/25390583
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39879433
has text: Thank you for replying, that's useful for me
comment on: http://stackoverflow.com/a/25539736
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25471104
has body: I'm making an AJAX call using URL as follows. http://somecomputer/Service.svc/Method?$filter=SomeDate gt DateTime'2014-08-24' This works perfectly and and the moment, I generate the string describing the date right before my AJAX call. However, I wonder if it's possible to match the date on dynamic values, such as today or lastyear or what not. I haven't found any documentation of that when googling so probably it's not possible but I still need to check with the wisdom of SO.
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has title: How to filter oData call using dynamic date?
possible better answer: http://stackoverflow.com/a/25471306
tagged with: javascript
has answer: http://stackoverflow.com/a/25471306
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25478634
accepted answer: http://stackoverflow.com/a/25478634
tagged with: jquery
tagged with: odata
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/25418862
favorite count: 0
has title: Javascript variable is undefined but it is defined
downvote count: 2
has comment: http://stackoverflow.com/comment/39652386
upvote count: 1
has answer: http://stackoverflow.com/a/25418936
accepted answer: http://stackoverflow.com/a/25418931
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39652422
score: -1
has body: I've this method in my global controller object of my JavaScript application. Now I get the error, that the statement self.texts.buttons.disabledFinishedJobs is undefined. But I don't understand that because the console.log() statement outputs the expected value. What can be the reason? toggleFinishedJobs: function() { var self = this; console.log(self.texts.buttons.disabledFinishedJobs[0]); if (this.disabledFinished) { $(".status_99").show(); this.disabledFinished = false; $("btn_finishedJobs").text(self.texts.buttons.disabledFinishedJobs[0]); } else { $(".status_99").hide(); this.disabledFinished = true; $("btn_finishedJobs").text(self.texts.buttons.disabledfinishedJobs[0]); } }
has comment: http://stackoverflow.com/comment/39652439
has answer: http://stackoverflow.com/a/25418931
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39652478
tagged with: javascript
has comment: http://stackoverflow.com/comment/39652385
possible better answer: http://stackoverflow.com/a/25418936

http://stackoverflow.com/comment/39876186
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25539477
has text: @Amadan: It can be really useful to "output" certain values into javascript variables or function calls or especially to decide whether or not to include certain chunks of js code based on things that must be evaluated on the server side. For example you may want to disable parts of an interface because the user doesn't have sufficient privileges.
score: 0

http://stackoverflow.com/comment/39744439
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25468386
type: AnswerComment
has text: Thankyou. both of your codes are working, i tried both.. But which one should i go for. I mean should i go for jquery or simple javascript??

http://stackoverflow.com/comment/39751671
comment on: http://stackoverflow.com/q/25472077
type: Comment
type: QuestionComment
has text: the code pasted here is not the one in the fiddle...
score: 0

http://stackoverflow.com/q/25420948
has comment: http://stackoverflow.com/comment/39656138
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25421273
linked to: http://stackoverflow.com/q/359494
has comment: http://stackoverflow.com/comment/39656283
tagged with: colors
has comment: http://stackoverflow.com/comment/39655943
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
has comment: http://stackoverflow.com/comment/39655998
favorite count: 0
possible better answer: http://stackoverflow.com/a/25421299
type: Question
has title: Js can read cookies but can't evaluate them
answer count: 2
has answer: http://stackoverflow.com/a/25421299
has body: I have made a webpage that asks user's that if they want to enable an effect, if they say yes then i store that "YES" as a cookie effect=true or if they don't want it then i also store it as effect=false cookie. The problem is listed as steps below: User visits a webpage (first time) He is alerted with document.cookie which is "". He Clicks OK Now value of saveedd is "", So according to my code the code below // Checkpoint 2 Should execute as value of saved is neither true nor false. But instead It executes only 1 line of code below // Checkpoint 1 , This should not happen as value of saveed is not false. What am I doing Wrong? Note : I have stripped some code, So if you find any mistakes like var not defined ,Please comment index.html My Second Page script.js function askk() { var saveedd = getCookie('effect'); alert(saveedd); if (saveedd == true) { changge(); alert('i wil change'); } else if (saveedd == false) { // Checkpoint 1 alert('i will not change'); } else { // Checkpoint 2 document.cookie = "effect=;expires=Wed; 01 Jan 1970"; var z = confirm("Enable Bgcolor Effect?"); if (z) { changge(); } setCookie("effect", z, 30); } } function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toGMTString(); document.cookie = cname + "=" + cvalue + "; " + expires; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1); if (c.indexOf(name) != -1) { return c.substring(name.length, c.length); } } return ""; } function checkCookie() { var user = getCookie("username"); if (user != "") { alert("Welcome again " + user); } else { user = prompt("Please enter your name:", ""); if (user != "" && user != null) { setCookie("username", user, 30); } } } function changge() { window.setInterval("Farbe()", 500); } farbe = 1; function Farbe() { if (farbe == 1) { docume…
has answer: http://stackoverflow.com/a/25421273
tagged with: cookies
upvote count: 1
tagged with: background

http://stackoverflow.com/comment/39919187
type: QuestionComment
comment on: http://stackoverflow.com/q/25541637
has text: @timelyportfolio I went through that, and what it does is change the entire line's style to dashed. My requirement is a bit different,have to put color gradients with percentage values.
score: 0
type: Comment

http://stackoverflow.com/a/25493390
has body: How about this? var mapcenter = new google.maps.LatLng(&lt;?= $coordinates ?&gt;); var map = new google.maps.Map(document.getElementById('map'), { zoom: 12, center: mapcenter }); var marker = new google.maps.Marker({ position: mapcenter, map: map }); google.maps.event.addListener(map,'center_changed', function() { marker.setPosition(map.getCenter()); });
answers question: http://stackoverflow.com/q/25493259
accepted answer of: http://stackoverflow.com/q/25493259
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/25493944
accepted answer of: http://stackoverflow.com/q/25493526
type: Answer
has body: Maybe you could try to use em in your body tag: &lt;body style='font-size: 0.2em'&gt; then all the font-size inside body tag would be small. JS Fiddle link: http://jsfiddle.net/nq0hdxae/
score: 0
answers question: http://stackoverflow.com/q/25493526
type: AcceptedAnswer

http://stackoverflow.com/q/25415703
has answer: http://stackoverflow.com/a/25415933
answer count: 1
tagged with: javascript
has body: In my Rails app I have modals that pop up sometimes containing photos. These photos have default dimensions of 600 x 600. What I need to do is reduce the height of the modal (div) and image when the viewport height decreases so the modal extend beyond the fold of the page. Here's the HTML: <%= image_tag Product.find(@product.id).photo.url(:large).sub('http://s3.amazonaws.com/anymarket/','http://anymarket.s3.amazonaws.com/') %> <a href="/products/<%= @product.id %>"><%= @product.name %> By <%= User.find(@product.user_id).first_name %> <%= User.find(@product.user_id).last_name %> And the CSS: #photo_preview { @extend #send_question_wrapper; z-index:1000; width:600px; background-color:white; border:1px solid #bbb; border-radius:3px; padding:5px; top:50px !important; img{ max-width:100%; height:auto; } #remove { float:right; color:#bbb; margin-bottom:5px; cursor:pointer; } } What do I need to do to accomplish what I want to do? I've tried setting the img height to auto but it didn't work.
has comment: http://stackoverflow.com/comment/39646848
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has title: Reduce height of image inside div as viewport height decreases?
tagged with: ruby-on-rails
type: Question
score: 0

http://stackoverflow.com/q/25455992
score: 0
has answer: http://stackoverflow.com/a/25456044
has comment: http://stackoverflow.com/comment/39721629
has title: visibility of a div not changing after clicking again
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: Hi so a i am trying to buttons and each button deals with the visibility of two side bars. Clicking on Color button will open Color Bar and clicking the theme button will open the Theme Bar. I am doing this by creating two Jquery click functions and adding Classes. HTML Part of two buttons Color Theme This is my CSS for Buttons and Bars .colorClicked { width:50%; border-top: 1px solid #818181; border-right: 1px solid #818181; border-left: 1px solid #818181; border-bottom: 0px solid #818181; height: 3em; text-align: center; font-size: 2em; font-family: 'Wire One', Gadget, sans-serif; cursor:pointer; } .colorOff { width:50%; border-bottom: 1px solid #818181; border-top: 0px solid #818181; border-right: 0px solid #818181; border-left: 0px solid #818181; height: 3em; text-align: center; font-size: 2em; font-family: 'Wire One', Gadget, sans-serif; cursor:pointer; } .themeClicked { width:50%; border-top: 1px solid #818181; border-right: 1px solid #818181; border-left: 1px solid #818181; border-bottom: 0px solid #818181; height: 3em; text-align: center; font-size: 2em; font-family: 'Wire One', Gadget, sans-serif; cursor:pointer; } .themeOff { width:50%; border-top: 0px solid #818181; border-right: 0px solid #818181; border-left: 0px solid #818181; border-bottom: 1px solid #818181; height: 3em; text-align: center; font-size: 2em; font-family: 'Wire One', Gadget, sans-serif; cursor:pointer; } CSS for Bars .colorTabOn { visibility:visible; } .colorTabHidden { position:absolute; width: 100%; visibility:hidden; } .themeTabOn { position:relative; width: 100%; visibility:visible; } .themeTabHidden { top: -31.5em; position:relative; width: 100%; visibility:hidden; } Jquery $('#theme').click(function(){ $('#colorTab').addClass('colorTabHidden', 500); $('#themeTab').addClass('themeTabOn', 500); $('#theme').addClass('themeClicked', 500); $('#color').addClass('colorOff', 500); }); $('#color').click(function(){ $('#colorTab').addClass('colorTabOn', 500); $('#themeTab').addClass('themeT…
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/39721606
type: Question
has comment: http://stackoverflow.com/comment/39721765
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39721654

http://stackoverflow.com/comment/39843240
type: QuestionComment
comment on: http://stackoverflow.com/q/25521466
has text: need this http://jsfiddle.net/6bo1rjrt/13/?
score: 0
type: Comment

http://stackoverflow.com/comment/39774768
type: AnswerComment
score: 0
type: Comment
has text: still doens't work. Can you please create me the fiddle for that?
comment on: http://stackoverflow.com/a/25484226

http://stackoverflow.com/comment/39828825
type: Comment
has text: Your answer worked but no totally because elements inside the `<p:outputPanel` can´t update the parents.
type: AnswerComment
comment on: http://stackoverflow.com/a/25506159
score: 0

http://stackoverflow.com/comment/39649418
comment on: http://stackoverflow.com/q/25417069
score: 0
type: Comment
type: QuestionComment
has text: I'm confused by the fiddle, exactly what is that trying to show?

http://stackoverflow.com/q/25476801
answer count: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39765854
score: 0
has comment: http://stackoverflow.com/comment/39760451
has title: Strange behavior with eval in javascript
has body: What I try to do is to "eval" the text included in a textarea. The related source code is the following: &lt;script&gt; function evaluate() { eval(txtarea.value); } &lt;/script&gt; &lt;textarea style="width:90%;" id="txtarea" rows="4" cols="40" /&gt;&lt;/textarea&gt; &lt;input type="button" value="Execute" onClick="evaluate()" style="width:120px;"&gt; This works in most cases, but not with the following snippet: unescape("alert%28%27ciao%21%27%29%3B") On the other hand, if I include this in the source code, it works without a problem: eval(unescape("alert%28%27ciao%21%27%29%3B")); Why does this happen? How can I fix it?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39761200
has comment: http://stackoverflow.com/comment/39760054

http://stackoverflow.com/comment/39741098
has text: If you look at the link in the OP, you'll see that there is no such original script to refer to. Apparently the poster assumed people would know what to do, but I for one didn't. I am trying to implement James' solution but still have questions for him as well. It's not easy being a newbie, but I appreciate the help!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25466196

http://stackoverflow.com/q/25504695
tagged with: google-chrome
tagged with: internet-explorer
downvote count: 0
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25504849
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/25505160
favorite count: 0
has body: I'm struggling with a simple SVG Image, where I try to update the color of two rectangles. In Chrome they get updated, In IE(10) the reactangles are just black! In my controller I'm setting the color via $scope.cvrColor=[random generated color code] I've made this simple sample to illustrate my problem: http://jsfiddle.net/mvg123/td7py264/ My Controller: function testController($scope, $timeout) { var test = updateSvg(); function updateSvg() { $scope.startColor = getRandomColor(); $scope.cvrColor = getRandomColor(); $timeout(updateSvg, 1000); }; function getRandomColor() { var number = Math.floor(Math.random() * 11); var color = ""; switch (true) { case (number &lt; 3): color = "#808000"; break; case (number &gt; 3 &amp;&amp; number &lt; 8): color = "#666666"; break; case (number &gt; 8 &amp;&amp; number &lt; 12): color = "#ff0000"; break; default: color = "#ffff00"; } return color; } } Any hints out there? /Best regards
has title: Angular SVG manipulation does'nt work in IE10
tagged with: http://stackoverflow.com/tag/svg
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/39828276
type: QuestionComment
comment on: http://stackoverflow.com/q/25513219
has text: Thank You! Jab, these JFiddles work in my browser too, but on my page it does not… I load the script on www.mydomain.com/index.php … The .text div appears in the site www.mydomain.com/index.php/about/ … could there be a problem?
score: 0
type: Comment

http://stackoverflow.com/q/25445455
score: 0
has answer: http://stackoverflow.com/a/25445598
answer count: 1
type: UnansweredQuestion
tagged with: safari
has title: Javascript not working in safari (online)
has body: It works fine offline and online on my IOS device, but not on desktop. It pushes a small image file down once user scrolls over 100% window height: &lt;script type="text/javascript"&gt; function update() { if ($(window).scrollTop() &gt; $(window).height()) { $('.logo-small').animate({ "top": '0px' }, 300); } else { $('.logo-small').animate({ "top": '-90px' }, 300); } } setInterval(update, 1000); &lt;/script&gt;
type: Question
tagged with: javascript

http://stackoverflow.com/a/25427426
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25427334
accepted answer of: http://stackoverflow.com/q/25427334
score: 1
has body: Javascript is a client-side language. This means that the page elements (collectively known as the DOM) are only altered after the page is loaded from the web server and rendered in your browser. Javascript can change these but can not save any data. In order to save data (persistence), you will need some type of data store. This is usually accomplished with a database running on a server. You will need to get your hands on one or possibly rent some storage space.
has comment: http://stackoverflow.com/comment/39667840

http://stackoverflow.com/comment/39722351
comment on: http://stackoverflow.com/q/25456039
score: 0
type: Comment
type: QuestionComment
has text: look at String(new C). to see the text of the output object. it's a lot like a new Sting("text"), but with your constructor instead of String as the constructor. I've only seen Strings do this, but it probably happens to Numbers as well.

http://stackoverflow.com/q/25508359
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/25508886
has title: Meteor: Change the class of link on click
has answer: http://stackoverflow.com/a/25512721
has body: Template: Home {{#if currentUser}} {{Meteor.userId}} {{else}} Login Sign Up {{/if}} About header.js Template.header.events({ 'click a': function(e) { e.preventDefault(); this.active?"active":""; } }); I just want to make set click link's class as active. Clicked link class should look like class="blog-nav-item active".
type: Question
type: AnsweredQuestion
answer count: 3
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25513954
accepted answer: http://stackoverflow.com/a/25513954
possible better answer: http://stackoverflow.com/a/25512721
favorite count: 0
tagged with: meteor

http://stackoverflow.com/a/25486763
score: 0
type: Answer
has body: Reading the documentation (https://github.com/dbpas/dbpasCarousel), it seems that paging your carousel items with bullets is not implemented, so you have to do it manually, or use another plugin (there are many jQuery carousel on the web, simple Google "jQuery carousel paging" for example)
answers question: http://stackoverflow.com/q/25486695

http://stackoverflow.com/a/25530915
score: -2
has comment: http://stackoverflow.com/comment/52197080
upvote count: 0
has body: Found One-Off Dynos, which allow: Running a console (also known as a REPL shell) to run arbitrary code or inspect the app’s models against the live database. (e.g. rails console, irb, or node) https://devcenter.heroku.com/articles/one-off-dynos#types-of-one-off-dynos I didn't have time to test, but this should let me run the built in node debugger.
type: Answer
answers question: http://stackoverflow.com/q/25494402
downvote count: 2

http://stackoverflow.com/q/25435387
tagged with: rest
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39683303
has title: Angular REST get using ngresource
answer count: 0
score: 0
tagged with: http://stackoverflow.com/tag/json
has body: I need to consume a Json WebService from angular. I wrote a web service in C# that implements a REST api and return json objects. Following this tutorial (http://www.masnun.com/2013/08/28/rest-access-in-angularjs-using-ngresource.html ) that implements exactly what I would perform: /* Controllers.js */ 'use strict'; var app = angular.module('my.controllers', []); app.controller( 'UserListCtrl', ['$scope', 'User', function myController($scope, $userFactory) { $scope.user= $userFactory.query({},{'Id':1}); }]); /* Service.js */ var service = angular.module('ngdemo.services', ["ngResource"]); // Booking Resource service.factory("User", function ($resource) { return $resource( "http://192.168.1.147:port/ServizioWeb/rest/user/:Id", { port : ':8002', Id: "@Id" }, { "update": {method: "PUT"}, "reviews": {'method': 'GET', 'params': {'reviews_only': "true"}, isArray: true} } ); }); Writing the url address in a browser the json get the expected results eg. *http://192.168.1.147:8002/ServizioWeb/rest/user/1* {"FirstName":"Leo","Id":1,"LastName":"Messi"} Attemping with angular i didn't receive any answer. Any help or hint is really appreciated!
has comment: http://stackoverflow.com/comment/39694156
type: Question
tagged with: c#
tagged with: javascript
has comment: http://stackoverflow.com/comment/39686540

http://stackoverflow.com/comment/39761525
comment on: http://stackoverflow.com/a/25477591
score: 0
type: AnswerComment
has text: Thanks, looks clean, this was what I meant with "A nice way", I wouldn't have come up with the problemcounter on my own. By the way, you missed one detail, I want to make sure that there's a "space" or "whitespace" in the infoName, is that possible? Also, how do I see if the user has selected one of the radio buttons?
type: Comment

http://stackoverflow.com/q/25506169
has comment: http://stackoverflow.com/comment/39814942
tagged with: javascript
has title: How can I get my search box tabs to remain active when clicking between them?
accepted answer: http://stackoverflow.com/a/25507230
has body: Here's a jsfiddle containing the search box code: http://jsfiddle.net/m1ym110r/ I'm trying to create a search box with tabs that become active when selected. My search boxes cycle through correctly as the tabs are clicked but the tab itself won't stay active to show that it's been selected. Any insight would be much appreciated as I've been stuck on this for a while now and can't figure out for the life of me why the tabs aren't remaining active every time I click one. Here is my code: HTML &lt;div id="widget"&gt; &lt;ul class="nav nav-tabs" id="tabs"&gt; &lt;li&gt;&lt;a href="#pubmed" onClick="expandcontent('sc1', this)"&gt;PubMed&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#databases" onClick="expandcontent('sc2', this)"&gt;Databases&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#uptodate" onClick="expandcontent('sc3', this)"&gt;UpToDate&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#ejournals" onClick="expandcontent('sc4', this)"&gt;E-Journals&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#ebooks" onClick="expandcontent('sc5', this)"&gt;E-Books&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#catalog" onClick="expandcontent('sc6', this)"&gt;Catalog&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#site" onClick="expandcontent('sc7', this)"&gt;Website&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;div class="tab-content"&gt; &lt;div class="tab-pane" id="sc1"&gt; &lt;div class="tab-content-inner"&gt; &lt;form action="http://www.ncbi.nlm.nih.gov/pubmed?holding=umiamilib_fft" class="SSCentralSearchSearchForm" name="searchForm" method="post" target="new"&gt; &lt;input name="SS_LibHash" value="FY6AF6XB5M" type="hidden" /&gt; &lt;input name="locale" value="en-us" type="hidden" /&gt; &lt;input name="action" value="start" type="hidden" /&gt; &lt;input name="dbIDList" value="NPM" type="hidden" /&gt; &lt;input style="width:75%" class="SSCentralSearchSearchCriteria" value="" name="term" type="text" size="40" maxlength="1000" placeholder="Search PubMed" /&gt; &lt;input class="SSCentralSearchSearchTe…
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39816028
has comment: http://stackoverflow.com/comment/39815435
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/39814757
has comment: http://stackoverflow.com/comment/39814927
has comment: http://stackoverflow.com/comment/39818555
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25507230
score: 1
upvote count: 3
type: Question

http://stackoverflow.com/q/25392326
has comment: http://stackoverflow.com/comment/39603501
tagged with: object
has comment: http://stackoverflow.com/comment/39603913
type: Question
has body: If I have a string like var s = someString; But I do NOT know the value of that string, since the program obtains it from external file, and I wanted to use that string to access an objects property, like: alert(obj.s) //or alert(obj[s]); How would I do that? The code I wrote doesn't work, the alerts are just empty (and I'm positive that s is NOT empty AND that there is a property with the same value as s). But when I try to access an object normally it works fine (using a property name I already know): alert(obj.name); //or alert(obj["name"]); So...any ideas? Thanks
tagged with: javascript
tagged with: string
score: 0
has comment: http://stackoverflow.com/comment/39603069
has comment: http://stackoverflow.com/comment/39602981
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39603012
has title: Javascript: Using a string to acces objects property

http://stackoverflow.com/comment/39693748
type: Comment
score: 0
has text: @Tesla After your comment, the slider, is it not working on IE only or other browsers as well?
type: QuestionComment
comment on: http://stackoverflow.com/q/25441259

http://stackoverflow.com/a/25539768
has body: Here's one way using trigonometry: Example code and a Demo: http://jsfiddle.net/m1erickson/7domgxf4/ // variables to define the circle and triangle var PI=Math.PI; var cx=150; var cy=150; var radius=100; var triLength1=35; var triLength2=18; var triSweep=PI*2/3; var rAngle=0; function triCircle(){ // calc triangle tip point (on circle's circumference); var x0=cx+radius*Math.cos(rAngle); var y0=cy+radius*Math.sin(rAngle); // calc outer side of triangle var tricx=cx+(radius+triLength1)*Math.cos(rAngle); var tricy=cy+(radius+triLength1)*Math.sin(rAngle); // calc remaining 2 triangle points var x1=tricx+(triLength2)*Math.cos(rAngle-PI/2); var y1=tricy+(triLength2)*Math.sin(rAngle-PI/2); var x2=tricx+(triLength2)*Math.cos(rAngle+PI/2); var y2=tricy+(triLength2)*Math.sin(rAngle+PI/2); // draw the circle and the triangle ctx.clearRect(0,0,canvas.width,canvas.height); ctx.beginPath(); ctx.arc(cx,cy,radius,0,Math.PI*2); ctx.closePath(); ctx.moveTo(x0,y0); ctx.lineTo(x1,y1); ctx.lineTo(x2,y2); ctx.closePath(); ctx.stroke(); } [ Addition ] You can calculate the angle of any point versus the centerpoint like this: var dx= s.x1 - centerX; var dy= s.y1 - centerY; rAngle= Math.atan2(dy,dx); triCircle();
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39975188
has comment: http://stackoverflow.com/comment/39914822
score: 1
has comment: http://stackoverflow.com/comment/39917635
has comment: http://stackoverflow.com/comment/39917248
answers question: http://stackoverflow.com/q/25538681
upvote count: 1
has comment: http://stackoverflow.com/comment/39898536

http://stackoverflow.com/a/25544011
has comment: http://stackoverflow.com/comment/39886827
has comment: http://stackoverflow.com/comment/39886690
has comment: http://stackoverflow.com/comment/39887824
has comment: http://stackoverflow.com/comment/39888248
has comment: http://stackoverflow.com/comment/39886883
has comment: http://stackoverflow.com/comment/39887558
has comment: http://stackoverflow.com/comment/39888131
score: 0
has comment: http://stackoverflow.com/comment/39887261
has comment: http://stackoverflow.com/comment/39889097
answers question: http://stackoverflow.com/q/25542793
has body: DEMO FIDDLE The easiest way i found was to create a 2D array and then traverse it in reverse. This was the case, as rowspan works by pushing itself down, and if you remove a matching element from below, you then have trouble matching to the element above it when more than 2 are on top of one another. There are assumptions that both your code and mine are making: There is no header table row (can be fixed by changing the initial processArray element assignment selectors No cells have colspan (if this is not the case, i will happily re-examine my code) JS var processArray = []; // make things easier to traverse in reverse by first creating a 2D array of the table $('#before tr').each(function(i){ var processRow = []; $(this).find('td').each(function(){ processRow.push($(this)); }); processArray.push(processRow); }); function computeDuplicates(){ // we are starting at the last row and working up to row 2 // we dont need to look at the first row, as we're looking at it from the row below for(var x = processArray.length - 1; x &gt; 0 ; x--){ for(var y = 0; y &lt; processArray[x].length; y++){ if(processArray[x][y].text() == processArray[x-1][y].text()){ //if the cell above has the same text as the current cell var currentRowSpan = processArray[x][y].attr('rowspan'); // get the current cell rowspan if(typeof currentRowSpan == "undefined"){ // no rowspan found on current cell currentRowSpan = 2; // set default of 2 }else{ currentRowSpan = parseInt(currentRowSpan, 10) + 1; // increase by 1 } // apply currentRowSpan to above cell and delete current cell processArray[x-1][y].attr('rowspan', currentRowSpan); processArray[x][y].remove(); } } } processArray = []; // remove from memory } computeDuplicates();
has comment: http://stackoverflow.com/comment/39887744
has comment: http://stackoverflow.com/comment/39886866
type: Answer
has comment: http://stackoverflow.com/comment/39886299
has comment: http://stackoverflow.com/comment/39888044
has comment: http://stackoverflow.com/comment/39888950
has comment: http://stackoverflow.com/comment/39885394
has comment: http://stackoverflow.com/comment/39888374
has comment: http://stackoverflow.com/comment/39887037
has comment: http://stackoverflow.com/comment/39886446
has comment: http://stackoverflow.com/comment/39886407
has comment: http://stackoverflow.com/comment/39886963

http://stackoverflow.com/comment/39815792
type: QuestionComment
comment on: http://stackoverflow.com/q/25505919
type: Comment
has text: I expected to every element that I created is already connected with url changed according to the index of the for loop, obviously wrong; I have to deepen the study of jquery
score: 0

http://stackoverflow.com/a/25458777
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25458217
has body: Please, first check what is Asp.net content negotiation: “the process of selecting the best representation for a given response when there are multiple representations available.” Most probably you get HTTP error 406 (Not Acceptable) because no formatter has been found for format that was specified in your request's headers (application/json). You can loop through all registered formatters (GlobalConfiguration.Configuration.Formatters) and check if there is formatter for application/json. register json formatter.

http://stackoverflow.com/comment/39769030
has text: I was attempting to use this: http://jsperf.com/counting-occurrences-of-a-specific-value-in-an-array
score: 0
comment on: http://stackoverflow.com/q/25481588
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39714701
comment on: http://stackoverflow.com/a/25447334
type: AnswerComment
score: 0
type: Comment
has text: actually i meant sections, not slides... anyway, i checked the callback page on github and now i trying something like this: `$(document).ready(function () { $('#fullpage').fullpage({ verticalCentered: true, anchors: ['Page1', 'Page2', 'Page3', 'Page4'], sectionsColor: ['#000000', '#1eacd7', '#e0382d', '#1eacd7'], afterRender: function () { //playing the video $('video').get(0).play(); }, afterLoad: function(Page2,2){ if(index == '2'){ $('video').get(0).play(); } } }); });`

http://stackoverflow.com/comment/39614635
has text: @Govan No. If it's external javascript, it should throw some sort of event. Use a directive and bind onto that event using `.on`
type: QuestionComment
comment on: http://stackoverflow.com/q/25398611
type: Comment
score: 0

http://stackoverflow.com/comment/50651917
score: 0
type: Comment
has text: i have posted a new question in this regard http://stackoverflow.com/questions/31312703/whenever-a-cors-http-request-fails-the-response-returned-is-always-0
comment on: http://stackoverflow.com/a/25506661
type: AnswerComment

http://stackoverflow.com/comment/39797093
type: QuestionComment
comment on: http://stackoverflow.com/q/25496531
has text: Do you know why you're using `&` or `=` in the scope definition object? If not, [find it out](https://docs.angularjs.org/api/ng/service/$compile).
score: 0
type: Comment

http://stackoverflow.com/comment/39637085
has text: @user1824508 I don't follow. You can check for the value of any textbox, anywhere. If you need to lock in the value, disable the appropriate textbox[es].
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25409785

http://stackoverflow.com/comment/39808495
score: 0
type: AnswerComment
has text: yes I have re checked that now too, I am using player.js as separate javascript file and slider.js as inline is this cause any problem?
type: Comment
comment on: http://stackoverflow.com/a/25502963

http://stackoverflow.com/q/25414922
type: Question
tagged with: java
tagged with: javascript
has body: I created a Jersey REST service with a Grizzly server. I do make ajax calls in my jquery and it works on localhost:9998 public static final URI BASE_URI = UriBuilder.fromUri("http://localhost/").port(9998).build(); public static void main(String[] args) throws IOException { SelectorThread threadSelector = startServer(); System.out.println(String.format("Jersey app started with WADL available at " + "%sapplication.wadl\nHit enter to stop it...", BASE_URI)); System.in.read(); threadSelector.stopEndpoint(); } 2 Questions: 1) How would I set the index.html (jquery) as the welcomepage so that when I go to localhost:9998/example/, the index.html would be displayed? (I'm using grizzly so no web.xml) 2) How would I make this visible outside of localhost?? Thanks!!!!! Any Help would be appreciated!
score: 0
tagged with: jquery
tagged with: rest
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39645800
answer count: 0
has title: Setting Jquery as the welcome pages for a Jersey REST service using Grizzly Server
has comment: http://stackoverflow.com/comment/39645553

http://stackoverflow.com/q/25456663
type: Question
accepted answer: http://stackoverflow.com/a/25456726
score: 5
has title: Use $(this) in an outside function
upvote count: 6
answer count: 6
has body: I'm new to JavaScript and I wonder why it's not working for me: function resetColor(){ $(this).css( { "color": "red" } ) } $('.class').click(function() { resetColor(); }); I also tried to save $(this) as a variable when clicking the .class, but that didn't work for me also.
has answer: http://stackoverflow.com/a/25456703
has answer: http://stackoverflow.com/a/25456709
downvote count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25456675
possible better answer: http://stackoverflow.com/a/25456686
has answer: http://stackoverflow.com/a/25456686
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25456720
has answer: http://stackoverflow.com/a/25456726
favorite count: 0

http://stackoverflow.com/q/25436489
tagged with: javascript
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25436560
has title: Ng-click Defined in Directive Not Firing
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39685399
has comment: http://stackoverflow.com/comment/39685273
type: Question
tagged with: angularjs-directive
has body: I'm trying to call a function that is defined inside of my directive's class from my directive's template. Consider the following template: &lt;div class="ef-jcrop"&gt; &lt;img src="placeholder" ng-attr-alt="{{image.ImageName}}" ng-src="{{image.url}}" /&gt; &lt;table&gt; &lt;tr class="ratio-selection"&gt; &lt;td class="ratio-item" ng-repeat="group in aspectRatioGroups"&gt; &lt;img ng-src="image.url" class='ratioSelector' ng-click="selectCrop(group)" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; The problem is the ng-click which calls selectCrop(), defined in the class for my directive. module MyProject.Directives { export interface IEfJcropScope extends ng.IScope { image: MyProject.Image; aspectRatioGroups: _.Dictionary&lt;ImageProductDimension[]&gt;; } export class EfJcrop implements ng.IDirective { restrict = "E"; templateUrl = TEMPLATES + 'ef-jcrop.html'; replace = true; transclude = true; scope = { image: "=" } link = (scope: IEfJcropScope, elem, attrs) =&gt; {} controller = ($scope: IEfJcropScope) =&gt; {} selectCrop = (group: ImageProductDimension[]) =&gt; { . //my function is defined here } } } angular.module("mymodule").directive("efJcrop", () =&gt; new MyProject.Directives.EfJcrop()); This is TypeScript, for those unfamiliar. Most of it is very similar to JavaScript, though, as I translated it from JS. For some reason, selectCrop never fires. Is there a reason for this that I'm missing?
score: 0
has answer: http://stackoverflow.com/a/25436560
answer count: 1

http://stackoverflow.com/comment/39621135
type: Comment
has text: And you don't need `$.when()`. `$('.mydiv').heartbeat().done(...)` will do the job. (Note - I changed the 'H' to lower case). [Updated fiddle](http://jsfiddle.net/2q933p0s/2/).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25397471

http://stackoverflow.com/comment/39887205
type: QuestionComment
has text: Thanks Brock, I distilled the question down.
type: Comment
comment on: http://stackoverflow.com/q/25532475
score: 0

http://stackoverflow.com/a/25494274
accepted answer of: http://stackoverflow.com/q/25494222
has comment: http://stackoverflow.com/comment/39792974
answers question: http://stackoverflow.com/q/25494222
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: jQuery('#myDIV tr:not(:has(input:checkbox))') JSFiddle: http://jsfiddle.net/TrueBlueAussie/e40tbx6p/ :not :has

dojo.gridx
tags question: http://stackoverflow.com/q/25454611
tag name: dojo.gridx
type: Tag
tags question: http://stackoverflow.com/q/25413067

http://stackoverflow.com/a/25529513
type: Answer
answers question: http://stackoverflow.com/q/25528760
has body: Using console.log(results[0].location) for debugging I get response as Object { k: 27.73574, B: 85.33218 } then I was able to get lat and lng value using results[0].location.k results[0].location.b Don't know how was this possible but it works.
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/25528760

http://stackoverflow.com/comment/39603779
comment on: http://stackoverflow.com/q/25392705
has text: Just to clarify, the issue is that your input doesn't still have the search term when you go back to the page?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25460355
score: 5
answers question: http://stackoverflow.com/q/25460249
upvote count: 5
type: Answer
downvote count: 0
has body: It is possible to wrap the ternary operator inside the void operator like this: void(cond ? expr1 : expr2); This achieves the desired result and passes JSHint. See JSFiddle and click JSHint button. However, I recommend the following syntax: if (cond) { expr1; } else { expr2; } Because it is more readable. Just because JavaScript lets you do strange things does not mean that you should.

http://stackoverflow.com/q/25528606
has comment: http://stackoverflow.com/comment/39856397
type: UnansweredQuestion
has title: JQuery Datatables - Search - Remove Dom Element
type: Question
has comment: http://stackoverflow.com/comment/39857056
tagged with: javascript
has body: I have jquery datable with pagination and search active. The first column hold a checkbox, from a list of items. Some of these items are already checked (coming from database) When I do the search, the jQDatatables, remove the dom elements and some of 'checked' itens are not showing Ok until here. The problem is, when I submit the form with checked values and filter is 'active', the others checked values are not sending to post. - because they are not on dom table- only the filtered. There is a way to jqDt, not remove the dom element when filtering, just put a 'hidden' class on tr element? Regards
score: 0
has answer: http://stackoverflow.com/a/29971380
tagged with: datatables
answer count: 1
has comment: http://stackoverflow.com/comment/39856260
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39677387
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25431635
has text: A negative already? tough crowd...
score: 0

http://stackoverflow.com/q/25432061
has title: regex in JS for no letters and identical chars
has answer: http://stackoverflow.com/a/25432318
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25432100
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39677136
has comment: http://stackoverflow.com/comment/39676947
tagged with: regex
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39677063
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39677005
has body: got a problem with two regular expressions in javascript. I need one expression that matches, when my string contains no a-zA-Z. Like 12345. Stuff like \W\S or [^a-zA-Z] is not working, cause it matches 123a etc. Getting crazy with that one. The other expression is the matching of two identical letters like the 'ss' in password. (.)\1 is not working with javascript. In c# no problem. What am I doing wrong with that one? Made a section in my web.config which defines password-rules and in my code (c#, asp.net 3.5) I am reading the rules to create javascript for the client. Thanks for help
possible better answer: http://stackoverflow.com/a/25432318
tagged with: javascript
has answer: http://stackoverflow.com/a/25432100

http://stackoverflow.com/a/25484183
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25453432
has body: As commented ImageField doesn't actually store images in database, it has links to images in filesystem and generates proper url to image for it's use in templates. You can get random image using rImage = Images.objects.order_by('?')[0] but keep in mind that it can be expensive and slow operation depending on database backend you're using (e.g. mysql). Then you can pass image object to template and use {{rImage.image_field.url}} (image field handles url generation for you, just set proper values in your project settings)
upvote count: 2
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25453432
score: 2

http://stackoverflow.com/q/25507365
has title: Javascript get integer value of url parameter to replace it in function
type: Question
has answer: http://stackoverflow.com/a/25507495
answer count: 2
tagged with: javascript
tagged with: regex
accepted answer: http://stackoverflow.com/a/25507495
possible better answer: http://stackoverflow.com/a/25507462
has body: I have some difficulties with javascript. I'm currently working out a pagination skipper. function skip(s) { var url = window.location.toString(); if(location.href.match(/(\?|&amp;)currentpage=x($|&amp;|=)/)) { url=url.replace('currentpage=x','currentpage='+s); window.location=url; } else { var newUrl = url+"&amp;currentpage="+s; window.location=newUrl; } } I would like x to match any integer, so the entire string will be replaced. Thanks!
has answer: http://stackoverflow.com/a/25507462
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39817175
score: 0

http://stackoverflow.com/comment/39810137
has text: you have used `$("#menu1").click` in your code. So, I need to create this for all menu items?
comment on: http://stackoverflow.com/a/25502726
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25389878
has body: Use this.parent $(".b").click(function () { var b=$(this).parent().text(); alert(b); }); http://jsfiddle.net/4n6ou0ka/3/
answers question: http://stackoverflow.com/q/25389816
score: 0
type: Answer

http://stackoverflow.com/q/25430928
has comment: http://stackoverflow.com/comment/39674766
tagged with: javascript
has comment: http://stackoverflow.com/comment/39674906
score: 0
has title: Javascript querySelector or getElementById
has comment: http://stackoverflow.com/comment/39674923
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39675016
linked to: http://stackoverflow.com/q/14377590
has comment: http://stackoverflow.com/comment/39675007
has comment: http://stackoverflow.com/comment/39675040
duplicate of: http://stackoverflow.com/q/14377590
type: Question
has body: I was wondering if there's a difference between the 2 options, knowing all my div's are with id's? I took them all with querySelector... is it better to change to getElementById or is it equivalent? document.querySelector("#div").value; OR document.getElementById("div").value;
has comment: http://stackoverflow.com/comment/39676910

http://stackoverflow.com/comment/39726902
type: Comment
has text: Edited answer accordingly
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25411083

http://stackoverflow.com/comment/39866463
score: 0
has text: still it turns it into a gif which makes the thumbnail basically unexistent. (I've added it to the main question)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25534409

http://stackoverflow.com/comment/39844480
score: 0
has text: @blackn1ght..no any errors are shown
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25522271

http://stackoverflow.com/a/25472736
has body: Here's an example function: http://jsfiddle.net/tto8ymqa/2/ js var domOrder, visualOrder; $(function() { domOrder = $(".box").find("DIV"); getVisualOrder(); }) function getVisualOrder() { visualOrder = domOrder.sort(function(a,b) { return $(a).offset().left-$(b).offset().left; }); console.log(visualOrder); } good luck!
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25472630
has comment: http://stackoverflow.com/comment/39753935
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/39765610

http://stackoverflow.com/comment/39871501
type: QuestionComment
comment on: http://stackoverflow.com/q/25536926
has text: There is no `$(document).on('click')` in your quoted code.
score: 0
type: Comment

http://stackoverflow.com/comment/39877112
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25537655
type: Comment
has text: I have no idea about your second question, Josh. But you are correct about the first one. Maybe I should have provided a screenshot of the actual webpage. There are 4 fields and each field has to have 4 numbers in it (the last one can have 4 or 5 numbers in it). The numbers can be zero. This set up is working unless I try to put all zeros in any of the fields. I am no programmer, but what I think is happening is when I put all zeros the value of that field is now less than 1. Hence the error. If I put 0001, then no error. So if I change `.val() < 1` to `.val() < -1` then there is no error.

http://stackoverflow.com/q/25399416
downvote count: 0
tagged with: jquery
favorite count: 0
has title: shifting all child divs inside a parent div when a child div is destroyed
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25399920
score: 1
upvote count: 1
type: Question
has body: I created this jsbin : http://jsbin.com/qoriqihapara/1/edit as you can see i have two problems i don't know how to solve if you opened the first chat window then the second and you close the first,then open again the first ,you see the two chat windows are overlapped and that because the calculation of right is not perfect when closing a chat window that is not the first or the last ( considering having multiple chat window opened ), is there any method wish can shift all the chat window to the right ??? code : var right = 10; var rightPadding = 10; function CreateDiv(id) { var ToAppend = " " + " " + " " + " close window " + " " + " " + " " + id + "... " + " text here... " + " "; right = right + (280 + rightPadding); // 280 is the width of the chat window $("#chat_div_container").append(ToAppend); } function closeChatwnd(id) { $("#" + id).remove(); right = right - (280 + rightPadding); }
tagged with: javascript
has answer: http://stackoverflow.com/a/25399920
answer count: 1

http://stackoverflow.com/q/25391715
has comment: http://stackoverflow.com/comment/39603308
has title: JavaScript block CSS
has comment: http://stackoverflow.com/comment/39601801
type: Question
has answer: http://stackoverflow.com/a/25395535
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25462642
tagged with: javascript
tagged with: firefox-addon
has comment: http://stackoverflow.com/comment/39601764
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39601950
has body: I have a .js file which blocks all CSS Code quite well when used with GreaseMonkey, but I also need it to run as .xpi (Firefox Extension) and it doesn't to work that well. I have tried many things, and now I'm trying to debug it with the Firefox Extension Builder SDK so I get all the error messages. Here is the error message I get: console.error: css3blocker: Message: ReferenceError: document is not defined and here is the .js Code: [].slice.call(document.styleSheets) .forEach(function (sheet) { try { [].slice.call(sheet.cssRules) .forEach(function (rule) { if (rule.media) { rule.media.mediaText = ''; } }); } catch (err) { console.log(err); } }); What does that error mean?

http://stackoverflow.com/comment/39849473
comment on: http://stackoverflow.com/a/25525095
type: Comment
has text: thank you, why was the toggle event depreciated. It seemed useful!
score: 0
type: AnswerComment

http://stackoverflow.com/a/25461646
answers question: http://stackoverflow.com/q/25442929
type: Answer
has body: this.copy() just copies the file, you should instead use this.template() to parse it: this.template("_Gruntfile.js", "Gruntfile.js");
has comment: http://stackoverflow.com/comment/39895509
score: 1
has comment: http://stackoverflow.com/comment/39764884
upvote count: 1
has comment: http://stackoverflow.com/comment/39808530
has comment: http://stackoverflow.com/comment/39895311
has comment: http://stackoverflow.com/comment/39793414
accepted answer of: http://stackoverflow.com/q/25442929
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39787043
has comment: http://stackoverflow.com/comment/39767774

http://stackoverflow.com/comment/39790067
type: Comment
has text: I think you are intended to use `chart.events.drilldown` to get this info.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25489518

http://stackoverflow.com/q/25530837
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39860925
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25531134
type: Question
has answer: http://stackoverflow.com/a/25531089
has answer: http://stackoverflow.com/a/25531653
has comment: http://stackoverflow.com/comment/39860029
has comment: http://stackoverflow.com/comment/39860268
has body: I have the following example url: #/reports/12/expense/11. I need to get the id just after the reports -> 12. What I am asking here is the most suitable way to do this. I can search for reports in the url and get the content just after that ... but what if in some moment I decide to change the url, I will have to change my algorythm. What do You think is the best way here. Some code examples will be also very helpfull.
score: 0
has comment: http://stackoverflow.com/comment/39860835
possible better answer: http://stackoverflow.com/a/25530921
has answer: http://stackoverflow.com/a/25530921
has title: Get id from url
has answer: http://stackoverflow.com/a/25531134
has comment: http://stackoverflow.com/comment/39860215
answer count: 4

http://stackoverflow.com/a/25432989
downvote count: 0
has body: By default the value binding updates the underlying observable on the change event which usually happen when you leave the textbox, that is why your code is not working when clicking on the checkbox while still focused on the textbox. You can change this behavior with the valueUpdate option: setting it to afterkeydown will update your observable as the user types in something to the textbox: &lt;input type="text" data-bind="value: number, valueUpdate: 'afterkeydown'" /&gt; However in itself it won't fix your code because your current updatedFromUser usage is not always working correctly. I would use a writable computed for the all property: self.number = ko.observable(5); self.all = ko.computed({ read: function () { return self.number() === ''; }, write: function (checked) { if (checked) { self.number(''); } else { self.number(0); } } }); Demo JSFiddle. In this case KO will handle the subscriptions for you and there is no dependency circle because only all depends on number.
accepted answer of: http://stackoverflow.com/q/25432442
has comment: http://stackoverflow.com/comment/39681909
has comment: http://stackoverflow.com/comment/39681703
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39681264
type: Answer
has comment: http://stackoverflow.com/comment/39679261
answers question: http://stackoverflow.com/q/25432442
score: 2

http://stackoverflow.com/comment/39635957
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25410021
has text: that is such a broad question, you need to give us more, contents of the dist folder, is the service up and running?

http://stackoverflow.com/comment/39700130
has text: No needed, the OP can store the value in a `js` variable
comment on: http://stackoverflow.com/a/25444999
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25391838
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25391705
answers question: http://stackoverflow.com/q/25391705
upvote count: 1
type: AcceptedAnswer
has body: Or simply use only one class and the snippet below $('#msaRegion').click(function () { $(".state-link").addClass('disableClass'); }); $('#ctyRegion').click(function () { $(".state-link").removeClass('disableClass'); }); jsFiddle

http://stackoverflow.com/q/25458083
answer count: 1
has title: Coffescript parseInt shortcut?
type: AnsweredQuestion
tagged with: coffeescript
type: Question
has answer: http://stackoverflow.com/a/25458114
accepted answer: http://stackoverflow.com/a/25458114
tagged with: javascript
has comment: http://stackoverflow.com/comment/39725518
tagged with: type-conversion
score: 0
tagged with: shortcut
has body: In javascript I can do something similar to this 1 === +'1' #true in coffeescript since everything is strictly checked how can I do something similar as a shortcut? I know 1 is parseInt("1") is possible but it's much more verbose.

http://stackoverflow.com/a/25432865
has body: You can use the jQuery .after function: $("table:visible").each(function() { $(this).find("tr").each(function(){ var row=' val '; $(this).after(row); // Insert row after this row }); }); Here's a jsFiddle: http://jsfiddle.net/g326b1ws/
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25432767
score: 1

http://stackoverflow.com/comment/39843053
type: Comment
score: 0
type: AnswerComment
has text: Yes, after testing it in the jsfiddle, it seems to be working. But still I can't find out why in my code, it is not including the data. Maybe I have some errors in my original code.
comment on: http://stackoverflow.com/a/25520779

http://stackoverflow.com/q/25526705
tagged with: node.js
possible better answer: http://stackoverflow.com/a/25526760
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25526778
accepted answer: http://stackoverflow.com/a/25526778
type: Question
tagged with: try-catch
answer count: 2
upvote count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25526760
has body: I am wondering which approach is better for error handling and debugging in JavaScript for nodeJS? Having a pure try/catch block: try { dangerous.function(); } catch(error); { console.log(error); } or Just using a function as a parameter, which will display if any errors occur dangerous.function(function(error) { console.log(error); }); I am raising this question because I read that try/throw has a potential of logging too much stack trace data as written here: http://nodejs.org/api/domain.html#domain_warning_don_t_ignore_errors
has title: JavaScript: Try/Catch vs error function passed as a parameter
has comment: http://stackoverflow.com/comment/39852179
tagged with: error-handling
tagged with: conceptual

http://stackoverflow.com/comment/39839144
comment on: http://stackoverflow.com/q/25519090
score: 0
has text: @Amadan Tell me what is wrong with `eval`.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39877038
type: QuestionComment
has text: please look at update..
comment on: http://stackoverflow.com/q/25539755
score: 0
type: Comment

http://stackoverflow.com/comment/39897029
comment on: http://stackoverflow.com/a/25549379
type: Comment
score: 0
type: AnswerComment
has text: but don't I already do that in my first curl request? is that code not for setting the cookie?

http://stackoverflow.com/q/25395252
has body: When I open this in the browser and type in my choice, It only tells me the computer's choice when it should tell mine, the computer's and the end result. I think it has something to do with my tag, but I'm not sure.
has title: Why is this only giving me the computer's output?
accepted answer: http://stackoverflow.com/a/25395311
has comment: http://stackoverflow.com/comment/39608778
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39608862
type: Question
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25395311
linked to: http://stackoverflow.com/q/22623331

http://stackoverflow.com/comment/66390863
type: Comment
score: 6
type: AnswerComment
comment on: http://stackoverflow.com/a/25448337
has text: But this is not using angular way. However, it works. So probably the question now is how to make it as close as possible to angular. I mean, how you can select all related elements from a controller or directive?

http://stackoverflow.com/comment/39816754
has text: Well, 5 minutes of debugging, and I got it to work... I had an extra jQuery close, and some misuse of $(this).position()... this will work for you now.
score: 0
comment on: http://stackoverflow.com/a/25505937
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25505049
has answer: http://stackoverflow.com/a/25505315
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25505315
has comment: http://stackoverflow.com/comment/39812409
answer count: 1
tagged with: jquery
has body: I have an HTML page (Lets call this Parent Page), from where a new Pop-Up (Child Page) can be opened by clicking on a link. But I am in situation to set the Parent page's javascript variable by using the javascript processing on this pop-up page. I tried using window.opener but it results into error Uncaught TypeError: Cannot set property 'parent_page_var' of null I can also use jQuery if the it provides resolution, but I'll prefer Javascript. PS: Everything is there on same domain, so there is no CORS thing required. I just want a simple solution Here is the code for window.opener: window.opener.parent_page_var = pop_up_variable_value;
has comment: http://stackoverflow.com/comment/39812320
tagged with: http://stackoverflow.com/tag/html
has title: Setting javascript variable value from Pop-Up window to the parent using window.opener or something else
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39813896
has comment: http://stackoverflow.com/comment/39812331

http://stackoverflow.com/q/25442709
has body: Let's say I have a path: var context = canvas.getContext('2d'); context.beginPath(); context.moveTo(100, 20); context.lineTo(200, 160); context.quadraticCurveTo(230, 200, 250, 120); context.bezierCurveTo(290, -40, 300, 200, 400, 150); context.lineTo(500, 90); context.lineWidth = 5; context.strokeStyle = 'blue'; context.stroke(); This prints the path all at once: How can I split the path into subpaths of given length? For example: context.splitCurrentPathIntoSubPath(0, 0.75) should return only the first 3/4 of the path. I would like to use this to realise an animation. If there is an easier method, it is also welcome.
type: Question
tagged with: canvas
downvote count: 0
accepted answer: http://stackoverflow.com/a/25446101
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25451821
has answer: http://stackoverflow.com/a/25451821
answer count: 3
has answer: http://stackoverflow.com/a/25444334
tagged with: html5-canvas
favorite count: 0
has title: Draw HTML5/Javascript Canvas Path in Time
linked to: http://stackoverflow.com/q/17099776
has answer: http://stackoverflow.com/a/25446101
type: AnsweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/a/27954487
has comment: http://stackoverflow.com/comment/62893202
answers question: http://stackoverflow.com/q/25395427
has comment: http://stackoverflow.com/comment/63358013
upvote count: 11
has body: Be carreful, there is a mistake in "validated" comment. autocompleteInput.select2('data', {id:103, label:'ENABLED_FROM_JS'}); The correct way is autocompleteInput.select2('data', {id:103, text:'ENABLED_FROM_JS'}); Use text instead of label
type: Answer
score: 11
downvote count: 0

http://stackoverflow.com/q/25398269
type: Question
has comment: http://stackoverflow.com/comment/39614123
tagged with: javascript
answer count: 1
favorite count: 0
score: -3
accepted answer: http://stackoverflow.com/a/25398475
has body: I have the following Problem, I want to call a function b like I call the function a. Here is the example: $('#clickme').click(function () { console.log("abc"); }); function a() { console.log("a"); } function b(b) { console.log(b); } $('#clickmea').click(a); // how to call this method without using a anonymous function? $('#clickmeb').click(b("ab")); Or is it not possible to call b("ab") without using a anonymous function? JSBin exmaple
has comment: http://stackoverflow.com/comment/39613943
type: AnsweredQuestion
upvote count: 0
has title: How can I call a function with parameters without using an anonymous function?
has answer: http://stackoverflow.com/a/25398475
downvote count: 3

http://stackoverflow.com/q/25406239
has comment: http://stackoverflow.com/comment/39635532
has title: How to execute Javascript in dynamically loaded HTML
has comment: http://stackoverflow.com/comment/39634158
has comment: http://stackoverflow.com/comment/39630828
answer count: 2
linked to: http://stackoverflow.com/q/8366454
has comment: http://stackoverflow.com/comment/39639849
has comment: http://stackoverflow.com/comment/39632066
has comment: http://stackoverflow.com/comment/39632426
has answer: http://stackoverflow.com/a/25406327
tagged with: javascript
has answer: http://stackoverflow.com/a/25406442
has comment: http://stackoverflow.com/comment/39633930
score: 0
has comment: http://stackoverflow.com/comment/39636602
has body: I have a webpage in which I dynamically change the HTML in the contentEditor div, depending on what topic the user picks in the navigation menu. The HTML in this contentEditor div gets loaded from external scripts: function updateContentEditor() { var window = document.getElementById('contentEditor'); if(editingPage == "Homepagina") { $("#contentEditor").load("http://www.imaginedigital.nl/CMS/Editor/Homepage9.html"); new jscolor.color($line.find('input[name=color]')[0], {}); } /* and so on... */ } Now this works perfectly fine, the correct html gets loaded for every page. I do have a problem with Javascript though.. One of the textfields in the script that I have should be a color picker: The color picker works perfectly when I load the page itself in my browser, but when I load this page in my contentEditor div, it does not get loaded: The color picker is an external Javascript (downloaded from: http://jscolor.com/download.php). I already tried loading it in both the main page as the editor page (editor is the one I load inside the main page), but that won't solve the problem either. Question How do I make sure my Javascript gets executed when I load a page containing that script inside another HTML page's div? PLEASE NOTE I do have other javascript in the editor that I load inside my main page. that is javascript that shows a pop up div. that works without any problem. Any help would be highly appreciated!
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39637113
tagged with: css
linked to: http://stackoverflow.com/q/538745
has comment: http://stackoverflow.com/comment/39632318
tagged with: dynamic
has comment: http://stackoverflow.com/comment/39629408
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39640643
has comment: http://stackoverflow.com/comment/39635597
has comment: http://stackoverflow.com/comment/39632231
tagged with: php
has comment: http://stackoverflow.com/comment/39635997
has comment: http://stackoverflow.com/comment/39630257
type: Question
linked to: http://stackoverflow.com/q/18323757
has comment: http://stackoverflow.com/comment/39629506
has comment: http://stackoverflow.com/comment/39628854
has comment: http://stackoverflow.com/comment/39637186

http://stackoverflow.com/a/25451509
has comment: http://stackoverflow.com/comment/39784078
accepted answer of: http://stackoverflow.com/q/25451418
type: Answer
score: 2
downvote count: 0
upvote count: 2
has body: No, there's no difference, but many people would put parentheses around the function declaration because it would be incorrect javascript syntax if you omitted the variable declaration: function () { // javascript parser gives an error here var open = function () { } return { open: open }; }(); (function () { var open = function () { }; return { open: open }; })(); // this works just fine. So out of habit, I'd probably use parentheses. That way other devs don't have to scratch their heads and wonder "is that allowed?"
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25451418

http://stackoverflow.com/q/25480659
answer count: 1
accepted answer: http://stackoverflow.com/a/25481486
tagged with: jquery
has comment: http://stackoverflow.com/comment/39767297
has title: Dropdown language keys available via keyboard
has comment: http://stackoverflow.com/comment/39767428
has body: I have the following dropdown that opens when the mouse hovers it: Now is it possible to open the same dropdown when the user highlights it via the tab key. I've tried learning from this: Selecting div in custom dropdown using Keyboard (Up, down and enter keys) But this not seems to be working. Thanks to anyone who can help! HTML: EN FR NL JS: $(document).ready(function () { /* ============================================================================= PORTAL NAV -> highlight clicked element + show/hide and equalize heights of Main Nav level 2 ========================================================================== */ $('header nav#nav > ul li a h3, header nav#nav-mystib > ul li a h3').click(function(e) { e.stopImmediatePropagation(); //alert($(this).html()) if(e.target != this) return; //hide choose_language box $('.choose_language').children('ul').hide(); //hide every context box except clicked one $('.context_box').not($(this).parent().parent().children('.context_box')).fadeOut(100); //hide more_info box and .my_space box if open $('.my_space .more_info_box, .my_space .opened').hide(); //show/hide THIS context box $(this).parent().parent().children('.context_box').fadeToggle(0); //set level2 columns at same height $(this).parent().parent().children('.context_box').children(".level2_links").children(".col:lt(5)").equalHeights(); $(this).parent().parent().children('.context_box').children(".level2_links").children(".col:gt(4)").equalHeights(); //reset the selected item $('#nav_item li').removeClass('selected'); //select the current item $(this).parent().parent().addClass('selected'); }); /* ============================================================================= NAV -> highlight clicked element ========================================================================== */ $('header nav#nav-mystib > ul li a h3').click(function() { //reset the selected item $('#nav-mystib_item li').removeClass('selected'); //select the current item $(this).parent().parent().a…
tagged with: http://stackoverflow.com/tag/html
tagged with: user-friendly
has answer: http://stackoverflow.com/a/25481486
type: Question
type: AnsweredQuestion
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39893081
comment on: http://stackoverflow.com/q/25548976
score: 3
has text: As always... stop using `mysql_*`. The extension is dated and, more importantly, ***deprecated***. Switch to `PDO` or `mysqli_*` instead (note the `i`, which stands for _improved_).
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25667688
score: 0
has body: You can directly make a field as required in Visualforce using required attribute to a specific component &lt;apex:inputField value="{!Account.Name}" required="true"/&gt; To make a field required using Javascript in VisualForce page please &lt;apex:page StandardController="Account"&gt; &lt;script&gt; function setRequired() { if (document .getElementById('{!$Component.theForm.thePageBlock.thePageBlockSection.accPhone}').value == '') alert("Phone number will not be blank"); } &lt;/script&gt; &lt;apex:form id="theForm"&gt; &lt;apex:pageBlock id="thePageBlock"&gt; &lt;apex:pageBlockButtons&gt; &lt;apex:commandButton value="submit" action="{!save}" onclick="setRequired();" /&gt; &lt;/apex:pageBlockButtons&gt; &lt;apex:pageBlockSection id="thePageBlockSection"&gt; &lt;apex:inputField id="accPhone" value="{!Account.Phone}" /&gt; &lt;apex:inputField value="{!Account.Name}" /&gt; &lt;/apex:pageBlockSection&gt; &lt;/apex:pageBlock&gt; &lt;/apex:form&gt; &lt;/apex:page&gt; Regards, Naveen Software Engineer http://www.autorabit.com
type: Answer
answers question: http://stackoverflow.com/q/25529108

http://stackoverflow.com/comment/39731938
has text: any ideas ... any other approach
comment on: http://stackoverflow.com/q/25452231
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25489187
has body: To detect if the scrolling is going down, or up, you can always store the last value of the scroll, and then compare it to the scrollTop() at the event handler: var lastVal = 0; $(window).scroll(function() { var st = $(this).scrollTop(); if (st &gt; lastVal){ // Is scrolling down... Increase height of div } else { // Is scrolling up, do nothing... } lastVal = st; });
downvote count: 0
answers question: http://stackoverflow.com/q/25488979
has comment: http://stackoverflow.com/comment/39784339
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/39648496
type: Comment
comment on: http://stackoverflow.com/q/25416547
type: QuestionComment
has text: Interesting.. This actually worked. I put the function inside the .load function of the page handler, and the initialization worked! But I am not really happy with this solution, because now it calls the function every time it loads a page, even though there may not be a tab system on the page..
score: 0

http://stackoverflow.com/a/25542329
has body: angular.module('VPPContractsApp', ['ui.bootstrap','$location','$window'] $location and $window are no modules. They are services provided by angular by default. You don't need to include a module to use them. You can delete those two here.
score: 1
answers question: http://stackoverflow.com/q/25532143
accepted answer of: http://stackoverflow.com/q/25532143
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/a/25470702
has body: I can't comment due to rep so... Is there anything in the debug log? /home/tducin/Development/qunit-sinon/npm-debug.log It doesn't look like it's trying to install globally as global modules are usually in /usr/local/lib/node_modules or /usr/lib/node_modules Please post the result of: ls -l -a /home/tducin/ | grep npm As the .npm folder may have been created as root
score: 1
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25470459

http://stackoverflow.com/comment/39763918
has text: @BobBrown: note that you can flag questions that are the same as duplicates of the original question, which will also generate an automatic comment with the link for you. It also brings it to the attention of other users who can then close the question.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25478398

http://stackoverflow.com/a/25470034
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25469800
answers question: http://stackoverflow.com/q/25469800
type: Answer
has body: Let´s say the var key has the value IsActionMovie as in your example. With request.params.key you are trying to access a property named key in the params object. (This won´t try to evaluate the key object and access a property by that name) What you want is to access a property named IsActionMovie in the params object, while writing code that can access any poperty whose name is set in the key var. You can use the square bracket notation for that: var valueFromRequestForKey = request.params[key]; Fiddle here.
downvote count: 0

http://stackoverflow.com/a/25548447
type: Answer
upvote count: 4
has body: You did not name your array in the client side before sending it, therefore the whole of $_POST is this array, and $_POST['orderDetailsArray'] is undefined. You must name it client-side: $.ajax({ type: "POST", url: 'http://testdomain.com/file.php', data: { orderDetailsArray: JSON.stringify(orderDetailsArray) }, contentType: "application/json", success: function(data) { alert(data); } });
answers question: http://stackoverflow.com/q/25548358
downvote count: 0
has comment: http://stackoverflow.com/comment/39892153
score: 4

http://stackoverflow.com/comment/39694067
comment on: http://stackoverflow.com/q/25441545
type: QuestionComment
type: Comment
has text: @dejan.s - regex parsing machine are different for javascript and other servers. You need to find the appropriate one. What programming language do you use on server?
score: 0

http://stackoverflow.com/comment/39768640
comment on: http://stackoverflow.com/a/25400769
score: 0
has text: Just before adding series check extremes, if are similar to axtucla axis (getExtremes() method) then add to that yAxis. If not, add axis, then add series.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25444036
has comment: http://stackoverflow.com/comment/39698976
tagged with: css
has answer: http://stackoverflow.com/a/25445173
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39698750
has comment: http://stackoverflow.com/comment/39698865
score: 0
has title: How to add a placeholder for draggable items?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39698588
has body: OK, so I've implemented a simple drag'n'drop test, using jQuery UI droppable, draggable and sortable. Whenever an item from the left sidebar (e.g. input, password, etc) is dragged to the main part (the form editor), the element is "added" to the specified position. When the existing items in the editor (after having been dropped) are dragged, they may easily be re-ordered, showing a dashed-border placeholder as for the exact position where the element is going to move. This one is done using sortable's placeholder. However, I still cannot figure out a way to get that working for items being dropped from the sidebar. Any ideas? The "draggable": $(".wrp").draggable({ snap: false, stack: ".wrp", cursor: 'move', helper: myHelper }); Fiddle : http://jsfiddle.net/xpayr4vt/ Demo: http://83.212.101.132/angjs/ang4.html
has comment: http://stackoverflow.com/comment/39698842
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39698804
has comment: http://stackoverflow.com/comment/39698843
has comment: http://stackoverflow.com/comment/39699000

http://stackoverflow.com/comment/39636410
has text: `bActiveRequests` is out of scope, I don't like too much the idea of making that variable global.
type: AnswerComment
comment on: http://stackoverflow.com/a/25407275
score: 0
type: Comment

http://stackoverflow.com/a/25522831
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39845615
has comment: http://stackoverflow.com/comment/39847471
answers question: http://stackoverflow.com/q/25521674
has body: You probably simply should use the documented API of dropkick. $(function () { $('.default').dropkick({ change: function () { alert("You selected " + $(this).val() + " for " + this.id + "."); } }); });
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39845327
has comment: http://stackoverflow.com/comment/39845482
has comment: http://stackoverflow.com/comment/39845798
has comment: http://stackoverflow.com/comment/39845889

http://stackoverflow.com/a/25423832
accepted answer of: http://stackoverflow.com/q/25423757
answers question: http://stackoverflow.com/q/25423757
type: Answer
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
has body: The problem is you are adding duplicate event handlers to the element... function post() { var post = $("#post").val(); $('.comments_cnt').append(' ' + post + ' Mark as resolved. '); $("#post").val(''); }; //dom ready handler jQuery(function ($) { //delegated event handler $('.comments_cnt').on('click', '.resolve_button', function () { $(this).closest(".post_unrslvd").toggleClass('post_rslvd'); }) }) Demo: Fiddle that is in the first call there is 1 click handler for the resolve_button so the toggle works fine... but when the post is called for the second time, the resolve_button button which was added in the first call will get another click handler(now it has 2 handlers)... so the toggle is called twice thus negating the effect. Demo: Problem - look at the console to see how many times it is getting called

http://stackoverflow.com/comment/39805143
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25501107
type: QuestionComment
has text: There's no such thing as an anchor tag being "loaded".

http://stackoverflow.com/comment/39674082
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25430352
has text: cojimarmiami, you need to actually execute your query. You would be much better off using PHP, .NET, etc. As pointed out, you're already exposing yourself to SQL injection. Using Javascript introduces more security issues.
type: AnswerComment

http://stackoverflow.com/a/25408759
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25408636
type: Answer
has body: When you call db.once("open", function () { you never close that paren and brace. I think you want a }); after the testJob declaration. That should also be }) and not )}.
answers question: http://stackoverflow.com/q/25408636
downvote count: 0
score: 1

resize
tags question: http://stackoverflow.com/q/25518807
tags question: http://stackoverflow.com/q/25501574
type: Tag
tag name: resize
tags question: http://stackoverflow.com/q/25542634

http://stackoverflow.com/comment/39697452
type: QuestionComment
has text: Can you provide some demo
score: 0
comment on: http://stackoverflow.com/q/25442960
type: Comment

http://stackoverflow.com/comment/39786026
score: 0
comment on: http://stackoverflow.com/q/25489317
type: Comment
type: QuestionComment
has text: If I manually change the window size, the layout will appear correctly. Maybe I need to resize the window somehow in code?

http://stackoverflow.com/a/25532317
score: 0
has body: If you plan on serving this page to others, you don't want to use an absolute path. Javascript runs on the browser, and does not have access to the server's filesystem for absolute paths. See answers here It's common to have an images folder within your website's project folder. Put images in this folder, then you can use src="/images/a.jpg"
type: Answer
answers question: http://stackoverflow.com/q/25532147

http://stackoverflow.com/q/25539356
has answer: http://stackoverflow.com/a/25539406
has comment: http://stackoverflow.com/comment/39876030
has answer: http://stackoverflow.com/a/25539469
accepted answer: http://stackoverflow.com/a/25539469
type: Question
has comment: http://stackoverflow.com/comment/39875863
tagged with: javascript
score: 0
has title: What is an object constructor?
has answer: http://stackoverflow.com/a/25539484
has comment: http://stackoverflow.com/comment/39915673
possible better answer: http://stackoverflow.com/a/43903328
has answer: http://stackoverflow.com/a/43903328
has comment: http://stackoverflow.com/comment/39875856
has body: I am trying to understand the process of creating an object with the Object Constructor. After reading my javascript book, sources online, the MDN and MSDN, I can't decide how best to define the object constructor. function Person(first, last, age, eyecolor) { this.firstName = first; this.lastName = last; this.age = age; this.eyeColor = eyecolor } In the code above, should I be thinking of the Object Constructor as: The entire function and all of the code that goes with it? JUST the function "person()" Or is it simply a term given to whatever behind-the-scenes things the JavaScript engine has to do to "create" my object in the memory? It seems like creating objects with the Object Constructor is like creating an object template, which you can later fill in while simultaneously creating that object based on the previously defined "object template". Please feel free to nitpick and help me accurately define this term and completely understand it.
answer count: 4
has comment: http://stackoverflow.com/comment/39877668
type: AnsweredQuestion

http://stackoverflow.com/comment/39764624
type: Comment
comment on: http://stackoverflow.com/a/25478790
score: 0
type: AnswerComment
has text: So you say. Fact is that there are good relying party libraries for OpenID for just about every language, only setting up a provider is difficult. You can easily set your services as accepted, and reject everything else. Using Oauth would not make anything easier.

http://stackoverflow.com/a/25487401
has body: My problem resolved, the cause of problem was lack of $scope in directive dependencies module1.directive('rhVisibleFor', function ($rootScope,$compile) ...
answers question: http://stackoverflow.com/q/25487207
score: 0
type: Answer

http://stackoverflow.com/a/25422667
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25422182
upvote count: 1
type: Answer
has body: Please find some details inside comment tags. &lt;html&gt; &lt;body&gt; &lt;script&gt; function add(){ console.log(this+10); } /* Here you created a Number primitive type -&gt;console.log(number.__proto__) -&gt; returns: Number{} */ var number=5; /* This line adds a new method to the Number.prototype object -&gt;console.log(number.__proto__) -&gt; returns Number{add: function} */ Number.prototype.add=add; /* 'this' inside the add method points to 'number' and because you are trying to do an addition javascript will first try to find the primitive value for 'this' object calling: valueOf method. this.valueOf() -&gt; number.valueOf() -&gt; 5 So what is really happens is this: this + 10 -&gt; number.valueOf() + 10 -&gt; 5 + 10 -&gt; 15 */ number.add(); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; Hope this helps.

http://stackoverflow.com/comment/39672645
type: AnswerComment
comment on: http://stackoverflow.com/a/25429144
has text: Hmm.. There is no such `div` in the code. The only thing related to `slimScrollDiv` I can find is `.slimScrollDiv{ overflow: visible; }` which I added a few minutes ago.
score: 0
type: Comment

http://stackoverflow.com/a/25514264
has body: You can not set the Cookie header for an ajax request, you will get an Illegal warning if you try. One option is to set a different header (ie, Ajax-Cookie) and then have them parse it on the server side. Pure JavaScript: xmlhttp.setRequestHeader( 'Ajax-Cookie', document.cookie ); jquery equivalent: $.ajax({ url: cross-domain-url, headers: { 'Ajax-Cookie' : document.cookie } ... }); If you are using php you can use http_parse_cookie to get the cookies values. $_AJAX_COOKIES = http_parse_cookie( $_SERVER[ 'HTTP_AJAX_COOKIE' ] )[ 'cookies' ]; EDIT: Here is a list of headers you can not set: accept-charset, accept-encoding, access-control-request-headers, access-control-request-method, connection, content-length, content-transfer-encoding, cookie, cookie2, date, expect, host, keep-alive, origin, referer, te, trailer, transfer-encoding, upgrade, via
answers question: http://stackoverflow.com/q/25513982
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25513982
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/39830145
has comment: http://stackoverflow.com/comment/39900527
score: 2

http://stackoverflow.com/q/25401376
linked to: http://stackoverflow.com/q/21087735
tagged with: jquery-select2
has title: Set "val" not working(pre selecting)
type: AnsweredQuestion
type: Question
has body: I have looked at multiple questions on SO and on Git hub: Set multiple Select2 options Select2 can't set multiple value Is initSelection used for select2(val) But I still cant seem to figure out why the values is not being set. I am using a jinja2 template, so Ill give the generated html/js: Meassage Type and the js: $(function () { $("#message_type").select2({ placeholder: "Email/SMS/PIMS Modal", multiple: true, width: "300px", tokenSeparators: [',', ' '], data: [{ id: "email", text: "Email" }, { id: "pims modal", text: "PIMS Modal" }, { id: "sms", text: "SMS" }, ], }); $("#message_type").select2("val", "pims modal"); }); I have also managed to reproduce the result, see example.
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/24905607
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25401684
accepted answer: http://stackoverflow.com/a/25401684

http://stackoverflow.com/a/25390810
upvote count: 1
has comment: http://stackoverflow.com/comment/39601550
has body: there is a plugin called angular-template-asset-pipeline. The essence of it is that it will put your .tpl.htm templates in the $templateCache. Then you could use it like this (example from the docs): angular.module('myApp.appSection', ['ngRoute']) .config(function($routeProvider) { $routeProvider .when('/index', { templateUrl: 'index.htm' }) .otherwise({redirectTo: '/index'}); });
has comment: http://stackoverflow.com/comment/39601068
type: Answer
has comment: http://stackoverflow.com/comment/39601180
answers question: http://stackoverflow.com/q/25390307
has comment: http://stackoverflow.com/comment/39602816
score: 1
has comment: http://stackoverflow.com/comment/39603516
has comment: http://stackoverflow.com/comment/39600936
has comment: http://stackoverflow.com/comment/39604360
has comment: http://stackoverflow.com/comment/39602209
downvote count: 0
has comment: http://stackoverflow.com/comment/39601600
has comment: http://stackoverflow.com/comment/39601237
has comment: http://stackoverflow.com/comment/39602102

http://stackoverflow.com/q/25539336
has title: Fading Divs Based On Checked-boxes Count
has answer: http://stackoverflow.com/a/25539375
downvote count: 1
has body: Recently, I've come up with some code to handle fading in and out certain divs depending on the amount of check boxes that have been checked by a user. While it functions and serves it's purpose I am wondering if anyone has feedback to see if this could be converted into a way that uses switch/case block which may be a better approach rather than having too many if/else statements? Does anyone have input on how to write this function shorter? $('input:checkbox').change(function() { var boxChecked = $('input:checkbox:checked').length; if (boxChecked == 11) { $('.column-3').fadeTo(500, 1.0); $('.column-1, .column-2').fadeTo(500, 0.4); } if (boxChecked == 10) { $('.column-2').fadeTo(500, 1.0); $('.column-1, .column-3').fadeTo(500, 0.4); } else if (boxChecked == 6) { $('.column-2').fadeTo(500, 1.0); $('.column-1, .column-3').fadeTo(500, 0.4); } else if (boxChecked == 5) { $('.column-1').fadeTo(500, 1.0); $('.column-2, .column-3').fadeTo(500, 0.4); } else if (boxChecked &lt; 5) { $('.column-2, .column-3').fadeTo(500, 1.0); } });
type: Question
type: AnsweredQuestion
score: -1
upvote count: 0
accepted answer: http://stackoverflow.com/a/25539375
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: logic

http://stackoverflow.com/comment/39773310
type: Comment
comment on: http://stackoverflow.com/a/25484226
has text: I just don't know where to put the code: I put your code bellow my code, but it doesn't work. Here is the fiddle: http://jsfiddle.net/Alkasih/rj3yuvvy/6/
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39933741
has text: Easy, because in (50,70) there is not an HTML with text `div` or `span` or whatever, `elementFromPoint()` is returning the `body` element. Therefore, changes will apply to all elements inside `body`
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25531748

http://stackoverflow.com/comment/39719109
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25454716
has text: RE: using unique ids [Can an html element have multiple ids?](http://stackoverflow.com/a/192066/3033053)

http://stackoverflow.com/q/25546797
upvote count: 1
answer count: 1
has title: Java Script Slide Show (add slide effect)
tagged with: slideshow
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: slider
has body: I have a problem this are my first steps in javascript and I'm trying to make a Javascript slide show. I try to add a "slide in" "slide out" effect But I don't know how I can do this. I google about 2-3 hours but still no solution. Please help me and give me some feedback please Here is my code Test Slider
has answer: http://stackoverflow.com/a/25548237

modal-dialog
tags question: http://stackoverflow.com/q/25465503
tag name: modal-dialog
tags question: http://stackoverflow.com/q/25492134
tags question: http://stackoverflow.com/q/25535335
tags question: http://stackoverflow.com/q/25510090
type: Tag
tags question: http://stackoverflow.com/q/25476342
tags question: http://stackoverflow.com/q/25456439

http://stackoverflow.com/comment/39779539
comment on: http://stackoverflow.com/q/25487013
has text: @N55PEC: Yes, you can target class. In fact, that's probably a better approach in case somebody changes those ` ` tags to ` `, `` or something else later.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39848162
has text: I know that, if an inner function call is asynchronous, then all the functions 'wrapping' this call must also be asynchronous in order to 'return' a response. So, my final question would be - was my first method the best way or may be I should look into deferred and promises to make the code modular and readable? [link](http://stackoverflow.com/questions/6847697/how-to-return-value-from-an-asynchronous-callback-function)
score: 0
comment on: http://stackoverflow.com/q/25524297
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25527719
has answer: http://stackoverflow.com/a/25527769
linked to: http://stackoverflow.com/q/13333221
has answer: http://stackoverflow.com/a/25527776
has body: I am trying to run two node.js application in my development machine but the second application throwing the following exception while running. Is there any way to run these two applications in parallel way ?
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/39854296
answer count: 3
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25527737
has comment: http://stackoverflow.com/comment/39854056
tagged with: node.js
downvote count: 0
score: 1
type: Question
has title: How to run multiple Node.js application while in development

http://stackoverflow.com/comment/39840651
comment on: http://stackoverflow.com/a/25520192
type: AnswerComment
score: 0
has text: This post must be add as a comment
type: Comment

http://stackoverflow.com/comment/39689875
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25439115
has text: Hmm, actually this is really close but not quite. Is there a simple way to exclude commas that fall inside of quotes? So if one of the values as, say, "Hello, world", it wouldn't be counted?
score: 0

http://stackoverflow.com/a/25481668
type: Answer
answers question: http://stackoverflow.com/q/25481144
accepted answer of: http://stackoverflow.com/q/25481144
has body: You can use a JavaScript function to craft the url and then redirect: HTML (inside form): &lt;input type="button" onclick="craft_url(this.form);" value="Go"&gt; JavaScript: function craft_url(f){ var x = f.a.value; //Being 'a' the name of the field var url = 'https://public.tableausoftware.com/profile/subhayan#!/vizhome/Book1_1826/Sheet1' + '&amp;Name=' + x; document.location = url; }
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39616207
has text: possible duplicate of [Detect version of browser](http://stackoverflow.com/questions/5916900/detect-version-of-browser)
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25399554
type: QuestionComment

vb.net
tags question: http://stackoverflow.com/q/25450727
tags question: http://stackoverflow.com/q/25421072
tags question: http://stackoverflow.com/q/25518424
tags question: http://stackoverflow.com/q/25518645
type: Tag
tags question: http://stackoverflow.com/q/25434328
tags question: http://stackoverflow.com/q/25438835
tags question: http://stackoverflow.com/q/25537296
tag name: vb.net
tags question: http://stackoverflow.com/q/25408779
tags question: http://stackoverflow.com/q/25452082
tags question: http://stackoverflow.com/q/25496260

http://stackoverflow.com/q/25460224
tagged with: javascript
score: 0
answer count: 1
tagged with: setinterval
has body: Why does the test div not moving towards left even after applying the window.setinterval function ? It just shows me the div after i click the Start the animation button. It is just a test content Start the animation Stop the animation
accepted answer: http://stackoverflow.com/a/25460263
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39729509
type: Question
has title: Why does the following code does not move the div towards left
has answer: http://stackoverflow.com/a/25460263

http://stackoverflow.com/q/25452944
score: 0
upvote count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/920236
tagged with: javascript
has answer: http://stackoverflow.com/a/25455463
has comment: http://stackoverflow.com/comment/39715524
has body: There have been multiple solutions posted here for linking to tabs when using the bootstrap framework, but I'm looking for a slightly different solution and wondering if its possible. There's a jsfiddle solution here demonstrating the behaviour I require: http://jsfiddle.net/technotarek/3hJ46/ Outline code below: js $("a").on('click', function() { # check if link id matches an element with data-toggle="tab"? # activate tab? }); html <a "tab-2">Go to Tab #2 TAB #1 TAB #2 TAB #3 You're in Tab #1 <a "tab-2">Go to Tab #2 <a "tab-3">Go to Tab #3 You're in Tab #2 Now #3. <a "tab-1">Back to Tab #1 You can click a link within the tab, or from outside the tab (on the same page) and the tab becomes activated. However, this requires that "a" tags have attribute "data-tab-destination" with the tab name. Due to the way we're automatically generating the html it's currently impossible (or v. difficult) to know if the link will point to a tab or any other part of the webpage, so it is not possible to add this attribute. I'm therefore hoping for a solution (using javascript) that will detect for all links whether it points to a tab by searching for any element with matching id with attribute data-toggle="tab". Any help greatly appreciated.
has comment: http://stackoverflow.com/comment/39715549
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39715723
tagged with: jquery
favorite count: 0
tagged with: tabs
has title: Link to bootstrap tab with no modification to "a" tag
type: Question
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/25455463
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/39888941
has text: Question disqus can find here https://github.com/pa7/heatmap.js/issues/132
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25523411

http://stackoverflow.com/comment/39850395
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25525724
has text: also [Why do you need to invoke an anonymous function on the same line](http://stackoverflow.com/questions/1140089/why-do-you-need-to-invoke-an-anonymous-function-on-the-same-line)
type: Comment

http://stackoverflow.com/q/25482378
type: UnansweredQuestion
has title: Hide specific div if opened by clicking on its own link
type: Question
tagged with: javascript
upvote count: 2
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: i have 3 divs that open which work fine. I need to be able to close the current div that is opened if the corresponding link is clicked so no divs are opened. Fiddle http://jsfiddle.net/zangief007/gu5b3mk1/1/ html: Catergory styles brand This is my category This is styles This is main brands JS: $("#category").click(function(e){ e.preventDefault(); $('div').hide(); $("#one").fadeToggle(); }); $("#style").click(function(e){ e.preventDefault(); $('div').hide(); $("#two").fadeToggle(); }); $("#brand").click(function(e){ e.preventDefault(); $('div').hide(); $("#three").fadeToggle(); }); CSS: #two, #three, #four{ display:none; }
tagged with: css
has answer: http://stackoverflow.com/a/25482444
score: 2
downvote count: 0

http://stackoverflow.com/comment/39848936
has text: In my experience, Your is perfect approach.
comment on: http://stackoverflow.com/q/25524892
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39748659
type: AnswerComment
has text: soo is there any other way to change the text.?
type: Comment
comment on: http://stackoverflow.com/a/25470546
score: 0

http://stackoverflow.com/comment/39784845
type: QuestionComment
has text: It looks like arguments[0] is populated even when this isn't.
comment on: http://stackoverflow.com/q/25489518
score: 0
type: Comment

http://stackoverflow.com/q/25472590
answer count: 1
tagged with: arrays
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39752268
has body: I want to have an array containing an object. For example I have an object like this: parentObj:{ childObj1, childObj2 } but I want to have a "parentObj" array and be able to call it like : parentObj[0].childObj1 I searched a lot but didn't find anything related to this. I'll appreciate if someone can help me with this. thanks very much
downvote count: 3
has answer: http://stackoverflow.com/a/25472632
accepted answer: http://stackoverflow.com/a/25472632
has comment: http://stackoverflow.com/comment/39752313
has title: Javascript array of object
type: AnsweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/39752266
score: -2
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/39752504

http://stackoverflow.com/q/25460238
has title: Radio Buttons Not Validating
has comment: http://stackoverflow.com/comment/39729639
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25460399
has comment: http://stackoverflow.com/comment/39729772
has body: I am trying to validate this form and am having trouble with the radio buttons. Everything else was working just fine until I added the buttons. Can someone please explain what I am missing. I do not know much about JavaScript. I am not sure if you will need more code than this, but this is the html and JavaScript for the radio part. Thanks! How May I Contact You: Email No Contact var radio = document.getElementById('name'); var radio_validation = document.getElementById("radio_validation"); if (radio.value === "") { valid =0; email_validation.innerHTML = "Field Required"; email_validation.style.display = "block"; emal_validation.parentNode.style.backgroundColor = "#FFDFDF"; } else { email_validation.style.display = "none"; email_validation.parentNode.style.backgroundColor = "transparent"; } Thanks for your help everyone. This is all the code before I added the buttons and it worked great. I add the buttons and I keep getting the error that I put in the comments below all of a sudden. I never moved that file. function validateForm() { var valid = 1; var email = document.getElementById('email'); var email_validation = document.getElementById("email_validation"); var name = document.getElementById('name'); var name_validation = document.getElementById("name_validation"); var message_validation = document.getElementById("message_validation"); var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (name.value === "") { valid = 0; name_validation.innerHTML = "Field Required"; name_validation.style.display = "block"; name_validation.parentNode.style.backgroundColor = "#FFDFDF"; } else { name_validation.style.display = "none"; name_validation.parentNode.style.backgroundColor = "transparent"; } if (message.value === "") { valid = 0; message_validation.innerHTML = "Field Required"; message_validation.style.display = "block"; message_validation.parentNode.style.backgroundColor = "#FFDFDF"; } else { message_validation.style.display = "none"; message…
type: Question
has answer: http://stackoverflow.com/a/25460266
tagged with: javascript
tagged with: forms
score: 0
has comment: http://stackoverflow.com/comment/39729614
answer count: 2

http://stackoverflow.com/a/25522071
type: AcceptedAnswer
type: Answer
has body: You can't? You need to send back the server side variables as a response to the client (browser in this instance) If you're using RESTful WCF/MVC/Web API, have you read much about DataContracts?. You can also achieve sending messages to the client using SignalR. Regardless of the technology, you can't bind to variables stored in memory on the server
accepted answer of: http://stackoverflow.com/q/25522030
downvote count: 0
answers question: http://stackoverflow.com/q/25522030
score: 1
upvote count: 1

http://stackoverflow.com/q/25549543
has title: IFRAME not loading in parent frame when called from HTML page
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25549676
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25684731
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25684731
has body: We have 1 IFRAME present in asp page. And 1 HTML page where we have redirected to the parent IFRAME on click of anchor tag using angular.js. In HTML page we have code as given below present inside anchor tag, ng-click="seeDetail(); "&gt; Go to parent Iframe In javascript function seeDetail() we have code as shown below, var url = "./PageToBeLoaded.asp"; parent.document.getElementsByTagName("IFRAME").item("frameID").src = url; On call of this statement in javascript we need the URL to launch in parent IFRAME.However instead of loading in the parent IFRAME its loading in the HTML page itself.
type: Question
has answer: http://stackoverflow.com/a/25549676

http://stackoverflow.com/a/25430352
has comment: http://stackoverflow.com/comment/39673924
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39674082
has body: Try using SELECT COUNT (*) FROM [DYNAMICS].[dbo].[AP_Invoice_Table] WHERE DocumentNumber = '" + invoice +"'". If it returns > 0 then the value already exists.
has comment: http://stackoverflow.com/comment/39676484
answers question: http://stackoverflow.com/q/25430289
accepted answer of: http://stackoverflow.com/q/25430289
score: 0

http://stackoverflow.com/q/25511755
type: AnsweredQuestion
downvote count: 3
type: Question
accepted answer: http://stackoverflow.com/a/25511837
has body: i'm using a function in JQuery, but i dont understand completly how it's works,maybe someone can give me a hand? $("[src*=plus]").live("click", function () { $(this).closest("tr").after(" " + $(this).next().html() + " "); $(this).attr("src", "Imgs/minus.png"); }); $("[src*=minus]").live("click", function () { $(this).attr("src", "Imgs/plus.png"); $(this).closest("tr").next().remove(); }); What this means? i mean in details. ^^" $(this).closest("tr").after(" " + $(this).next().html() + " ");
tagged with: javascript
has comment: http://stackoverflow.com/comment/39825384
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has title: JQuery Functions and how they are working together (after() , $(this).next().html())
has answer: http://stackoverflow.com/a/25511837
score: -3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39685686
type: Comment
type: QuestionComment
has text: @recursive either or. I want to beable to take numbers entered in any format 1,234 1234 1.234(EUnotation) and prepare them for parseFloat.
comment on: http://stackoverflow.com/q/25436575
score: 0

http://stackoverflow.com/comment/39735050
type: QuestionComment
has text: @user3970891 yeah! I was surprised by that, but it's a really cool effect. You could probably do some fancy stuff with it.
type: Comment
comment on: http://stackoverflow.com/q/25462964
score: 0

http://stackoverflow.com/comment/39705527
score: 0
comment on: http://stackoverflow.com/q/25447675
has text: Yes, please expand on what you are trying to achieve.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39735009
has text: Thanks a lot for your hints- I commented out my hidden field, filled it witj Javascript: setTimeout(function () { var endTime = new Date().getTime(); console.log("duration = " + (endTime - startTime)); }, 1500); //$("#HiddenField2").html("" + (endTime - startTime)); //alert(endTime - startTime); $("#<%=HiddenField2.ClientID%>").val(endTime - startTime);
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25462613
type: Comment

http://stackoverflow.com/q/25428260
has answer: http://stackoverflow.com/a/25428537
has comment: http://stackoverflow.com/comment/39669897
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39669487
has comment: http://stackoverflow.com/comment/39669576
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25428537
has title: color in front of image jquery
has comment: http://stackoverflow.com/comment/39669676
type: Question
has comment: http://stackoverflow.com/comment/39670040
has body: I wan't to add a color shading to an image-element using jquery. Please disregard the color below, just looking for the effect. This is how I create the image: $(document.createElement ('img')) .addClass ('question-image') .attr ('id', 'question-image') .attr ('src', quiz[currentquestion]['image']) .attr ('alt', htmlEncode(quiz[currentquestion]['question'])) .insertAfter ('#question'); This is what I thought would give me a frontground-color $('div').css('background-color:', 'red').appendTo('#question-image');
score: 0

http://stackoverflow.com/comment/39664992
type: QuestionComment
has text: You must mixing javascript and PHP like this ? It's ugly.
score: 0
comment on: http://stackoverflow.com/q/25425936
type: Comment

http://stackoverflow.com/comment/39672430
type: Comment
type: QuestionComment
has text: This project sounds as a little too big for a learning exercise. Why don't you try to do something less challenging, like an online notes app. If you got the basics working, try adding more features (like logging in/being able to view your notes from wherever you are, rich text formatting, whatever). I think that is a lot more viable than a real-time, multiplayer, online game.
comment on: http://stackoverflow.com/q/25429706
score: 0

http://stackoverflow.com/a/25394136
answers question: http://stackoverflow.com/q/25394066
score: 0
type: Answer
has body: This is an issue with Scope You are creating your variables inside of the $(".villa div a").click function. To be able to use them elsewhere, create the variables at a higher level (outside of that function), and then assign to them inside your function. var bigsrc = $(document).find("img").attr("src"); var smallsrc = $(document).find(".foto a img").attr("src"); $(".villa div a").click(function(){ var smallsrc = $(this).parent().parent().find(".blueprint a img").attr("src").replace('.jpg', '_small.jpg'); bigsrc = $(this).find("img").attr("src"); bigsrc = bigsrc.replace('.jpg', '_big.jpg'); var villaNaam = $(this).parent().parent().find("h2").text(); if (bigsrc.indexOf("blueprint") != -1) { smallsrc = $(this).parent().parent().find(".foto a img").attr("src"); } else { smallsrc = $(this).parent().parent().find(".blueprint a img").attr("src"); } smallsrc = smallsrc.replace('.jpg', '_small.jpg'); $("#popup-img").fadeIn(); $("#popup-bg").fadeIn(); $("#popup-img #titel").append(villaNaam) $("#popup-img #big").attr("src", bigsrc); $("#popup-img #small").attr("src", smallsrc); }) $("#small-link").click(function(){ if (bigsrc.indexOf("blueprint") != -1) { smallsrc = smallsrc.replace('blueprint', 'huis'); bigsrc = smallsrc.replace('huis', 'blueprint'); } else { smallsrc = smallsrc.replace('huis', 'blueprint'); bigsrc = smallsrc.replace('blueprint', 'huis'); } });

http://stackoverflow.com/comment/39705559
type: QuestionComment
comment on: http://stackoverflow.com/q/25447842
score: 0
type: Comment
has text: Show your real code, a minimal example that demonstrates what you are actually doing. In the code posted, there is no attempt at writing any loop, and in the markup, there’s no Cat or Dog.

http://stackoverflow.com/comment/111631376
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25507433
has text: I tried a few codes and this is only one that worked. 10x!

http://stackoverflow.com/a/25502647
has body: I'm using the following function throught XLMhttpRequest calls: function updateChart(data) { var jsonData = { "chart": { // Some rendering options "caption": caption, "subcaption": "" }, "data": data }; // First time I initialize my chart if (FusionCharts("myChartId") === undefined) { var chart = new myChartId({ // Some rendering options swfUrl: "Charts/MSLine.swf", id: "myChartId", width: "100%", height: "280px", dataFormat: 'json' }); chart.setJSONData(jsonData); chart.render("myContainerId"); } else // Then I just update FusionCharts("myChartId").setJSONData(jsonData); } I call the updateChart function into my success callback: success: function(data, request) { try { var d = JSON.parse(data); updateChart(d.chart); // Other job... var event = new CustomEvent("dataReceivedFromAjax", {"detail": d}); document.dispatchEvent(event); } catch (e) { window.console.warn("Wrong format JSON data received"); window.console.warn(data); } } Of course you may adapt my code to your case (for instance I'm using JsonData rather than JsonUrl).
score: 4
has comment: http://stackoverflow.com/comment/40706290
has comment: http://stackoverflow.com/comment/39808398
has comment: http://stackoverflow.com/comment/40704932
has comment: http://stackoverflow.com/comment/39819170
upvote count: 4
has comment: http://stackoverflow.com/comment/39837151
answers question: http://stackoverflow.com/q/25502132
has comment: http://stackoverflow.com/comment/39809967
downvote count: 0
has comment: http://stackoverflow.com/comment/39818912
type: Answer

http://stackoverflow.com/comment/39763903
has text: I think you would do well to read a tutorial on AJAX in general which would help you understand how to program this. But from a more practical standpoint, you may also want to consider this plugin which could do it for you: http://www.appelsiini.net/projects/chained.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25467310
score: 0

http://stackoverflow.com/q/25545269
tagged with: gridview
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39885951
has comment: http://stackoverflow.com/comment/39886051
type: Question
has title: JQuery Or Javascript is not working after Partial PostBack
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39886191
score: 0
has comment: http://stackoverflow.com/comment/39887508
has body: I have a page with a GridView and Two Buttons namely- Save &amp; Reset and some textboxes to hold values from GridView record. If i clicked on any record in the gridview then all the column values placed in specific textboxes and Save button's text changes into "Update" and the textboxes has to become empty. But whenever i do it,the textboxes becomes empty but the Save button's text Changes for a second and again converted to "Update". Following is the JQuery Code embedded into pageLoad function. function pageLoad(sender, args) { $(document).ready(function () { $("#&lt;%=btnExpReset.ClientID%&gt;").click(function () { try { $('#&lt;%= txtCompanyName.ClientID %&gt;').attr('disabled', true); $('#&lt;%= txtExpDesignation.ClientID %&gt;').attr('disabled', true); $('#&lt;%= txtSalary.ClientID %&gt;').attr('disabled', true); $('#&lt;%= txtExpFromDate.ClientID %&gt;').attr('disabled', true); $('#&lt;%= txtExpToDate.ClientID %&gt;').attr('disabled', true); $('#&lt;%= txtLivingReason.ClientID %&gt;').attr('disabled', true); $('#&lt;%= txtCompanyName.ClientID %&gt;').val(""); $('#&lt;%= txtExpDesignation.ClientID %&gt;').val(""); $('#&lt;%= txtSalary.ClientID %&gt;').val(""); $('#&lt;%= txtExpFromDate.ClientID %&gt;').val(""); $('#&lt;%= txtExpToDate.ClientID %&gt;').val(""); $('#&lt;%= txtLivingReason.ClientID %&gt;').val(""); $('#&lt;%= txtExpYears.ClientID %&gt;').val(""); $('#&lt;%= txtExpMonths.ClientID %&gt;').val(""); var RB1 = document.getElementById("&lt;%=rdbExperience.ClientID%&gt;"); var radio = RB1.getElementsByTagName("input"); for (var i = 0; i &lt; radio.length; i++) { if (radio[i].value == 2) { radio[i].checked = true; } } $('#&lt;%= btnAddExp.ClientID %&gt;').val("Add Experience"); alert("Inner Clicked"); return true; } catch (e) { alert(e); } }); }); } Please let me know of any solution. Thanks in advance.
tagged with: asp.net
has comment: http://stackoverflow.com/comment/39886316

http://stackoverflow.com/q/25549986
has comment: http://stackoverflow.com/comment/50860503
tagged with: facebook
has title: how to detect facebook incoming messages in javascript
has comment: http://stackoverflow.com/comment/39895025
answer count: 0
type: UnansweredQuestion
type: Question
score: 0
has comment: http://stackoverflow.com/comment/59513652
tagged with: javascript
has body: we are going to develop Firefox add-on like Facebook chat history.i think it's possible to detect incoming message .i have seen lot of HTTPS headers like https://www.facebook.com/ajax/mercury/send_messages.php i guess income chat messages also come to browser like this.i want to know how to detect incoming facebook chat messages .i want to give alert about incoming message content ,sender . i can inject javascript because it's a add-on.

http://stackoverflow.com/q/25471965
score: 0
has title: returning false from JavaScript Does not stop the HTML page from Executing
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: i have a list in my HTML page with the following code. Home Register Contact Us Services Log Out my log in check function is as follows. function validate() { some validations done here.if found true change the variable log in to true. login = true; } function loginCheck() { if (!login) { alert("Log In to continue operations"); return false; } the page gives an alert Log In to continue operations. But still moves to the next page which was clicked. How can i stop this ?
has answer: http://stackoverflow.com/a/25471985
type: Question
has comment: http://stackoverflow.com/comment/39751124
accepted answer: http://stackoverflow.com/a/25471985
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39751153

http://stackoverflow.com/comment/39658508
comment on: http://stackoverflow.com/a/25416552
type: Comment
has text: Thanks but this is essentially identical to what I'm doing. I have no problem with iterating through the `a` tags, my problem is entirely with the data return by the `$.ajax` call.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39694182
score: 0
has text: I am actually doing a create sentence game. So I have to retrieve the next id(which is the next question) on the same page when user answer the first question correctly. Now I have problem displaying the content out to the next following question. I think is because the $x = 1; which is set into 1 that why it cannot auto increment after I click next?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25439049

http://stackoverflow.com/q/25511721
type: Question
has answer: http://stackoverflow.com/a/25511997
has answer: http://stackoverflow.com/a/25511961
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25511997
linked to: http://stackoverflow.com/q/11056001
score: 2
has body: I am trying to trigger the event of parent view from its child view. But it seems that the parent view's event did not gets triggered. Following is the sample for my code: I tried to get hint from many solutions found via google search, but it seems I am got struck somewhere. Some of the options which I found are : 1/ How to trigger an event from child view to parent view in backbonejs and requirejs 2/ Backbone: How to trigger methods in a parent view
favorite count: 0
has title: Backbone - Trigger the parent view event from child view
tagged with: backbone.js
upvote count: 2
possible better answer: http://stackoverflow.com/a/25511759
has answer: http://stackoverflow.com/a/25511759
answer count: 4
has answer: http://stackoverflow.com/a/67378922
linked to: http://stackoverflow.com/q/16931120
type: AnsweredQuestion

http://stackoverflow.com/q/25544805
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25545453
answer count: 3
downvote count: 0
linked to: http://stackoverflow.com/q/35549468
tagged with: meteor
has answer: http://stackoverflow.com/a/35549646
favorite count: 0
possible better answer: http://stackoverflow.com/a/25545925
has title: Meteor: Save RegExp Object to Session
has answer: http://stackoverflow.com/a/25545925
tagged with: regex
has body: I'm trying to save a regular expression as RegExp Object in a Meteor Session for a MongoDB query, but after Session.get() the RegExp object is just a empty object. js if (Meteor.isClient) { Meteor.startup(function () { var obj = {}; obj['regexp'] = new RegExp("test"); console.log("setting regular expression: " + obj['regexp']); Session.set("test", obj); }); Template.test.events({ 'click button': function () { var regex = Session.get("test"); console.log("now it is: "); console.log(regex['regexp']); } }); } if (Meteor.isServer) { } html meteor-regexp-session-test {{> test}} hit the button and look at the console Any ideas why this is not working? Thank in advance!
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/25545453
tagged with: session

http://stackoverflow.com/comment/39853828
has text: @PaulD.Waite For my purpose, device width less than `768px`?
type: QuestionComment
comment on: http://stackoverflow.com/q/25526693
score: 0
type: Comment

http://stackoverflow.com/q/25548065
type: Question
has answer: http://stackoverflow.com/a/25548509
tagged with: javascript
score: 0
answer count: 1
has title: Getting Wordpress Admin Select Value into Ajax
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25548509
tagged with: php
type: AnsweredQuestion
tagged with: wordpress
has body: I'm working through the Ajax reference in the Wordpress Codex and adapting their example for an Admin side plugin My plugin code creates a new dropdown in a Woocommerce product index page as follows: $dmo_select = '&lt;select onchange="dmo_service_update()"&gt;'; foreach ($dmo_service_enhancements as $enhancement) { $dmo_select .= '&lt;option value="'.$enhancement.'"&gt;'.$enhancement.'&lt;/option&gt;'; } $dmo_select .= '&lt;/select&gt;'; Using the Wordpress Codex example, I can fire up the alert dialogue when the select is changed: PHP: add_action( 'admin_enqueue_scripts', 'my_enqueue' ); function my_enqueue($hook) { wp_enqueue_script('wtd-dmo-update', plugins_url( 'ajax-js.js', __FILE__ ), array('jquery') ); wp_localize_script ( 'wtd-dmo-update', 'ajax_object', array('ajax_url' =&gt; admin_url('admin-ajax.php'), 'we_value_3' =&gt; 1234 ) ); } add_action( 'wp_ajax_dmo_service_update_php_2', 'dmo_service_update_php_1' ); function dmo_service_update_php_1() { global $wpdb; $whatever = intval( $_POST['whatever_4'] ); $whatever += 10; echo $whatever; die(); } Javascript: function dmo_service_update(){ var data = { 'action': 'dmo_service_update_php_2', 'whatever_4': ajax_object.we_value_3, }; jQuery.post(ajax_object.ajax_url, data, function(response) { alert('Got this from the server: ' + response); }); } The problem is that the value processed by ajax ('1234') is hardcoded in the example provided in the wp_localize_script() function call which seems to set everything up. What I need is the value of the selected select box. How would I pass that into Ajax, rather than a hardcoded value? Ultimately, I'm aiming to write the select value to the db using the dmo_service_update_php_1 php function. Any pointers would be very gratefully received.

http://stackoverflow.com/a/25527093
upvote count: 2
has body: Constructing semantic markup is a staple of good design. By using anchors to signify navigation, you are sticking to the specification. The perfered way would be what the spec outlines, if you need to deviate I would make sure your changes are justified. One advantage for preferring an anchor tag is screen reader software for the blind will parse the DOM for anchors to help users navigate on the page. By using div's or span's the nav links will be overlooked.
type: Answer
answers question: http://stackoverflow.com/q/25526854
score: 2
downvote count: 0

http://stackoverflow.com/comment/39617279
score: 0
type: Comment
type: QuestionComment
has text: "The JSON.parse() method parses a string as JSON, optionally transforming the value produced by parsing." from [link]The JSON.parse() method parses a string as JSON, optionally transforming the value produced by parsing.[link]. So i hope it would transform the `val()`to valid jSON. But apparenty i totally was wrong here...
comment on: http://stackoverflow.com/q/25400069

http://stackoverflow.com/comment/39834294
comment on: http://stackoverflow.com/a/25516281
has text: I just meant that, since I didn't know what the value of window.location.pathname would be for the JSFiddle, I had to use `alert(window.location.pathname)` in order to figure it out. That command will just pop up an alert box that tells you the value of the variable.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25520930
answer count: 2
has answer: http://stackoverflow.com/a/25520982
upvote count: 1
has body: I have two pages: choose.html create.html In the choose.html I can choose an entry from a listview. I can click on such entries in the listview and I want to pass the ID of that entry so that I can use the ID on the html page create.html. ID is a number. I have done: When I clicked on an entry, I get the ID: function postID(id) { alert(id); } This functions so far. Then I tried this code with a GET on the create.html: POST: function postID(id) { $.ajax({ url: "create.html", type: "POST", dataType: "text", data: id, success: function () { document.location.href = "create.html"; }, error: function (jqXhr) { alert("Error"); } }); } GET: try { $.get("chooseAddress.html", function (id) { alert(id); }); } catch (e) { alert(); } But nothing happens. Can you help me? Thanks
has title: How to pass data from a html page to another?
has comment: http://stackoverflow.com/comment/39842282
tagged with: javascript
has answer: http://stackoverflow.com/a/25521612
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25520982
linked to: http://stackoverflow.com/q/901115
downvote count: 0
score: 1
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25521612
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/39842015

http://stackoverflow.com/comment/39738240
comment on: http://stackoverflow.com/q/25465056
type: QuestionComment
type: Comment
has text: Have you tested it? Do you get error messages? Why are you concerned?
score: 2

http://stackoverflow.com/q/25492893
has comment: http://stackoverflow.com/comment/39790550
type: Question
has comment: http://stackoverflow.com/comment/39790500
tagged with: google-visualization
has body: I've tried looking for a fix to this problem but wasn't able to find one that pertained to the haxis labels... In the picture below, you'll notice that the last percentage label on the haxis is not showing up. I'm not sure what the issue is. I've tried messing around with the chartArea width and left values but that didnt seem to work. I've also made sure that the containing div is wide enough so it's not cutting off the '100%' label. Any ideas? Update w/ jsFiddle jsFiddle with my code &lt;body bgcolor = "black"&gt; &lt;div id="chart_language_div"&gt;&lt;/div&gt; &lt;div id="chart_api_div"&gt;&lt;/div&gt; &lt;div id="chart_software_div"&gt;&lt;/div&gt; &lt;/body&gt; As you can see from my div declarations, I don't have any containing divs in the example and the issue still exists.
has answer: http://stackoverflow.com/a/25493641
answer count: 1
tagged with: javascript
score: 0
has title: Google Charts bar chart last value label cutoff
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25493641
has comment: http://stackoverflow.com/comment/39790291
type: AnsweredQuestion

http://stackoverflow.com/comment/39690660
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25439620
type: Comment
has text: Is this you want? http://jsbin.com/lehakuyiwoya/1/edit

http://stackoverflow.com/comment/39806952
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25501890
has text: tried your suggestion but it doesnt work. also i edit the code above to show the real problem.
score: 0

http://stackoverflow.com/comment/39674966
has text: Oh, you also have to do `array_bin.push(randomElement[0]);` since `.splice` *always* returns an array.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25430814
type: Comment

http://stackoverflow.com/comment/39692792
score: 0
type: AnswerComment
has text: Read this [Is it okay to copy-paste answers from other questions?](http://meta.stackexchange.com/questions/78658/is-it-okay-to-copy-paste-answers-from-other-questions)
comment on: http://stackoverflow.com/a/25440656
type: Comment

http://stackoverflow.com/comment/39800920
type: QuestionComment
comment on: http://stackoverflow.com/q/25498842
score: 3
has text: `$('tbody').append(' ')` gives you back the `tbody`.
type: Comment

http://stackoverflow.com/a/25410708
has comment: http://stackoverflow.com/comment/39638664
has body: This is very similar to String Metrics. In other words, your algorithm should be modeled off of string metric/distance algorithms, such as the Levenshtein Distance. Basically, your algorithm needs to define how you want to rank similarity. This is usually done using points for 'displacement' and 'matching'. What's closer to 100 - 010 or 000 ? You should decide how to rank the similarity and then find the set that ranks the highest.
has comment: http://stackoverflow.com/comment/39638469
type: Answer
answers question: http://stackoverflow.com/q/25410335
score: 0

http://stackoverflow.com/q/25460161
has title: How to avoid including same file in Iframe?
answer count: 0
type: UnansweredQuestion
tagged with: iframe
upvote count: 1
has body: I have a webpage that includes a Javascript file(pqrs.js) , I have a iframe in the same page that needs same js file , so we need to include or download same file twice . There is any way to avoid this . Domain for Iframe and main page is same . As fooo.com/xyz contains an iframe foo.com/xyz
score: 1
has comment: http://stackoverflow.com/comment/39729433
tagged with: dom
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/39729403
tagged with: javascript
has comment: http://stackoverflow.com/comment/39729570
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25405033
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25405240
has body: So I have a problem where I have two forms with the same ID on the same web page (assume I can't change the ID very easily for either form and both forms are required on the page). When I submit one of the forms, it is also submitting the other form, blank, creating two submissions. I would like to disable the opposite form of the form with current focus. So for example, if the submit button of the form at the bottom of the page is submitting, then ideally the top form would already be disabled with javascript and eliminate the second submission. Here is the code for the top form - &lt;div id="gf_top"&gt; &lt;form method="post" enctype="multipart/form-data" id="gform_1" action="/"&gt; And the bottom form - &lt;div id="gf_bottom"&gt; &lt;form method="post" enctype="multipart/form-data" id="gform_1" action="/"&gt; I know zero javascript / JQuery. I suspect I need to use something like (based on some google searches) $("#gf_top #gform1 :input").attr('disabled', true); but I don't really know the code to add for the focus of one disables the other. I guess also there needs to be code to remove the disabled attribute when/if the disabled form receives focus and then disable the other... Sheesh, any help much appreciated!
has title: Disable one on page form when the other form has focus
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39626284
score: 1
tagged with: forms
has answer: http://stackoverflow.com/a/25405188
has comment: http://stackoverflow.com/comment/39626404
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39626340
upvote count: 1
tagged with: javascript

http://stackoverflow.com/comment/39791549
type: AnswerComment
comment on: http://stackoverflow.com/a/25491426
type: Comment
has text: You are right. I figured it out myself just now. There were a couple of errors. The correct path is `/d3/d3.js` instead of `../d3/d3.v3.js`. I am still unable to open the webpage directly by clicking on it. I have to specify the path via the local host. Which I guess is fine for now. Though I wonder if there is an obvious solution that my novice brain is missing.
score: 0

http://stackoverflow.com/q/25472425
linked to: http://stackoverflow.com/q/9361108
has answer: http://stackoverflow.com/a/25472461
has title: JavaScript backspace and remove break from h1 element
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25472478
has answer: http://stackoverflow.com/a/25472478
type: Question
score: 0
upvote count: 1
has body: I am looking to remove the break after an H1 element as well as a way to implement a backspace in JavaScript
downvote count: 1
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/9932957
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25472453
accepted answer: http://stackoverflow.com/a/25472453

http://stackoverflow.com/comment/39801888
has text: The before and after pseudo classes are valid with container elements like div, span, article, etc. Since radio does not contain any other elements in it, before/after doesn't work.
comment on: http://stackoverflow.com/q/25499334
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39609424
type: QuestionComment
comment on: http://stackoverflow.com/q/25395588
has text: I checked the csproj and I see <TypeScriptCompile Include="Scripts\site.ts" /> along with the appropriate targets. Is there something else I need to do?
score: 0
type: Comment

http://stackoverflow.com/comment/39773944
has text: thanks Dennis...but how to reselect the list can you give an idea
type: AnswerComment
comment on: http://stackoverflow.com/a/25468846
score: 0
type: Comment

http://stackoverflow.com/a/25501444
answers question: http://stackoverflow.com/q/25500312
type: Answer
has body: Try this. body{ position:relative } #header{ position:absolute; z-index:10; } #page{ position:absolute; top:0; } padding-top = calculate height of header. Also check which div the image is applied as background.
upvote count: 4
downvote count: 0
type: AcceptedAnswer
score: 4
accepted answer of: http://stackoverflow.com/q/25500312

http://stackoverflow.com/comment/39725775
has text: Oh, of course. The answer you selected as correct was already there when I commented. I've just informed you of a possible typo, not that the code was right.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25458074
type: Comment

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

http://stackoverflow.com/comment/39809818
type: QuestionComment
has text: You need to iterate through your array of objects and compare or use a library like underscoreJS which makes it easy and quick: `_.findWhere(list, properties) `
comment on: http://stackoverflow.com/q/25503627
score: 0
type: Comment

http://stackoverflow.com/a/25435425
upvote count: 5
score: 5
answers question: http://stackoverflow.com/q/25435357
downvote count: 0
type: Answer
has body: a = a; This assigns to the local variable a from the local variable a, effectively (ineffectively?) doing nothing. The global variable is still set to its default of undefined, and that’s why you get undefined from getA(). In getC(), you return the value of the global variable c, but only assigned to the property c of the instance: this.c. this isn’t implicit in JavaScript.

replace
tags question: http://stackoverflow.com/q/25401903
tags question: http://stackoverflow.com/q/25391490
tags question: http://stackoverflow.com/q/25507412
tags question: http://stackoverflow.com/q/25472355
tags question: http://stackoverflow.com/q/25547567
type: Tag
tags question: http://stackoverflow.com/q/25461497
tags question: http://stackoverflow.com/q/25398395
tags question: http://stackoverflow.com/q/25516605
tag name: replace
tags question: http://stackoverflow.com/q/25409601
tags question: http://stackoverflow.com/q/25446408
tags question: http://stackoverflow.com/q/25505187
tags question: http://stackoverflow.com/q/25506695
tags question: http://stackoverflow.com/q/25517280
tags question: http://stackoverflow.com/q/25433079

http://stackoverflow.com/comment/39788816
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25491932
has text: This is what i get in the new tab link: /Provider/MemberEvents.aspx?itemId= No value for MemberNumber
type: Comment

codeigniter
tags question: http://stackoverflow.com/q/25468245
tags question: http://stackoverflow.com/q/25397028
type: Tag
tags question: http://stackoverflow.com/q/25397195
tags question: http://stackoverflow.com/q/25480410
tags question: http://stackoverflow.com/q/25452808
tag name: codeigniter
tags question: http://stackoverflow.com/q/25393138
tags question: http://stackoverflow.com/q/25398864
tags question: http://stackoverflow.com/q/25520959
tags question: http://stackoverflow.com/q/25468960
tags question: http://stackoverflow.com/q/25444109
tags question: http://stackoverflow.com/q/25548086
tags question: http://stackoverflow.com/q/25468904
tags question: http://stackoverflow.com/q/25477910

http://stackoverflow.com/a/25511821
has comment: http://stackoverflow.com/comment/39856675
answers question: http://stackoverflow.com/q/25510746
score: 0
has comment: http://stackoverflow.com/comment/39868294
has body: I think you need to use something like: window.onpopstate = function(event) { // do something };
has comment: http://stackoverflow.com/comment/39856165
type: Answer

http://stackoverflow.com/q/25492563
has comment: http://stackoverflow.com/comment/39789663
possible better answer: http://stackoverflow.com/a/25492645
has comment: http://stackoverflow.com/comment/39789736
has comment: http://stackoverflow.com/comment/39789853
type: Question
has body: Normally, when I call new keyword, it will absolutely output an object. For example: function Time(){ this.now = new Date(); } console.log(new Time()); //{now : 'Tue Aug 26 2014 01:52:15 GMT+0700 (SE Asia Standard Time)'} How can new Date() be a string value?
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39789764
has comment: http://stackoverflow.com/comment/39790124
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25492628
has comment: http://stackoverflow.com/comment/39789683
has comment: http://stackoverflow.com/comment/39789660
has comment: http://stackoverflow.com/comment/39789895
has title: Why is new Date() a string value?
has comment: http://stackoverflow.com/comment/39790029
favorite count: 0
has comment: http://stackoverflow.com/comment/39789672
has comment: http://stackoverflow.com/comment/39790310
upvote count: 1
has answer: http://stackoverflow.com/a/25492645
has comment: http://stackoverflow.com/comment/39789725
has comment: http://stackoverflow.com/comment/39789673
tagged with: object
has answer: http://stackoverflow.com/a/25492628
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39790510
score: 1

http://stackoverflow.com/a/25482158
answers question: http://stackoverflow.com/q/25482042
has body: Check your data because this seems to work fine: JSFIDDLE var images = ["a:b:c","d:e:f"]; var data = { questions:[], answers:[] }; var questionAssetPath = "c:\\abc\\"; var mouseAssetPath = "c:\\def\\"; $.each(images, function (k, v) { v = v.split(':'); data.questions.push({source: questionAssetPath + v[0], match: v[1], mouse: mouseAssetPath + v[2] + '.png'}); data.answers.push({answer: v[1], match: v[1]}); }); console.log(data);
score: 0
type: Answer

http://stackoverflow.com/a/25454552
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39719710
has comment: http://stackoverflow.com/comment/39725635
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25453959
has comment: http://stackoverflow.com/comment/39719759
has body: You can do this way :- Set your directive to a higher priority so that the directive runs before ng-model does its viewValue/modelValue evaluation, and do a 2 way binding with ngModel to get the actual value you set (and not the viewValue of ngModel), and to support async data assignment keep a temporary watch. You cannot possibly do it with formatters because they run after ngModel has evaluated the value. .directive( 'jkNumeric', function() { return { restrict: 'A', require: 'ngModel', priority:999999, //&lt;-- Give a higher priority scope: { model:'=ngModel' //&lt;-- A 2 way binding to read actual bound value not the ngModel view value }, link: function(scope, element, attrs, ngModelCtrl) { //Perform whatever formatting you want to do. function stringToNum(text) { return +text; } var unwatch = scope.$watch('model', function(val){ if(!val) return; ngModelCtrl.$setViewValue(stringToNum(val)); ngModelCtrl.$render(); unwatch(); }); } }; }); Plnkr Another way to watch would be to watch on evaluated value of ngModel attribute. require: 'ngModel', priority:999999, link: function(scope, element, attrs, ngModelCtrl) { function formatToNumber(text) { //do something and return numeric value } scope.$watch(function(){ return scope.$eval(attrs.ngModel); //evaluate the scope value }, function(val){ if(!val) return; ngModelCtrl.$setViewValue(formatToNumber(val)); ngModelCtrl.$render(); }); Plnk2
accepted answer of: http://stackoverflow.com/q/25453959
has comment: http://stackoverflow.com/comment/39724314
has comment: http://stackoverflow.com/comment/39718801
type: Answer

http://stackoverflow.com/comment/40082849
type: Comment
comment on: http://stackoverflow.com/a/25492291
type: AnswerComment
has text: This is set up to scroll to the image number of the id of the clicked button. It require a set width on .thumbnail. http://jsfiddle.net/p96wrtop/3/
score: 0

http://stackoverflow.com/comment/39759548
score: 0
comment on: http://stackoverflow.com/a/25476450
type: AnswerComment
type: Comment
has text: @cm8188 yep, added fiddle

http://stackoverflow.com/a/25528189
score: 1
upvote count: 1
has body: Make the div appear after a certain amount of pixels scrolling down. The fadeIn transition is done using CSS. This would be your jQuery code: var $document = $(document), $element = $('.fixed-menu'), className = 'hasScrolled'; $document.scroll(function() { if ($document.scrollTop() &gt;= 100) { $element.addClass(className); } else { $element.removeClass(className); } }); Here i set up a jsFiddle as example
answers question: http://stackoverflow.com/q/25527807
downvote count: 0
type: Answer

http://stackoverflow.com/q/25470907
tagged with: javascript
has answer: http://stackoverflow.com/a/25470954
score: 6
possible better answer: http://stackoverflow.com/a/25471004
answer count: 3
has answer: http://stackoverflow.com/a/25471004
accepted answer: http://stackoverflow.com/a/25470954
has comment: http://stackoverflow.com/comment/39749285
has answer: http://stackoverflow.com/a/25471039
favorite count: 0
has body: I got to this document which says there is a closure happening here: function addHandler(){ document.getElementById('el').onclick = function(){ this.style.backgroundColor = 'red'; }; } While this code removes the closure: function addHandler() { var clickHandler = function() { this.style.backgroundColor = 'red'; }; (function() { var el = document.getElementById('el'); el.onclick = clickHandler; })(); } I can't see how the second one solves the closure issue. Why would not the code at el.onclick = clickHandler create a closure? clickHandler's this has to be fulfilled with el.
upvote count: 7
type: AnsweredQuestion
downvote count: 1
type: Question
has title: How does 'this" work in closure?

http://stackoverflow.com/q/25471315
tagged with: javascript
has title: Generate an array of markers in one loop and assign different popup to all of them
tagged with: google-maps-api-3
tagged with: google-maps
type: AnsweredQuestion
downvote count: 0
has body: I load an array of markers from a JSON string. The JSON string contains marker location and information that needs to be displayed on each marker's popup. I have the following code function AddAllMarkers(markersJSON){ var tempArray = JSON.parse(markersJSON); infoWindow = new google.maps.InfoWindow(); for(var i = 0; i &lt; tempArray.Locations.length; i++){ var obj = tempArray.Locations[i]; var point = new google.maps.LatLng(obj.Latitude, obj.Longitude); var contentString = &lt;!--CONTENT STRING GETS SET HERE PER MARKER--&gt;; var markerTemp = new google.maps.Marker({ position: point, icon:obj.Icon }); google.maps.event.addListener(markerTemp, 'click', function() { infoWindow.close(); infoWindow = new google.maps.InfoWindow(); infoWindow.setContent(contentString); infoWindow.open(map, this); }); markerArray.push(markerTemp); } } When this function gets called I load all the markers correctly but all markers show the popup of the last marker loaded. What am I doing wrong? I did try moving the declaration of infoWindow around but either that does not solve the problem or it causes multiple balloons to be opened at the same time. How can I solve this?
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25471549
type: Question
has comment: http://stackoverflow.com/comment/39752370
linked to: http://stackoverflow.com/q/3059044
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/25471549
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/39701889
has text: just curious why you need to do this way, redirecting to a new page.
comment on: http://stackoverflow.com/q/25445956
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28132191
downvote count: 0
type: Answer
has body: Javascript arrays are objects. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Predefined_Core_Objects#Array_Object for details. Note: if you supply a non-integer value to the array operator in the code above, a property will be created in the object representing the array, instead of an array element. JSON supports only a subset of Javascript. See http://www.json.org/ for details. JSON is built on two structures: A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array. An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence. A Javascript array that has properties created in the underlying object does not fit into either of these structures because it has both a collection of name/value pairs and an ordered list of values, so there is no simple way to represent such an object directly in JSON. The JSON.stringify method is defined in the ECMAScript specification. For example, see http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3. While there are many details, the bit that is relevant here is how object values are stringified: If Type(value) is Object, and IsCallable(value) is false If the Class internal property of value is "Array" then Return the result of calling the abstract operation JA with argument value. Else, return the result of calling the abstract operation JO with argument value. Given your array, despite the addition of parameters to the underlying object, the result is of stringifying the ordered set of array elements, not the underlying object. There is nothing wrong about adding parameters to an array object, but they are not part of the array and functions or methods that handle arrays might ignore them or deal with them arbitrarily. You have seen that JSON.stringify ignores the additional parameters. Other functions might do otherwise - you will have to find out in each …
answers question: http://stackoverflow.com/q/25422293
upvote count: 5
score: 5

http://stackoverflow.com/q/25397349
type: Question
tagged with: dynamics-crm-2011
has comment: http://stackoverflow.com/comment/39612358
tagged with: javascript
score: 0
has body: I'm creating an Entity Form in CRM with an IFRAME. The URL in the IFrame is a WebApp I created using asp with some Java script Function. But every time I make a New Record on my Entity Form in CRM, the IFrame is not Loaded and a SHIELD icon appears on my address bar with an option "Load Unsafe Script". Then the HTTPS become red. How can I remove that Shield Icon or Automatically load my Script or make my Script safe to load?
answer count: 0
type: UnansweredQuestion
tagged with: crm
has title: Unsafe Script on IFRAME CRM
has comment: http://stackoverflow.com/comment/39612875

http://stackoverflow.com/q/25424003
answer count: 1
score: 0
has comment: http://stackoverflow.com/comment/39661500
has title: HTML returned from jQuery AJAX call acting weird
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25424073
has body: I have some HTML that is echoed out by my PHP form handler script. The call made is an AJAX call, here is the jQuery AJAX call. $(function() { $('#file').bind("change", function() { var formData = new FormData(); //loop for add $_FILES["upload"+i] to formData for (var i = 0, len = document.getElementById('file').files.length; i &lt; len; i++) { formData.append("file" + i, document.getElementById('file').files[i]); } //send formData to server-side $.ajax({ url: "file-upload.php", type: 'post', data: formData, dataType: 'html', async: true, processData: false, // tell jQuery not to process the data contentType: false, // tell jQuery not to set contentType success : function(data) { alert('success!!'); $('#upload-result')[0].html(data); }, error : function(request) { alert('error!!'); console.log(request.responseText); } }); }); }); I am getting a weird error: TypeError: undefined is not a function So I place a breakpoint in my success call, and here is the result in the Chrome Console: As you can see, my div element that I am targeting exists! my data returned is also present! So why can't I append that to the div element #upload-result?
type: Question
accepted answer: http://stackoverflow.com/a/25424073

http://stackoverflow.com/q/25482490
tagged with: kineticjs
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Multi-touch for my rotation KineticJs
has answer: http://stackoverflow.com/a/25518048
type: AnsweredQuestion
type: Question
tagged with: puzzle
accepted answer: http://stackoverflow.com/a/25518048
has body: i am currenly using kineticJs v4.5.3 , i am doing jig-saw puzzle and my puzzle can be rotate with "click" event , but now i want to change to multi-touch which allows me to use 2 finger or hands to rotate the jig-saw pieces, anyone have any idea of that? Thanks :) piecesArray[i][j].shape.on("mousedown", function () { this.moveToTop(); this.rotateDeg(90) layer.draw(); }); My JsFiddle : http://jsfiddle.net/e70n2693/7/
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39742752
comment on: http://stackoverflow.com/q/25467321
has text: Ooops, you're right. Do you think I should update the question to fix that error?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39833242
comment on: http://stackoverflow.com/a/25515741
score: 0
type: AnswerComment
has text: Awesome answer is awesome! I'll fitting this into my project, I'll contact you if I face any other problem. Thanks for the time man!
type: Comment

http://stackoverflow.com/comment/39897391
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25550837
type: QuestionComment
has text: I'm writing an answer, but I voted down because I find the question not useful.

http://stackoverflow.com/comment/39810604
score: 0
type: QuestionComment
type: Comment
has text: @Teemu please have a look at code now. I have added the javsacript code
comment on: http://stackoverflow.com/q/25502096

http://stackoverflow.com/q/25404439
answer count: 1
favorite count: 0
tagged with: angularjs
has body: I've build an directive there I use scope.$watch. But I get the following error when I run my application: Error: [$rootScope:infdig] http://errors.angularjs.org/1.2.22/$rootScope/infdig?p0=10&p1=%5B%5B%22safeHtml()%3B%20newVal%3A%20%7B%7D%3B%20oldVal%3A%20%7B%7D%22%5D%2C%5B%22safeHtml()%3B%20newVal%3A%20%7B%7D%3B%20oldVal%3A%20%7B%7D%22%5D%2C%5B%22safeHtml()%3B%20newVal%3A%20%7B%7D%3B%20oldVal%3A%20%7B%7D%22%5D%2C%5B%22safeHtml()%3B%20newVal%3A%20%7B%7D%3B%20oldVal%3A%20%7B%7D%22%5D%2C%5B%22safeHtml()%3B%20newVal%3A%20%7B%7D%3B%20oldVal%3A%20%7B%7D%22%5D%5D I don't know why this appears. I know that It has something to with attr.ngBind, but I don't know why this error is triggered. Here is my controller, including my directive: var gameApp = angular.module("gameApp", ['ngRoute','ngSanitize']); gameApp.service('link', function() { this.user = false; }); gameApp.filter('unsafe', function($sce) { return function(val) { return $sce.trustAsHtml(val); }; }); gameApp.directive('mapActivity', function() { return { restrict: 'A', link: function(scope, element, attr) { scope.$watch(attr.ngBindHtml, function(value) { angular.element('.click#1').addClass('dotted').html($(" ")); var j = null; for(var i = 1; i <= 4; i++) { $.ajax({ type: 'GET', url: 'lib/terrain.php', dataType: 'html', data: {i: i}, success: function(data) { var randomRuta = Math.floor((Math.random() * 100) + 1); angular.element('.click#'+randomRuta).addClass('monster').html($(" ")); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError); } }); j=i; } angular.element('.click').click(function() { if(angular.element(this).hasClass('monster')) { if(confirm('Vill du anfalla monster?')) { alert("Du vann"); angular.element('.click.monster'+j).empty(); angular.element('.click.monster').removeClass('monster'+j); angular.element('.click.dotted').empty(); angular.element('.click.dotted').removeClass('dotted'); angular.element(this).addClass('dotted'); angular.element('.click.dotted').html($(' ')); } } else…
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/62968160
tagged with: error-handling
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/25409039
accepted answer: http://stackoverflow.com/a/25409039
tagged with: javascript
upvote count: 1
has title: Error while using scope.$watch in directive

http://stackoverflow.com/comment/39649687
type: Comment
comment on: http://stackoverflow.com/a/25417166
has text: The @Ninsly code should work too.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25536351
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/52583893
has answer: http://stackoverflow.com/a/25536409
tagged with: attributes
has answer: http://stackoverflow.com/a/25536464
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: bootstrap-typeahead
has title: Use html input data field attribute on bootstrap typeahead
has body: I'm trying to get a data-field attribute to select what field of my "objects.json" will be used as source of my Bootstrap Typeahead input text, like: form.html &lt;input type="text" data-provide="typeahead" data-field="name"&gt; form.js $("[data-provide=typeahead]").typeahead({ source: function(query, process) { return $.get("/objects.json", { query: query }, function(data) { return process($.map(data, function(o) { return o[$(this).data('field')]; })); }); } }); objects.json [{"id":1,"name":"lorem"}, {"id":2,"name":"ipsum"}, {"id":3,"name":"dolor"}] The problem is the "$(this).data('field')" on Javascript isn't get the HTML data-field attribute. Thanks in advance!
answer count: 3
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39638961
type: Comment
has text: This is *bounding box collision detection*, which is efficient and used often. I have done collision detection like this countless times. I don't see why you think there is something wrong with it.
type: AnswerComment
comment on: http://stackoverflow.com/a/25411324
score: 0

http://stackoverflow.com/q/25463728
has body: demo: http://jsfiddle.net/sky94132003/gbptvmnk/ I create a comment function for my site there is a button for the user click to reply a comment. onclick function will be do something 1. open slideToggle 2. animate scrollTop to the comment box (textarea) 3. animate backgroundColor (notic user where comment.) $(function() { $( ".reply_video" ).click(function() { $(".comment_reply_video").slideToggle( "fast" ); $('html,body').animate({ scrollTop:$('.comment_reply_video').offset().top-90}, 800); $(".comment_reply_video").animate({ backgroundColor: '#CCC' }, 800 ); setTimeout(function() { $(".comment_reply_video").animate({ backgroundColor: '#FFF' }, 1200 ); }, 1500); $(".r_all").focus(); }); }); But the user click the first will be open the slideToggle. how can I set the just the first will be active slideToggle function? If opened. onclick just to do 2.animate scrollTop to the comment box (textarea) 3.animate backgroundColor (notic user where comment.) and dont close the slideToggle
has answer: http://stackoverflow.com/a/25463801
has title: how to set slideToggle open div just on the first click?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39735815
type: Question
possible better answer: http://stackoverflow.com/a/25463801
has comment: http://stackoverflow.com/comment/39735748
accepted answer: http://stackoverflow.com/a/25463764
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25463764
tagged with: jquery

http://stackoverflow.com/q/25431912
tagged with: javascript
favorite count: 0
tagged with: promise
linked to: http://stackoverflow.com/q/28250680
duplicate of: http://stackoverflow.com/q/28250680
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25432229
has answer: http://stackoverflow.com/a/25432707
upvote count: 3
has answer: http://stackoverflow.com/a/25432229
has answer: http://stackoverflow.com/a/25437296
has answer: http://stackoverflow.com/a/25436239
has title: Can you "accumulate" promise results in a chain of "then"?
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/25436239
has comment: http://stackoverflow.com/comment/39677159
has comment: http://stackoverflow.com/comment/39677007
has comment: http://stackoverflow.com/comment/39677066
downvote count: 0
has body: Assuming you have to chain function that return promises, where each function needs values returned by some (not necessarily the last) other promise. Does this pattern have a name, and is it feasible cleanly with promises ? E.g : return getA().then(function (a) { getB(a).then(function (b) { getC(a, b).then (function (c) { return { a : a, b : b, c : c } }); }); }); You can't "naively" flatten this : getA().then(function (a) { return getB(a); }).then(function (b) { // Obviously won't work since a is not there any more return getC(a, b); }).then(function (c) { // Same game, you can't access a or b }); The only alternative I can see is that getA, getB and getC actually return a Promise resolved with an object containing a, then b, then c. (So each function would build it's part of the final result.) getA().then (function (result) { return getB(result.a); }).then(function (result) { return getC(result.a, result.b); }).then(function (result) { // Last function is useless, just here to illustrate. return result; }); Is there a way to flatten the code in my first example?

http://stackoverflow.com/comment/39813181
has text: @code-jaff is OP using that API?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25504659

http://stackoverflow.com/comment/40141019
comment on: http://stackoverflow.com/q/25452190
type: Comment
type: QuestionComment
has text: @sebagomez Thanks for your reply and apologies for the delay. I haven't got anything else to show really, what I have entered in the question is essentially it.
score: 0

http://stackoverflow.com/q/25467908
has body: hello all i am having a page where there are two divs floating left one is of about 360 px and the other is auto width when the page scrolls the left div is added a class which makes it fixed to the screen and allows the oyher div to scroll. it is working in chrome but not in mozilla actually the div gets fixed but the other div gets behind the fixed div. here is the code &lt;div id="leftfixop909"&gt; &lt;div id="MKAEitFIXED0"&gt; &lt;/div&gt;&lt;/div&gt; &lt;div id="otherdiv"&gt; &lt;/div&gt; #leftfixop909{max-width:365px; min-height:103%;margin- left:-8px; float:left;width:35%;min-width:360px; overflow:auto;overflow-x:hidden; box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75);} #MKAEitFIXED0{width:365px;min-height:101%; background:url(webimg/mainbg.png); padding-bottom:20px;z-index:99;overflow:auto; box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75);} .RighTFIXIEDbot{position:fixed;bottom:0px;} #otherdiv{width:auto; overflow:hidden;min-height:150%;margin-top:46px;padding-left:20px;} $(window).scroll(function () { var height=window.innerHeight; var DIVHEIG=$("#MKAEitFIXED0").height(); var NOWstoPS=(DIVHEIG-height); if ($(this).scrollTop() &gt; NOWstoPS) { $('#MKAEitFIXED0').addClass('RighTFIXIEDbot'); } else if ($(this).scrollTop() &lt; NOWstoPS) { $('#MKAEitFIXED0').removeClass('RighTFIXIEDbot'); } }); is there anything you can suggest me i think the min-height property is not accepted by mozilla but if a fix the height i get a scroller or may get some matter trimmed .
answer count: 1
tagged with: jquery
has title: onscroll fix the div and add a class having troublle in mozilla
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25467990
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25467990

http://stackoverflow.com/a/25432283
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25432149
has body: Catch all clicks on the html document, and close the modal. Catch clicks inside the modal and stop the propagation. i.e. $("html").on("click",closemodal()); $(".modal").on("click",function(event){ event.stopPropagation(); }
downvote count: 0
has comment: http://stackoverflow.com/comment/82397903

http://stackoverflow.com/comment/39801834
score: 0
comment on: http://stackoverflow.com/q/25499315
has text: can you place the code on jsfiddle
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25536703
has title: How to enable a pageAction icon for a chrome extension in incognito mode?
has body: Even after selecting the 'Allow in incognite mode' my extension which uses pageaction to render in certain urls doesn't show up in incognito mode. background.js has the following. chrome.runtime.onInstalled.addListener(function() { // Replace all rules ... chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { // With a new rule ... chrome.declarativeContent.onPageChanged.addRules([ { // That fires when a page's URL contains a 'g' ... conditions: [ new chrome.declarativeContent.PageStateMatcher({ pageUrl: { urlContains: 'sears' }, }) ], // And shows the extension's page action. actions: [ new chrome.declarativeContent.ShowPageAction() ] } ]); }); });
has answer: http://stackoverflow.com/a/25537746
upvote count: 3
type: UnansweredQuestion
tagged with: google-chrome
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: google-chrome-extension
score: 3

jquery-ui-draggable
tags question: http://stackoverflow.com/q/25425294
tags question: http://stackoverflow.com/q/25512094
type: Tag
tags question: http://stackoverflow.com/q/25538191
tag name: jquery-ui-draggable
tags question: http://stackoverflow.com/q/25493225
tags question: http://stackoverflow.com/q/25515140

http://stackoverflow.com/comment/39707230
comment on: http://stackoverflow.com/a/25448188
type: AnswerComment
score: 0
has text: In the future, other browsers may support it, so keep it in mind.
type: Comment

http://stackoverflow.com/q/25486588
tagged with: flask
has body: I am having hard time loading local js file with docker. I had no problem testing on local machine but if I host it on web server running on docker No such file or directory: 'static/js/data.js error. My code is organized as follow: Root/ application.py static/ js/ data.js templates/ index.html And in application.py I am generating the file data.js and from index.html I read the file data.js with no problem &lt;script src="../static/js/data_data.js"&gt;&lt;/script&gt; And in application.py I create a file using file = open("static/js/data.js", "w+") which works fine in local machine but not in web server (EC2) And here's my dockerfile FROM ubuntu:14.04 RUN apt-get update RUN apt-get install python-setuptools -y &amp;&amp; DEBIAN_FRONTEND=noninteractive apt-get install python-setuptools -y RUN apt-get install python-pip -y RUN apt-get install python-numpy -y RUN apt-get install python-matplotlib -y RUN apt-get install python-mysqldb -y RUN apt-get install libpq-dev -y RUN apt-get install python-psycopg2 -y RUN apt-get install python-pandas -y RUN pip install flask ADD . /src # Expose EXPOSE 80 # Run CMD ["python", "/src/application.py"]
tagged with: python
has comment: http://stackoverflow.com/comment/39777764
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39778902
type: Question
has title: Docker IO Error with local js file
tagged with: docker
score: 0
has answer: http://stackoverflow.com/a/25488300
accepted answer: http://stackoverflow.com/a/25488300
tagged with: amazon-ec2
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25442698
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has body: I don't know how to catch the event from EventSource with javascript. I am doing it like that, but "running" never appears in the console. var es = new EventSource(myUrl); es.addEventListener("time", function(e){ console.log("running") }, false); es.onopen = function(){ console.log('open') }, es.onerror = function(e){ console.log('error') }, It log on 'open' and I see in the network section in the browser console that it is connected and updating every 5 s, when i curl to the server i am getting response every 5 s: :ok event: time data: {"data":"tick","ttl":"60","published_at":"2014-08-22T08:26:17.624Z","id":"53ff6e065067544829091287"} event: time data: {"data":"tick","ttl":"60","published_at":"2014-08-22T08:26:22.630Z","id":"53ff6e065067544829091287"} how can I catch this event in JS?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39697798
score: 2
has comment: http://stackoverflow.com/comment/39697185
downvote count: 0
tagged with: server-sent-events
has comment: http://stackoverflow.com/comment/39696508
has comment: http://stackoverflow.com/comment/39697053
type: Question
has answer: http://stackoverflow.com/a/25455231
upvote count: 2
has title: EventSource is not triggering on addEvent listenning

http://stackoverflow.com/a/25443435
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25443343
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25443343
type: Answer
has body: You can listen to select2-close event. When this event is fire you can remove "active" class. $('.YOURCLASS').removeClass('select2-container-active'); Demo
score: 1
upvote count: 1

http://stackoverflow.com/q/25466173
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/25466536
has answer: http://stackoverflow.com/a/25466377
has title: How do I create a list of quotes in my html from javascript objects?
score: 0
answer count: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/39740423
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has body: *A Jsfiddle would be appreciated, thanks! This is a sample of what I've been given in a js document: var comments = [ {"name":"John","comment":"Text","timestamp":69379200}, {"name":"Ronny","comment":"Text","timestamp":1007683200}, {"name":"Darrel","comment":"Text","timestamp":172281600} ]; How do I load that into my preexisting unordered list as list items? Ideally in this sort of a format (including turning the unix timestamps into this format): "Text" -John, 8/23/2014 "Text" -Ronny, 8/23/2014 "Text" -Darrel, 8/23/2014 I'm new to loading javascript into my html, so if anyone can help me out and explain, I'd really appreciate it! Thanks!
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39740574
has answer: http://stackoverflow.com/a/25466344
tagged with: dynamic
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/39807006
has text: He doesn't have to, he can do it himself (see my answer below). But I agree using `$http` is standard and recommended. But if he wants for whatever reason, he can live without it.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25501955
type: QuestionComment

http://stackoverflow.com/comment/39606865
comment on: http://stackoverflow.com/q/25394188
has text: have you tried compatibility mode on either 10 or 11?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39639388
type: AnswerComment
type: Comment
has text: If I'm not wrong ajax won't work for cross-domain sites?
comment on: http://stackoverflow.com/a/25411626
score: 0

http://stackoverflow.com/a/25548623
upvote count: 2
answers question: http://stackoverflow.com/q/25548501
downvote count: 0
has body: First and last slashes are delimiters. g at the end is a modifier (Modifiers are used to perform case-insensitive and global searches) and performs a global match (find all matches rather than stopping after the first match). | means OR. \/\/.* has some escaped chars and can be translated as // followed by any characters \/\*[^]*\*\/ has also some escaped chars and can be translated as /*any characters*/ Note: both / and * must be escaped because they are used by regex syntax (special characters). So \/ means / and \* means * while .* means any characters (0 or more times) Since the goal of your code is to remove comments, all comments like // xxxx or /* xxx */ are replaced by empty string
type: Answer
score: 2

http://stackoverflow.com/a/25478949
answers question: http://stackoverflow.com/q/25478511
score: 0
has body: I found the following changes in your code got the job done: Inside of init.js around line 15 remove the 200 millisecond delay from the dropdown menu fadeOut(). $(this).find('.dropdown-menu').stop(true, true).delay(0).fadeOut(); I re-wrote your hover function to target the li's instead of the a, it looked like there was some kind of conflict there: $('.navbar-nav &gt; li').on({ mouseenter: function() {; $(this).find('.menu-bg').animate({ height: "60px" }); }, mouseleave: function() { $(this).find('.menu-bg').animate({ height: "0px" }); } }); And finally, I overwrote the CSS that was creating that 5px margin gap on the .dropdown-menu: .dropdown-menu { margin-top:0px!important; } There you go! Please let me know if you'd like me to expand on anything?
type: Answer
has comment: http://stackoverflow.com/comment/39787615
has comment: http://stackoverflow.com/comment/39785835
accepted answer of: http://stackoverflow.com/q/25478511
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39778647

http://stackoverflow.com/a/25429861
answers question: http://stackoverflow.com/q/25429811
score: 0
has body: That is not the way to do it because it is an async call so the data will not be returned by the ajax call. Try this $(document).ready(function(){ var search_result; $("#searchBox").keyup(function(){ $.ajax({ url:"/mm5/service/product_lookup_json.php", type: "GET", dataType: "json", jsonp: false, data: "query=" + $("#searchBox").val(), success: function(data){ search_result = data; console.log(search_result); } }); }); });
type: Answer

http://stackoverflow.com/q/25418878
accepted answer: http://stackoverflow.com/a/25419053
type: AnsweredQuestion
downvote count: 0
tagged with: jqplot
score: 1
has title: jqPlot Pie chart not rendering correctly
has answer: http://stackoverflow.com/a/25504433
type: Question
tagged with: charts
tagged with: javascript
answer count: 2
upvote count: 1
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25504433
tagged with: cordova
has body: I am using jqPlot in phonegap but some problem is there like if I gave static value to pie chart then it works well but if I gave dynamic value then not rendering correctly Static chart :- $.jqplot('chartdiv', [ [ [ 'Cricket', 42], [ 'Football', 8 ], [ 'Basketball', 4 ], [ 'Chess', 28 ], [ ' TableTennis', 18 ] ] ], { seriesDefaults : { renderer : $.jqplot.PieRenderer, rendererOptions : { showDataLabels : true } }, legend : { show : true, location : 'e' } }); O/P :- Dynamic chart :- var cricketPortion = document.getElementById("value_1").value; var footballPortion = document.getElementById("value_2").value; var basketballPortion = document.getElementById("value_3").value; var chessPortion = document.getElementById("value_4").value; var ttPortion = document.getElementById("value_5").value; $.jqplot('chartdiv', [ [ [ 'Cricket', cricketPortion ], [ 'Football', footballPortion ], [ 'Basketball', basketballPortion ], [ 'Chess', chessPortion ], [ ' TableTennis', ttPortion ] ] ], { seriesDefaults : { renderer : $.jqplot.PieRenderer, rendererOptions : { showDataLabels : true } }, legend : { show : true, location : 'e' } }); O/P :- Tell me how can I get rid of this..??
has answer: http://stackoverflow.com/a/25419053

http://stackoverflow.com/comment/39707236
type: Comment
score: 1
has text: @nismonster You should really use a `HiddenField` instead. It's specifically designed for doing exactly this, unlike a `TextBox`.
type: AnswerComment
comment on: http://stackoverflow.com/a/25434399

http://stackoverflow.com/q/25406432
has comment: http://stackoverflow.com/comment/39629165
score: 1
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39629099
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: events
favorite count: 0
has title: How to ensure button is clicked even moving position
has answer: http://stackoverflow.com/a/25406540
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39629159
upvote count: 1
has comment: http://stackoverflow.com/comment/39629432
has body: See fiddle: http://jsfiddle.net/2fboubvs/5/ Text disappears when "valid" Next JS: $(function(){ $('button').on('click', function(){ alert('I was clicked'); }); $('#losefocus').on('change', function(){ $('#validationMessage').hide(); }); }); I have a text input in a state of "error" with a validation message below. I type something correct and while focus is still on the text button I click a button next that is located under the input and the validation message. If I click low on the button it will not trigger a click, since the removal of the message moves the button up as well. What are the workarounds to this? One approach I have thought of is to do the change event slightly async so that the button is clicked first, then the value is updated and then the message removed. This however will cause any reading of the value of the input done in the click handler for the button to use the previous value of the input. Also: pay attention to the button: it seems to get activated, visually it get a "pressed" or "active" look, but the click event is not fired.

http://stackoverflow.com/comment/39853419
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25527099
score: 0
has text: @PaulS. sorry I am quite new in jave I don't know how to convert it into JSON, can you give me some idea?

http://stackoverflow.com/comment/39735386
type: Comment
score: 1
has text: PHP gives me results: 1 2305843009213693950 0 1073741823 576460752303423487 why?
comment on: http://stackoverflow.com/a/25463496
type: AnswerComment

http://stackoverflow.com/q/25442833
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/39696281
has comment: http://stackoverflow.com/comment/39696362
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39696310
has title: I want to split a string and want to put in the dropdown list
has answer: http://stackoverflow.com/a/25443050
favorite count: 0
has comment: http://stackoverflow.com/comment/39696343
has comment: http://stackoverflow.com/comment/39696440
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39696533
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/3434278
has comment: http://stackoverflow.com/comment/39696555
score: -4
duplicate of: http://stackoverflow.com/q/25441228
has comment: http://stackoverflow.com/comment/39696496
type: Question
has answer: http://stackoverflow.com/a/25442889
linked to: http://stackoverflow.com/q/25441228
has comment: http://stackoverflow.com/comment/39696390
has body: strPropertyEvents=20 Aug 2014-New Activity 1, 21 Aug 2014-gfdbfjdb ,21 Aug 2014-anubhav, 24 ug 2014-hjdf Basically In strPropertyEvents it is stored in the form of string but I want to split this string in such a manner that where there is a comma , it splits down there and the output is in a dropdown list as &lt;script type="text/javascript"&gt; $('#hiddenActivityDate').val('@strPropertyEvents'); alert($('#hiddenActivityDate').val()); var strList = hiddenActivityDate.split(','); console.log(strList); $.each(strList,function(index,val){ $("#ProgramList").append('&lt;option&gt;'+val+'&lt;/option&gt;'); }); &lt;/script&gt; But the code is not working. Could you please help me out what is the mistake either in fiddle or anywhere.

http://stackoverflow.com/comment/39875857
type: AnswerComment
comment on: http://stackoverflow.com/a/25539310
type: Comment
has text: Why put everything on the same page?
score: 0

http://stackoverflow.com/a/25426313
has body: What you need is multiple IDs and an HTML Class to handle the CSS. Each element can only have one ID, but it can inherit multiple classes. Define .imgSmall and .imgBig classes, use those to handle your CSS, and then use whatever ID scheme suits you for the click detection. I would recommend something like img1, img1, img2 and bigimg1, bigimg2, bigimg3, because that would let you generate all of your html in a loop.
score: 1
answers question: http://stackoverflow.com/q/25426242
type: Answer
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/25481388
tagged with: angularjs
type: UnansweredQuestion
has title: Angularjs 1.30 password verify. Validate confirm password matches
has body: Total noob here. I'm using Angularjs 1.30 and trying to get confirm password to work. I want it such that if the "password" and "confirm_password" input fields match and validate, if I then modify either of the two fields, the form will no longer be valid. I think Dominic Watson gave an answer in password-check directive in angularjs, but pasting his module it into my .js and including it in my var app = angular.module('myapp', ['validators']) doesn't seem to work because...well, I don't know how to attach/use modules... (so if you can explain how I can use the modules like the one he posted into my own project, that would be great too!) I've tried most everything I could find, and as Dominic pointed out, the problem seems to be that in Angular 1.30, "invalid inputs don't write to ngModel"
tagged with: directive
tagged with: passwords
score: 1
type: Question
upvote count: 2
linked to: http://stackoverflow.com/q/14012239
tagged with: javascript
has answer: http://stackoverflow.com/a/30328695
favorite count: 0
answer count: 1
downvote count: 1

http://stackoverflow.com/comment/39746356
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25469307
has text: but how will i check if usr has came from refrrer URL or not
score: 0

http://stackoverflow.com/a/25424427
answers question: http://stackoverflow.com/q/25408116
score: 0
has body: Check my blog post here http://andersmalmgren.com/2014/08/11/single-page-application-with-sub-routing/ It has a main id for the viewmodel to load #MyMainModel And then it also listen to sub routs using the query after the hash like #MyMainModel?id=5 I cant really say if its a 100% solution for your usecase but maybe it can give you some pointers?
type: Answer

http://stackoverflow.com/a/25392832
downvote count: 0
has body: Use setTimeout, but store the reference so you can prevent it from executing if further editing has occurred. Basically, only update the preview once 5 seconds past the last keystroke has passed (at least in the below example). // maintain out of the scope of the event var to; $('#source-text').on('keyup',function(){ // if it exists, clear it and prevent it from occuring if (to) clearTimeout(to); // reassign it a new timeout that will expire (assuming user doesn't // type before it's timed out) to = setTimeout(function(){ updatePreview(); }, 5e3 /* 5 seconds or whatever */); }); References: clearTimeout setTimeout And not to self-bump, but here's another [related] answer: How to trigger an event in input text after I stop typing/writing?
answers question: http://stackoverflow.com/q/25392787
upvote count: 2
has comment: http://stackoverflow.com/comment/39625521
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39606525

http://stackoverflow.com/q/25410315
has title: AddEventListener isn't working, hard-coded works
has comment: http://stackoverflow.com/comment/39637312
has comment: http://stackoverflow.com/comment/39637030
has comment: http://stackoverflow.com/comment/39638026
tagged with: jquery
has comment: http://stackoverflow.com/comment/39639056
has comment: http://stackoverflow.com/comment/39638163
has comment: http://stackoverflow.com/comment/39637431
has comment: http://stackoverflow.com/comment/39637515
has comment: http://stackoverflow.com/comment/39636852
has comment: http://stackoverflow.com/comment/39637470
has comment: http://stackoverflow.com/comment/39637143
has comment: http://stackoverflow.com/comment/39637264
has comment: http://stackoverflow.com/comment/39636983
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39638105
has comment: http://stackoverflow.com/comment/39639223
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39637238
answer count: 0
has comment: http://stackoverflow.com/comment/39636693
has comment: http://stackoverflow.com/comment/39637361
has comment: http://stackoverflow.com/comment/39637969
has comment: http://stackoverflow.com/comment/39636632
has comment: http://stackoverflow.com/comment/39637549
type: Question
has body: this is pretty odd. I'm trying to add event listener but it doesn't work though hard-coding it to the html is working. Here's my code - tet The Dynamo.intilize function = var Dynamo = { __elements: document.getElementsByTagName("*"), intilize: function() { var links = document.getElementsByTagName("a"); for (var i = 0; i < links.length; i++) { var link = links[i].attributes[0].value; if (link.match(/^https?/) === null) { console.log(links[i]); links[i].addEventListener("mouseover", function(event) { event.preventDefault(); alert('event'); //Dynamo.loadAndReplace('js/' + link + '.json'); // history.pushState(null, null, links[i].href); } , false); } } }, manipulateValue: function(elem, manipulation) { for (var i = 0; i < elem.attributes.length; i++) { elem.setAttribute(elem.attributes[i].name, manipulation(elem.attributes[i].value)); } }, replace: function(str, match, replacement) { return str.replace(new RegExp('\{\{' + match + '\}\}', "g"), replacement); }, loadAndReplace: function(json) { $.getJSON(json, function(data) { var keys = Object.keys(data); for (var i = 0; i < Dynamo.__elements.length; i++) { if (Dynamo.__elements[i].attributes.length !== 0) { Dynamo.manipulateValue(Dynamo.__elements[i], function(val) { for (var j = 0; j < keys.length; j++) { return val.replace('{{' + keys[j] + '}}', data[keys[j]]); } }); } else { for (var j = 0; j < keys.length; j++) { Dynamo.__elements[i].innerHTML = Dynamo.replace(Dynamo.__elements[i].innerHTML, keys[j], data[keys[j]]); } } } }); } } But it doesn't work and I don't know why, there are no errors, nothing. The if part IS working.
has comment: http://stackoverflow.com/comment/39638639
has comment: http://stackoverflow.com/comment/39639220
has comment: http://stackoverflow.com/comment/39637097
has comment: http://stackoverflow.com/comment/39637336
tagged with: javascript
has comment: http://stackoverflow.com/comment/39636653
tagged with: dom
has comment: http://stackoverflow.com/comment/39638144
has comment: http://stackoverflow.com/comment/39637856
has comment: http://stackoverflow.com/comment/39637271
score: 0

http://stackoverflow.com/comment/39792974
has text: @SashiKant Note : *"Because* `:checkbox` *is a jQuery extension and not part of the CSS specification, queries using* `:checkbox` *cannot take advantage of the performance boost provided by the native DOM* `querySelectorAll()` *method. For better performance in modern browsers, use* `[type="checkbox"]` *instead."*
type: AnswerComment
comment on: http://stackoverflow.com/a/25494274
type: Comment
score: 1

http://stackoverflow.com/a/25504469
has body: http://jsfiddle.net/sn1xfwxm/11/ changes to your original fiddle: #notice { position:fixed; removed the display: none, also! the resulting js is much more simple: $("#notice").hide(); //hide the notice on document load $("#show").click(function () { $("#notice").stop(true, true).slideDown(); }); $("#hide").click(function () { $("#notice").stop(true, true).slideUp(); });
score: 1
answers question: http://stackoverflow.com/q/25504071
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25504071
type: AcceptedAnswer
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39918818
type: QuestionComment
comment on: http://stackoverflow.com/q/25547567
has text: Voted to close my own question, since it is, indeed, a duplicate
score: 0
type: Comment

http://stackoverflow.com/q/25413281
accepted answer: http://stackoverflow.com/a/25413345
has title: Knockout js - Getting string length of observable
type: AnsweredQuestion
downvote count: 0
favorite count: 0
type: Question
upvote count: 6
has answer: http://stackoverflow.com/a/25413345
answer count: 1
tagged with: knockout.js
tagged with: javascript
has body: This seems to be a simple issue but I can't seem to figure it out I just need to display the length of a string that is observable. I have tried achieving the result with a ko.computed() function as you can see in the code below, but it always returns zero. Fiddle with an example Html The title is: The length is: Length from computed: JavaScript function VM() { var self = this; self.title = ko.observable(); self.titleLength = ko.computed(function() { return self.title.length; }); } ko.applyBindings(VM(), document.getElementById('vm'));
score: 6

http://stackoverflow.com/a/25404851
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25404247
has body: If you always want one decimal place and the line preceded with a "+" symbol try this. $(document).ready(function () { var predpona = '+'; var pom = $('#testid').text(); var lastChar = pom.slice(-1); var newPom = predpona + (pom / 10).toFixed(1); $('#testid').text(newPom); }); Here is a fiddle to mess around with.

http://stackoverflow.com/q/25528035
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25556951
score: 0
answer count: 2
tagged with: jquery
tagged with: ajax
has body: I have been searching around trying to find a solution to this with no success :( I have a page that lists products. The page has two layouts (list and grid) with a toggle to switch between the views (basically changing the CSS behind the view) this is all working as expected ! I am using full text search on the page containing of a search box (text input) that filters the products based on the entered search string etc... this is also working as expected. I have a keyup event listener on the text input so that the data is filtered on each key press using an ajax get response. The data is filtered correctly however the view state / switch is not considered. E.g. the default view is a list. If I do not change the view and search, everything is updated correctly: the correct results renders as a list. However, if I change to the grid view, and then search, although the results are correct the view is switched back to the original (list) view. The switch toggle also stops working after a search has passed. I am not sure, but it seems like the $.get methods response reloads the original file not containing any added classes (in relation to the view change) that have been added. It also appears that all JS added on document load is lost. This is "basically" what I have: CSS .hideSection { display: none; } HTML LIST GRID HTML ... ... JS (CoffeScript) $("#gridViewButton").click -> $(".gridView").removeClass "hideSection" $(".listView").addClass "hideSection" $("#listViewButton").click -> $(".listView").removeClass "hideSection" $(".gridView").addClass "hideSection" $("#employee_search input").keyup -> $.get $("#employee_search").attr("action"), $("#employee_search").serialize(), null, "script" false As said, all searching works as expected, the problem is that the view looses its state (List or Grid) when searching, and additionally all JS appears not to work after the search - im not sure if this is something to do with the response from the $.get method as looking at it …
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25528149
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: HTML View loses state during search (ajax) update

http://stackoverflow.com/comment/39839714
score: 0
type: AnswerComment
type: Comment
has text: No honestly I do not. The CSS was pre-defined from the author at codecanyon.
comment on: http://stackoverflow.com/a/25518434

http://stackoverflow.com/comment/39847473
score: 0
type: Comment
type: QuestionComment
has text: Best reference for JS equivalent functions is http://phpjs.org/
comment on: http://stackoverflow.com/q/25523988

http://stackoverflow.com/a/25549971
has body: Try this:
has comment: http://stackoverflow.com/comment/39941253
has comment: http://stackoverflow.com/comment/40090772
has comment: http://stackoverflow.com/comment/39949815
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25511630
has comment: http://stackoverflow.com/comment/39933072
score: 0
answers question: http://stackoverflow.com/q/25511630
has comment: http://stackoverflow.com/comment/40057857
type: Answer
has comment: http://stackoverflow.com/comment/39918205
has comment: http://stackoverflow.com/comment/39919957
has comment: http://stackoverflow.com/comment/40094094

http://stackoverflow.com/comment/39858116
score: 0
has text: $("#fileupload").click()
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25529835

http://stackoverflow.com/comment/39648637
comment on: http://stackoverflow.com/q/25416544
type: QuestionComment
type: Comment
has text: Yes, that will probably be the case. I just thought maybe someone knew the exact reasoning behind that, because in the C programming language for example, I have never seen such strange zeros (using `printf("%lf", n);`).
score: 0

http://stackoverflow.com/a/25528437
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25527607
has body: Try using typeahead's "typeahead-input-formatter" artribute, you can pass a callback to it for formatting the final selected value
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39776826
has text: Ah, right. Well this example uses the partition layout, which always sums up the values -- this is not configurable. You would need to modify the source to do averages.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25482798

http://stackoverflow.com/q/25402677
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39621711
has title: JavaScript increment images
has answer: http://stackoverflow.com/a/25402741
accepted answer: http://stackoverflow.com/a/25402741
has comment: http://stackoverflow.com/comment/39621648
has comment: http://stackoverflow.com/comment/39621627
score: 1
tagged with: image
has answer: http://stackoverflow.com/a/25402822
has answer: http://stackoverflow.com/a/25402773
type: Question
has body: I'm trying to use JavaScript to list images 01-40 in order automatically. Like this: &lt;img src="01.jpg" /&gt; &lt;img src="02.jpg" /&gt; &lt;img src="03.jpg" /&gt; &lt;img src="04.jpg" /&gt; &lt;img src="05.jpg" /&gt; ... I don't want to write each img src manually, as I want to use this on multiple pages I'd like the image starting and ending number to be variables that I can edit easily.
has comment: http://stackoverflow.com/comment/39621754
has answer: http://stackoverflow.com/a/25402799
has answer: http://stackoverflow.com/a/25403345
tagged with: javascript
answer count: 6
has comment: http://stackoverflow.com/comment/39622658
has comment: http://stackoverflow.com/comment/39621615
tagged with: http://stackoverflow.com/tag/html
tagged with: increment
favorite count: 0
possible better answer: http://stackoverflow.com/a/25402773
upvote count: 2
has answer: http://stackoverflow.com/a/25402905

datepicker
tags question: http://stackoverflow.com/q/25402191
tags question: http://stackoverflow.com/q/25530736
tags question: http://stackoverflow.com/q/25401947
tags question: http://stackoverflow.com/q/25390841
tags question: http://stackoverflow.com/q/25506025
tags question: http://stackoverflow.com/q/25492036
tags question: http://stackoverflow.com/q/25422715
tags question: http://stackoverflow.com/q/25391014
tags question: http://stackoverflow.com/q/25529321
tags question: http://stackoverflow.com/q/25427241
tag name: datepicker
type: Tag
tags question: http://stackoverflow.com/q/25512555
tags question: http://stackoverflow.com/q/25543158
tags question: http://stackoverflow.com/q/25537003
tags question: http://stackoverflow.com/q/25446566
tags question: http://stackoverflow.com/q/25450253
tags question: http://stackoverflow.com/q/25429108
tags question: http://stackoverflow.com/q/25429778
tags question: http://stackoverflow.com/q/25439545
tags question: http://stackoverflow.com/q/25496478
tags question: http://stackoverflow.com/q/25430224
tags question: http://stackoverflow.com/q/25452131

http://stackoverflow.com/q/25545837
score: 3
tagged with: javascript
has title: Plugin-driven Application Design with AngularJS
downvote count: 0
has comment: http://stackoverflow.com/comment/39893101
tagged with: client-side
favorite count: 0
tagged with: angularjs
tagged with: architecture
has comment: http://stackoverflow.com/comment/39887229
has body: I’m searching for a way to develop a website that consists of several plug-ins. The website itself is basically only a container for the plug-ins. My scenario: A user logs into the application and is forwarded to a dashboard, where he sees all apps that are available to him. An app is a small tool for a specific use case (e.g. cancelling an order or searching for a customer profile). When he clicks on an app, it is opened in the main view of the page (a small app-independent navbar will always be visible so that the user can change apps and go back to the dashboard quickly). Key features: The website consists of small, independent plug-ins The available plug-ins depend on the user (e.g. an admin has more plug-ins) Standalone plug-in development would be beneficial The server will be written in C#, whereas the client and all the plug-ins should be written in JS, especially AngularJS. If anyone has done something like this before or knows libraries to realize this, I would appreciate a hint in the right direction
tagged with: plugins
answer count: 0
upvote count: 3
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/39685676
type: AnswerComment
score: 0
has text: Alternatively, using `JSON.stringify()`, something like: `JSON.stringify(treeOfStrings).replace(/","|",\["?|"\],"?|^\["|"\]$/g, '')` which could be a bit more resistant to commas.
type: Comment
comment on: http://stackoverflow.com/a/25436690

http://stackoverflow.com/comment/39650019
type: AnswerComment
comment on: http://stackoverflow.com/a/25417310
type: Comment
has text: AAAAaaa so close to perfect! Only problem now is that if i refresh the page, before i have clicked on any of the links they are all in colour (aka active) how do i remove that class from the beginning? to only activate on the first click? @user26409021
score: 0

http://stackoverflow.com/q/25414816
tagged with: asp.net-mvc
tagged with: javascript
linked to: http://stackoverflow.com/q/5088450
tagged with: jquery
has comment: http://stackoverflow.com/comment/39645555
has answer: http://stackoverflow.com/a/25426596
has answer: http://stackoverflow.com/a/25423885
accepted answer: http://stackoverflow.com/a/25423885
linked to: http://stackoverflow.com/q/17370062
has body: This: $.ajax({ url: '/Merchant/SaveDirty', type: 'POST', dataType: 'json', data: ko.toJSON(dirtyItems), contentType: 'application/json; charset=utf-8', success: function (data) { // get the result and do some magic with it //var message = data.Message; alert(ko.toJSON(dirtyItems)); } }); ...currently calls this: [HttpPost] public void SaveDirty(string json) { } ...but when I hit the breakpoint in SaveDirty, no data is passed. I've verified that ko.toJSON(dirtyItems) returns a JSON string in the javascript. What am I doing wrong? Thanks!
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39645495
has comment: http://stackoverflow.com/comment/39651921
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39645360
has comment: http://stackoverflow.com/comment/39645595
has comment: http://stackoverflow.com/comment/39645529
possible better answer: http://stackoverflow.com/a/25426596
has comment: http://stackoverflow.com/comment/39646391
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39645679
has comment: http://stackoverflow.com/comment/39645417
score: 1
has comment: http://stackoverflow.com/comment/39652735
upvote count: 1
has answer: http://stackoverflow.com/a/25421842
has comment: http://stackoverflow.com/comment/39646620
has comment: http://stackoverflow.com/comment/39645639
has title: Ajax post doesn't pass any data to MVC controller
has comment: http://stackoverflow.com/comment/39645570
type: Question
has comment: http://stackoverflow.com/comment/39645458

http://stackoverflow.com/comment/39636068
type: QuestionComment
comment on: http://stackoverflow.com/q/25409662
type: Comment
has text: All HTML is in 1 `tag`
score: 0

http://stackoverflow.com/comment/39846283
score: 1
comment on: http://stackoverflow.com/q/25523262
has text: possible duplicate of [css :selected pseudo class similar to :checked, but for for elements](http://stackoverflow.com/questions/8619406/css-selected-pseudo-class-similar-to-checked-but-for-for-select-elements)
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25508516
tagged with: regex
type: AnsweredQuestion
has body: I am finding hard time to perform Capture and Replace for following lines with Regex in JavaScript: // Lines: This is foo. This is (Capital) foo. This is foo (Plural). This is (Capital) foo (Plural). I need This is foo. for all of the above. I tried as: var pattern = /(\(Capital\))?\s?(\w+)\s?(\(Plural\))?<\/span>/; var text1 = "This is foo"; var text2 = "This is (Capital) foo"; var text3 = "This is foo (Plural)"; var text4 = "This is (Capital) foo (Plural)"; text1.replace(pattern, function(_, m){ return m; }); text2.replace(pattern, function(_, m){ return m; }); text3.replace(pattern, function(_, m){ return m; }); text4.replace(pattern, function(_, m){ return m; }); But its not working.
has title: JavaScript Regex capture and replace for optional parts
possible better answer: http://stackoverflow.com/a/25508598
type: Question
has answer: http://stackoverflow.com/a/25508598
accepted answer: http://stackoverflow.com/a/25508767
score: 0
answer count: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/25508689
has answer: http://stackoverflow.com/a/25508767

http://stackoverflow.com/comment/39686117
comment on: http://stackoverflow.com/q/25436867
type: QuestionComment
type: Comment
has text: Perhaps you need to read this article first: http://stackoverflow.com/help/how-to-ask
score: 0

http://stackoverflow.com/q/25431635
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39676237
possible better answer: http://stackoverflow.com/a/25431689
has answer: http://stackoverflow.com/a/25431689
has answer: http://stackoverflow.com/a/25431774
has body: I have a long string that I'm trying to get one item which is the Stock#, if I could get it another way I could, but I'm stuck with: Ingot Silver Metallic Exterior, Charcoal Black / Silver Stitch Interior, Status: Dealer Ordered, Engine: Regular Unleaded I-4 1.6 L/97, Trans: Automatic, Stock#: IP-2758P4B, VIN #: 3FADP4BJ2FM114457 So basically I just need IP-2758P4B. I've been trying different things from different answers from StackOverflow another place, but no luck. Thank you in advance
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25431773
has title: Javascript Regex - select one item out a long string
has answer: http://stackoverflow.com/a/25431792
tagged with: regex
answer count: 4
has comment: http://stackoverflow.com/comment/39677387
score: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/25431773
downvote count: 1
type: Question

http://stackoverflow.com/comment/82464439
has text: i guess a debounce function or a function similar to codepen where x number of changes would be better, i guess 2nd one s more customizable and has no timeouts
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25466796

http://stackoverflow.com/comment/39785738
has text: I am running 0.10.1 . I am new to sails so sorry your whole point went over my head. Yes, I understand it is an excerpt from the documentation, but can you explain please what you are drawing attention to by posting that?
comment on: http://stackoverflow.com/q/25478462
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25475001
has title: Image not displaying and no errors despite tag being present
has comment: http://stackoverflow.com/comment/39756785
has answer: http://stackoverflow.com/a/25475353
has comment: http://stackoverflow.com/comment/39756790
has comment: http://stackoverflow.com/comment/39756645
tagged with: javascript
answer count: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39756678
accepted answer: http://stackoverflow.com/a/25475353
tagged with: angularjs
type: Question
has body: (Repoed on Plunkr) I have a page, the user enters a username, website goes and gets some metadata, including the Gravatar ID. It then uses the ID to display the avatar, however, despite the img tag being there, the correct URL being in it and there being no errors in the developer console of the browser the image isn't displayed. I can also see the HTTP call being made, and returning 200. NB If I open the Plunkr in Firefox, I can a reference error: ReferenceError: angular is not defined http://run.plnkr.co/plunks/4tGAFuqjfqn9hYUy1Xoa/app.js Line 1 NB In both IE and Safari it works as expected, only Chrome fails without error. {{user.name}} Username: {{user.login}} Gravatar ID: {{user.gravatar_id}} Main Controller: (function (app) { var MainController = function ($scope, $http) { $scope.message = 'Hello World!'; $scope.search = function (username) { console.log('Username = ' + username); $http.get('https://api.github.com/users/' + username) .then(onUserComplete); }; var onUserComplete = function (response) { $scope.user = response.data; }; }; app.controller("MainController", ["$scope", "$http", MainController]) })(gitHubViewer); app.js var gitHubViewer = gitHubViewer || angular.module("gitHubViewer", [], function () { });
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25475123
tagged with: cross-browser
has answer: http://stackoverflow.com/a/25475123
score: 0

http://stackoverflow.com/comment/39762544
score: 1
comment on: http://stackoverflow.com/q/25478078
type: Comment
type: QuestionComment
has text: If you want, you can use `typeof o === 'number'`.

http://stackoverflow.com/q/25520419
has comment: http://stackoverflow.com/comment/39841187
tagged with: php
possible better answer: http://stackoverflow.com/a/25520514
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25520514
has title: Get count of div from html string (returned from API JSON)?
has answer: http://stackoverflow.com/a/25521202
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25520576
type: Question
has answer: http://stackoverflow.com/a/25520596
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39841254
has body: I've created a live feed (like Facebook's) wherein if you scroll to the bottom of the div, it gets more feeds via ajax. Also, it keeps checking for new feeds at iteration of 5 secs and if new feeds are found, they're loaded at the top of the div. Now, every time new feed is found, I want to show it's count in notification. And btw, the feed data is returned in a json array in form {'success':true,'data':'the-html-form-of-new-feeds'}. I want to count the number of feeds in data part for which I'm using $(json.data).find('.one_feed').length (json is the returned json array), but everytime I get 0 as count. What's wrong here, please?
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25520576
has comment: http://stackoverflow.com/comment/39841107
answer count: 4

http://stackoverflow.com/comment/39699757
type: AnswerComment
comment on: http://stackoverflow.com/a/25443740
has text: This seems to be working for me. I say seem because the issue with my old way was intermittent, and I couldn't force it, so I'll keep my eye on it and report back if this issue is still there.
type: Comment
score: 0

http://stackoverflow.com/a/25498006
answers question: http://stackoverflow.com/q/25494035
type: Answer
score: 0
has body: Try this: DEMO CSS: .form-container{ max-width: 1230px; margin-left: auto; margin-right: auto; padding-left: 15px; padding-right: 15px; } .contact-form{ width:100%; height:auto; max-width:1680px; background-color: #ac9762; } .form-text{ float:left; width:230px; } .border-top{ padding-top: 30px; padding-left: 30px; height: 3px solid #fefdfc; width:10px; background-color:#fefdfc; } .form-text h3{ padding-top: 30px; padding-left: 30px; font-size:20px; font-weight:bold; color:#fefdfc; } label{ display: block; padding-top: 30px; } .form-control{ margin-bottom: 30px; border-radius: 0px; margin-right: 30px; } .contact-form .btn{ border-radius: 0px; margin-top: 24px; } .contact-form .btn-default{ background-color: #090805; border-color: #090805; padding-top: 5px; color: #fefdfc; } .contact-form h3:before { width: 4.5%; background: none repeat scroll 0 0 #fefdfc; border-top: 1px solid #fefdfc; content: ""; height: 5px; position: absolute; margin-top: -10px; } .icon-bar { background-color:violet; } HTML: Free Advice And Consultation Toggle navigation Name Phone Email address Treatment Relaxation Massage Remedial Massage Sports Massage Trigger Point Massage Float Bath Infrared Sauna Send

http://stackoverflow.com/q/25531328
tagged with: javascript
has body: I have an SVG made in illustrator for an artbox of 960pt x 960pt. I'd like to insert it in a webpage of an inferior dimension. I have tried to following to reduce it but it gets cropped like in the following jsfiddle: http://jsfiddle.net/4tjoevqo/ d3js: var svg = d3.select("body") .append('svg') .attr('width', '960px') .attr('height', '960px'); svg.append('g').append('circle') .attr('cx', 480) .attr('cy', 480) .attr('r', 284.5); CSS: svg { width: 400px; height: 400px; } How can I rescale it without cropping? Many thanks
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25531529
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
has title: Rescale an SVG in CSS
tagged with: d3.js
type: Question
has answer: http://stackoverflow.com/a/25531529
score: 1
has comment: http://stackoverflow.com/comment/39861147
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/39623798
score: 2
has text: It remove `hello` class outside `container` also.
comment on: http://stackoverflow.com/a/25403820
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25457264
accepted answer: http://stackoverflow.com/a/25458589
has answer: http://stackoverflow.com/a/25457621
has body: I am not sure what will be best approach to handle the situation . my angular js code look like: &lt;span class="something" ng-hide="onsomecondition"&gt; {{value}} &lt;/span&gt; .something{ text-align:left; padding:10px;} Problem: in my dom val get updated but not able to display correct value in the screen . but if i remove the class attribute it seems fine but than my styles are gone . Is there a way to make sure i can keep style and value updated correctly? thank! in advance for any advice.
tagged with: angularjs
tagged with: css
has title: values not getting updated when there is a style in the parent container angularJS
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25457621
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/16125872
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25458589

storage
tag name: storage
type: Tag
tags question: http://stackoverflow.com/q/25418000

http://stackoverflow.com/a/25495326
has comment: http://stackoverflow.com/comment/39795066
has comment: http://stackoverflow.com/comment/39795098
downvote count: 0
has comment: http://stackoverflow.com/comment/39794921
has comment: http://stackoverflow.com/comment/39794907
has comment: http://stackoverflow.com/comment/39795123
answers question: http://stackoverflow.com/q/25495311
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39794889
has comment: http://stackoverflow.com/comment/39794990
has body: $('.show-nav').click(function(){ var text = $(this).text() == 'Toggle Navigation' ? 'Close' : 'Toggle Navigation'; $(this).text(text); $('nav').toggleClass('show'); navHeight = $('nav').css('height'); $('.show').css('height', navHeight); });
score: 1

http://stackoverflow.com/comment/39704386
has text: what is the response type in http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback= json ??application/json ?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25424207
type: Comment

http://stackoverflow.com/q/25446225
favorite count: 0
upvote count: 39
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39704703
answer count: 4
has answer: http://stackoverflow.com/a/25448337
possible better answer: http://stackoverflow.com/a/55155649
has answer: http://stackoverflow.com/a/59309829
has answer: http://stackoverflow.com/a/55155649
tagged with: angularjs
has answer: http://stackoverflow.com/a/76459241
type: AnsweredQuestion
score: 39
has title: How to enable one button inside a disabled fieldset
accepted answer: http://stackoverflow.com/a/25448337
has comment: http://stackoverflow.com/comment/88523893
type: Question
downvote count: 0
tagged with: javascript
has body: I want to disable all the elements inside Fieldset but enable few buttons inside it. Demo: Personalia: Name: Email: Date of birth: Somethingelse:

http://stackoverflow.com/comment/39671223
comment on: http://stackoverflow.com/q/25429235
score: 2
type: Comment
has text: did you wrapped the code in dom ready event??
type: QuestionComment

http://stackoverflow.com/comment/39685958
type: QuestionComment
has text: oh I didn't know that there is a difference between a client side call and a server side call..
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25436879

http://stackoverflow.com/q/25478729
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25478800
tagged with: ajax
linked to: http://stackoverflow.com/q/4551175
favorite count: 0
has answer: http://stackoverflow.com/a/25478762
downvote count: 0
type: UnansweredQuestion
tagged with: ruby-on-rails
has title: Stop Ajax Request in jQuery After Change The Page
has body: Consider this code that runs when the page is loaded: if ($('#content-recommendation').length) { $.ajax({ url:'/get_content_recommendation/' + gon.item_id + '.js', type:"get" }); } And this request take about 15 seconds to complete in development. If I go to another page I have to wait until the Ajax is completed so, how do I cancel that Ajax request?
score: 2
tagged with: jquery-ui
type: Question
upvote count: 2
answer count: 2

http://stackoverflow.com/q/25503364
tagged with: asp.net
favorite count: 0
answer count: 0
type: UnansweredQuestion
has title: values from c# code behind and pass it to javascript on design page
tagged with: c#
score: 1
type: Question
upvote count: 2
has body: I am working on google geomap and mark some locations , for those locations I am fetching values from database in codebehind DataTable dt = new DataTable(); dt = this.GetData("SELECT WaterLevelUS,WaterLevelDS,Alert_Upstream,Alert_Downstream, Warning_Upstream,Warning_Downstream,DangerUpstream,DangerDownstream FROM sgwebdb.stations where StationType='Sluice Station'"); for (int i = 0; i &lt;= dt.Rows.Count - 1; i++) { sluice_waterlevelus.Value = dt.Rows[i]["WaterLevelUS"].ToString(); sluice_waterlevelds.Value = dt.Rows[i]["WaterLevelDS"].ToString(); sluice_alertup.Value = dt.Rows[i]["Alert_Upstream"].ToString(); sluice_alertdown.Value = dt.Rows[i]["Alert_Downstream"].ToString(); sluice_warnup.Value = dt.Rows[i]["Warning_Upstream"].ToString(); sluice_warndown.Value = dt.Rows[i]["Warning_Downstream"].ToString(); sluice_dangerup.Value = dt.Rows[i]["DangerUpstream"].ToString(); sluice_dangerdown.Value = dt.Rows[i]["DangerDownstream"].ToString(); } This will give us 48 locations values ,means 48 rows from database.Accordeing to these values we need to change the colour of geomap location mark .we are passing these values to aspx page by hidden field. Aspx page javascript code for passing values in hidden field for color change of geomap mark if(data.type=='Sluice Station') { var Sluice_WaterLvlUpValue = $get('&lt;%= sluice_waterlevelus.ClientID %&gt;').value; var Sluice_WaterLvlDwValue = $get('&lt;%= sluice_waterlevelds.ClientID %&gt;').value; var Sluice_AlertUpValue = $get('&lt;%= sluice_alertup.ClientID %&gt;').value; var Sluice_AlertDwValue = $get('&lt;%= sluice_alertdown.ClientID %&gt;').value; var Sluice_WarnUpValue = $get('&lt;%= sluice_warnup.ClientID %&gt;').value; var Sluice_WarnDwValue = $get('&lt;%= sluice_warndown.ClientID %&gt;').value; var Sluice_DangerUpValue = $get('&lt;%= sluice_dangerup.ClientID %&gt;').value; var Sluice_DangerDwValue = $get('&lt;%= sluice_dangerdown.ClientID %&gt;').value; if ((Sluice_WaterLvlDwValue &gt;= Sluice_AlertDwValue &amp;&amp; …
downvote count: 1
tagged with: javascript

http://stackoverflow.com/a/25506630
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25505116
score: 1
has body: Communication between a directive and its parent controller can work in a few different ways, depending on how you define the scope property in your directive definition object. The default is scope: false, which is what you are implicitly using in your example above of the mapActivity directive, since you did not specify one. (for the other modes, see the docs on $compile, under the "scope" setting) This means no new scope is created - the directive will have direct access to the containing controller's $scope via the scope argument you pass as the first parameter of the link function. Your code might not have worked for the simple reason that you wrote $scope.fish = data in your directive, rather than scope.fish = data (without the dollar sign). Actually, looking at the directive code you posted, you don't try to assign to a fish property anywhere. Perhaps you just ommitted it in the example? re: using '$rootScope.$broadcast()' I would personally recommend against using the $rootScope.broadcast() method as suggested by lulu88. I would reserve broadcasting onto the $rootScope to only those circumstances where there is no simple, direct means on communication between two components. In this case, as I explained, there is a very simple means. From the Angular docs $broadcast(name, args); Dispatches an event name downwards to all child scopes (and their children) notifying the registered $rootScope.Scope listeners. The event life cycle starts at the scope on which $broadcast was called. All listeners listening for name event on this scope get notified. Afterwards, the event propagates to all direct and indirect scopes of the current scope and calls all registered listeners along the way. The event cannot be canceled. So if you call $broadcast() on the $rootScope, you will be propagating the event to every scope in your app. This is unnecessary for anything but global app-wide events - a typical one being user logging in or out.
downvote count: 0

http://stackoverflow.com/a/25545970
has comment: http://stackoverflow.com/comment/39887507
has comment: http://stackoverflow.com/comment/39887464
type: Answer
downvote count: 0
score: 1
has body: Two things: You are missing a # in the selector: $("#optlogo").hide(); You can use cookies to set that it should be hidden. I would recommend using jQuery-Cookie plugin and use it this way: $.cookie('logohide', true); And so, every time when the page loads, check for this: if ($.cookie('logohide')) $("#optlogo").hide(); Also, if you do not want it to redirect, give event.preventDefault() in the function call: $("#optlogo").click(function(e){ e.preventDefault(); $("#optlogo").hide(); });
has comment: http://stackoverflow.com/comment/39887441
answers question: http://stackoverflow.com/q/25545873
has comment: http://stackoverflow.com/comment/39887385
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25545873
has comment: http://stackoverflow.com/comment/39887588
upvote count: 1

http://stackoverflow.com/comment/39719541
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25433617
has text: Sorry, I failed you. :) Whenever you are using the border layout, you must apply either height or width values to panels that are NOT center. Any panel that is region east or west must have either flex or width values. Any panel that is region north or south must have either flex or height values. I have corrected my code above to reflect this.
type: AnswerComment

http://stackoverflow.com/comment/39730361
type: QuestionComment
comment on: http://stackoverflow.com/q/25454670
has text: So far I have found out that the divs that are cloned loose the id of video-slide until they are loaded into the slider completely.
score: 0
type: Comment

http://stackoverflow.com/q/25550380
score: 0
has comment: http://stackoverflow.com/comment/39895757
has comment: http://stackoverflow.com/comment/39895900
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/39895970
has comment: http://stackoverflow.com/comment/39919183
has answer: http://stackoverflow.com/a/25558388
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39899508
accepted answer: http://stackoverflow.com/a/25558388
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Backbonejs.org says "— while very deliberately avoiding painting you into a corner by making any decisions that you're better equipped to make yourself." So I have a BackBone view like this: var LotsaToys= Backbone.View.extend({ el: '#CaveToy', events: { 'click .slide': 'slideAnimal' }, initialize: function (obj) { this.collection = new Yoyo(obj); this.render(); }, render: function () { this.collection.each(function (item) { this.renderToy(item); }, this); }, renderBook: function (item) { var ToyView = new oneToy({ model: item }); this.$el.append(ToyView .render().el); } }); And simple Jquery code like this: $(document).ready(function () { var sudoSlider = $("#slider").sudoSlider({ vertical: true, continuous: false }); }); Do I combine these to by simply adding the JQuery code in the slide function? (Simple Jquery image slider) slideAnimal: function (event) { $(document).ready(function () { var sudoSlider = $("#slider").sudoSlider({ vertical: true, continuous: false }); }); }); Im a noob, so please give me a explanation ,not sure what way is 'good practice' or what way would be better to implement..
has title: How do I combine my backbonejs view with jquery

http://stackoverflow.com/q/25417638
type: Question
has answer: http://stackoverflow.com/a/25420196
score: -2
tagged with: javascript
tagged with: facebook-like
answer count: 2
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: facebook-graph-api
favorite count: 0
type: UnansweredQuestion
downvote count: 2
tagged with: facebook
has title: How to check if people liked my Facebook FanPage
has body: There are many questions and answers about this. But nowadays Facebook changes their Privacy. Any Application that request for user_likes permission must be review by Facebook before using. I've tried many times to explain to Facebook review team about my app, but they did not accept, because my application (a web game using HTML5 and JavaScript) require people like my fan page before play. So my question is: Is there any to bypass Facebook privacy? I have a Like Box on the same page as the game screen (where i need to check Like), so any solution (like: analyze DOM elements, capture screen can pass through image recognition) will fine.
has answer: http://stackoverflow.com/a/25417844

http://stackoverflow.com/q/25466888
downvote count: 0
possible better answer: http://stackoverflow.com/a/25466971
type: Question
has answer: http://stackoverflow.com/a/25466969
accepted answer: http://stackoverflow.com/a/25466969
has comment: http://stackoverflow.com/comment/39741885
has comment: http://stackoverflow.com/comment/39742043
tagged with: javascript
has body: I know this may be easy , but I am not that good in JS . I have got 5 images and I want the body background to be one of them each day . I have tried this : some text But , Unfortunately it doesn't work . Is there any other way to do this ? Please help , thanks
has title: Change background daily
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/25466971
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39741930
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/25405199
tagged with: validation
type: Question
has answer: http://stackoverflow.com/a/25405396
score: 0
has answer: http://stackoverflow.com/a/25405265
has body: I am trying to validate a form using jQuery and what I want to do now is to disable the submit button until all fields are filled correctly. This is my approach: http://jsfiddle.net/w57hq430/ &lt;input type="text" name="commodity"&gt;Commodity &lt;input type="text" name="plz"&gt;PLz &lt;input type="submit"&gt; and the actual jQuery: $(document).ready(function() { var error = null; $('input[name=commodity]').focusout(function() { var com = $('input[name=commodity]').val(); if($.isNumeric(com)) { error ="asd"; } else { alert("commodity has to be numeric"); } }); $('input[name=plz]').focusout(function() { var com = $('input[name=plz]').val(); if($.isNumeric(com)) { error ="asd"; } else { alert("plz has to be numeric"); } }); if(error != null) { $('input[type=submit]').attr('disabled', 'disabled'); } else { $('input[type=submit]').removeAttr('disabled'); } }); I know that this code would prevent the submit button from being clicked when all fields are correct as this was meant to be a test if I use mouseout correctly.However,this is not working.The variable error is null even after you enter some numerics into the textfields(which should set it to "asd").Is my variable not accessible by the rest of the code?Or is anything else wrong?
has title: Disable submit-button in validation with jquery
has answer: http://stackoverflow.com/a/25405329
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25405406
possible better answer: http://stackoverflow.com/a/25405329
answer count: 4
accepted answer: http://stackoverflow.com/a/25405265
type: AnsweredQuestion

http://stackoverflow.com/a/25460957
downvote count: 0
answers question: http://stackoverflow.com/q/25460881
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25460881
has body: Your HTML formatting is wrong. Change it as below FIDDLE DEMO HOME dropdown #1 dropdown #1 item #1 dropdown #1 item #2 dropdown #1 item #3 dropdown #2 dropdown #2 item #1 dropdown #2 item #2 dropdown #2 item #3 Hello and Welcome --------------
type: AcceptedAnswer

http://stackoverflow.com/comment/39905429
type: Comment
score: 1
has text: This is the best way to control your logs. You can easy turn it on/off control level of logging etc. BTW if you think that it answer your question mark it as answer, if you think it is useful vote it up
type: AnswerComment
comment on: http://stackoverflow.com/a/25535715

http://stackoverflow.com/q/25435731
has body: Hi I was hoping to get a hand with Appecelator Titanium. I am trying to add multiple items to the a database from a app. I am using php and passing a json object. Here is my js code: var username = "testUser"; $.createBox_buttonWrapper.addEventListener('click', function(e){ Ti.API.info("NEW NAME" + $.createBox_textfield.value); var boxName = ""; boxName = $.createBox_textfield.value; var pin = ""; var privateBox = 0; if ($.privateSwitch.value == true) { privateBox = 1; pin = $.createBox_pinTextField.value; Ti.API.info("PIN:" + $.createBox_pinTextField.value); } pin = pin.toString(); boxName = boxName.toString(); //minus the photo var createBox_request = Ti.Network.createHTTPClient({ onload: function(){ Ti.API.info("SEND"); Ti.API.info(this.responseText); var obj = JSON.parse(this.responseText); for ( var data in obj ){ if ( obj.hasOwnProperty(data) ){ for ( var i in obj[data]){ var content = obj[data][i]['and']; if ( content = "success" ){ alert("Box created!");//remove //success window }else{ alert("Error: "); } } } } }, onError: function(){ Ti.API.debug(e.error); } }); createBox_request.open("POST","http://*****/app/createBox.php"); createBox_request.send( {data: { "username_post":username,"boxName_post":boxName,"picturePath_post":"test","private_post":privateBox,"pin_post":pin} }); }); $.index.open(); Here is the php: &lt;?php $data = isset($_POST['data']) ? $_POST['data']: "";//brings in string // { // "boxName" = boxName; // "picturePath_post" = testPath; // "pin_post" = 9133; // "private_post" = 1; // "username_post" = testUser; // } $items = explode(";", $data); for( $i = 0 ; $i &lt; count($items) ; $i++ ){ $start = strpos($items[$i],' = '); $string = substr($items[$i], $start); $string = substr($string, 3); $items[$i] = $string; } $boxName = $items[0]; //getting error here $picPath = $items[1]; $pin = $items[2]; $private = $items[3]; $username = $items[4]; $username = contentCheck($username); if($username != ""){ $boxName = contentCheck($boxName); $picPath =…
answer count: 1
favorite count: 0
tagged with: appcelerator
upvote count: 2
type: UnansweredQuestion
tagged with: titanium
tagged with: php
score: 2
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Titanium multiple json item passed to php
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39694185
has comment: http://stackoverflow.com/comment/39683967
has answer: http://stackoverflow.com/a/25442879

http://stackoverflow.com/q/25467487
has answer: http://stackoverflow.com/a/25467565
type: Question
has title: Y-axis created but invisible
type: AnsweredQuestion
tagged with: javascript
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39742934
favorite count: 0
has body: I have create a simple barchart with D3.js with the following code Bar Transition Example Yet my Y axis doesn't visualise as I would expect. Indeed, the Y axis is created I tried tweaking all the parameters (including the margin variables var margin = {top: 20, right: 20, bottom: 30, left: 60}, width = 300 - margin.left - margin.right, height = 400 - margin.top - margin.bottom; but with no effect.
tagged with: d3.js
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25467565
tagged with: css
downvote count: 0
score: 1

http://stackoverflow.com/comment/39634781
comment on: http://stackoverflow.com/q/25408407
has text: Thanks RaggaMuffin-420 for your insight...I hope the authorisation process on facebook isn't too complex! Regards the rest have you got some tutorial or resources to point me trough? Thanks
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25457581
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39724591
type: Question
accepted answer: http://stackoverflow.com/a/25457772
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39724578
has title: Javascript/jQuery elements not working until page reload
tagged with: javascript
tagged with: jquery
has body: I've got a strange problem where the javascript/jQuery on my homepage is only working after I reload the page. Both the floating menu and smooth scroll fail to work as expected. The problem can be replicated by forcing the browser to get a new version of the page (ie, Ctrl+F5). I include the code below. The first bit is the floating menu, and the second is the smooth scroll. &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; function UpdateTableHeaders() { $(".persist-area").each(function() { var el = $(this), offset = el.offset(), scrollTop = $(window).scrollTop(), floatingHeader = $(".floatingHeader", this) if ((scrollTop &gt; offset.top) &amp;&amp; (scrollTop &lt; offset.top + el.height())) { floatingHeader.css({ "visibility": "visible" }); } else { floatingHeader.css({ "visibility": "hidden" }); }; }); } // DOM Ready $(function() { var clonedHeaderRow; $(".persist-area").each(function() { clonedHeaderRow = $(".persist-header", this); clonedHeaderRow .before(clonedHeaderRow.clone()) .css("width", '100%') .addClass("floatingHeader"); }); $(window) .scroll(UpdateTableHeaders) .trigger("scroll"); }); &lt;/script&gt; &lt;script&gt; $(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &amp;&amp; location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[id=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top - 40 }, 1000); return false; } } }); }); &lt;/script&gt; I have a sneaking suspicion that the problem might be a change I made to the floating menu where I set the width to 100% rather than finding the parent width (which then gave a width in pixels) because the element was full width anyway, and when the page is viewed on a mobile the floating menu wasn't updating to the new width when the device orientation changed. If tha…
has answer: http://stackoverflow.com/a/25457772

http://stackoverflow.com/q/25392198
tagged with: javascript
tagged with: jquery
has title: Nav hover effect - Sliding the :hover background from one element to another
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25392899
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/39602750
downvote count: 3
type: Question
has body: I've searched google and stackoverflow for this technique, but I'm at a loss. Home Gallery Store Contact The active page would have a css background/class and I would like to slide that background to any element in the nav when I hover to it. Whenever the cursor over a nav element, it would create a hover state. Thoughts?
has comment: http://stackoverflow.com/comment/39602872
score: -2

http://stackoverflow.com/comment/39781133
has text: is `vmproperty` an observable? Also, if it changes `polymer` needs to be configured to use dynamic fields
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25487456

http://stackoverflow.com/q/25412196
has body: I'm trying to create a simple counter box next to an ASP.NET multi-line textbox. I'm using JavaScript to do this ClientSide. &lt;script type="text/javascript"&gt; function textCounter(maxlimit) { var txtField = document.getElementById('&lt;%=txtWhatCompanyDoes.ClientId%&gt;') var cntCounter = document.getElementById('&lt;%=txtWhatCompDoesChrsRem%&gt;') if (txtField.value.length &gt; maxlimit) { txtField.value = txtField.value.substring(0, maxlimit); } else { var chrsleft = maxlimit - txtField.value.length; cntCounter.value = chrsleft; } } &lt;/script&gt; My page code is; &lt;asp:TextBox ID="txtWhatCompanyDoes" onKeyUp="textCounter('txtWhatCompanyDoes', 'txtWhatCompDoesChrsRem',2000);" runat="server" TextMode="MultiLine" Rows="10"&gt;&lt;/asp:TextBox&gt; &lt;asp:TextBox ID="txtWhatCompDoesChrsRem" runat="server"&gt;&lt;/asp:TextBox&gt; The problem is that it works right up to the last line of the JavaScript as I can use an alert to tell me the number of characters left, but's just not writing the value to the textbox. Am I doing something wrong?
possible better answer: http://stackoverflow.com/a/25413863
type: Question
has comment: http://stackoverflow.com/comment/39640449
has answer: http://stackoverflow.com/a/25413863
has answer: http://stackoverflow.com/a/25415077
type: AnsweredQuestion
has title: unable to set asp.net textbox value in javascript
has answer: http://stackoverflow.com/a/25414157
tagged with: javascript
tagged with: asp.net
score: 0
has answer: http://stackoverflow.com/a/25412310
answer count: 4
accepted answer: http://stackoverflow.com/a/25412310

http://stackoverflow.com/a/25463462
score: 11
has comment: http://stackoverflow.com/comment/39735449
has body: The non working code uses automatic promise unwrapping which was deprecated and removed in recent versions of Angular. It was deemed too magical. Angular used to do the following when you returned a promise: Return an empty array. Populate it later on when the request arrives. Trigger a digest on its own. This behavior was deemed confusing and magical by Angular developers and was deprecated (in 1.2), deactivated and soon (1.3) removed in Angular. The correct way to assign a value through a promise is like you've indicated in the second example: eventData.getEvent().then(function(result) { $scope.event = result; }); From the Angular 1.3 (pending) release docs: $parse: due to fa6e411d, promise unwrapping has been removed. It has been deprecated since 1.2.0-rc.3. It can no longer be turned on. Two methods have been removed: And from the 1.2 release docs: $parse and templates in general will no longer automatically unwrap promises. Before: $scope.foo = $http({method: 'GET', url: '/someUrl'}); &lt;p&gt;{{foo}}&lt;/p&gt; After: $http({method: 'GET', url: '/someUrl'}) .success(function(data) { $scope.foo = data; });`` {{foo}} ` This feature has been deprecated. If absolutely needed, it can be reenabled for now via the $parseProvider.unwrapPromises(true) API. While we're here avoid the deferred anti pattern, $http already returns the promise so you can simply return it rather than using $q.defer.
accepted answer of: http://stackoverflow.com/q/25463411
answers question: http://stackoverflow.com/q/25463411
upvote count: 11
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25438355
answer count: 1
downvote count: 0
favorite count: 0
tagged with: google-drive-api
has comment: http://stackoverflow.com/comment/39696078
upvote count: 2
type: UnansweredQuestion
tagged with: kmz
score: 2
has body: Next september I will be travelling during three months by bike. I will use an iPhone with Motion-X GPS app instaled to record everyday's track. The journey intends to draw some public attention thus I'm building a website with Squarespace where I intend to upload every day cycling strech on a Google map. I can't spend much time processing files or performing manual tasks. Everything needs to be triggered by a single event. Everyday. So far so good. Motion-X GPS records GPS tracks and allows sharing them via email. The files sent by email are one gpx file and one kmz file as attachments in the body of a single email. That's my trigger. In my website I have managed to load a Google Map (with the Google Maps Javascript Api) and plot waypoints and KmlLayers. I also have a Google Drive Script running that downloads the email attachments with kmz or gpx extensions automatically and saves them in a Google Drive folder. I can also retrieve the permalinks to those files through another Script. I guess I even could figure out how to add a new layer to my javascript code on the site everytime a new KMZ file is added to the folder, but I haven't gone that far. Here's where the nightmare starts. First approach. I'm able to plot a KMZ file on my map with KmlLayer. No problem with that. But Google Maps have a limit of around 15-20 layers and the journey is goint to last around 100 days, adding a new layer every day. That means many layers and probably a blackout on the map when the limit is reached. Since many people will be visiting the site, I don't want that to happen. The second option would be to have a script that: Unzips the KMZ. Saves the unzipped KML in another folder. Merges all the KML's in one single KML. I can't get over step 1. I've tried to unzip my KMZ files on Drive with a Script but I'm unable. This is the code I used when testing: function unZip() { var kmzs = DriveApp.getFilesByType('application/vnd.google-earth.kmz'); while (kmzs.hasNext()){ var kmz = kmzs.ne…
linked to: http://stackoverflow.com/q/2109555
type: Question
tagged with: google-apps-script
tagged with: javascript
has answer: http://stackoverflow.com/a/25452923
tagged with: google-maps-api-3
has title: Update Google Maps with kmz files in several layers

http://stackoverflow.com/q/25431848
tagged with: angularjs-ng-repeat
possible better answer: http://stackoverflow.com/a/25431907
has answer: http://stackoverflow.com/a/25431907
tagged with: angularjs
has answer: http://stackoverflow.com/a/25432111
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/39676513
has body: I am not sure how to get the range of my headerRow so that when I am ng-repeating the rows it knows how many there are to get the correct offset. {{ header }} {{ row[need this to be the range of the length of the headerRow] }}
accepted answer: http://stackoverflow.com/a/25432111
type: Question
answer count: 2
has title: ng-repeat issue and html table
tagged with: javascript

http://stackoverflow.com/q/25549503
tagged with: node.js
type: AnsweredQuestion
tagged with: coffeescript
type: Question
has answer: http://stackoverflow.com/a/25549715
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25549715
has body: I'm dealing with a simple Coffescript class representing a Database module (using SQLite with jugglingdb, which works fine), which has a method that returns always false and I can't figure out why is that: database.coffee Schema = require('jugglingdb').Schema; module.exports = class Database constructor: (database_file) -&gt; if database_file? @filename = database_file else @filename = 'board.db' console.log '[DB] SQLite database: ' + @filename @db = null @connection = false connect: (callback) -&gt; @db = new Schema 'sqlite3', { database: @filename } @db.on 'connected', () -&gt; console.log '[DB] Database connection established' @connection = true callback? callback(@connection) @db.on 'disconnected', ()-&gt; console.log '[DB] Database closed' @connection = false callback? callback(@connection) @db.log = (message, duration)-&gt; console.log '[DB]' + message close: -&gt; @db.disconnect() delete @db @db = null getSchema: -&gt; if @db isnt null return @db else return null isConnected: -&gt; return @connection database-test.js var Database = require('./database'); function db_connection_cb(is_connected) { var connection = db.isConnected(); console.log("Class method: " + connection + " --- from callback: " + is_connected); } var db = new Database('user_test.db'); db.connect(db_connection_cb); surprisingly, db.isConnected() reports always false, but is_connected is always true. Why Node.js is having such a strange behaviour?
has title: Coffeescript class method always returns false

http://stackoverflow.com/a/25461416
downvote count: 0
has comment: http://stackoverflow.com/comment/39731691
score: 1
has body: It is as the message says: cannot load file:///D:/Work%20File/My%20Work%20File/mY%20Work%20Backup/Sophie/Work%20File/footer.html. . You are referencing to a file on a Windows boxes filesystem and not in a webservers folder. Second: you have a CORS-issue (which in this case is caused by the filesystem reference) Cross origin requests are only supported for HTTP See MDN for more infos. To solve the issue, you have to configure your webserver to allow such requests. Check your webservers manual.
answers question: http://stackoverflow.com/q/25461367
has comment: http://stackoverflow.com/comment/39732002
upvote count: 1
type: Answer

http://stackoverflow.com/comment/39868054
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25535119
has text: @Christopher Actually, I was quite literally inquiring if you had a good reason to recommend he use jQuery to access the value rather than directly. Super aggressive? Stop reading emotion into my comments. There is none.

http://stackoverflow.com/q/25409987
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25410091
has body: I have an ad page, and I would like to give users the option not to see it anymore if they are not interested in my ad. I thought I would add a button that, when clicked, would send the user to their own homepage. I've tried onclick='window.home()' but it's not working in Chrome. alt+home does send Chrome to its homepage. I wonder if there is a way to use that? Or has this been prohibited in modern browsers due to security concerns?
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39638626
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25410041
linked to: http://stackoverflow.com/q/1369450
has answer: http://stackoverflow.com/a/25410041
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25410091
has comment: http://stackoverflow.com/comment/39637468
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39637225
type: Question
has comment: http://stackoverflow.com/comment/39636044
has title: 'onclick' redirects user to their homepage?

http://stackoverflow.com/q/25527819
has body: I am very new to MVC and Sails.js. I just started learning it yesterday and tried to learn it by doing something. But I am having some confusions regarding Sails models. After creating the application, I configured the database in config/connection.js. Then I created a blueprint api named user. Next thing I did is I started the server and loaded following url: http://localhost:1337/user/create?user=Mr.X I didn't configure anything in api/models/user.js. So it is not supposed to save any data in database. When I browse my database as expectedly I can't see any record. But when I load the following url: http://localhost:1337/user/ I can see the record of Mr.X there. And even if I restart the server the record of Mr.X is still there. What I can't understand is, how is it happening? How is Sails saving this data without affecting the configured database? Is it normal thing in all MVC frameworks or just Sails do that?
tagged with: javascript
score: 4
accepted answer: http://stackoverflow.com/a/25530839
favorite count: 0
tagged with: node.js
tagged with: model-view-controller
type: AnsweredQuestion
has title: How does Sails.js manages data without saving in database
possible better answer: http://stackoverflow.com/a/32472800
upvote count: 5
has answer: http://stackoverflow.com/a/32472800
has answer: http://stackoverflow.com/a/25530839
downvote count: 1
type: Question
answer count: 2
tagged with: sails.js

http://stackoverflow.com/comment/39613951
type: AnswerComment
comment on: http://stackoverflow.com/a/25398293
type: Comment
has text: It doesn't work on Firefox (v 30) and also this works rubbish on Chrome.
score: 1

http://stackoverflow.com/comment/39701295
has text: Try to annotate the method `postJson` with `@BodyParser.Of(BodyParser.FormUrlEncoded.class)`
type: Comment
comment on: http://stackoverflow.com/q/25444637
score: 0
type: QuestionComment

http://stackoverflow.com/a/25487888
upvote count: 12
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25486954
has body: The pattern I'm using for addressing this purpose is the following : First, I externalize the cursor used to feed the #each block in a separate helper function because we are going to reuse it later. // given a slider, return associated slides from the collection function slides(slider){ return Slides.find({ sliderId:slider._id }); } // assumes the slider template is called with a slider as data context Template.slider.helpers({ slides:function(){ return slides(this); } }); &lt;template name="pageSlider"&gt; {{&gt; slider mySlider}} &lt;/template&gt; Template.pageSlider.helpers({ mySlider:function(){ return Sliders.findOne({ name:"mySlider" }); } }); Now what we'd like to do is execute code after the #each block has finished inserting our items in the DOM, so we are going to "listen" to the same reactive data source that the #each block is listening to : this is why we declared the cursor as a separate function. We'll setup a reactive computation to detect changes being made to the underlying Slides collection, and we'll execute some code that is going to wait until the #each block renders items in the DOM then reinitialize the jQuery slider. Template.slider.rendered=function(){ this.autorun(_.bind(function(){ // we assume that the data context (this.data) is the slider doc itself // this line of code makes our computation depend on changes done to // the Slides collection var slidesCursor=slides(this.data); // we wait until the #each block invalidation has finished inserting items // in the DOM Deps.afterFlush(function(){ // here it is safe to initialize your jQuery plugin because DOM is ready }); }, this)); }; Deps.afterFlush is assuring us that we run our plugin initialization code AFTER the DOM rendering process implied by the #each block is done. The setTimeout hack works by assuming that it will trigger after the flush cycle has finished, but is is ugly insofar as the Deps API provides a method specifically designed to run code after the current flush cycle is…
answers question: http://stackoverflow.com/q/25486954
type: Answer
has comment: http://stackoverflow.com/comment/43873117
has comment: http://stackoverflow.com/comment/39819859
score: 12

http://stackoverflow.com/comment/39823235
has text: First: You are dealing with a JavaScript *object* -- with perhaps an array inside of it (depending on how you handle the '0'). Second -- what have you tried? Your best solution is a recursive one -- take an object, see if your key `user` is there. If not, add the key. Then, pass that object and your next key `joey` down and walk through your string bit by bit. You can use the `split` method on the string to break it apart.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25510551

http://stackoverflow.com/q/25426214
tagged with: javascript
score: 2
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43680267
type: UnansweredQuestion
answer count: 0
upvote count: 2
tagged with: http://stackoverflow.com/tag/json
has title: multiple JSON Data log and PUT to server
type: Question
has body: I have a javascript function which generates JSON data at every certain second and then PUT it to a cloud server. 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. For example I want to log 50 data point in 10 second and then with timestamp I will PUT to a server Now JSON data is passed through var fromDatan. JSON data format is {"value":"-2.1282838391939194"} Now the code is: var acc; var watchID = null; function startWatch() { //set frequency of accelerometer update.1000 = 1 second var options = { frequency: 1000 }; watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options); } function stopWatch() { if (watchID) { navigator.accelerometer.clearWatch(watchID); watchID = null; } } //DISPLAY ACCELERATION DATA function onSuccess(acceleration) { acc = acceleration; var element = document.getElementById("accelerometer"); element.innerHTML = 'Acceleration X: ' + acceleration.x + '&lt;br /&gt;' + 'Acceleration Y: ' + acceleration.y + '&lt;br /&gt;' + 'Acceleration Z: ' + acceleration.z + '&lt;br /&gt;' + 'Timestamp: ' + acceleration.timestamp + '&lt;br /&gt;'; datalock(); } function postdata () { var accx = acc.x; alert(accx); var fromDatan = JSON.stringify(fromData); alert(fromDatan); //POST JSON SENSOR DATA $.ajax({ url: "http://abcd.com", headers: { "X-API-KEY": "2b9asdedqedqxdqd7956e6f7a", "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)); } }); return false; //var fromData = {}; } var fromData; var jsonCounter = 0; function datalock(){ alert("Entering"); fromData.push({ value: accx.toString(), }); jsonCounter++; // post only after 10 entries if (jsonCounter &gt;= 10) { postdata (); jsonCounter = 0; // reset }; //var fromData; // make it global as it is used in other function. } But the…

http://stackoverflow.com/q/25518591
has body: My application needs to read in a large dataset and pipe it to the client to manipulate with D3.js. The problem is, on large datasets, the reading/loading of the file contents could take a while. I want to solve this using streams. However, I'm unsure of how to do so in the context of the Sails framework. What I want to do is read the contents of the file and pipe it to a rendered page. However, I can't figure out how to pipe it through if I use something like res.view('somePage', { data: thePipedData });. I currently have something like this: var datastream = fs.createReadStream(path.resolve(DATASET_EXTRACT_PATH, datatype, dataset, dataset + '.csv')); datastream.pipe(res); ... return res.view('analytics', { title: 'Analytics', data: ??? }); What's the best way to approach this?
answer count: 1
favorite count: 0
upvote count: 3
tagged with: stream
has title: Piping data from a file to a rendered page in Sails.js
has answer: http://stackoverflow.com/a/25519112
tagged with: node.js
type: AnsweredQuestion
score: 3
type: Question
tagged with: sails.js
accepted answer: http://stackoverflow.com/a/25519112
downvote count: 0
tagged with: javascript
tagged with: express

http://stackoverflow.com/q/25534356
tagged with: javascript
has title: Meteor: TypeError: Object #<Object> has no method 'require'
answer count: 1
downvote count: 0
tagged with: meteor
has body: I had problems previously trying to get the Meteor.require method to work and I thought it was fixed but apparently not. Although I have since upgraded to Meteor 0.9.0. Anyone have any idea how I can get the Meteor.require method to work? Here's what I get on the terminal when passing params back to the server =&gt; App running at: http://localhost:3000/ I20140827-11:08:21.949(-7)? createImage I20140827-11:08:21.953(-7)? 24890 I20140827-11:08:22.030(-7)? Exception while invoking method 'createImage' TypeError: Object #&lt;Object&gt; has no method 'require' I20140827-11:08:22.032(-7)? at Meteor.methods.createImage (app/server/server.js:7:21) I20140827-11:08:22.033(-7)? at maybeAuditArgumentChecks (packages/livedata/livedata_server.js:1492) I20140827-11:08:22.034(-7)? at packages/livedata/livedata_server.js:643 I20140827-11:08:22.034(-7)? at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56) I20140827-11:08:22.034(-7)? at packages/livedata/livedata_server.js:642 I20140827-11:08:22.034(-7)? at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56) I20140827-11:08:22.034(-7)? at _.extend.protocol_handlers.method (packages/livedata/livedata_server.js:641) I20140827-11:08:22.035(-7)? at packages/livedata/livedata_server.js:541 This is my Meteor.method: createImage: function(coords) { console.log('createImage') console.log(coords.area); var gd = Meteor.require('node-gd'); }, my packages.json file: { "node-gd":"0.2.3" } node-gd is definitely there too: me@ubuntu:~/leaderboard/packages/npm/npm/node_modules/node-gd$ ls binding.gyp build coffee cpp js package.json README.md
favorite count: 0
has answer: http://stackoverflow.com/a/25534419
accepted answer: http://stackoverflow.com/a/25534419
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/a/25478177
has body: In Cocos2D v3 the way events are handled has changed. For a proper explanation of the whole system you should read New event manager in Cocos2d-Html5 v3.0. In short, if you used to have: var AnimationLayer = cc.Layer.extend({ ctor : function() { this._super(); this.setKeyboardEnabled(true); }, onKeyDown : function(key) { cc.log("action"); } ... ... )} You have to turn it into something like: var AnimationLayer = cc.Layer.extend({ ctor : function() { this._super(); cc.eventManager.addListener({ event: cc.EventListener.KEYBOARD, onKeyDown : function(key) { cc.log("action"); } }, this); }, ... ... )} This can sound a bit complicated at first, but this new mechanism allows you to attach these event listeners to any kind of cc node, not just layers. So for example you could do something like this to make a Sprite fade when the mouse is above it: var hoverHandler = cc.EventListener.create({ event: cc.EventListener.MOUSE, onMouseMove: function (event) { var target = event.getCurrentTarget(); var locationInNode = target.convertToNodeSpace(event.getLocation()); var s = target.getContentSize(); var rect = cc.rect(0, 0, s.width, s.height); if (cc.rectContainsPoint(rect, locationInNode)) { cc.log("It's hovering! x = " + locationInNode.x + ", y = " + locationInNode.y); target.opacity = 180; return true; } else { target.opacity = 255; return false; } } }); var MyLayer = cc.Layer.extend({ init: function() { this._super(); var mySpriteThatFadesWhenHovered = cc.Sprite.create(...); this.addChild(mySpriteThatFadesWhenHovered); cc.eventManager.addListener(hoverHandler.clone(), mySpriteThatFadesWhenHovered ); } )}
has comment: http://stackoverflow.com/comment/39790742
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39765554
score: 7
accepted answer of: http://stackoverflow.com/q/25474700
answers question: http://stackoverflow.com/q/25474700
upvote count: 7
type: AcceptedAnswer

http://stackoverflow.com/comment/39718057
comment on: http://stackoverflow.com/q/25454214
score: 4
has text: Handling `keyup` isn’t the right way to filter text. Use an ` ` if appropriate, or just validate instead of doing active filtering, because working with the selection is really difficult, and you should avoid it at all costs.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25411912
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39639736
has answer: http://stackoverflow.com/a/25411950
has comment: http://stackoverflow.com/comment/39639859
score: 0
has body: I have a jquery script that changes an element to fixed when the page is scrolled. The problem is that the script won't work until the page is fully loaded, and it can take some time Is there a way to start the script as soon as the user enters the page, without having to wait until it finishes loading ? &lt;script type='text/javascript'&gt;//&lt;![CDATA[ $(window).load(function(){ var menuOffset = $('#ribbonmenu')[0].offsetTop; $(document).bind('ready scroll', function() { var docScroll = $(document).scrollTop(); if (docScroll &gt;= menuOffset) { $('#ribbonmenu').addClass('fixed'); } else { $('#ribbonmenu').removeClass('fixed'); } }); });//]]&gt; &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39639746
type: Question
has answer: http://stackoverflow.com/a/25411961
tagged with: javascript
answer count: 2
has title: start script as soon as the page opens
tagged with: jquery

http://stackoverflow.com/comment/39832520
type: QuestionComment
has text: File inputs are controlled by the browsers pretty strictly and weirdly in some cases. It might be a better idea to instead of hiding the container, to simply not have it exist until you need it. Append it to the dom on show call.
score: 0
comment on: http://stackoverflow.com/q/25515386
type: Comment

http://stackoverflow.com/comment/39836611
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25517570
has text: @Ian thanks it turned out just using an array like [] works in my python code but I used your Json.parse to make it an array.
score: 0

http://stackoverflow.com/comment/39844567
type: QuestionComment
has text: A 2x2 matrix / array in javascript is an Array inside an Array. Can you provide in matrix form what you are trying to put into the arrays? Are you try {[London, England], [John, Mike]}?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25522307

http://stackoverflow.com/q/25486809
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39778336
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/11541754
tagged with: css
has comment: http://stackoverflow.com/comment/39778412
has body: How to use my hover function on with ajax load content function ? ..................................................................................................................................................................... first when i load page content.php , mouse over on cat image, it's will show hover text. but when i call content using index.php, hover not work , How can i do ? index.php ThaiCreate.Com Ajax Tutorial content.php <!--[if IE 7]> <![endif]--> hover cat images.
duplicate of: http://stackoverflow.com/q/11541754
has answer: http://stackoverflow.com/a/25486909
type: Question
tagged with: javascript
score: 0
has title: How to use my hover function on with ajax load content function?
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/25446818
favorite count: 0
has comment: http://stackoverflow.com/comment/39703355
has comment: http://stackoverflow.com/comment/39703310
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39703462
tagged with: css
has answer: http://stackoverflow.com/a/25446919
answer count: 4
has comment: http://stackoverflow.com/comment/39703270
has title: CSS not getting updated through jQuery
type: Question
has answer: http://stackoverflow.com/a/25446931
has answer: http://stackoverflow.com/a/25446957
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25447124
downvote count: 2
upvote count: 1
has body: I am stuck in a silly problem. I have two divs (white coloured). Onclick them a class should be added which changes the color from white to blue. The class is getting added but the colour is not changing. (I do not need to addClass() just to change colour, but there will be more things in that class later, right now I have to execute it properly). The divs has a class "thumbnail", onClick I want to add "border-glow". // ImageBox component // Author Sayantan Hore // Created on 19.08.2014 // -------------------------------- function ImageBox(){ this.outerContainer = null; this.imageBoxArray = []; } ImageBox.prototype.createOuterContainer = function(){ this.outerContainer = $(" ") this.outerContainer.addClass("outer-image-container"); $("body").append(this.outerContainer); } ImageBox.prototype.createImageBox = function(){ if (this.createOuterContainer === null){ this.createOuterContainer(); } var imageBox = $(" "); imageBox.addClass("thumbnail"); var closeButton = $(" x "); closeButton.addClass("btn-close"); //imageBox.append(closeButton); this.imageBoxArray.push(imageBox); return imageBox; } ImageBox.prototype.loadImage = function(imPath, imageBox){ var img = $(" ") img.attr("src", imPath); imageBox.append(img); img.load(function(){ //console.log($(this).height()); imgWidth = $(this).width(); $(this).parent().height(rowHeight); $(this).height(rowHeight); //console.log($(this).width()); $(this).parent().width($(this).width()); }); } var rowHeight; $(document).ready(function(){ rowHeight = parseFloat(($(window).height() * 90 / 100) / 5); //console.log(rowHeight); var imageBoxObj = new ImageBox(); imageBoxObj.createOuterContainer(); for (var i = 0; i < 2; i++){ var imageBox = imageBoxObj.createImageBox(); imageBoxObj.outerContainer.append(imageBox); var imPath = '../images/im' + (i + 1) + '.jpg'; //imageBoxObj.loadImage(imPath, imageBox); } console.log(screen.availHeight); console.log($(window).height()); console.log($(".outer-image-container").height()); $(".thumbnail")…
tagged with: jquery

http://stackoverflow.com/comment/39718840
comment on: http://stackoverflow.com/q/25454529
score: 0
type: Comment
type: QuestionComment
has text: Reason may be it is not properly converted to json. [Look Here](http://stackoverflow.com/a/7986636/1823242)

http://stackoverflow.com/comment/39817982
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25501253
has text: That `self` is missing a `var` stems from the coffee cleanup as well? You might want to post the original coffeescript as well.

http://stackoverflow.com/comment/39878556
comment on: http://stackoverflow.com/q/25540833
score: 0
type: Comment
type: QuestionComment
has text: What is that {<?php and ?>}

http://stackoverflow.com/a/25531311
accepted answer of: http://stackoverflow.com/q/25531276
answers question: http://stackoverflow.com/q/25531276
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39861879
has comment: http://stackoverflow.com/comment/39861568
type: Answer
score: 6
downvote count: 0
has comment: http://stackoverflow.com/comment/39862253
has comment: http://stackoverflow.com/comment/41500870
has body: You need to again escape \d, new RegExp("\\d") \ should be escaped in the regex which has " as delimiter.
upvote count: 6

http://stackoverflow.com/comment/39701402
type: QuestionComment
comment on: http://stackoverflow.com/q/25444881
has text: Have you any live demo of your chart? Can you recreate it on the jsfiddle.net?
score: 0
type: Comment

http://stackoverflow.com/q/25437327
answer count: 1
tagged with: arrays
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25437494
has body: I would like to calculate the percent change for a range of data by it's prior range. Here's an example of what I'm working on: Below is an array of objects that I need to calculate a percent change for displayAd_imp, videoAd_imp, and tv_impbased properties based on a selection of WeekNo range. var objArr = [{ "Title": "July 13 - July 19 2014", "displayAd_imp": "3,500", "videoAd_imp": "1.5", "tv_imp": "0.52", "Date": "2014-07-17T00:00:00.000Z", "WeekNo": 29 }, { "Title": "July 20 - July 26 2014", "displayAd_imp": "1,600", "videoAd_imp": "2.55", "tv_imp": "0.052", "Date": "2014-07-24T00:00:00.000Z", "WeekNo": 30 }, { "Title": "July 27 - Aug 2 2014", "displayAd_imp": "1,500", "videoAd_imp": "2.1", "tv_imp": "0.122", "Date": "2014-07-31T00:00:00.000Z", "WeekNo": 31 }, { "Title": "Aug 3 - Aug 9 2014", "displayAd_imp": "1,500", "videoAd_imp": "1.99", "tv_imp": "0.254", "Date": "2014-08-07T00:00:00.000Z", "WeekNo": 32 }, { "Title": "Aug 10 - Aug 17 2014", "displayAd_imp": "1,400", "videoAd_imp": "2.0", "tv_imp": ".235", "Date": "2014-08-14T00:00:00.000Z", "WeekNo": 33 }]; In the method below I'm trying to achieve this task by first filtering the data with start and end WeekNo, then calculating the sum of that data. Here's a jsfiddle working example. function CalcWeekRange(data,begin,end){ //console.log(data,begin, end); var newArr = data.filter(function(item){ return (item.WeekNo &gt;= begin &amp;&amp; item.WeekNo &lt;= end); }); var sumArr = [newArr.reduce(function (acc, x) { Object.keys(acc).forEach(function (k) { acc[k] += Number(x[k]); }); return acc; }, { displayAd_imp: 0, videoAd_imp: 0, tv_imp: 0, })]; console.log(sumArr); } The part I'm having difficulty with is calculating the percent change for that period by getting the sum of previous range and then current/previous - 1. So for example, in the above jsfiddle we called CalcWeekRange(objArr,32,33);. The percent change logic for displayAd_impwould be: Current Weeks(32,33): 1400+1500 = 2900 (We have this part in s…
type: AnsweredQuestion
tagged with: object
accepted answer: http://stackoverflow.com/a/25437494
has title: Calculating change in percent of the properties in JavaScript objects
type: Question

http://stackoverflow.com/comment/39728621
type: QuestionComment
type: Comment
score: 1
has text: You could also leave the `href` out of your `a`. Or make a `span` out of it.
comment on: http://stackoverflow.com/q/25459716

http://stackoverflow.com/comment/39804027
has text: @user32342534: How about looking up the docs on those functions, hm?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25500466

http://stackoverflow.com/comment/39841454
has text: As you told me you are not a programmer, take a look at this post about [one JS file for multiple pages](http://stackoverflow.com/questions/8410298/one-js-file-for-multiple-pages) and to the blog of [P. Irish](http://www.paulirish.com/2009/markup-based-unobtrusive-comprehensive-dom-ready-execution/) who had this idea
comment on: http://stackoverflow.com/q/25500059
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25475033
has answer: http://stackoverflow.com/a/25574660
tagged with: express
has title: Debugging node.js with Express Framework: Troubleshooting missing res.end
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25574660
favorite count: 0
type: Question
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39757387
tagged with: node.js
score: 0
downvote count: 1
tagged with: javascript
has body: The Express node.js server application I'm currently developing will sometimes go off into the void and stops returning requests. I very much suspect somewhere in it I am doing something that is ultimately skipping a res.end that I need to be doing. Does anyone have any tips or tricks on how to best go about looking for where I'm missing the res.end (assuming that's the problem)? Is there anyway to view the currently open requests in real time in the node event loop? When things hang up, everything is still running in that Express will still accept incoming requests. And, these requests are logged to the console via express.logger just fine. But, the request is never returned to the client and no error is being thrown. Thank you in advance for your thoughts. Follow-up: There doesn't seem to be much documentation on node's debug mode beyond the raw API docs. I did find this article which seems to provide a good overview of several options. But, there doesn't seem to be the kind of thing I was thinking of for watching the event loop, something a la vtop's process list. More Follow-up: Yesterday, Daniel Hood published Debugging in Node.js stating that, "The state of debugging node.js apps has always been a bit unfortunate..." So, perhaps my question is not so silly as to merit down votes as it might seem. Anyway, in his next article he promises to cover some tools for debugging asynchronous operations.

http://stackoverflow.com/q/25512036
type: Question
has comment: http://stackoverflow.com/comment/39826034
score: 1
possible better answer: http://stackoverflow.com/a/25512096
has answer: http://stackoverflow.com/a/25512183
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25512183
has title: how can call value in jquery function in onclick
has comment: http://stackoverflow.com/comment/39826387
type: AnsweredQuestion
has body: I want add value in jquery function an post it to my php file. I call my jquery function whit onclick event but i don't know how can add value. I have this input tag: <input type="hidden" name="code" id="code" value="<?php echo $code; ?>" /> and my onlick event this is: start and my checkDb function it is: now I can't call value from input by id code in my checkDb() function in onclick event. please help me. thank you
upvote count: 1
tagged with: php
has answer: http://stackoverflow.com/a/25512096

http://stackoverflow.com/comment/39730396
comment on: http://stackoverflow.com/q/25460518
has text: @MostafaTalebi Yep..Since I getting the intended output but the script should run without onblur or any event..I have tried document ready of jquery as well but no use its not working..
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25544823
favorite count: 0
has comment: http://stackoverflow.com/comment/39885205
accepted answer: http://stackoverflow.com/a/25545033
has title: Doing a series of asynchronous operations in node.js
tagged with: node.js
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25545104
has answer: http://stackoverflow.com/a/25545033
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25545104
answer count: 2
has body: What is a good way of doing a series of asynchronous operations in Node.js? This is for a script type of application, an application that is supposed to be run from the command line and then finish a job, it is not in the context of a server that should sit in the background and handle several different things at once. I know of Promises/A+ aka Thenables, but the syntax doesn't get that nice: do_some_stuff().then( function() { do_some_other_stuff().then( function() { do_the_last_stuff().then( function() { // we are done with everything! } ) } ) } ); When we have more operations the indentation will make it look quite ugly. I like how jasmine does it, where the asynchronous operation gets passed a function that it should call when it is finished. Based on this idea, I created something I called AsyncSequence. The AsyncSequence runs a series of operations, and each operation gets passed a done function that should be called on completion. Using AsyncSequence the above would look like: AsyncSequence.run( function(done) { do_some_stuff().then(done); }, function(done) { do_some_other_stuff().then(done); }, function(done) { do_the_last_stuff().then(done); }, function() { // we are done with everything! } ); This works and it looks nicer I think, but I wonder if there is a more "standard" way of doing it? Is there something similar to my AsyncSequence that comes to mind when you seasoned Node.js programmers see this? Or something that is not exactly similar, but can be used for the same purpose?
downvote count: 0
tagged with: asynchronous

http://stackoverflow.com/q/25460782
tagged with: google-chrome
answer count: 1
tagged with: uglifyjs2
tagged with: source-maps
upvote count: 1
tagged with: debugging
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has title: Debugger showing wrong information with source maps
has body: This has happened for the second time now and as you can imagine, a debugger that shows wrong information is the worst thing that can happen when debugging. What happens is that when using source maps that debugger thinks the VM is at a certain line, but actually it's not yet there, or worse, will never reach this line. The source maps are generated with the Grunt uglify plugin, which uses UglifyJS2. An example: if(something === 1){ console.log("it's something"); // debugger thinks the VM is here else{ console.log("no it's not"); // while actually it's here } This did then print no it's not although the debugger jumped into the if The other example I experienced was: var that = this; some.functionCall(1, function(){ console.log(that); //this is where the debugger thinks the vm is // debugger: that = undefined // console prints nothing to that point }); When I continued the program the console.log(that) did fire eventually. Did anyone else experience the same problem? Is it more likely a problem of UglifyJS2 or of Google Chrome? Chrome Version: 38.0.2125.8 dev (64-bit) Uglify2JS: 2.4.0 grunt-contrib-uglify: 0.5.1
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26817205

http://stackoverflow.com/q/25453377
tagged with: javascript
has answer: http://stackoverflow.com/a/25453478
score: 0
has answer: http://stackoverflow.com/a/25453437
tagged with: http://stackoverflow.com/tag/html
answer count: 7
has body: I am trying to create a form in a structure of a table. However, it seems that once I placed my boxes text to the label, the outside border loses its structure and part of the border disappears. I am not sure what is causing. Here is my code: Test model Title of Table Label 0 Label 1 Yes No Label 2 Yes No Label 3 Yes No Label 4 Yes No Label 5 Yes No Label 6 Yes No Label 7 Label 8 I can use Javascript if that will help, but I can't use JQuery.
has title: Borders of my table are not completely showing
has comment: http://stackoverflow.com/comment/39716391
tagged with: css
accepted answer: http://stackoverflow.com/a/25453437
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25453410
has comment: http://stackoverflow.com/comment/39716309
has answer: http://stackoverflow.com/a/25453497
has answer: http://stackoverflow.com/a/25453452
has answer: http://stackoverflow.com/a/25453453
type: Question
has answer: http://stackoverflow.com/a/25453479
possible better answer: http://stackoverflow.com/a/25453453

http://stackoverflow.com/q/25478462
has title: Cannot lift sails: localhost undefined
answer count: 2
has answer: http://stackoverflow.com/a/25491000
has body: I'm on a project using a stack that includes PostgreSQL, NodeJS, SailsJS, and BackboneJS. I pulled the client and server repos from git and I navigate into the server for the project and try to run it: sails lift Then I get this error: /Users/$USER/Documents/Code/$APP/config/adapters.js:39 host: mc.dbSettings.host, TypeError: Cannot read property 'host' of undefined Where mc is a var that is set to point to another mainConfig.js file using a require statement. Opening that file I see that dbSettings is defined as: dbSettings: { host: "localhost", user: "_appName_", password: "_password_", dbName: "_appDB_" }, and sails cannot initialize because there is no localhost, or it doesn't know what it is? Please help.
tagged with: postgresql
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39790010
tagged with: node.js
has comment: http://stackoverflow.com/comment/39785738
has comment: http://stackoverflow.com/comment/39763184
has answer: http://stackoverflow.com/a/25481859
tagged with: localhost
type: Question
tagged with: sails.js
has comment: http://stackoverflow.com/comment/39765462
tagged with: javascript
score: 0

http://stackoverflow.com/q/25434191
answer count: 2
has comment: http://stackoverflow.com/comment/39680986
has comment: http://stackoverflow.com/comment/39680855
has comment: http://stackoverflow.com/comment/39681024
favorite count: 0
linked to: http://stackoverflow.com/q/7106470
has answer: http://stackoverflow.com/a/25434629
tagged with: php
has answer: http://stackoverflow.com/a/25434398
has title: Unicode encode string
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39680990
downvote count: 1
has comment: http://stackoverflow.com/comment/39681209
has comment: http://stackoverflow.com/comment/39681324
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has body: I'm json_encoding some strings. Sometimes they contain binary data. This causes the encoding to fail with error code JSON_ERROR_UTF8. Running the strings through utf8_encode gets around this error. However, ✓ (a unicode checkmark) gets encoded as â which when interpreted by JavaScript and rendered in your browser actually looks like â. How can I fix this? Is there another encoding I can use? echo json_encode(utf8_encode('✓')); // "â" Now press F12 and paste that into your JavaScript console (quotes included). It should output â. Please note that echo json_encode('✓'); // "✓" Works as intended. The issue is that sometimes the string will contain binary data which json_encode can't handle, so I need to sanitize every string without breaking the strings it can handle. More examples: json_encode(chr(200)); // false (bad) json_encode(utf8_encode(chr(200))) // "È" (good) json_encode('✓'); // "✓" (good) json_encode(utf8_encode(chr(200))) // "â" (bad) So you see, encoding it works well for some strings and breaks others. This is strictly for logging. I don't care if the binary data comes out weird, I just don't want it to mess with valid strings.
type: Question
score: 0

http://stackoverflow.com/q/25516154
tagged with: javascript
has comment: http://stackoverflow.com/comment/39834620
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: single-page-application
has comment: http://stackoverflow.com/comment/46572278
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/64122495
type: Question
tagged with: visual-studio
has body: I'm reading a book on how to create a SPA (single page applications). The author writes, if the IDE is any good then there will be a technique to convert a highlighted section of HTML and converted to a JavaScript string. How can this be done in Visual Studio 2013? An example of how I want the convert to work is below. Also it would be great to toggle back to the html. HTML JAVASCRIPT var main_html = String() + ' ' + ' ' + ' ' + ' ' + ' ';
score: 1
has answer: http://stackoverflow.com/a/38355101
has title: Convert HTML to Javascript String
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25511143
has answer: http://stackoverflow.com/a/25511273
type: Question
accepted answer: http://stackoverflow.com/a/25511328
has body: Here is my code, it works but I would like to use the loop to clean up the code. Instead of having so many lines of code. I tried replacing the [0] with [i] but it would just make everything fadein together. JSFIDDLE var $icons = $('#header li').hide(); for(var i = 0; i &lt; $icons.length; i++) { $($icons[0]).fadeIn(function() { $($icons[1]).fadeIn(function() { $($icons[2]).fadeIn(function() { $($icons[3]).fadeIn(function() { $($icons[4]).fadeIn(function() { $($icons[5]).fadeIn(function() { $($icons[6]).fadeIn(function() { $($icons[7]).fadeIn(function() { $($icons[8]).fadeIn(function() { $($icons[9]).fadeIn(function() { }); }); }); }); }); }); }); }); }); }); }
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has title: Fade in elements one after another
has answer: http://stackoverflow.com/a/25511328
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25511272
has answer: http://stackoverflow.com/a/25511272

http://stackoverflow.com/a/25515591
accepted answer of: http://stackoverflow.com/q/25515348
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25515348
upvote count: 2
type: Answer
has body: You may use a delegated handler for the button that is within your my-custom-panel.html even if it's not loaded yet in the DOM, for example: $(document).on('click', 'your-element-id-class', function() { //... }); If you load the content dynamically after DOM has loaded then still this will work. I've used click event for the example tho.
score: 2
downvote count: 0

http://stackoverflow.com/comment/39666463
has text: can i set renderTo option at runtime??so that if i call same datepicker i can set data in diffrent div accordingly
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25424207

validation
tags question: http://stackoverflow.com/q/25405199
tags question: http://stackoverflow.com/q/25405545
tags question: http://stackoverflow.com/q/25517325
tags question: http://stackoverflow.com/q/25401695
tags question: http://stackoverflow.com/q/25496920
tags question: http://stackoverflow.com/q/25471652
tags question: http://stackoverflow.com/q/25473134
tags question: http://stackoverflow.com/q/25401398
tags question: http://stackoverflow.com/q/25531570
tags question: http://stackoverflow.com/q/25537003
tags question: http://stackoverflow.com/q/25422795
tags question: http://stackoverflow.com/q/25503724
tags question: http://stackoverflow.com/q/25463060
type: Tag
tags question: http://stackoverflow.com/q/25439051
tag name: validation
tags question: http://stackoverflow.com/q/25441967
tags question: http://stackoverflow.com/q/25421810
tags question: http://stackoverflow.com/q/25411232
tags question: http://stackoverflow.com/q/25522837
tags question: http://stackoverflow.com/q/25477420
tags question: http://stackoverflow.com/q/25501141
tags question: http://stackoverflow.com/q/25522271
tags question: http://stackoverflow.com/q/25492806
tags question: http://stackoverflow.com/q/25422260
tags question: http://stackoverflow.com/q/25458470
tags question: http://stackoverflow.com/q/25435423
tags question: http://stackoverflow.com/q/25446121
tags question: http://stackoverflow.com/q/25430071
tags question: http://stackoverflow.com/q/25429885
tags question: http://stackoverflow.com/q/25522374
tags question: http://stackoverflow.com/q/25525734
tags question: http://stackoverflow.com/q/25428931
tags question: http://stackoverflow.com/q/25530489
tags question: http://stackoverflow.com/q/25530159
tags question: http://stackoverflow.com/q/25507003
tags question: http://stackoverflow.com/q/25441557
tags question: http://stackoverflow.com/q/25512340
tags question: http://stackoverflow.com/q/25502110
tags question: http://stackoverflow.com/q/25430693

http://stackoverflow.com/a/25457619
has body: If it is Javascript code, then perhaps it's actually JSON, and you can use json.loads to decode it.
answers question: http://stackoverflow.com/q/25457598
upvote count: 1
has comment: http://stackoverflow.com/comment/39724799
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/25540804
has body: Haven't had a chance to test but try stopping the propagation of the click function, doing that tells the browser to not complete the default action for this event. $('#loginbtn').click(function(e){ if(!$('#username').val()){ e.stopPropagation(); } }); or as the other answer suggests try using jquery validation which will help in getting all this to work much more easily I like to use: http://jqueryvalidation.org/
score: 0
answers question: http://stackoverflow.com/q/25540705
type: Answer

http://stackoverflow.com/q/25397229
type: Question
downvote count: 0
tagged with: javascript
tagged with: multiple-monitors
score: 3
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25397268
type: UnansweredQuestion
has title: Can a webpage detect if an external display is connected?
has body: I know I can get the screen's dimensions with window.screen.width and .height, but this only gives me the display/screen which the browser is currently residing in. Is there a way to find if another monitor is connected?
upvote count: 3
tagged with: screen-size

http://stackoverflow.com/comment/39826737
comment on: http://stackoverflow.com/q/25512473
type: Comment
type: QuestionComment
has text: Are `doSomethingFunction` or `doAnotherThingFunction` asynchronous? If yes, then you can't do that. You'd have to do the logic inside the callback, or use promises.
score: 0

http://stackoverflow.com/comment/39630040
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25406935
has text: What's the issue? I don't see anything lining up with your use of `competitions`, but other than that, please provide details regarding *how* things are failing. Note also you could debug in the JavaScript console.

http://stackoverflow.com/q/25478329
tagged with: css
answer count: 0
type: Question
has title: Failed getting height of view in Chrome - backbone js
has comment: http://stackoverflow.com/comment/39837024
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39763280
has comment: http://stackoverflow.com/comment/39763425
tagged with: jquery
tagged with: backbone.js
linked to: http://stackoverflow.com/q/25460121
has comment: http://stackoverflow.com/comment/39764733
has body: I am trying to equal the view template div in backbone view. render: function(options){ var highestBox = 0; this.collection.each(function(_itemData){ var item = new ItemView({model : _itemData}); this.$el.append(item.el); if (item.$el.height() &gt; highestBox){ highestBox = item.$el.height(); } },this); $('#container .item').height(highestBox + 90); } It works well in firefox yet in chrome, it returns height = 52px when I do console.log(highestBox) in this.collection loop. I supposed the height of the view will be set to be the highest one, but it didn't. Any idea what could be causing this. Thanks.
type: UnansweredQuestion

http://stackoverflow.com/q/25411508
downvote count: 0
tagged with: javascript
tagged with: alignment
tagged with: jquery
tagged with: jquery-ui-tabs
answer count: 2
favorite count: 0
has body: I'm trying to get my jQuery tabs to go all the way across the top and line up on the left and right side with the edges, I tried doing fixed widths but it doesn't seem to want to cooperate that way. Does anyone know how to do this? Also it keeps jumping around when you click on a tab, I saw it's because they are hiding the border of the content by moving the tab down over the border... is there anyway to connect the tabs to the content without moving the tab itself and creating that jumping? http://jsfiddle.net/fun6faos/2/ What is Community Solar? Why Clean Energy Collective? How it Works? Community Solar Benefits TITLE Information TITLE Information TITLE Information TITLE Information
possible better answer: http://stackoverflow.com/a/25411564
upvote count: 2
has answer: http://stackoverflow.com/a/25411648
has answer: http://stackoverflow.com/a/25411564
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
has title: How do I get my tabs to go 100% across the top?
type: Question
accepted answer: http://stackoverflow.com/a/25411648

http://stackoverflow.com/a/25544660
type: AcceptedAnswer
has body: The div you created has the id = 'chart' out = out + "&lt;div id='chart' style='width:100%; height:100px;'&gt;&lt;/div&gt;"; whereas the container id you're passing to highcharts is 'container' $('#container').highcharts({ and to check whether div is created at the time of highcharts call, you can try: alert(document.getElementById('chart')); if it shows an element it means the div is already created. If not then you can try: $('#chart').on('change', function() { Just to be sure, you can also try: $(document).ready(function() { /* code here */ });
has comment: http://stackoverflow.com/comment/39885425
type: Answer
answers question: http://stackoverflow.com/q/25544548
has comment: http://stackoverflow.com/comment/39885510
has comment: http://stackoverflow.com/comment/39886264
accepted answer of: http://stackoverflow.com/q/25544548
has comment: http://stackoverflow.com/comment/39886055
has comment: http://stackoverflow.com/comment/39885340
score: 0
has comment: http://stackoverflow.com/comment/39885880
has comment: http://stackoverflow.com/comment/39885248

http://stackoverflow.com/q/25548622
has comment: http://stackoverflow.com/comment/39894979
has title: Forcing download of PDF on iPad
score: 0
tagged with: ipad
tagged with: cordova
type: UnansweredQuestion
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/39892338
has body: Previous questions about this on SO haven't been much help. I'm trying to force a PDF to download on the iPad. However, the default behaviour of both Safari and the Phonegap/Cordova InAppBrowser on the iPad is to display the PDF, not download it. I already manipulate the MIME-type in Apache, and this makes the download work properly in all desktop browsers. I've tried both: SetEnvIf Request_URI "\.pdf$" requested_pdf=pdf Header add Content-Disposition "attachment" env=requested_pdf and: &lt;FilesMatch "\.(pdf)$"&gt; ForceType application/octet-stream Header set "Content-disposition" "attachment; filename=test.pdf" &lt;/FilesMatch&gt; Both Safari and InAppBrowser still display the PDF, instead of downloading. Yet I've seen there are sites able to force a PDF to download, possibly through client-side JavaScript. Any ideas?
tagged with: apache
tagged with: ios
tagged with: javascript

http://stackoverflow.com/comment/39893783
has text: you are returning partialview from controller action????
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25549395
score: 0

http://stackoverflow.com/a/25448378
answers question: http://stackoverflow.com/q/25448239
type: Answer
has comment: http://stackoverflow.com/comment/39706411
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/39706459
has body: One thing to check in IE, in Internet Options > Advanced, under Multimedia should be a checkbox that says "play animations in webpages". Ensure that is checked.
has comment: http://stackoverflow.com/comment/39706518
has comment: http://stackoverflow.com/comment/39706464
has comment: http://stackoverflow.com/comment/39707480
has comment: http://stackoverflow.com/comment/39706558
has comment: http://stackoverflow.com/comment/39706559
score: 0

http://stackoverflow.com/q/25494437
has answer: http://stackoverflow.com/a/26638439
type: Question
has body: I'm using grafana to work with graphite data but when I try to parse it I get an error. It happens because the server does not give me a JSON. I'm trying to work with scripted dashboards an the script which I'm using is this: https://gist.github.com/anatolijd/73b1360c9780c0d161b1 On function expand_filter_values the line var obj = JSON.parse(req.responseText);, apparently the response.text is not a JSON object but an html with this content: &lt; !-- Copyright 2008 Orbitz WorldWide Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- &gt; &lt; html&gt;&lt;br&gt; &lt; head&gt;&lt;br&gt; &lt; title&gt;Graphite Browser&lt; /title&gt;&lt;br&gt; &lt; /head&gt; &lt; frameset rows="60,*" frameborder="1" border="1"&gt; &lt; frame src="/browser/header/" name="Header" id='header' scrolling="no" noresize="true" /&gt; &lt; frame src="/composer/?query=myhost.xxx.%2A" name="content" id="composerFrame"/&gt; &lt; /frameset&gt; &lt; /html&gt; Can you help me with it, please?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40854306
score: 0
tagged with: grafana
answer count: 1
tagged with: graphite
type: UnansweredQuestion
has title: Scripted dashboard on grafana
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/39643249
type: Comment
comment on: http://stackoverflow.com/a/25410825
score: 0
has text: +1 It is working nicely. What I had to do was to change open to close. Thanks you again.
type: AnswerComment

http://stackoverflow.com/a/25839937
downvote count: 0
has comment: http://stackoverflow.com/comment/127947770
has comment: http://stackoverflow.com/comment/111651740
upvote count: 13
type: Answer
has body: One more detail in addition to the accepted answer: In Chrome and FireFox, console.info log lines are prefixed with a little i icon while console.log lines are not. warn and error lines are prefixed with a little triangle and x, respectively.
answers question: http://stackoverflow.com/q/25532778
score: 13

http://stackoverflow.com/comment/39845451
has text: neelsg thank you for paying attention, the problem with the examples is that they were scattered into pieces and not clear how to make a working playlist retrieval...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25522003

http://stackoverflow.com/q/25423064
has body: There is a directive: .directive('location', function () { return { restrict : 'A', scope : {}, replace : true, templateUrl: 'common/components/location/location.html', link : function (scope, element, attr) {……} } }); So it is used in another directive: var scope = $rootScope.$new(true); var directive = $compile('&lt;div location&gt;&lt;/div&gt;')(scope); $document.find('body').append(directive); directive.hide(); - not working How to hide directive generated html after inserting it to body? Directive has "replace" set to true http://plnkr.co/edit/e7fNua?p=preview
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25432688
favorite count: 0
has comment: http://stackoverflow.com/comment/39660942
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39660759
accepted answer: http://stackoverflow.com/a/25432688
has comment: http://stackoverflow.com/comment/39661623
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39660033
upvote count: 1
has title: How to hide an element after $compile?
type: Question
has comment: http://stackoverflow.com/comment/39671206
tagged with: javascript

http://stackoverflow.com/comment/39763259
type: QuestionComment
comment on: http://stackoverflow.com/q/25473908
has text: @morefromalan I think you can answer this question
score: 0
type: Comment

http://stackoverflow.com/q/25401459
tagged with: javascript
has answer: http://stackoverflow.com/a/25426368
score: 0
has body: I want an alert box only in Internet Explorer in java script... How can I write in .js file. &lt;!--[if IE 8]&gt;&lt;!--&gt; alert("only in IE8"); &lt;!--&lt;![endif]--&gt; I use this code previously but it doesn't work.. is there any need to add js file for execute this or any code for this. if (isIE8) { alert('Your browser is IE8'); } If I use this code javascript stops the execution in chrome and firefox.
answer count: 3
type: UnansweredQuestion
tagged with: browser-detection
has answer: http://stackoverflow.com/a/25401993
has title: Javascript alert only in ie8
tagged with: internet-explorer
tagged with: alert
tagged with: internet-explorer-8
type: Question
has comment: http://stackoverflow.com/comment/39665058
has answer: http://stackoverflow.com/a/51167964

http://stackoverflow.com/q/25417034
score: 1
has body: In the browser, JavaScript usage of eval is often cited as being "evil." Nicholas C. Zakas makes the case that eval() isn’t evil, just misunderstood and covers the Debugability, Performance and Security topics. The Google Chrome Content Security Policy document mentions the default policy disables eval and requires and requires you to add 'unsafe-eval' to reenable . As a test case, I ran the following from the Chrome developer tools JavaScript console. to see what happens when I delete window.eval &gt; eval("1+1") 2 &gt; window.eval("1+1") 2 &gt; delete window.eval true &gt; eval("1+1") ReferenceError: eval is not defined &gt; window.eval("1+1") TypeError: undefined is not a function Other that potentially enhancing security and breaking third party code that relies on eval, what are the other implications of executing delete window.eval ?
has comment: http://stackoverflow.com/comment/39650093
has comment: http://stackoverflow.com/comment/39649689
type: Question
has comment: http://stackoverflow.com/comment/39650042
tagged with: browser
has comment: http://stackoverflow.com/comment/39649628
has title: Browser JavaScript Implications of `delete window.eval`?
tagged with: javascript
tagged with: eval
upvote count: 1
favorite count: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39649629
downvote count: 0

http://stackoverflow.com/a/25489107
downvote count: 0
has comment: http://stackoverflow.com/comment/39783155
answers question: http://stackoverflow.com/q/25489049
upvote count: 2
has body: Try removing event.preventDefault();
type: Answer
score: 2

http://stackoverflow.com/q/25505951
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25505975
has title: Load page in DIV without redirect
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39814213
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25505975
has body: I have small problem with my div's and addresses to load! I have a link where i call dialog box and load that link address in that dialog box, but when I click on link it opens the dialog box and start to redirect an everything is gone! Here's how look the address link: INFO and dialog call: $(".clinfo").click(function () { $("body").on("click", ".ui-widget-overlay", function () { $('#divInfo').dialog("close"); }); $("#divInfo").dialog("open"); $('#divInfo').empty(); $("#divInfo").load($(this).attr("href")); }); I cant figure out where is the problem, because when I call divInfo from iFrame it works like a charm loads page in divInfo perfect. But outside iFrame it opens divInfo an then redirects whole page!

http://stackoverflow.com/comment/39773925
type: Comment
comment on: http://stackoverflow.com/a/25482015
has text: I am using php for the upload. Thanks
score: 0
type: AnswerComment

http://stackoverflow.com/comment/77471958
has text: Hi capcom, I am trying to achieve the same thing. Have you got the answer?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25457680

http://stackoverflow.com/a/25516512
downvote count: 0
type: Answer
has body: var $dragging = null; $('#guide').on("mousedown", "div", function(e) { e.stopPropagation(); $('#guide').attr('unselectable', 'on').addClass('draggable'); var el_w = $('.draggable').outerWidth(); $(document).on("mousemove", function(e) { if ($dragging) { $('#guide').offset({ left: e.pageX - el_w / 2 }); } }).on("mouseup", function(e) { $dragging = null; $('#guide').removeAttr('unselectable').removeClass('draggable'); }); $dragging = $('#guide'); });
accepted answer of: http://stackoverflow.com/q/25516030
answers question: http://stackoverflow.com/q/25516030
upvote count: 1
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25540942
score: 0
has answer: http://stackoverflow.com/a/25541027
answer count: 1
has comment: http://stackoverflow.com/comment/39878659
tagged with: javascript
tagged with: event-handling
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25541027
has comment: http://stackoverflow.com/comment/39878596
has title: $('.photos ul li').length outputs 0 before i inject the photos and outputs five when they appear but when i remove them it still shows 5
type: AnsweredQuestion
has body: when i click on the removePhotos button it will output the photos li length. initially when the DOM loads their are no photos so it would output 0 and when i click show photos i use ajax to inject my photos. after i insert my photos and click the removePhotos button it outputs 5 which is the number of photos i have but the problem is when i remove the photos and then click the removePhotos button it outputs 5 still when it should be outputting 0. any suggestions on how to fix this? my html CRAPPY CHEESE Get Paris Photos Remove Photos my javascript function Tour(el) { var tour = this; this.el = el; this.hidePhotos = function() { alert($('.photos ul li').length); $('.photos').fadeOut(); } this.fetchPhotos = function() { $.ajax('photos.html', { data: {location: $("#tour").data(this.el)}, success: function(response) { this.el.find('.photos').html(response).fadeIn(); }, context: tour, error: function() { this.el.find('.photos').html(' There was a problem fetching the latest photos. Please try again. '); }, timeout: 3000, beforeSend: function() { this.el.addClass('is-fetching'); }, complete: function() { this.el.removeClass('is-fetching'); } }); }; var kirt = this.el.on('click.showPhotos', 'button', this.fetchPhotos); var pooh = this.el.on('click.removePhotos', 'span', this.hidePhotos); } $(document).ready(function() { var paris = new Tour($('#paris')); });
type: Question
has comment: http://stackoverflow.com/comment/39878668

http://stackoverflow.com/comment/39723223
type: AnswerComment
type: Comment
score: 1
has text: Thanks for responding. Your edit to my code does indeed work but it's not what I want. My fault. I guess I didn't explain the issue well enough. The result I'm after is akin to a tooltip. When a user of my site hovers on a select box option I want to present them some text (which goes in the hint div in my code), I realize I could attach a title attribute to the option to achieve the same thing. Or use a plugin like qtip or Jquery Tooltip. I may end up doing that if I can't get my own code to work but I'm pretty sure it won't be necessary what with all the expertise here. Again, thanks.
comment on: http://stackoverflow.com/a/25453503

http://stackoverflow.com/comment/39755324
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25474022
type: Comment
has text: It will show it - Your label is for that. The hidden tag is to transfer the value back to the servlet. I have not removed the label.

http://stackoverflow.com/comment/39915663
comment on: http://stackoverflow.com/a/25541164
score: 0
type: AnswerComment
has text: @hex494D49 here's the link of follow-up question http://stackoverflow.com/questions/25560646/follow-up-of-how-to-search-values-from-first-column-in-html-table-using-pure-nat
type: Comment

http://stackoverflow.com/a/25541238
has comment: http://stackoverflow.com/comment/39879950
has comment: http://stackoverflow.com/comment/39879760
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39879587
answers question: http://stackoverflow.com/q/25541070
score: 1
has body: One solution is to keep a boolean variable in your scope, lets say sortAscending="true", when you sort in descding order change the value to false. In your html you can use something like this ng-class="sortAscending ?'ascClass':'desClass'" Working example: http://jsfiddle.net/uev10oru/ Adding new working example with toggle button http://jsfiddle.net/uev10oru/1/
has comment: http://stackoverflow.com/comment/39879485
downvote count: 0
has comment: http://stackoverflow.com/comment/39879714

http://stackoverflow.com/comment/39664256
type: QuestionComment
score: 1
has text: you would need to make a different request based on results of first request
type: Comment
comment on: http://stackoverflow.com/q/25424986

http://stackoverflow.com/comment/39751524
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25471750
has text: OK, well, if it were me I'd methodically proceed to nail down exactly what the value of that parameter is on *both* sides of the function calls. If nothing else, you'll amass a test case to be used to demonstrate that there *is* a Node bug (dubious but it's a big world).

http://stackoverflow.com/comment/39882909
type: Comment
type: QuestionComment
has text: @EvanKnowles `else if(h==1){ rowHeaders[h]= (table.rows[numberOfRows/2].cells[0].innerHTML);}` gives an Uncaught TypeError: Cannot read property 'cells' of undefined. The click handler is set by `allTRs[i].cells[j].onclick = function ()`. This is at the bottom of the code
comment on: http://stackoverflow.com/q/25542454
score: 0

http://stackoverflow.com/a/25394023
accepted answer of: http://stackoverflow.com/q/25393865
upvote count: 60
score: 60
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/50571603
answers question: http://stackoverflow.com/q/25393865
has body: The problem is the user agent will always have "Chrome" whether it is the desktop or mobile version. So you have to check the more specific case first. $(document).ready(function(){ var ua = navigator.userAgent; if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(ua)) $('a.mobile-other').show(); else if(/Chrome/i.test(ua)) $('a.chrome').show(); else $('a.desktop-other').show(); });

http://stackoverflow.com/comment/39623689
has text: @DimitarDimitrov it is a minified code that got prettified
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25403590
score: 0

http://stackoverflow.com/a/25514726
downvote count: 0
score: 1
upvote count: 1
has body: From your subsequent question on this topic, I see you've got past the issues you were having here. To repeat the answer I gave there, the payload you want to post should be in a property called 'payload' on the object you return from the function. The documentation of the http request node describes all of that. You will find there is not currently a lot of activity on node-red within stack overflow. Hopefully that will change over time, but for now you'll find the mailing list is much more responsive. Also, if you have specific feedback, we'd welcome it on the mailing list.
answers question: http://stackoverflow.com/q/25500675
type: Answer

http://stackoverflow.com/comment/39865115
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25533215
has text: @Zak: still get the same errorCode 500
score: 0

http://stackoverflow.com/a/25427507
type: Answer
has comment: http://stackoverflow.com/comment/39668036
has comment: http://stackoverflow.com/comment/39668319
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/39668652
has body: you can use :has() selector for that. Selects elements which contain at least one element that matches the specified selector. Like this: $("#tableB tr:has(.New.selected)") and to get the data values in array: $("#tableB tr:has(.New.selected)").map(function(){return $(this).data("fid");}).get(); An other alternative which is faster would be to select the .New.selected element and then access to its parent: $("#tableB tr .New.selected").parent('tr')
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25427471
has comment: http://stackoverflow.com/comment/39668046
has comment: http://stackoverflow.com/comment/39668257
has comment: http://stackoverflow.com/comment/39668627
has comment: http://stackoverflow.com/comment/39669014
has comment: http://stackoverflow.com/comment/39668692
has comment: http://stackoverflow.com/comment/39668074
accepted answer of: http://stackoverflow.com/q/25427471

http://stackoverflow.com/q/25392223
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25397063
tagged with: tabs
has answer: http://stackoverflow.com/a/25393296
has title: How to show or hide tab based on the page url
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39625558
has body: This is my code to flip around the tab and the contents under the tab: $(function () { $('#tabs li a').click(function (e) { e.preventDefault(); $('#tabs li, #content .current').removeClass('current'); $(this).parent().addClass('current'); var currentTab = $(this).attr('href'); $(currentTab).addClass('current'); }); }); I have the following code which figured out which section of the website the user is in: $(window).load(function () { var homeTab = ["home1", "home2", "home3", "home4", "home5"]; var recruitingTab = ["rec1", "rec2", "rec3", "rec4", "rec5"]; var adminTab = ["adm1", "adm2", "adm3", "adm4"]; var pathName = getPageName(window.location.pathname); alert(pathName); if ($.inArray(pathName, homeTab) != -1) { alert("at home tab"); } if ($.inArray(pathName, recruitingTab) != -1) { alert("at recruiting tab"); } if ($.inArray(pathName, adminTab) != -1) { alert("at admin tab"); $("#tab li#tHome").removeClass('current'); $("#tab li#tRecruiting").removeClass('current'); $("#tab li#tAdminControls").addClass('current'); } }); How do I take the original code and add to the document.ready function to achieve the above? EDIT: I updated the code above to see if it works but it's not working. :/
type: Question
has answer: http://stackoverflow.com/a/25393396
accepted answer: http://stackoverflow.com/a/25393396
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25393296
tagged with: jquery
has comment: http://stackoverflow.com/comment/39611660
score: 0

http://stackoverflow.com/comment/39732623
score: 1
comment on: http://stackoverflow.com/q/25456733
type: Comment
type: QuestionComment
has text: Sure, give me 15 minutes

http://stackoverflow.com/comment/39692553
has text: Perhaps [this article](http://www.dotnetvishal.com/2012/11/replace-selected-text-in-textbox-using.html) could be useful to you.
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25440686
type: Comment

http://stackoverflow.com/comment/39734053
comment on: http://stackoverflow.com/a/25462782
has text: nice but is there a way to get the attribute of data-price on same input while looping it? like $(this).val()..because i need to do total =total+(price*$(this).val());
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25402194
tagged with: mysql
has body: I want to make a form that sends a feedback (good/average/poor) in a mysql database without loading the page I'm on. It's working fine except that it doesn't recognize if wich value I'm sending (if it's good, average or poor that was sent). Here my form : Poor Average Good <input type="hidden" name="url" value="<?php echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];?> "/> And here is my jQuery : jQuery(document).ready(function($) { $("#radio_fb").submit(function() { cname = this.radios.value; curl = this.url.value; submitter = this.submitter; var data = { name: cname, url: curl }; $.post("ajax.php", data, function() { submitter.value="Sent"; submitter.disabled=true; }); return false; }); }); And here are the functions that store the value in the database: <?php include_once('config.php'); if ($_POST['radios'] == 'good') { $url = $_POST['url']; $bdd->exec('INSERT INTO feedback(id, url, avis) VALUES ("", "'. $url .'", "Good")'); } else if ($_POST['radios'] == 'average') { $url = $_POST['url']; $bdd->exec('INSERT INTO feedback(id, url, avis) VALUES ("", "'. $url .'", "Average")'); } else { $url = $_POST['url']; $bdd->exec('INSERT INTO feedback(id, url, avis) VALUES ("", "'. $url .'", "Poor")'); } ?> Any idea how to fix this? I looked through all the answers but nothing is working: my function keeps returning the else statement (or nothing if I remove it).
has answer: http://stackoverflow.com/a/25402348
type: Question
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/39660841
upvote count: 4
duplicate of: http://stackoverflow.com/q/596351
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39620992
has title: Get the radio value without refreshing the page
linked to: http://stackoverflow.com/q/596351
linked to: http://stackoverflow.com/q/20352799
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39622022

http://stackoverflow.com/q/25407282
type: Question
has comment: http://stackoverflow.com/comment/39631028
upvote count: 9
tagged with: javascript
has comment: http://stackoverflow.com/comment/39630657
tagged with: express
score: 9
has answer: http://stackoverflow.com/a/25407772
has body: I am trying to implement a stripe checkout process in one of my express.js routes. To do this, I have: Official Node.js Stripe module Official client-side Stripe module A json logger I use to log things like javascript errors, incoming requests and responses from external services like stripe, mongodb, etc… An Order model defined using mongoose - a MongoDB ODM My steps are as follows: Client: Submit order details which include a stripe payment token Server: Create an unpaid order and save to database (order.status is created) Use stripe client to charge user's credit/debit card Update order and save to database (order.status is accepted or failed depending on response from Stripe) Question: If payment is successful after step 2 but an error occurs updating the order in step 3 (due to database server error, outage or similar), what are some appropriate ways to handle this failure scenario and potentially recover from it?
has title: Handling successful payment processing but database update failure
answer count: 1
downvote count: 0
tagged with: payment
tagged with: stripe-payments
favorite count: 0
accepted answer: http://stackoverflow.com/a/25407772
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/q/25533562
tagged with: javascript
tagged with: jquery
score: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: How to Add/remove 'prev' and 'next' classes to carousel slides in Bootstrap?
has body: I'm trying to position the prev and next slides in a Bootstrap Carousel with CSS but the Bootstrap.js (version 3.1.1) seems to be only very briefly adding prev or next classes to adjacent slides before stripping them and adding the active class (depending on which way you swipe). In order to position the prev and next slides (and not the other slides in the sequence) I want to add the next class to the following slide and the 'prev' class to the prev slide relative to the current slide and keep them there until the slides change: Here is the example I'm basing it off, and here is the javascript that is used: The correct behavior would be the following (note the movement of the prev, active and next classes: Slide 1 Slide 2 Slide 3 Slide 4 Should become: Slide 1 Slide 2 Slide 3 Slide 4 Any thoughts?
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/25534645

http://stackoverflow.com/q/25398657
answer count: 3
score: 14
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/64501781
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39614733
has body: How can I center align the chart title in a Google Charts chart? I don't see any options for positioning the title. var data = google.visualization.arrayToDataTable([ ["Period", "Daily"], ['a', 3], ['b', 3], ['c', 1] ]); var options = { title:"number of publications", titleFontSize:30, width: 1100, height: 600, legend: { position: "none" } } // Create and draw the visualization. new google.visualization.LineChart(document.getElementById("daily")). draw(data, options);
upvote count: 14
type: Question
has answer: http://stackoverflow.com/a/55833213
tagged with: charts
has answer: http://stackoverflow.com/a/25399041
tagged with: javascript
has title: Center align title in Google Chart

http://stackoverflow.com/comment/39820082
comment on: http://stackoverflow.com/a/25507503
type: Comment
has text: @HudsonHawk: You need to target just a subsection of your page. Instead of `$("[style]")` try something along the lines of `$("[style]", "#subsection")`.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39672095
has text: Also try a single Include of basefolder/*.js and see what that does
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25428952
score: 0

http://stackoverflow.com/a/25537021
has comment: http://stackoverflow.com/comment/39872703
has comment: http://stackoverflow.com/comment/39920714
has comment: http://stackoverflow.com/comment/39871982
has comment: http://stackoverflow.com/comment/40412673
has comment: http://stackoverflow.com/comment/39874458
has comment: http://stackoverflow.com/comment/40415741
has comment: http://stackoverflow.com/comment/39909905
has comment: http://stackoverflow.com/comment/39872843
has comment: http://stackoverflow.com/comment/40436103
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39913957
has comment: http://stackoverflow.com/comment/39912742
type: Answer
has comment: http://stackoverflow.com/comment/39913234
has comment: http://stackoverflow.com/comment/39909814
has comment: http://stackoverflow.com/comment/39910037
has comment: http://stackoverflow.com/comment/39871904
has body: relying on the scroll events (OPs method 1) is fine for a desktop implementation. the scroll event fires before the screen is updated. on mobile devices, especially iOS this is not the case. due to limited resources the scroll event only fires after the user completed (lifted his finger) the scroll operation. implementing manual scrolling to have a scroll event while the user scrolls on iOS requires to implement the scrolling manually. register the touchstart event. and get the first touch: var element1 = document.getElementById('content1'); var element2 = document.getElementById('content2'); var activeTouch = null; var touchStartY = 0; var element1StartScrollTop = 0; var element2scrollSyncFactor = 0; document.addEventListener('touchstart', function(event) { event.preventDefault(); var touch = event.changedTouches[0]; if ( activeTouch == null ) { // implement check if touch started on an element you want to be scrollable // save a reference to the scrolling element for the other functions activeTouch = touch; touchStartY = touch.screenY; // if scroll content does not change do this calculation only once to safe compute and dom access time while animating calcSyncFactor(); } }); function calcSyncFactor() { // calculate a factor for scroll areas with different height element2scrollSyncFactor = (element2.scrollHeight - element2.clientHeight) / (element1.scrollHeight - element1.clientHeight); } update your scroll position on finger movement: document.addEventListener('touchmove', function() { for ( var i = 0; i &lt; event.changedTouches.length; i++ ) { var touch = event.changedTouches[i]; if ( touch === activeTouch ) { var yOffset = touch.screenY - touchStartY; element1.scrollTop = element1StartScrollTop + (0 - yOffset); syncScroll(); break; } } }); function syncScroll() { element2.scrollTop = Math.round(element1.scrollTop * element2scrollSyncFactor); } it is possible to add a check that starts the scrolling only after the user has moved his finger some pixels. this way…
has comment: http://stackoverflow.com/comment/39911892
upvote count: 3
has comment: http://stackoverflow.com/comment/40420674
accepted answer of: http://stackoverflow.com/q/25477651
answers question: http://stackoverflow.com/q/25477651
score: 3
has comment: http://stackoverflow.com/comment/39911913

http://stackoverflow.com/comment/39863676
has text: When @Zak said to ask another question he didn't mean to ask the [same question again](http://stackoverflow.com/questions/25532750/how-do-you-run-two-javascript-functions-independently#25532750).
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25530106

http://stackoverflow.com/comment/39745508
type: Comment
has text: @Manku are you aware of the fact that `$(document).ready(` is a jquery function? So if you specify it before adding `jQuery` library, the browser doesn't know what it is and throws error. It is called after `DOM` is ready, but is *compiled* before that.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25468764

http://stackoverflow.com/a/25528141
has comment: http://stackoverflow.com/comment/39961082
has comment: http://stackoverflow.com/comment/39961153
has comment: http://stackoverflow.com/comment/40209026
has comment: http://stackoverflow.com/comment/40209321
has comment: http://stackoverflow.com/comment/39867153
downvote count: 0
has comment: http://stackoverflow.com/comment/40241283
has body: If your asking how to approach this (fun) problem, I would go about it like this. Make your arrow with 2 pngs: 2 divs with background images (body and point of the arrow) inside one container div. Once you have the code to properly display the arrow, make sure you know how to append it to the DOM using javascript. Now try to make the arrow longer and shorter with javascript (by changing the size of the div containing the body of the arrow) Once you can do this, it's time for math. Use javascript to calculate the coordinates of the DIV that is clicked first when making an arrow, and the DIV that is clicked second. When you have these coordinates, calculate (using Pythagoras) the length of the arrow you need, and the amound of rotation you need (this is the tricky part, but I have done it before so it can certainly be done if you know some basic math). You are essentially creating triangles on the board. With the coordinates, length and rotation, you can now place your arrow on the playing board, adjust the length and the rotation, to display it just the way you need it. And remember you can also turn the arrow for say 350 degrees to get to -10 degrees. This is by no means easy but a lot of fun if you like math, and considering chess, I guess you do. By the way, this problem can certainly be solved with plain JS but using jQuery would make it easier en less work. You can also use jQuery offline by downloading the library.
has comment: http://stackoverflow.com/comment/40249892
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40166107
has comment: http://stackoverflow.com/comment/39890155
has comment: http://stackoverflow.com/comment/40110531
has comment: http://stackoverflow.com/comment/40252151
answers question: http://stackoverflow.com/q/25527902
score: 1

http://stackoverflow.com/comment/39847690
score: 0
has text: I've already answered on this question in this post (https://stackoverflow.com/questions/25499108/how-to-select-an-element-from-drop-down-list-from-the-following-html-code-using/25499309#25499309)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25523817

http://stackoverflow.com/a/25487838
has body: Try this, &lt;script&gt; $(function() { $( "input[type=submit],button" ) .button(); }); &lt;/script&gt;
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25487205
type: Answer
answers question: http://stackoverflow.com/q/25487205

http://stackoverflow.com/q/25419057
has body: Basically, I want to wait for an element to appear (e.g. dynamically loaded element). I want to know how I can edit it to support xpath,different DOM documents (e.g. dynamically loaded iframe) and also set a timeout value so that it will quit if after X number of seconds, the element is till not found, throw an error that I can handle. waitUntilExists(xpath,document,5,function(){ // Element exists, if after 5 seconds and it doesn't exist handle it here. }) original code to modify: (function(){ var _waitUntilExists = { pending_functions : [], loop_and_call : function() { if(!_waitUntilExists.pending_functions.length){return} for(var i=0;i&lt;_waitUntilExists.pending_functions.length;i++) { var obj = _waitUntilExists.pending_functions[i]; var resolution = document.getElementById(obj.id); if(obj.id == document){ resolution = document.body; } if(resolution){ var _f = obj.f; _waitUntilExists.pending_functions.splice(i, 1) if(obj.c == "itself"){obj.c = resolution} _f.call(obj.c) i-- } } }, global_interval : setInterval(function(){_waitUntilExists.loop_and_call()},5) } if(document.addEventListener){ document.addEventListener("DOMNodeInserted", _waitUntilExists.loop_and_call, false); clearInterval(_waitUntilExists.global_interval); } window.waitUntilExists = function(id,the_function,context){ context = context || window if(typeof id == "function"){context = the_function;the_function = id;id=document} _waitUntilExists.pending_functions.push({f:the_function,id:id,c:context}) } waitUntilExists.stop = function(id,f){ for(var i=0;i&lt;_waitUntilExists.pending_functions.length;i++){ if(_waitUntilExists.pending_functions[i].id==id &amp;&amp; (typeof f == "undefined" || _waitUntilExists.pending_functions[i].f == f)) { _waitUntilExists.pending_functions.splice(i, 1) } } } waitUntilExists.stopAll = function(){ _waitUntilExists.pending_functions = [] } })()
upvote count: 1
has comment: http://stackoverflow.com/comment/39653866
type: Question
has comment: http://stackoverflow.com/comment/39652823
tagged with: javascript
has title: javascript: wait until xpath exists with timeout?
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39652806
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39652985
has comment: http://stackoverflow.com/comment/39653130
answer count: 0
score: 1

http://stackoverflow.com/comment/39621008
score: 0
has text: Friend where did u write this code it is inside of the controller or not..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25401942

http://stackoverflow.com/a/25496377
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25496260
score: 0
answers question: http://stackoverflow.com/q/25496260
type: Answer
has body: In respond to updated question, to find the &lt;script&gt; tag containing javascript code, you can try using this XPath : //script[@type='text/javascript'] or if you need to also make sure javascript code within that tag has jQuery(document).ready part : //script[@type='text/javascript' and contains(.,'jQuery(document).ready')]

http://stackoverflow.com/comment/39807179
comment on: http://stackoverflow.com/q/25501710
has text: @Teemu i am using $.data answer with 6 votes, thanks for the link, i was not knowing that JS resize event triggers twice, now i got what i was after, thank you
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39881781
type: Comment
type: QuestionComment
has text: .done(pagenum){ pageno=pagenum; } return pageno; SyntaxError: Unexpected token { . Look at http://api.jquery.com/deferred.done/
comment on: http://stackoverflow.com/q/25541796
score: 0

http://stackoverflow.com/q/25536242
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: How to correctly find (and ultimately change) img src attribute using string value?
has answer: http://stackoverflow.com/a/25536319
tagged with: http://stackoverflow.com/tag/html
has body: I have the following HTML: &lt;img id="unique.name.status" class="icon" src="OffStatus.png" alt="OFFLINE" /&gt; At some point a client refreshes and I may need to change the image src and alt with id 'unique.name.status'. First, however, I must be able to find the specific image and, currently, I'm getting an undefined value with the following code: statusimageId = "#" + user_id + ".status"; alert(statusimageId); // confirmed valid: '#unique.name.status' statusimageSource = $(statusimageId).attr("src"); // returns 'undefined' alert(statusimageSource); NOTE: user_id is a value returned from JSON
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25536319

http://stackoverflow.com/a/25416509
has body: Take the g out var reIsNumeric = /[0-9]/; console.log(reIsNumeric.test(1)); // true console.log(reIsNumeric.test(2)); // true console.log(reIsNumeric.test(3)); // true console.log(reIsNumeric.test(4)); // true http://jsfiddle.net/0tap3nfx/1/ The reason is because the g modifier is used to perform a global match (find all matches rather than stopping after the first match). So basically the value that will return true is not what you would expect but the same regex as yours does work as expected see below. var reIsNumeric = /[0-9]/g; console.log(reIsNumeric.test(1)); // true console.log(reIsNumeric.test(22)); // true console.log(reIsNumeric.test(333)); // true console.log(reIsNumeric.test(4444)); // true http://jsfiddle.net/0tap3nfx/2/
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25416482
score: 2
has comment: http://stackoverflow.com/comment/39648275
downvote count: 0

http://stackoverflow.com/comment/39736000
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25463653
score: 0
has text: Well, `classList.toggle` definitely works (http://jsfiddle.net/qdmdke0z/). If you can't provide a complete example which replicates the issue, then we can't really help you.

http://stackoverflow.com/a/25442625
downvote count: 2
has comment: http://stackoverflow.com/comment/80917799
upvote count: 23
answers question: http://stackoverflow.com/q/25442566
score: 21
has body: Try using _.without(array, *values) it will remove all the values that you don't need. In your case *values == null http://underscorejs.org/#without
type: Answer

http://stackoverflow.com/comment/39601714
has text: @fluidddynamics There, I rewrote the answer so it correctly addresses your issue.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25390775

http://stackoverflow.com/q/25539537
tagged with: kendo-grid
tagged with: javascript
has title: Kendo UI Update and create is not working
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25549119
tagged with: jquery
tagged with: kendo-ui
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25547135
has body: Reading rows is working fine in grid, but when updating and creating it is not working at all. It is not hitting the controller. I have provided the code, can you please look into what is wrong with the below code. The below json is return from the read webservice ------------------------------------------------- {"items":[{"id":1,"publisherName":"Srini","active":false}, {"id":2,"publisherName":"Ram","active":false}]} Java Controller --------------- package com.wad.webui.controller; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RequestParam; import com.wad.core.model.lookup.PublisherLookupItem; /** * @author Srinivasa.K * */ @Controller public class PublisherController extends BaseController { private static final Logger logger = Logger .getLogger(PublisherController.class); private static final List<PublisherLookupItem> publishersList = new ArrayList<PublisherLookupItem>(); static { PublisherLookupItem pb = new PublisherLookupItem(); pb.setId(1); pb.setPublisherName("Srini"); PublisherLookupItem pb1 = new PublisherLookupItem(); pb1.setId(2); pb1.setPublisherName("Ram"); publishersList.add(pb); publishersList.add(pb1); } @RequestMapping(value = "/admin/searchPublishers.htm", method = RequestMethod.GET, produces = "application/json") public @ResponseBody JsonDataWrapper<PublisherLookupItem> searchPublishers( HttpServletRequest request) throws Exception { logger.debug("searchPublishers method "); JsonDataWrapper<PublisherLookupItem> result = new JsonDataWrapper<PublisherLookupItem>( publishersList); return result; } @RequestMapp…
type: Question

http://stackoverflow.com/q/25438792
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: I am trying to create a tree-like checkboxes like this : o Master Tree - o Tree 1 o Subtree 1 o Subtree 2 o Tree 2 o Subtree 1 o Subtree 2 where each 'o' is a checkbox and functions include : when a checkbox is clicked to check, all its children checkboxes it will be checked. when a checkbox is clicked to uncheck, all its children checkboxes it will be unchecked when a checkbox is clicked to uncheck, all its parent checkboxes it will be unchecked since it will not be 'select all' What I've tried: ng-model &amp; ng-changed in all trees - although this is not ideal. Select All Below Child Grandchid 1 Grandchid 2 Demo function Ctrl($scope) { $scope.billing_is_shipping = true; $scope.master = true; $scope.child = true; $scope.grandchlid = true; $scope.checked = function (type) { switch (type) { case 'master': $scope.master = !$scope.master; if ($scope.master) { $scope.child = true; $scope.grandchild = true; } else { $scope.child = false; $scope.grandchild = false; } $scope.apply(); break; case 'child': $scope.child = !$scope.child; if ($scope.child) { $scope.grandchild = true; } else { $scope.grandchild = false; } $scope.apply(); break; case 'grandchild1': $scope.grandchild1 = !$scope.grandchild1; if(!$scope.grandchild1 || !$scope.grandchild2){ $scope.child = false; $scope.master = false; } break; } console.log($scope.billing_is_shipping) } } ng-model or ng-changed only Demo I've tried $scope.apply() and without but I can only get the first clicks to work and then everything just gives up. Any approach or help would be greatly appreciated, and thanks in advance.
tagged with: checkbox
score: 3
upvote count: 3
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27053328
downvote count: 0
answer count: 1
has title: Tree-like Checkboxes in AngularJS

http://stackoverflow.com/q/25505880
tagged with: javascript
score: 0
has title: $resource returning empty json in IE8
tagged with: angularjs
type: UnansweredQuestion
tagged with: factory
tagged with: internet-explorer-8
has answer: http://stackoverflow.com/a/25507621
linked to: http://stackoverflow.com/q/690251
type: Question
has body: I have created an angularjs application which uses $resource, here UserType.customDelete factory. after executing the server will return either [{"0":"T"}] or [{"0":"F"}], The application is working fine in all browser except IE8, in IE8 i am getting [{}] , but in all other browser even in IE9 i am getting [{"0":"T"}] can anyone please give me some solution for this UserType.customDelete({ uid : user.uid, action : 'remove' }, function(data) { console.log(JSON.stringify(data)); if(data[0][0] === "T") { console.log('success'); } else { console.log('failure'); } }, function(error) { }); modals.js angular.module('users', ['ngResource']) .constant('OPTIONS', { query: { method: 'GET', isArray: true }, customDelete: { method: 'POST', isArray: true } }) .factory('UserType', function($resource, OPTIONS) { return $resource('rest/users/:uid/:action', { uid: "@uid", action: "@action" }, OPTIONS); });
answer count: 1

http://stackoverflow.com/comment/39787553
comment on: http://stackoverflow.com/q/25489453
score: 0
type: QuestionComment
type: Comment
has text: So this page suggests that there is a limit of X connections per *hostname* with a max *browser* limit of Y.. Assuming a web-worker is considered as being under the same *hostname* of the application that spawned it, am I correct to say that web workers are subject to the hostname limit then along with the rest of the application? So if I have X webworkers all using XHR requests, then i could still block the UI?

http://stackoverflow.com/comment/39755196
score: 0
has text: Where does the AJAX calls occurs? Page load event has nothing to do with complete AJAX calls...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25474196

http://stackoverflow.com/q/25542031
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/25542528
tagged with: jquery
has answer: http://stackoverflow.com/a/25542210
has body: &lt;input type="hidden" id="amenities" value="@Model.Amenities" /&gt; &lt;script type="text/javascript"&gt; $(function () { arr = new Array(); var str = document.getElementById("amenities").value; arr = str.split(","); for(count =0;count&lt;arr.length;count++) { $("input[type=checkbox][value=arr[count]]").prop("checked",true);​ } &lt;/script&gt; In the model there is an attribute called "Amenities" of type string. It stores all the amenities like wifi, pool , park etc with delimiter (,). When I go to the edit page I want all those amenities to be checked which were earlier stored for that particular property.
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has title: How to tick the check boxes on page load using javascript?
possible better answer: http://stackoverflow.com/a/25542583
score: 0
accepted answer: http://stackoverflow.com/a/25542528
has answer: http://stackoverflow.com/a/25542583
tagged with: asp.net-mvc-3
has comment: http://stackoverflow.com/comment/39880587
type: Question
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/39880481

http://stackoverflow.com/q/25405998
has body: I'm trying to POST a form from my website to a server (not same domain). Everything is working fine with Chrome, Firefox and IE10+, but I have to make it work with IE9 too. Here's my code $("#sendform").click(function() { // Content var infosForm = {}; infosForm.firstname = $('input[name=firstname]')[0].value; infosForm.name = $('input[name=name]')[0].value; infosForm.phone = $('input[name=tel]')[0].value; infosForm.mail = $('input[name=mail]')[0].value; infosForm.commentaire = $('textarea[name=comment]')[0].value; var isChecked = $('.messageCheckbox:checked').val(); if (isChecked == "on") { infosForm.isNewsletter = "on"; } else { infosForm.isNewsletter = "off"; } $.ajax({ url:'http://my.website.com/form.ashx', type:'post', data:infosForm, cache:false, //normaly this is quite useless since it's a post, but It's known to help with IE... still not. crossDomain:true, //showing feedback success:function(){ $("#contact form").hide(); $("#contact form").fadeIn('slow').html(" Success "); //trackEvent(); }, error:function(){ $("#contact form").hide(); $("#contact form").fadeIn('slow').html(" Error "); } }); }); According to fiddler, it seems like IE9 isn't sending any request and going straight to showing the error message. Note : jQuery 1.8.3 is used here.
answer count: 2
downvote count: 0
has title: IE9 Compatibility : jQuery ajax post request
has comment: http://stackoverflow.com/comment/39628466
favorite count: 0
has comment: http://stackoverflow.com/comment/39628309
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25406215
score: 1
tagged with: internet-explorer-9
has comment: http://stackoverflow.com/comment/39628815
has comment: http://stackoverflow.com/comment/39629274
has answer: http://stackoverflow.com/a/25421727
type: Question
tagged with: internet-explorer
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/39618251
comment on: http://stackoverflow.com/q/25400006
type: Comment
type: QuestionComment
has text: Bookmarklet is execute via a direct action by a user. When a user runs an app, the user doesn't expect it to run JS in the browser.
score: 1

http://stackoverflow.com/q/25409462
has body: I know how to use range.js and d3.scale.linear, also know domain and range . but when I read the code in range.js and linear.js, I was so confused that why it looks so complicated and mysterious： such as the code in linear.js： step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step; // Filter ticks to get closer to the desired count. if (err &lt;= .15) step *= 10; else if (err &lt;= .35) step *= 5; else if (err &lt;= .75) step *= 2; Generally，I implement the function by using "ax + b = y" ，such as: domain(inputMin, inputMax); stick = 4; a = (inputMax-inputMin)/stick; for(i = 0; i&lt;a; i++) { arr[] = i*a+inputMin; } so why d3 use Math.log (Math.pow...) to get the 'step'? what the code means and does？ Thanks for any help you can offer.
answer count: 1
tagged with: javascript
score: 0
tagged with: range
has title: Hard to understanding d3.range.js and d3.scale.linear
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39635285
has answer: http://stackoverflow.com/a/27748480
type: Question

http://stackoverflow.com/q/25478810
type: Question
has answer: http://stackoverflow.com/a/25478914
score: -2
has comment: http://stackoverflow.com/comment/39763860
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25478958
has comment: http://stackoverflow.com/comment/39763950
possible better answer: http://stackoverflow.com/a/25478914
answer count: 2
has comment: http://stackoverflow.com/comment/39764129
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39764071
has comment: http://stackoverflow.com/comment/39763855
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/39763812
has comment: http://stackoverflow.com/comment/39763852
tagged with: css
has body: I'm trying to call footer.html into main.html. Looks like document.write is overwriting the footer.html. How can I display Date().getFullYear() inside my main.html? main.html (main page): &lt;script&gt; $("#footer").load("footer.html"); &lt;/script&gt; footer.html (external file): &lt;div&gt;&lt;span style="color:#444;"&gt;&amp;copy; Comp &lt;script&gt;document.write(new Date().getFullYear())&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;
has title: Dynamic html called into main html - Prevent over righting document.write
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39763783
has answer: http://stackoverflow.com/a/25478958
has comment: http://stackoverflow.com/comment/39763990

http://stackoverflow.com/comment/39857456
comment on: http://stackoverflow.com/q/25528559
score: 0
has text: @LinkinTED Thanks! I had the same problem actually, it doesn't quite work when resizing the page. But your code is at least working
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39816279
type: Comment
comment on: http://stackoverflow.com/a/25506661
type: AnswerComment
has text: Ah you're the man/woman. This is jogging my memory now, I think we implemented this at once and it was lost. Thank you, very much.
score: 0

http://stackoverflow.com/comment/130899666
type: QuestionComment
has text: Also, is this for HTML like jondinham's answer provided (which can be removed via any developer tools), or on top of an image and rendered server-side?
comment on: http://stackoverflow.com/q/25439268
score: 0
type: Comment

http://stackoverflow.com/q/25404148
has body: I am using this code which contains html along with php, when there are multiple elements in collapse only the first element is working properly because there is id named collapseOne which should change dynamically for each element. So, the problem is how to change the id dynamically <?php foreach ($topics_list->result_array() as $row) { ?> <?php echo $row['name']; ?> Material Link-:<?php echo "Link "; echo" Hardness-:"; echo $row['hardness'] . " "; echo " Type-:" . $row['type'] . " "; ?> <?php } ?> <?php } ?>
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/25404284
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/28290613
type: Question
tagged with: javascript
score: -1
answer count: 2
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/28290613
has title: how to use multiple bootstrap collapse elements dynamically in php
accepted answer: http://stackoverflow.com/a/25404284
tagged with: twitter-bootstrap

http://stackoverflow.com/q/25391914
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25392008
has title: How to animate a jquery function passed by parameter?
downvote count: 1
type: AnsweredQuestion
score: -1
type: Question
has body: I am trying to develop a simple function in jquery that can animates o rotates an element. My current code is this: &lt;button id="bt_Employment2" name="bt_Employment2" onclick="rotate('bt_Employment2')"&gt; function rotate(elem) { elem.rotate({animateTo:180}); } Could you help me please?
upvote count: 0
accepted answer: http://stackoverflow.com/a/25392008
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25465824
type: Answer
has comment: http://stackoverflow.com/comment/39739838
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25465769
accepted answer of: http://stackoverflow.com/q/25465769
type: AcceptedAnswer
downvote count: 0
has body: You can use the :has selector or has method: $('#myTable').find('tr:has(span.checked)'); Or: $('#myTable tr').has('span.checked');

http://stackoverflow.com/a/25484612
has comment: http://stackoverflow.com/comment/39775714
has comment: http://stackoverflow.com/comment/39774165
has body: Where have you mentioned the url to which the form is to be submitted? Plus, is this a simple webview or a cordova project?
answers question: http://stackoverflow.com/q/25484230
downvote count: 1
has comment: http://stackoverflow.com/comment/39774313
type: Answer
has comment: http://stackoverflow.com/comment/39777405
has comment: http://stackoverflow.com/comment/39780131
upvote count: 0
has comment: http://stackoverflow.com/comment/39774569
has comment: http://stackoverflow.com/comment/39777679
has comment: http://stackoverflow.com/comment/39785264
score: -1
has comment: http://stackoverflow.com/comment/39777564
has comment: http://stackoverflow.com/comment/39781499

http://stackoverflow.com/q/25440551
linked to: http://stackoverflow.com/q/10851882
tagged with: ios
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40280872
possible better answer: http://stackoverflow.com/a/25442426
answer count: 2
has answer: http://stackoverflow.com/a/25442426
has answer: http://stackoverflow.com/a/25499112
has title: How to close dropdown on onchange event of selector In iOS6?
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: I am working on hybrid application with worklight. When tapping on select control, a native dropdown pops out. Now I have bound onchange event on this select so when I choose any option the event gets fired but the dropdown doesn't fadeout until I tap on the done button. I have used ('select').blur() to overcome and it is working fine for Android but not for iOS6. I want to fadeout the dropdown with onchange. Code: &lt;select id="myID" onchange="myFun()"&gt;; function myFun(){ $('select').blur(); } or function myFun(){ $('#myID').blur(); } What are the possible soultions for it? Thanks.
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40173425
score: 2
tagged with: ibm-mobilefirst
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25499112
type: Question

http://stackoverflow.com/a/25466344
upvote count: 1
answers question: http://stackoverflow.com/q/25466173
has body: Try something like this: // the parent element var ulElement = document.createElement("ul"); ulElement.setAttribute("class", "testimonials"); // iterate through the array for ( var i = 0 ; i &lt; comments.length ; i++ ) { // extract data from JavaScript var currentObj = comments[i]; var currentName = currentObj.name; var currentComment = currentObj.comment; var currentTimestamp = currentObj.timestamp; // create child nodes for the parent var liElement = document.createElement("li"); // blockquote var blockquoteElement = document.createElement("blockquote"); var t1 = document.createTextNode(currentComment); blockquoteElement.appendChild(t1); // cite var citeElement = document.createElement("cite"); var d = new Date(currentTimestamp*1000); var formattedDate = d.getMonth()+ "/" + d.getDate() + "/" + d.getFullYear() var t2 = document.createTextNode(currentName + ", " + formattedDate); citeElement.appendChild(t2); // add children for li liElement.appendChild(blockquoteElement); liElement.appendChild(citeElement); // add child nodes to parent ulElement.appendChild(liElement); } Here you can see a fiddle
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/a/25456766
has body: You don't give the context of your use case but could it be possible that the function that has the send email() call is called by a trigger.? (An installable trigger of course) In that case, the email would always be sent by the user who created the trigger. If you did then it would be from your account. Please tell us if it's the case.
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25447401
accepted answer of: http://stackoverflow.com/q/25447401
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39728855
type: Answer

http://stackoverflow.com/comment/39824343
type: Comment
has text: but using $("#txt_name").val() is what i need to do right? I put it in the get_data(f) function (of the javascript) but than it does not work. And i really don't know how to fix this.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25511140

http://stackoverflow.com/q/25509046
has title: Loop in javascript to append a series of divs
possible better answer: http://stackoverflow.com/a/25509382
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25509105
accepted answer: http://stackoverflow.com/a/25509105
has answer: http://stackoverflow.com/a/25509782
score: 0
answer count: 3
tagged with: append
has answer: http://stackoverflow.com/a/25509382
tagged with: css
type: AnsweredQuestion
has body: This is my code, but it does not work. for (i = 0; i &lt; 5; i++) { $(function(){ $('.tt'+ [i]).appendTo('.td'+ [i]); }); } I want the result: $('.tt1').appendTo('.td1') $('.tt2').appendTo('.td2') $('.tt3').appendTo('.td3') $('.tt4').appendTo('.td4') $('.tt5').appendTo('.td5') Please correct me, thanks you in advance!
tagged with: loops
type: Question

http://stackoverflow.com/a/25459913
has comment: http://stackoverflow.com/comment/139307997
score: 4
has comment: http://stackoverflow.com/comment/39747462
answers question: http://stackoverflow.com/q/25455679
has body: The reason for this, is that most HTML5 events do not bubble and jQuery relies on event bubbling for event delegation, which is sad, but you can implement it if you want by using addEventListener: //note the third parameter has to be true, it is important to work document.addEventListener('ended', function(e){ if($(e.target).is('video')){ //e.target has ended playing } }, true); As an alternative you can use webshim which implements many HTML5 features thorugh jQuery. In case you request a polyfill for mediaelement, webshim fixes jQuery's event delegation code for the mediaelement features: ```webshim.polyfill('mediaelement'); $(document).on('play', 'ended', function(){ //this has ended playing });
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/39747321

http://stackoverflow.com/a/25418467
type: Answer
answers question: http://stackoverflow.com/q/25418368
score: 0
has body: Try this example: &lt;img src="http://dizzyfrinks.com/wp-content/uploads/2010/11/65sprite.jpg" onclick="swap(this);"/&gt; script var swap = function (img) { img.src = 'http://dizzyfrinks.com/wp-content/uploads/2010/11/65sprite.jpg' === img.src ? 'http://www.wired.com/images_blogs/gadgetlab/sprite.jpg' : 'http://dizzyfrinks.com/wp-content/uploads/2010/11/65sprite.jpg'; };

http://stackoverflow.com/comment/39756206
type: QuestionComment
comment on: http://stackoverflow.com/q/25404147
has text: Did you sort that out? Or you still need some help?
score: 0
type: Comment

http://stackoverflow.com/comment/39807034
type: QuestionComment
comment on: http://stackoverflow.com/q/25502172
has text: Post you html ,css or make a fiddle to help you better.
score: 0
type: Comment

http://stackoverflow.com/a/25544030
answers question: http://stackoverflow.com/q/25544000
accepted answer of: http://stackoverflow.com/q/25544000
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
has body: You should use parseInt function. In facts, values get tanks to getElementById("sale").value are string and not numbers. You have to cast them into real integers to make the sum (otherwise it will make the concatenation of the two strings) var sale=parseInt(document.getElementById("sale").value); // enter 2 var sale2=parseInt(document.getElementById("sale2").value); // enter 3 document.getElementById('calsale').value = ((sale2)+(sale));
type: Answer

http://stackoverflow.com/comment/39887767
score: 0
type: Comment
type: QuestionComment
has text: Thanks for your comment. But my question is, how can I achieve this? How can a let User A open the hangout and send the url to my server so I can show the url to User B
comment on: http://stackoverflow.com/q/25546094

http://stackoverflow.com/comment/39662154
has text: Seems to work just fine, but already accepted Barmar's answer thank you for your answer. I will definitely analyse the code later.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25423367
score: 0

stroke
tags question: http://stackoverflow.com/q/25438493
tag name: stroke
type: Tag

http://stackoverflow.com/comment/39813919
has text: you want to print the statement means, use document.write or alert()
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25505768

http://stackoverflow.com/q/25423384
upvote count: 1
type: AnsweredQuestion
score: 1
has body: In my web app, in a search result, each item can have a different look according to the type of item. To achieve this, I was thinking of including the layout with data placeholders for that particular item in the json response. How do I bind the scope data to the placeholders in the json response template? for eg. My search result would look something like : &lt;li ng-repeat="item in items"&gt; &lt;div ng-bind-html="item.template"&gt;&lt;/div&gt; &lt;/li&gt; And the JSON response would look like : [{ "template_name":"One", "template":"&lt;div ng-repeat='subitem in item.subitems'&gt;{{subitem.name}}&lt;/div&gt;", "subitems":[{name:"John"},{name:"Jane"}] }, { "template_name":"Two", "template":"&lt;div ng-repeat='subitem in item.subitems'&gt;{{subitem.name}}&lt;/div&gt;", "subitems":[{name:"John"},{name:"Jane"}] } ] Like you can see, I need to bind the placeholders in the json response with the scope data. Is there any way to do it? If not, how do you suggest i should address this situation? Thank You!
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25427871
type: Question
has comment: http://stackoverflow.com/comment/39662435
has title: Using dynamic layouts from json response: angularJS
tagged with: layout
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39662838
has comment: http://stackoverflow.com/comment/39662131
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25427871
has comment: http://stackoverflow.com/comment/39662227
linked to: http://stackoverflow.com/q/12346690

http://stackoverflow.com/comment/39765554
type: Comment
has text: Thanks, this way of handling user events seems to give more flexibility.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25478177

http://stackoverflow.com/comment/39627966
type: QuestionComment
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25405718
has text: To add to my comment. An image is a safer way to determine how many people opened your email on the clients side.

http://stackoverflow.com/q/25501710
tagged with: css
accepted answer: http://stackoverflow.com/a/25503047
has comment: http://stackoverflow.com/comment/39806514
has comment: http://stackoverflow.com/comment/39807440
has comment: http://stackoverflow.com/comment/39876842
has comment: http://stackoverflow.com/comment/39807296
has answer: http://stackoverflow.com/a/25503047
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39878230
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39806473
upvote count: 1
has title: Post window resize event, but before page is visible to user?
has comment: http://stackoverflow.com/comment/39806974
tagged with: javascript
tagged with: jquery
has body: I am trying to get height of a div, after window.resize method, so that the element has its new height, but before display the output to the user, so I could change height of another div. What I know already and not so tempted to use in this case Use percentages for setting height of another div Use fixed heights Use CSS instead use clientHeight use innerheight so back to question Is there any event in JS or JQuery which could get me state where document is re sized but not displayed to user yet on the screen. $(window).resize(WindowResizeNow);
has comment: http://stackoverflow.com/comment/39807179
has comment: http://stackoverflow.com/comment/39806738
favorite count: 0
linked to: http://stackoverflow.com/q/4298612
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/39771477
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25482998
has text: JavaScript arrays (and so JSON) doesn't have key name, just values. So writing `["Region":{}, "Region":{}]` is incorrect, but `[{}, {}]` is correct: see Jon's answer
score: 0

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/25497347
tags question: http://stackoverflow.com/q/25540942
tags question: http://stackoverflow.com/q/25454501
type: Tag

http://stackoverflow.com/a/25442586
type: Answer
answers question: http://stackoverflow.com/q/25442462
has body: Usually when you include some scripts, browser will load them synchronously, step by step. But if you set script.async = true; script will load asynchronously and other scripts will not waiting for them. To fix this problem you can remove this option.
score: 0

http://stackoverflow.com/q/25457432
tagged with: php
has answer: http://stackoverflow.com/a/25457694
type: Question
type: AnsweredQuestion
answer count: 2
has answer: http://stackoverflow.com/a/25457883
tagged with: javascript
tagged with: jquery
has body: I want to add a class (and later on to send that string to php) to a text with javascript. Whenever I try to do that, the code is adding the class to the first occurrence of my selection, not to the actual selection. Keep in mind that I want to send that EXACT selection to php (and put it in a database as well so it keep that class even after refresh). JQ $("#highlight").click(function(){ paraval = $('#para').html(); sel = window.getSelection(); newst = '' + sel + ''; newvalue = paraval.replace(sel, newst); $('#para').html(newvalue); }); HTML Will only highlight if text is selected from comment class div only Here goes some text Here goes some text Here goes some text Here goes some text Some other text CSS .selectedText{ background-color:yellow; } .comment{ border: solid 2px; } .comment::selection { background-color: yellow; } example here: http://jsfiddle.net/zq1dqu3o/3/ try to select the last occurrence of the word "text". the first one will get the class "selectedText"... thanks
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25457883
has title: Javascript add class to selected text, not first occurrence of the selected text
score: 0
possible better answer: http://stackoverflow.com/a/25457694

http://stackoverflow.com/comment/39786900
has text: Hi @Lars, for some reason when I select the checkboxes they won't tick i.e. show the arrow...have you come across something like this before?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25487249
type: QuestionComment

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/25535306
tag name: webbrowser-control

http://stackoverflow.com/q/25428113
has title: In EmberJS built by EmberCLI, how to call methods on different controllers?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25428892
linked to: http://stackoverflow.com/q/24189086
type: Question
has body: I'm building an app in Ember with EmberCLI. In my top navigation (controllers/navigation/top.js) I have an action that is triggered on a button click. This action should open the left navigation (controllers/navigation/left.js). My top navigation controller: import Ember from "ember"; export default Ember.Controller.extend({ actions: { toggleMenu: function() { // I need to call toggleProperty on the left navigation controller. [leftNavigationController].toggleProperty('visible'); } } }); How to get another controllers instance to call a method like toggleProperty?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39670585
accepted answer: http://stackoverflow.com/a/25428892
tagged with: ember.js
answer count: 1
downvote count: 0
score: 1
tagged with: ember-cli
favorite count: 0
tagged with: requirejs
upvote count: 1

http://stackoverflow.com/q/25447135
has body: I have 2 modal and I check validation of form of first modal and if entries of textboxes were empty .second modal should not be shown.I cannot do this. user is id of my first modal and permission is id of my second modal. java script code: function valid() { var bool = true; var pt = /^[\w.]+@[a-z0-9-]+\.[a-z]{2,6}/i; var email = document.getElementById('email').value; if (!pt.test(email)) { bool = false; } var name = document.getElementById('name').value; if (name.length < 1) { bool = false; } return bool; } $("#btn1").click(function() { var bool = valid(); if (bool == false) { $('#permission').modal('hide'); } else { $('#user').modal('hide'); $('#permission').modal('show'); } }); my html code: set permission
has answer: http://stackoverflow.com/a/25447211
has title: hide second modal if condition is false
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
answer count: 1
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/comment/39704163
type: Comment
comment on: http://stackoverflow.com/a/25447242
score: 0
type: AnswerComment
has text: If I understand correctly, the `action` in the HTML points to a page that just ignores the POST request. The JS code submits the form to the correct page. There's no JS trying to stop the submission.

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/25419860
type: Tag

http://stackoverflow.com/comment/39780895
has text: Well the choice between the two is merely a question of do you want the element that is hidden to take up space on your page or not. If you want space on the page to still be allocate even if the element is not visible use `hidden` if not use `display`.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25487993

http://stackoverflow.com/comment/39961082
comment on: http://stackoverflow.com/a/25528141
type: AnswerComment
score: 0
type: Comment
has text: I actually was able to find most of the information myself thanks to your suggestions. I was able to find the Math.atan2 operator and have now been able to successfully click, drag, and release my mouse click, and based on the direction and and length, get the arrow to point in one of four directions as well as change length. What's driving me nuts now is I cannot for the life of me get the arrow to change location to where I want. I get my start coordinates "startXY" and my end coordinates "endXY, subtract the smaller x and y from the larger x and y.

http://stackoverflow.com/comment/39804538
has text: I mean that there is no external variable (`out` in ShaneQful's answer) that exposes the current state of the algorithm. The version I propose is stateless. State is *generally* something you want to avoid (see [functional programming](http://en.wikipedia.org/wiki/Functional_programming)).
type: Comment
comment on: http://stackoverflow.com/a/25491878
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39671517
has text: Shouldn't you use bodyParser (http://stackoverflow.com/a/4296402/2571926)?
comment on: http://stackoverflow.com/q/25428686
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39819193
type: QuestionComment
type: Comment
has text: I know the ratio of the image: it is fixed at 0.5
score: 0
comment on: http://stackoverflow.com/q/25508058

memoization
type: Tag
tags question: http://stackoverflow.com/q/25404516
tags question: http://stackoverflow.com/q/25434781
tags question: http://stackoverflow.com/q/25436413
tag name: memoization

http://stackoverflow.com/q/25422054
has body: db.people.update( { "age": "Thirty Two" }, { age: 32 }, { upsert: false } ) db.people.update( { "age": "Fifty-Five" }, { age: 55 }, { upsert: false } ) db.people.update( { "age": "Twenty" }, { age: 20 }, { upsert: false } ) I was thinking: db.people.update( [{ "age": "Thirty Two" }, { age: 32 }, { upsert: false }], [{ "age": "Fifty-Five" }, { age: 55 }, { upsert: false }], [{ "age": "Twenty" }, { age: 20 }, { upsert: false }] ) But that didn't work.. I know im just really tired and can't think of it...
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39675863
has answer: http://stackoverflow.com/a/25428515
has title: How could I run this as one command in Mongo Shell
has comment: http://stackoverflow.com/comment/39700151
has answer: http://stackoverflow.com/a/25509115
type: Question
tagged with: mongodb
possible better answer: http://stackoverflow.com/a/25428515
tagged with: javascript
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25509115
tagged with: arguments
tagged with: updatemodel

http://stackoverflow.com/q/25394677
type: Question
has body: I am following the sandcastle ellipse Outline Geometry. I am wondering if there is anyway to make the ellipse line width wider? There are examples of making a polyline wider using the width attribute but there does not seem to be a way to make an ellipseOutlineGeometry object. The sandcastle example has a lineWidth setting at the end but changes to this do not seem to affect the width of the ellipse outline. sandbox code: // Create the ellipse geometry. To extrude, specify the // height of the geometry with the extrudedHeight option. // The numberOfVerticalLines option can be used to specify // the number of lines connecting the top and bottom of the // ellipse. ellipseOutlineGeometry = new Cesium.EllipseOutlineGeometry({ center : Cesium.Cartesian3.fromDegrees(-95.0, 35.0), semiMinorAxis : 200000.0, semiMajorAxis : 300000.0, extrudedHeight : 150000.0, rotation : Cesium.Math.toRadians(45), numberOfVerticalLines: 10 }); // Create a geometry instance using the ellipse geometry // created above. var extrudedEllipseOutlineInstance = new Cesium.GeometryInstance({ geometry : ellipseOutlineGeometry, attributes : { color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.WHITE) } }); // Add both ellipse outline instances to primitives. primitives.add(new Cesium.Primitive({ geometryInstances : [ellipseOutlineInstance, extrudedEllipseOutlineInstance], appearance : new Cesium.PerInstanceColorAppearance({ flat : true, renderState : { depthTest : { enabled : true }, lineWidth : Math.min(2.0, scene.maximumAliasedLineWidth) //changes here dont seem to affect the actual size? } }) }));
tagged with: cesiumjs
downvote count: 0
tagged with: javascript
answer count: 3
tagged with: dictionary
has answer: http://stackoverflow.com/a/62305585
tagged with: ellipse
has comment: http://stackoverflow.com/comment/39637071
favorite count: 0
has answer: http://stackoverflow.com/a/25405483
upvote count: 7
has comment: http://stackoverflow.com/comment/39618876
possible better answer: http://stackoverflow.com/a/33223036
has title: How do you change the width on an EllipseOutlineGeometry in Cesium map?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33223036
accepted answer: http://stackoverflow.com/a/25405483
score: 7
tagged with: webgl

http://stackoverflow.com/a/25452877
downvote count: 0
has body: With using app.use('/info', info); you're saying route the info path. That's why you're getting /info/.json so you're going to have change how you have things set up for this to work. Instead of module.exports = router; in your info.js, you'll want to do something like this: module.exports = function(req, res) { if(req.isJSON) { } else { } } In your app.js you'll have some route middleware to flag the request as .json: app.use('*.json', function() { req.isJSON = true; next(); }); app.get('/info', info); app.get('/info.json', info);
answers question: http://stackoverflow.com/q/25452672
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/39733904
type: QuestionComment
type: Comment
has text: There's no way you could get anything at all as long you use `$('tableClass')` without `.`
comment on: http://stackoverflow.com/q/25462705
score: 0

http://stackoverflow.com/q/25474464
linked to: http://stackoverflow.com/q/1646698
score: 0
has comment: http://stackoverflow.com/comment/39768943
tagged with: http://stackoverflow.com/tag/html
tagged with: this
tagged with: var
type: UnansweredQuestion
has title: Need help understanding a certain code
duplicate of: http://stackoverflow.com/q/1646698
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/39755692
has body: I am trying to learn how to create my own object and i can't understand the "this" part. Is that representing the function "person"? And why do we have to type .name = name? function person(name, age){ this.name = name; this.age = age; } var bucky = new person("bucky roberts", 24); var perry = new person("perry smith", 20); &lt;/script&gt; &lt;script type="text/javascript"&gt; document.write(bucky.name); &lt;/script&gt;
tagged with: function
tagged with: javascript

http://stackoverflow.com/comment/64774352
type: Comment
score: 0
has text: Read the post for all Morris Chart's resize [Morris Chart's](http://stackoverflow.com/a/38656829/4265604)
comment on: http://stackoverflow.com/q/25480210
type: QuestionComment

http://stackoverflow.com/comment/39752390
score: 0
comment on: http://stackoverflow.com/q/25472630
has text: More specifically, you'll want a function that could sort your jquery object in the order according to offsets.. you need help with that?
type: Comment
type: QuestionComment

object-literal
tag name: object-literal
type: Tag
tags question: http://stackoverflow.com/q/25548281

http://stackoverflow.com/q/25445099
tagged with: pyside
tagged with: javascript
type: Question
tagged with: qtwebkit
downvote count: 0
favorite count: 0
tagged with: python
has comment: http://stackoverflow.com/comment/39704881
answer count: 0
type: UnansweredQuestion
score: 1
has body: I am building a web crawler using QWebPage in Python. My script is browsing through a website by clicking on various links using evaluateJavaScript("this.click()"). The resulting contents are then being processed after emitting the signal loadFinished. class Crawler( QWebPage ): ... def __init__(self, url): QWebPage.__init__( self ) self._url = url ... def crawl( self ): signal.signal( signal.SIGINT, signal.SIG_DFL ) self.connect( self, SIGNAL( 'loadFinished(bool)' ), self._finished_loading ) ... def _finished_loading( self, result ): doc = self.mainFrame().documentElement() link = doc.findFirst("a[id='ANYID']") link.evaluateJavaScript("this.click()") This is working quite well. However, there is one link where the loadFinished signal is not being emitted after executing evaluateJavaScript("this.click()"). I have verified that findFirst is indeed finding the right element. I have looked at the source code of the website and it seems that the link is executing some JavaScript without loading new data from the server. Is loadFinished not emitted in such a case? Or should it always be emitted after executing JavaScript? Is there any other signal I could use to capture the changes to my QWebPage?
upvote count: 1
has title: Signal emission after execution of evaluateJavaScript
tagged with: qt

datatables
tags question: http://stackoverflow.com/q/25502387
tags question: http://stackoverflow.com/q/25495106
tags question: http://stackoverflow.com/q/25520521
tags question: http://stackoverflow.com/q/25416457
tags question: http://stackoverflow.com/q/25504415
tags question: http://stackoverflow.com/q/25528606
tags question: http://stackoverflow.com/q/25509850
tags question: http://stackoverflow.com/q/25437141
tags question: http://stackoverflow.com/q/25452119
tags question: http://stackoverflow.com/q/25414778
tags question: http://stackoverflow.com/q/25463175
tags question: http://stackoverflow.com/q/25476898
type: Tag
tag name: datatables
tags question: http://stackoverflow.com/q/25418860
tags question: http://stackoverflow.com/q/25441213
tags question: http://stackoverflow.com/q/25478276

http://stackoverflow.com/a/25496380
has comment: http://stackoverflow.com/comment/39970947
upvote count: 1
answers question: http://stackoverflow.com/q/25460745
has comment: http://stackoverflow.com/comment/40042235
has body: This is how EasyScroller functionality is added: When the document is fully loaded and parsed, the document is searched for all elements with data attributes data-scrollable and data-zoomable. For each such element, EasyScroller instance is created, which adds the scrolling functionality. In Backbone applications, since we modify the dom tree, we need to create the EasyScroller instance explicitly. After assigning content to Backbone view's el element, you can dynamically attach the EasyScroller to it. You need not add data-scrollable attribute to the el element, with this approach. define(['jquery', 'underscore', 'backbone'], function($, _, Backbone) { var HomeView = Backbone.View.extend({ template: _.template("&lt;div data-i18n='view.name'&gt;&lt;/div&gt;"), render: function() { this.$el.html(this.template); // Now attach the EasyScroller element to the el element. new EasyScroller(this.el, {scrollingX: false, scrollingY: true}); } }); return HomeView; });
score: 1
has comment: http://stackoverflow.com/comment/39960703
has comment: http://stackoverflow.com/comment/39962136
accepted answer of: http://stackoverflow.com/q/25460745
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39872821
type: Answer
has comment: http://stackoverflow.com/comment/39877661

http://stackoverflow.com/comment/39712254
type: QuestionComment
comment on: http://stackoverflow.com/q/25451269
has text: Not sure I get it, you want to return a new constructor with the same methods and prototype, or just return a new instance of the passed constructor ?
score: 0
type: Comment

http://stackoverflow.com/comment/39734429
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25462964
type: Comment
has text: StackOverflow is not really the place to ask people to do **all** the work for you. You should at least provide an attempt which we can help you improve.

http://stackoverflow.com/comment/39821491
score: 0
type: Comment
type: QuestionComment
has text: Take a look at these 2 answers: http://stackoverflow.com/questions/8405458/return-json-data-from-asmx-web-service and http://stackoverflow.com/questions/18244696/how-to-return-json-with-asp-net-jquery
comment on: http://stackoverflow.com/q/25507023

http://stackoverflow.com/q/25518380
tagged with: d3.js
has comment: http://stackoverflow.com/comment/39844154
has title: What's the best way to draw multiple charts using NVD3.js from an array of chart data
type: Question
tagged with: charts
has comment: http://stackoverflow.com/comment/39860232
score: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39860456
has body: I am trying to render an array of charts using NVD3. Let's assume that data is an array of charts (object with an array of key values) Since I am using a selector to insert the chart data at a specific svg element, how can I create multiple charts (data.length) and append them in my html? my HTML is simple: &lt;div class="span12"&gt; &lt;div id="chart" class="col-md-12"&gt; &lt;svg&gt;&lt;/svg&gt; &lt;/div&gt; &lt;/div&gt; JavaScript is the standard NVD3 example, with a click event registered on each bar: nv.addGraph(function() { var chart = nv.models.multiBarChart(); chart.xAxis .tickFormat(d3.format(',f')); chart.yAxis .tickFormat(d3.format(',.1f')); d3.select('#chart svg') .datum(data()) .transition().duration(500) .call(chart) ; nv.utils.windowResize(chart.update); return chart; }; }, function () { d3.selectAll(".nv-bar").on('click', function () { $('#modalMonthlySubcategory').modal('show') }); }); ); I need to render all charts at once, without knowing how many there are in the array. IDs need to be unique and the clock events need to work on each bar, it shows a bootstrap modal.
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
tagged with: nvd3.js

kendo-combobox
tag name: kendo-combobox
type: Tag
tags question: http://stackoverflow.com/q/25521682

http://stackoverflow.com/comment/39864135
has text: ajp15243, the answers are:
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25530547

http://stackoverflow.com/q/25545055
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25545165
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/25545124
score: 0
has answer: http://stackoverflow.com/a/25545124
has answer: http://stackoverflow.com/a/25545152
linked to: http://stackoverflow.com/q/16437173
has comment: http://stackoverflow.com/comment/39885726
has comment: http://stackoverflow.com/comment/39885796
has answer: http://stackoverflow.com/a/25545165
tagged with: javascript
has title: jQuery add class to current li and remove prev li automatic
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25545155
has body: Below is my HTML code, I want to remove active class from 1st li and add it to 2nd li and viceversa automatic every 2 second using jQuery. &lt;li class=""&gt; &lt;a href="#"&gt; &lt;img src="client_logo01.png"&gt; &lt;/a&gt; &lt;/li&gt; &lt;li class="active"&gt; &lt;a href="#"&gt; &lt;img src="client_logo02.png"&gt; &lt;/a&gt; &lt;/li&gt; I'm trying to do in this way. $('ul li a').click(function() { $('ul li.current').removeClass('active'); $(this).closest('li').addClass('active'); }); But it is only working on click event.

http://stackoverflow.com/a/25467963
has body: demo You can use this one liner: $('select:not(:has(option))').prop('disabled', true);
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25467937
upvote count: 3
score: 3

http://stackoverflow.com/comment/39803995
comment on: http://stackoverflow.com/q/25500466
type: Comment
has text: [`animate()`](http://api.jquery.com/animate/).
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39858230
comment on: http://stackoverflow.com/a/25527686
has text: @AlexW: I meant the execution context is not directly accessible to the user. `it is still stored in memory and therefore no benefit is provided by caching access to it in a variable`: I'm not agreeing here, global variables are also in memory and there is a benefit to cache them.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25543956
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25544048
has answer: http://stackoverflow.com/a/25544148
has answer: http://stackoverflow.com/a/25544048
has body: I have a section on my website which holds all the content, but I want a "sidebar" with hidden content to smoothly appear from the left at the push of an external button. CSS transitions can handle the smoothness no problem, and jQuery toggle() can switch between classes to move the hidden div in and out of the screen. How can I get the same effect without using jQuery?
tagged with: http://stackoverflow.com/tag/html
answer count: 7
has answer: http://stackoverflow.com/a/25544161
favorite count: 0
has title: Toggle class on HTML element without jQuery
has answer: http://stackoverflow.com/a/40604655
has answer: http://stackoverflow.com/a/54488414
score: 34
tagged with: css
type: AnsweredQuestion
downvote count: 2
accepted answer: http://stackoverflow.com/a/25544161
type: Question
has answer: http://stackoverflow.com/a/54487785
has answer: http://stackoverflow.com/a/25544216
upvote count: 36

http://stackoverflow.com/comment/39736391
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25463653
has text: I solved it. I couldn't apply display:none to p in a class. I made a div around it.
score: 0

http://stackoverflow.com/comment/39629550
comment on: http://stackoverflow.com/a/25395092
has text: I guess in your case it would, but heirarchy-viewer.tpl.html or heirarchy_viewer.tpl.html would translate to the module heirarchyViewer. I'm glad it's figured it out though, and you've given me some things that needed clarified in the documentation so thanks for that.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39684251
has text: I can, in fact... I wrote a short series on [Blogascript](http://blog.javascriptroom.com). Start with [Objects and the Prototype Chain](http://blog.javascriptroom.com/2013/01/14/objects-and-the-prototype-chain/).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25435552
type: Comment

http://stackoverflow.com/q/25419054
has comment: http://stackoverflow.com/comment/39652765
has comment: http://stackoverflow.com/comment/39652666
downvote count: 1
has comment: http://stackoverflow.com/comment/39653943
has comment: http://stackoverflow.com/comment/39652726
upvote count: 0
has answer: http://stackoverflow.com/a/25419806
tagged with: javascript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: -1
has body: What I want to have is a working button and input form for my code which is a block in an object literal. My form shows fine when I run the code, but doesn’t output a value. Why not? enter
favorite count: 0
type: Question
has title: Adding an event listener using an object’s property
answer count: 1

http://stackoverflow.com/comment/39602790
type: QuestionComment
score: 0
has text: so, i should say that i don't think you're going about this the right way, but it looks like an experiment, so ... maybe your best bet is to use cookies. 1) check if a particular cookie exists, if it doesn't, show the most recent post and set the cookie to that date string. If the cookie does exist, subtract a day from it, reset the cookie and use that to show your post.
comment on: http://stackoverflow.com/q/25390583
type: Comment

http://stackoverflow.com/a/25547612
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25547567
has body: You can do this with regular expression as argument to replace with global selection. "1/2/3".replace(/\//g, "")
downvote count: 0

http://stackoverflow.com/q/25537003
has comment: http://stackoverflow.com/comment/39884764
upvote count: 6
has answer: http://stackoverflow.com/a/30379275
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/39883335
score: 6
has answer: http://stackoverflow.com/a/55050082
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25644924
has answer: http://stackoverflow.com/a/41769450
answer count: 6
type: Question
has comment: http://stackoverflow.com/comment/39871677
has title: Bootstrap datepicker and bootstrap validator
has body: I am using the bootstrap datepicker from here and the bootstrap validator from here. Also I am using bootstrap v3.1.1. After selecting a date from datepicker the validator does not react. It works just when I use the keyboard to enter a date. Here is my HTML code: &lt;form id="myForm" method="POST"&gt; &lt;div class="col-lg-3"&gt; &lt;div class="form-group"&gt; &lt;input name="endDate" type="text" class="datepicker form-control"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; In .js file I added: $(document).ready(function () { $('.datepicker').datepicker(); )}; and for validators: $(document).ready(function () { $('#myForm').bootstrapValidator({ feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { endDate: { validators: { date: { format: 'DD/MM/YYYY', message: 'The format is dd/mm/yyyy' }, notEmpty: { message: 'The field can not be empty' } } } } }); });
tagged with: validation
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/58969247
favorite count: 0
possible better answer: http://stackoverflow.com/a/36130899
has comment: http://stackoverflow.com/comment/39881389
has answer: http://stackoverflow.com/a/36130899
has answer: http://stackoverflow.com/a/25644924
tagged with: datepicker

http://stackoverflow.com/comment/39759751
type: Comment
has text: Thanks! That helped me a lot. One more question though, is there a way to get just the month/date/year from the way this?
comment on: http://stackoverflow.com/a/25476573
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39667188
has text: @misterManSam In your example, at least in IE 11, the legend now starts off in the incorrect position.
comment on: http://stackoverflow.com/q/25413986
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39610834
type: Comment
comment on: http://stackoverflow.com/q/25396489
type: QuestionComment
score: 0
has text: when you submit a form(or serialize form data) only selected values of the `select` element are sent

http://stackoverflow.com/q/25540358
type: Question
has comment: http://stackoverflow.com/comment/39877806
has comment: http://stackoverflow.com/comment/39877597
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39877645
score: 0
has comment: http://stackoverflow.com/comment/39877696
has body: I know that Nodejs is supposed to be different to other laguages due to the event loop, what makes it difficult to understand at first. However there's no way I can understand the following code (I managed to make it work, but no logic explanation). I create new instances of a SSH connection each time I receive an special request, let's say: sshCons = {}; sshObjt = new Connection(); sshCons[request_id] = sshObjt; sshObjt.connect(); //and son on... So I create a new Connection and "store" it in what we can understand as an "associative array", even if I think that it's just an Object that carries properties and their values. The question is, if I place this code after the lines written above: sshObjt.on('data', function() { // CODE }); How does Node know which sshObjt is the one that emits the event if I created multiple sshObjts and "stored" them? I previously tried to loop over the sshCons object but that shouldn't be the appropriate way of handling this. In case I'm wrong, which should be the proper way of handling events of multiple objects "stored" in sshCons object?
has answer: http://stackoverflow.com/a/25540429
has title: Can't understand nodejs code
has comment: http://stackoverflow.com/comment/39877698
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25540429

http://stackoverflow.com/q/25428561
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39671520
possible better answer: http://stackoverflow.com/a/25429286
has comment: http://stackoverflow.com/comment/39670039
has comment: http://stackoverflow.com/comment/39670647
has answer: http://stackoverflow.com/a/25429286
accepted answer: http://stackoverflow.com/a/25429368
has comment: http://stackoverflow.com/comment/39671270
type: Question
has title: $(document).on("click"... how to collapse a list when clicking anywhere else on the document
has answer: http://stackoverflow.com/a/25429368
tagged with: javascript
has comment: http://stackoverflow.com/comment/39670946
score: 0
answer count: 2
has body: I'm trying to build a collapsible/expandable menu for my website. I had a version where hovering over a category would cause the subcategory to expand, but what I really want is to click on a category and have the subcategories expand and remain expanded until I click anywhere else on the page. I think I'm close--I've looked at a lot of examples and am just struggling to piece them all together. The current situation is that I can get the lists to expand and collapse when clicking on the lists themselves, but I can't get anything to happen when clicking elsewhere on the document. I realize that I'll also have to do something with stopPropagation(), but first things first... Javascript: function show_sub(cat){ cat.querySelector("ul").style.display = (cat.querySelector("ul").style.display == "block") ? "none" : "block"; }; $('body').on("click", function () { $("#nav ul").style.display="none"; }); CSS: #nav { width: 120px; border: black 1px solid; } #nav li > ul { display:none; } HTML: Vegetables Beans Carrots Greens Onions Fruit Apple Banana Cantaloupe link to jfiddle Thanks in advance for your patience. I don't have much experience with Javascript and I've found Stack Overflow enormously helpful as I figure out how to make changes to existing websites. However, I'm still floundering around when it comes to creating anything from scratch. EDIT: Used solution from @JustinMorgan and added one line so that only one submenu is visible at a time: http://jsfiddle.net/nbavc5g7/2/
has comment: http://stackoverflow.com/comment/39672058
has comment: http://stackoverflow.com/comment/39670954
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39836956
type: Comment
type: QuestionComment
has text: when the new window opens
score: 0
comment on: http://stackoverflow.com/q/25517800

http://stackoverflow.com/comment/49311093
type: QuestionComment
comment on: http://stackoverflow.com/q/25449103
score: 0
type: Comment
has text: Here it is :) https://www.google.co.in/search?q=FormTag+source&ie=utf-8&oe=utf-8&gws_rd=cr&ei=iApvVfPIMMmwuASP14GoCg

http://stackoverflow.com/comment/39895403
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25549855
has text: Oh.. I want to put an "X" in if the word "error" is in the "Action" column and "O" if it isn't there.

http://stackoverflow.com/q/25543480
score: 2
has body: Im having a markup like this &lt;p&gt; &lt;img hspace="4" alt="" src="sampleimage.png"&gt; Many in her village believed that girls should not be educated, and someone burned down the coffee trees on Enatha’s family farm – their only source of income – to discourage her from continuing with her studies.&amp;nbsp;However, Enatha’s parents continued to support her education, and in 2011, she earned a spot at the Gashora Girls’ Academy of Science and Technology. &lt;/p&gt; I have added text-wrap-around-image effect by adding float-right to the image. Currently text wrap around the image, but the image is at the top. Current Snapshot I want the image to be in the middle (among) the text say 2 lines below the text. Is there anyway to achieve something like this Expected Behaviour
linked to: http://stackoverflow.com/q/10968726
duplicate of: http://stackoverflow.com/q/4618881
has title: How to move image/div markup center of the div containing text
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39884082
downvote count: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25544761
favorite count: 0
has comment: http://stackoverflow.com/comment/39883116
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/4618881
tagged with: css

http://stackoverflow.com/comment/39788446
type: QuestionComment
comment on: http://stackoverflow.com/q/25491941
type: Comment
score: 0
has text: @James McLaughlin, thanks, I didn't know this name, now google showing me much more results than before ;-)

http://stackoverflow.com/comment/39878930
has text: So it would be safe to, once the user logs in, simply store their permission ID in a PHP session variable and leave it as that - no need to check permissions again until next login.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25541114
type: AnswerComment

http://stackoverflow.com/comment/39608981
comment on: http://stackoverflow.com/a/25395410
score: 0
type: AnswerComment
type: Comment
has text: I want the bar to be customized. There was a reason I didn't use the tag

http://stackoverflow.com/comment/39885273
has text: Hello suchit, i am already make a code but still not working.. I am create new article to post my code.. Please take a look at http://stackoverflow.com/questions/25544843/show-query-result-into-input-field-based-on-user-input-value-in-dynamic-input-fi Any solution?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25498046

http://stackoverflow.com/q/25452968
downvote count: 0
favorite count: 0
has title: Full Calendar - Differentiate Past Events from Future Events
accepted answer: http://stackoverflow.com/a/25453332
upvote count: 1
type: AnsweredQuestion
score: 1
has body: I want to differentiate Past events from Future events in fullcalendar.I have loaded and rendered all the events in the calendar.How can I differentiate the Past events and Future events with two different colors.Here is the JsFiddle Link $('#calendar').fullCalendar({ //theme: true, header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, defaultDate: moment().format("YYYY-MM-DD"), editable: true, events: { url: 'http://www.json-generator.com/api/json/get/ccUKVDYErS?indent=2', error: function() { $('#script-warning').show(); }, success: function(){ alert("successful: You can now do your stuff here. You dont need ajax. Full Calendar will do the ajax call OK? "); } }, loading: function(bool) { $('#loading').toggle(bool); } }); });
type: Question
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
possible better answer: http://stackoverflow.com/a/59624295
has answer: http://stackoverflow.com/a/25453332
has answer: http://stackoverflow.com/a/59624295
answer count: 2

http://stackoverflow.com/comment/39714038
type: Comment
comment on: http://stackoverflow.com/a/25452169
has text: if it solved the problem, don't thank me ... thank the checkmark. ;)
score: 0
type: AnswerComment

http://stackoverflow.com/q/25522080
type: UnansweredQuestion
upvote count: 1
answer count: 0
score: 0
tagged with: dom
downvote count: 1
type: Question
tagged with: javascript
has body: I have a table with a background like this: http://ast-ss.se/terrain/ You can navigate through the boxes by just clicking on them. I have also implemented the feature that random monsters, black dots, is generated at the map. You can navigate to the box and challenge the monster. When I click on a box with a monster in it, I get the monster's specifications, lever, strength etc etc. Here is the code snippet from my directive: if(angular.element(this).hasClass('monster')) { var monster_info = angular.element(this).find("img").attr("title"); $http.get("lib/terrain.php", {params: { monster_data:monster_info}}).success(function(data) { console.log(data); $rootScope.$broadcast('mapInfo', data); }); } As you can see, I'm using $rootScope.$broadcast for this. Here is what I'm doing in my controller: $scope.$on('mapInfo', function(event, mapInfo) { $scope.mapInfo = mapInfo; console.log($scope.mapInfo); }); And here is my HTML: Vildmarken | Marknaden | Värdshuset This works fine. The information about the monster is printed out at the page. However, when you are in a box without a monster, I want to display information about the box you are in. Everytime you navigate to a new box, I want to print out information about that box. I have tried like this: Directive: angular.element('.click').click(function() { if(angular.element(this).hasClass('monster')) { var monster_info = angular.element(this).find("img").attr("title"); $http.get("lib/terrain.php", {params: { monster_data:monster_info}}).success(function(data) { console.log(data); $rootScope.$broadcast('mapInfo', data); }); } else { test = angular.element(this).attr('id'); $rootScope.$broadcast('mapInfo', test); angular.element('.click.dotted').empty(); angular.element('.click.dotted').removeClass('dotted'); if(!angular.element(this).hasClass('dotted')) { $rootScope.$broadcast('mapInfo', test); angular.element(this).addClass('dotted'); angular.element(this).html($(' ')); } } }); As you can see, I have an else-statement with …
has comment: http://stackoverflow.com/comment/39850540
has comment: http://stackoverflow.com/comment/39858701
favorite count: 0
has title: Change value in $rootScope
tagged with: angularjs

http://stackoverflow.com/a/25540476
score: 2
downvote count: 0
has body: change your code: $(document).on('click','#leftdesktop',function() { alert("desktop"); });
accepted answer of: http://stackoverflow.com/q/25539755
answers question: http://stackoverflow.com/q/25539755
upvote count: 2
has comment: http://stackoverflow.com/comment/39969226
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39877816
type: Answer

http://stackoverflow.com/q/25499431
has body: Here is my for loop that I have to update particular section after ajax request. through this code database is updating but section is not updating. <?php if ($prod ['data'] [0] [0] ['data'] ['name'] != null) { echo ' Products '; for($i = (count ( $prod ['data'] ) - 1); $i >= 0; $i --) { echo ' ' . $prod ['data'] [$i] [0] . ' ' . urldecode ( $prod ['data'] [$i] [1]) . ' '; $str = base64_decode ( $prod ['data'] [$i] [2] ); if ($str [0] == "(") { $str [0] = " "; } if ($str [strlen ( $str ) - 1] == ")") { $str [strlen ( $str ) - 1] = " "; } echo $str; echo ' Done Cancel '; } echo ' '; } ?> I have to update this loop with ajax request. Here is my ajax function: function updateProduct(p,c){ var pdt= "#pro_details"+p; var ped = "#pro_edit"+p; var product = "pro_name"+p; var pne = "proName_edit"+p; var pue = "proURL_edit"+p; var pde = "proDescription_edit"+p; alert(c); var tno = p; var pnee = document.getElementById(pne).value; var puee = document.getElementById(pue).value; var pdee = document.getElementById(pde).value; var pro = document.getElementById(product).innerHTML; alert(pro); $.ajax({ url: "./xxxxxxxx.php", type: "POST", data: { COMPANY:<?php echo '"'.$company.'"';?>, NAME: pnee, URL: puee, DESCRIPTION: pdee, id: c, TNO: tno }, success: function(data) { $(ed).css("display","none"); $(pd).css("display","block"); $(pd).empty(); $(pd).html(data); } }); } How can I can change my particular section on ajax request.
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/39802682
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25499896
tagged with: ajax
has title: Edit profile update functionality is not working
has comment: http://stackoverflow.com/comment/39802097
tagged with: php
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39802031

http://stackoverflow.com/comment/39714388
has text: Ok i fixed js... i will post that 2 solutions :D
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25451785

http://stackoverflow.com/q/25416318
score: 2
type: AnsweredQuestion
has body: I know they just deprecated id and reference, and I'm getting valid placeIds with my initial search- but for some reason when I go to search for details like this: function(place_id){ var request = { placeId: place_id } this.service.getDetails(request, function(data){ //Da callback }); } I get an error asking for the deprecated field 'reference': Uncaught Error: Missing parameter. You must specify reference. Thanks for the help!
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/25416464
has title: placeId not working as request parameter for Places Details search
tagged with: google-places-api
upvote count: 2
accepted answer: http://stackoverflow.com/a/25416464

http://stackoverflow.com/comment/39602145
score: 0
type: Comment
type: QuestionComment
has text: I have both orientation change and resize. Even if I take one out for the other, Both don't work. @dzny
comment on: http://stackoverflow.com/q/25391771

http://stackoverflow.com/comment/39700170
score: 0
comment on: http://stackoverflow.com/a/25444566
type: Comment
type: AnswerComment
has text: unfortunately window.print() print only the current page. But you can make window.open(' ') and window.print().

http://stackoverflow.com/a/25411301
has comment: http://stackoverflow.com/comment/39638928
upvote count: 1
has comment: http://stackoverflow.com/comment/39638845
answers question: http://stackoverflow.com/q/25411101
has comment: http://stackoverflow.com/comment/39638752
downvote count: 0
has body: You're confused about how prototypes work. You probably want nothing more than Hamster.prototype = { test: function() { this.sleep(); } }; What you are doing is creating a new object for the prototype. The _self variable you are setting is not pointing to the this of individual Hamster objects, but rather to the this of the new prototype object you are creating, which is lost to the world.
has comment: http://stackoverflow.com/comment/39640344
type: Answer
score: 1

http://stackoverflow.com/a/25457137
accepted answer of: http://stackoverflow.com/q/25456993
answers question: http://stackoverflow.com/q/25456993
downvote count: 0
type: AcceptedAnswer
has body: if you use ng-hide and ng-show together like that and ng-hide evaluates to false, my guess is that both divs should show. Have you tried just using one to make sure your methods are working properly and image has the right value? If so, add another div as a wrapper and use it for ng-hide so they dont fight each other.
has comment: http://stackoverflow.com/comment/39723728
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/a/25463498
accepted answer of: http://stackoverflow.com/q/25463427
type: Answer
has body: Your code doesn't work because you have misspelled NaN; NaN is spelled with a little a. In your code you have var a=isNAN(mo); at line 16. Change it to var a=isNaN(mo);.
has comment: http://stackoverflow.com/comment/39736167
has comment: http://stackoverflow.com/comment/39735944
score: 0
answers question: http://stackoverflow.com/q/25463427
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39735990
has comment: http://stackoverflow.com/comment/39735897

http://stackoverflow.com/q/25546472
linked to: http://stackoverflow.com/q/8888491
has comment: http://stackoverflow.com/comment/39888261
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25546635
has body: I have 8/28/2014 12:00:00 AM and i want to access Date= 8/12/2014 and time= 12:00 AM. How can i separate this date and time in javascript? I used the following code and got the date according to my requirement but i got time 0:00 but i need 12:00 AM.How it is possible? var date = new Date(starttime); var startday = date.getDate(); var startmonth = date.getMonth() + 1; var startyear = date.getFullYear(); var formatDate = startday + "/" + startmonth + "/" + startyear; var starttime = date.getHours() + ":" + date.getMinutes();
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/25546629
score: 1
linked to: http://stackoverflow.com/q/1056728
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39888361
duplicate of: http://stackoverflow.com/q/1056728
has title: separate Date and time with AM or PM?
tagged with: javascript
has answer: http://stackoverflow.com/a/25546582
has answer: http://stackoverflow.com/a/25546706

http://stackoverflow.com/comment/39863237
type: QuestionComment
has text: Yes. The intention of the site is the build a repository of questions and answers that are useful for programmers in general; it isn't about just helping you specifically. What is your question here? There isn't one. What is the problem to be solved? The problem is "I don't have code". How is a solution for that problem going to help anyone **else**? It helped you, great, but that isn't what the site is for. Check out http://stackoverflow.com/help/how-to-ask. You got an answer here, but it is ultimately clutter because the question and answers aren't *generally* useful.
score: 0
comment on: http://stackoverflow.com/q/25532339
type: Comment

http://stackoverflow.com/q/25541494
has title: Simple WinJS ListView Binding
score: 1
tagged with: listview
has answer: http://stackoverflow.com/a/25576920
type: Question
tagged with: winjs
answer count: 1
tagged with: windows-8.1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: binding
has comment: http://stackoverflow.com/comment/39905308
type: UnansweredQuestion
has body: I am developing a Windows 8.1 app, and I have some data I want to bind to a listview. For some reason, I am not able to have the data shown, and I am not quite sure where I am making the mistake. HTML: Javascript: var results = [{ name: "quebec" }, { name: "quebec1" }]; var dataList = new WinJS.Binding.List(results); var resultsListView = document.getElementById("resultsView").winControl; var resultTemplate = document.getElementById("resultTemplate"); resultsListView.itemTemplate = resultTemplate; resultsListView.itemDataSource = dataList.dataSource; I am calling WinJS.UI.processAll() at the top of my javascript.
upvote count: 1

http://stackoverflow.com/comment/39762751
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25478088
has text: @Angelo I would say yes, since regex is a bit overkill and creating array and joining for a simple work is too a overkill.
score: 0

http://stackoverflow.com/comment/129570273
comment on: http://stackoverflow.com/a/25526451
has text: @BalusC would you mind explaining the 'why' of why jquery-ui.js should be renamed to jquery-plugins.js please? i.e. we've seen that it doesn't work if you try to upgrade by placing a newer jquery-ui.js in resources/primefaces/jquery, it must be named jquery-plugins.js, but why is that?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25497546
score: 0
has comment: http://stackoverflow.com/comment/39801519
has comment: http://stackoverflow.com/comment/39798904
answers question: http://stackoverflow.com/q/25497466
type: Answer
has body: I recommend to use html + css instead of javascript. And since the new function of SO isn't working yet, link here: http://codepen.io/anon/pen/pHhEo Code here: Button 1 Button 2 Button 3 Button 4 Button 5 If you change the height, the button's height will also change automatically.

http://stackoverflow.com/comment/39873165
type: QuestionComment
has text: you also need a length of time with the end of the `setInterval` (you probably know this)
comment on: http://stackoverflow.com/q/25537821
score: 0
type: Comment

http://stackoverflow.com/comment/39719259
type: Comment
comment on: http://stackoverflow.com/a/25433857
type: AnswerComment
has text: Thanks for your help. I should have mentioned that the transition plugin is being loaded before the carousel plugin already.
score: 0

http://stackoverflow.com/a/25468288
answers question: http://stackoverflow.com/q/25468245
upvote count: 1
type: AcceptedAnswer
has body: If you use type:'GET' in ajax then you should use in ajaxVerify() like this $this-&gt;input-&gt;get('name'); And if you use type:'POST' then $this-&gt;input-&gt;post('name');
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25468245

http://stackoverflow.com/a/25447334
downvote count: 0
score: 9
has comment: http://stackoverflow.com/comment/39714701
answers question: http://stackoverflow.com/q/25430333
has comment: http://stackoverflow.com/comment/39713774
has comment: http://stackoverflow.com/comment/39710595
accepted answer of: http://stackoverflow.com/q/25430333
type: AcceptedAnswer
has body: You should use the afterRender callback the fullpage.js plugin offers. afterRender() This callback is fired just after the structure of the page is generated. This is the callback you want to use to initialize other plugins or fire any code which requires the document to be ready (as this plugin modifies the DOM to create the resulting structure). You can take a look at a live example here or you can even find it in the examples folder of the fullpage.js download. And you can easily see the source code its using: $(document).ready(function () { $('#fullpage').fullpage({ verticalCentered: true, sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE'], afterRender: function () { //playing the video $('video').get(0).play(); } }); }); UPDATE This is no longer necessary in fullpage.js > 2.6.6. It will automatically play the video when accessing the section as far as it has the tag autoplay in it: &lt;video autoplay loop muted controls="false" id="myVideo"&gt; &lt;source src="imgs/flowers.mp4" type="video/mp4"&gt; &lt;source src="imgs/flowers.webm" type="video/webm"&gt; &lt;/video&gt; In case you only want to play it on section load (not on page load) use data-autoplay. More info at the documentation.
upvote count: 9
type: Answer
has comment: http://stackoverflow.com/comment/39717738
has comment: http://stackoverflow.com/comment/39820168
has comment: http://stackoverflow.com/comment/39820084

http://stackoverflow.com/q/25487837
has comment: http://stackoverflow.com/comment/39797447
tagged with: node.js
has title: Node JS and Socket IO
has body: I'm trying to write an object with member functions for receiving and sending data to and from the client with Node JS and Socket IO. The problem is that every time I send data from the client, there is a new 'connection' event that fires. Is that how it works? I thought the connection event would only occur on a new connection. So with the code below, the log echoes 'New connection' with every reception from the client. It doesn't seem right. io.sockets.on('connection', function (socket) { console.log('New connection'); var localSocket = socket; var newsock = new UserSocket(localSocket); newsock.game = null; newsock.host = null; newsock.opponent = null; newsock.room = ""; newsock.SendToHostSocket('Welcome to Baseball Strategy II'); arrSockets.push(socket); }); function UserSocket(sock) { var localSock = sock; var o = this; this.sock = localSock; this.sock.on('clientData', function (data) { console.log("user socket object"); console.log(o); o.ParseClientData(data); }); } This is a simplified version of what I have for the client: $(document).ready( function () { var socket = io.connect('http://local.baseball.com:3333'); function SocketGameOut(outstring) { socket.emit('clientData', outstring ); } $("#hostGame").click( function () { var gamenum = $('input[name=gameSelect]:checked', '#gameForm').val(); var aSendData = { command : "newgame" , senddata : { gameid : gamenum } }; var senddata = JSON.stringify(aSendData); SocketGameOut(senddata); }); });
downvote count: 1
tagged with: socket.io
type: Question
has answer: http://stackoverflow.com/a/25500892
upvote count: 0
has comment: http://stackoverflow.com/comment/39780448
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39788908
has comment: http://stackoverflow.com/comment/39794432
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39812538
type: Comment
has text: I want this to pop-up when I click on deactivate button. Will this do ?
type: AnswerComment
comment on: http://stackoverflow.com/a/25500107
score: 0

http://stackoverflow.com/q/25401564
has title: Javascript: How to create a bi-dimensional array with unknown length?
has comment: http://stackoverflow.com/comment/39620713
tagged with: multidimensional-array
type: UnansweredQuestion
answer count: 0
type: Question
has body: I'm trying to create 2 bi-dimensional arrays as global variables in javascript like this: player = [nPlayers]; helps = [nPlayers]; And I populate them in a for loop as follows: for (i = 0; i &lt; nPlayers; i++) { j = i + 1; name = window.localStorage.getItem('player' + j); player[i] = [j, name, 0]; helps[i] = [1,1,1,1]; Until here, everything is ok, but everytime that I do something like this: var currentPlayer = 1; player[currentPlayer][2]; It gives me this error: Uncaught TypeError: Cannot read property '0' of undefined Can someone help me on this?
has comment: http://stackoverflow.com/comment/39620004
tagged with: javascript
has comment: http://stackoverflow.com/comment/39620075
score: 0
tagged with: arrays
has comment: http://stackoverflow.com/comment/39620280
has comment: http://stackoverflow.com/comment/39621513

http://stackoverflow.com/comment/39792583
has text: Have you tried `css({'position' : 'relative', 'z-index' : size});`? (I can't work out, from your text, if this element, or others, have `position: absolute` set) And does `size` contain the value you expect?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25494016

http://stackoverflow.com/comment/39600936
has text: I've tried using that plugin and i get: Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8980/app-name-here/directivea.html Error: [$compile:tpload] http://errors.angularjs.org/1.2.21/$compile/tpload?p0=directivea.html
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25390810
type: AnswerComment

http://stackoverflow.com/a/25418681
type: Answer
has comment: http://stackoverflow.com/comment/39652113
downvote count: 0
has comment: http://stackoverflow.com/comment/39652231
answers question: http://stackoverflow.com/q/25418379
has body: @RobG is right by using 'class' you can get array of elements in JavaScript as- var divs=document.getElelementsByClassName("className"); \\And you can loop through it(`divs[i]`). AND according to @RobG and @Barmar data-* attribute is also a good option. But here is some point(just point, not negative or positive, its totally depends on your application need) I want to discuss: 1] data-* element is HTML5's new attribute. Documentation 2] To retrieve elements in javascript, You need to use jQuery or more bit of JavaScript, coz all direct function available have specific browser support: Like document.querySelector("CSS selector"); IE8+ document.getElementsByClassName("className"). IE9+ document.querySelectorAll("CSS selector"); etc. So, basically for this point you need to choose according to your app need and browser compatibility. 3] Performance issue is also there on selecting by data-* attribute... Source But, generally and if we go for latest application and selecting HTML5, data-* attribute + jQuery is a good option.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39652403

http://stackoverflow.com/a/25492203
answers question: http://stackoverflow.com/q/25490030
has body: Allow me to offer a side view, another way handle what I think you intent to do by using Regular Expressions with something like: "test2".replace(/[a-z]/gi,"M").replace(/[^M]/g,"X") //Outputs "MMMMX" String.replace will replace an string that contains letters from [a-z] the i at the end of the expression means case insensitive. g means will search for all possible matches and not just the first match. In the second expression [^M] this ^ means negation so anything that is not an M will be replaced with X. There is another way in which we implement a custom function within the String.replace using Regular Expressions and it can be implemented like this: "test2".replace(/([a-z])|([^a-z])/gi, function(m,g1, g2){ return g1 ? "M" : "X"; }); In regular expression parenthesis creates groups and | means or in this expression ([a-z])|([^a-z]) there 2 groups one with letters from a-z and the other which means everything that is not a-z with the replace function we asked only for group g1 if it is group 1 is M otherwise is an X. Another cool thing you could do is add this function to all your string by prototyping it like: String.prototype.traverse = function(){ return this.replace(/([a-z])|([^a-z])/gi,function(m,g1){ return g1 ? "M" : "X" });} Then it can be used as simple as: "test1".traverse();
score: 0
type: Answer

http://stackoverflow.com/a/25478610
upvote count: 1
has comment: http://stackoverflow.com/comment/40068633
score: 1
has body: Now that you've clarified your question, we can give you an actual answer. Click the Share button in jsFiddle's toolbar (after saving your fiddle) to get a link to the result only.
has comment: http://stackoverflow.com/comment/40057106
has comment: http://stackoverflow.com/comment/39776931
downvote count: 0
has comment: http://stackoverflow.com/comment/40100026
has comment: http://stackoverflow.com/comment/40106806
has comment: http://stackoverflow.com/comment/39764039
type: Answer
answers question: http://stackoverflow.com/q/25473194

http://stackoverflow.com/q/25496928
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25497009
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25497009
has title: setting highcharts title in a modal
type: Question
tagged with: highcharts
has body: how do i set a title of highcharts from an element? here is my code: $(function () { var chart; $('#second-chart').highcharts({ chart: { type: 'bar' }, subtitle: { text: 'Assortment # by SKUs' }, xAxis: { categories: ['Lazada', 'C1', 'C2', 'C3'] }, yAxis: { title: { text: '# of SKUs' }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, tooltip: { valueSuffix: '' }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'middle', borderWidth: 0 }, series: [{ name: 'SKU', data: [500, 120, 150, 300] }] }); chart = $('#container').highcharts(); $('#chart-modal').on('shown.bs.modal', function () { var title_string = $(this).closest('.row').find('.form-control').val().toString(); chart.setTitle({ text: title_string}); // alert(title_string); }); }); here is the jsfiddle: http://jsfiddle.net/omp4b291/ what am i doing wrong here

http://stackoverflow.com/q/25530322
tagged with: angular-ui-router
has body: I use the new deferIntercept() of ui-router to update the browser url without reloading my controller: $rootScope.$on('$locationChangeSuccess', function(e, newUrl, oldUrl) { e.preventDefault(); if ($state.current.name !== 'search') { $urlRouter.sync(); } $urlRouter.listen(); }); With this code, a click on the browser's back button changes the URL to the previous one, but I'm not able to update my controller state to mirror this change. $stateParams still contains the values set when the user first loaded the page. What's the best way to update the $state and $stateParams objects inside my controller when the user click the back button or change the URL manually ? thanks !
has answer: http://stackoverflow.com/a/25859767
score: 9
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 9
tagged with: angularjs
type: AnsweredQuestion
downvote count: 0
has title: ui-router deferIntercept and state params
accepted answer: http://stackoverflow.com/a/25859767
type: Question

http://stackoverflow.com/a/25548398
score: 0
has comment: http://stackoverflow.com/comment/39892110
has comment: http://stackoverflow.com/comment/39891779
type: Answer
has body: without dataType data: {orderDetailsArray :orderDetailsArray}, with dataType dataType: "json", data: JSON.stringify({orderDetailsArray:orderDetailsArray}),
answers question: http://stackoverflow.com/q/25548358
has comment: http://stackoverflow.com/comment/39892389
has comment: http://stackoverflow.com/comment/39891755

http://stackoverflow.com/comment/39814472
type: QuestionComment
comment on: http://stackoverflow.com/q/25506025
score: 0
has text: `return noWeekEnds(date);` will never work as this function ends on first return.
type: Comment

http://stackoverflow.com/comment/39714346
score: 0
type: QuestionComment
type: Comment
has text: Try using `(.*?)` instead.
comment on: http://stackoverflow.com/q/25452261

http://stackoverflow.com/comment/39725407
type: Comment
has text: Did you consider adding an onclick handler to each car instead of the container?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25457911

http://stackoverflow.com/q/25518438
has title: How to append <form:input path="" /> into table using jquery?
favorite count: 0
has comment: http://stackoverflow.com/comment/39837885
downvote count: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39837991
has comment: http://stackoverflow.com/comment/39837981
has comment: http://stackoverflow.com/comment/39837937
type: Question
has comment: http://stackoverflow.com/comment/39837989
upvote count: 0
accepted answer: http://stackoverflow.com/a/25518527
score: -2
answer count: 1
tagged with: jsp
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25518527
has body: I want to add row if user press button add. I using jsp and jquery .append(), but it's doesnt work I tired to try this append for <form:input path=""> into table. HTML code <fmt:message key='fileMapping.parameter.sequence' /> Add sequence <form:input path="sequence" id="sequence" cssClass="validate[required]" cssErrorClass="error validate[required]" /> <form:errors path="sequence" cssClass="error" /> <form:radiobutton path="value" id="default" value=""/> Default <form:radiobutton path="value" id="startCharacter" value=""/> Start character <form:input path="firstCharacterPosition" id="firstCharacterPosition" cssClass="validate[required]" cssErrorClass="error validate[required]"/> Length <form:input path="length" id="length" cssClass="validate[required]" cssErrorClass="error validate[required]"/> <form:radiobutton path="value" id="dateTime" value=""/> Date & Time <form:select path=""> <form:option value="">DATE</form:option> <form:option value="">DATE AND TIME</form:option> </form:select> remove Javascript code $("#addSequence").click(function(){ $("#fileMappingTable:last").append( " " + " " + "<form:\input path='sequence' id='sequence' cssClass='validate' cssErrorClass='error validate' />" + "<form:\errors path='sequence' cssClass='error' />" + " " + " " + "<form:radiobutton path='value' id='default' value=''/> Default " + "<form:radiobutton path='value' id='startCharacter' value=''/> Start character " + "<form:input path='firstCharacterPosition' id='firstCharacterPosition' cssClass='validate[required]' cssErrorClass='error validate[required]'/>" + " Length " + "<form:input path='length' id='length' cssClass='validate[required]' cssErrorClass='error validate[required]'/> " + "<form:radiobutton path='value' id='dateTime' value=''/> Date & Time " + "<form:select path=''>" + "<form:option value=''>DATE</form:option>" + "<form:option value=''>DATE AND TIME</form:option>" + "</form:select> " + " " + " " + "remove" + " " + " " ); }); if i click the button with id="addSeque…

http://stackoverflow.com/comment/39742525
type: Comment
comment on: http://stackoverflow.com/q/25452322
type: QuestionComment
has text: So give yourself access to it in your redraw function... either pass it in as an argument, or create both functions in the same scope.
score: 0

http://stackoverflow.com/q/25497784
has body: var understand = true; while( ){ console.log("I'm learning while loops!"); understand = false; } What should I add in the parentheses to make it print "I'm learning while loops!"
has comment: http://stackoverflow.com/comment/39799346
has title: How to do this while loop
accepted answer: http://stackoverflow.com/a/25497808
downvote count: 7
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39799367
has comment: http://stackoverflow.com/comment/39799384
has comment: http://stackoverflow.com/comment/39799399
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/39799283
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/25497808
score: -7
possible better answer: http://stackoverflow.com/a/25497822
favorite count: 0
has answer: http://stackoverflow.com/a/25497822
has comment: http://stackoverflow.com/comment/39799356
has comment: http://stackoverflow.com/comment/39799298

http://stackoverflow.com/a/25480973
downvote count: 0
answers question: http://stackoverflow.com/q/25480939
has body: This is simple Conditional (ternary) Operator which is same as if(i + 1 == count){ i = 0; } else{ i = i+1; } Just a suggestion it could be just i = (i+1) % count;
has comment: http://stackoverflow.com/comment/39771752
type: Answer
has comment: http://stackoverflow.com/comment/39775240
score: 6
upvote count: 6

http://stackoverflow.com/a/25410391
has comment: http://stackoverflow.com/comment/39640548
accepted answer of: http://stackoverflow.com/q/25410357
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39641598
answers question: http://stackoverflow.com/q/25410357
has comment: http://stackoverflow.com/comment/39636751
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39643214
has comment: http://stackoverflow.com/comment/39638887
downvote count: 0
score: 1
has body: You'll need to call stopPropagation: jsPlub.bind("dblclick", function(e) { e.stopPropagation(); // Do the rest of your stuff }); This will prevent the event from getting bubbled up.

http://stackoverflow.com/comment/39609333
type: Comment
type: QuestionComment
has text: you are adding the 'shackle' class to the `svg` you need to add it to the `svg` element with class `handle`
comment on: http://stackoverflow.com/q/25395569
score: 0

http://stackoverflow.com/a/25508742
has comment: http://stackoverflow.com/comment/39821244
has comment: http://stackoverflow.com/comment/39819902
has comment: http://stackoverflow.com/comment/39819950
type: Answer
has comment: http://stackoverflow.com/comment/51198506
has comment: http://stackoverflow.com/comment/51198124
has comment: http://stackoverflow.com/comment/39819861
has comment: http://stackoverflow.com/comment/39820338
has body: You can reset inputs quite easy. If that does not work for you, you might store the file somwhere. DEMO $("button#1").click(function(){ //check file alert($("input").val()); return false; }); $("button#2").click(function(){ //reset form $("form")[0].reset(); return false; }); $("button#3").click(function(){ //replace input $("input").replaceWith($('&lt;input type="file"/&gt;')); return false; });
answers question: http://stackoverflow.com/q/25507737
score: 0
has comment: http://stackoverflow.com/comment/39819672
has comment: http://stackoverflow.com/comment/39820896

http://stackoverflow.com/comment/39852762
has text: How do you go about doing that at runtime?
score: 0
comment on: http://stackoverflow.com/q/25526673
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25424423
score: 0
answers question: http://stackoverflow.com/q/25424174
type: Answer
has body: Try like this: $.ajaxSetup({ headers: { "cache-control": "no-cache" } });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25424174

http://stackoverflow.com/comment/39809756
type: Comment
has text: You didn't mention changing it in the question.
type: AnswerComment
comment on: http://stackoverflow.com/a/25503635
score: 0

http://stackoverflow.com/comment/39706711
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25448383
has text: I recommend to learn about promises: http://learn.jquery.com/code-organization/deferreds/. Maybe looking at http://stackoverflow.com/search?q=%5Bjquery%5D+Execute+Ajax+calls+in+series helps as well.

http://stackoverflow.com/a/25431228
score: 0
type: Answer
has body: The download attribute is not (yet) supported from IE. It belongs to the Html 5 specification and therefore it will most probably appear somewhen in newer IE versions. To support IE you need to use some "workarounds" (like making a request to server [it would be very clever to use the text/csv MIME type for an Accept header on a request to a REST API], or maybe some flash-plugin)
answers question: http://stackoverflow.com/q/25416989

http://stackoverflow.com/comment/39721211
type: QuestionComment
comment on: http://stackoverflow.com/q/25455791
score: 3
has text: you shouldn't put inline scripts in a script tag that references an external script
type: Comment

http://stackoverflow.com/a/25472478
has body: You can change the CSS style of the H1 element to come to this result. It is explained here: https://stackoverflow.com/a/9361133/2433843 h1 { display: inline; } For your second part of the question, implementing a backspace, I am not sure what you mean. Perhaps you would like to strip spaces?
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39752083
answers question: http://stackoverflow.com/q/25472425
downvote count: 0
type: Answer

http://stackoverflow.com/a/25479551
answers question: http://stackoverflow.com/q/25479498
score: 2
accepted answer of: http://stackoverflow.com/q/25479498
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: You're loosing the context of your check boxes. It works for yes, because you use this, but for the no items, you just grab every 'no box' on the document using jQuery('.opt_no'). Because it's so broad, all 'no box' boxes are affected. You can very easily narrow your selectors with this syntax: jQuery('selector', context). In this case, I recommend this.parentNode like so : jQuery('.opt_yes', this.parentNode).removeClass('selected') See my demo here: http://jsfiddle.net/m5aug81a/ For more info on using contexts for your jQuery objects, see here
type: Answer

typeahead
type: Tag
tags question: http://stackoverflow.com/q/25466889
tag name: typeahead
tags question: http://stackoverflow.com/q/25438545

http://stackoverflow.com/comment/39726774
type: Comment
has text: Do not allow the Date object to parse strings, it's notoriously inconsistent across browsers (even when using the single format specified by [*ECMA-262 ed 5*](http://ecma-international.org/ecma-262/5.1/#sec-15.9.1.15)). Parse the strings manually (e.g. my browser things 12/02/2014 is 2 December, 2014 and 28/08/2014 is invalid).
type: AnswerComment
comment on: http://stackoverflow.com/a/25458634
score: 0

http://stackoverflow.com/a/25450319
type: Answer
has body: onclick="window.history.go(-1); return false;"
answers question: http://stackoverflow.com/q/25450154
score: 0

http://stackoverflow.com/q/25431640
has answer: http://stackoverflow.com/a/25431744
has comment: http://stackoverflow.com/comment/39676177
type: Question
possible better answer: http://stackoverflow.com/a/25431744
has comment: http://stackoverflow.com/comment/39676234
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25456880
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25456880
has comment: http://stackoverflow.com/comment/39676158
has comment: http://stackoverflow.com/comment/39676108
has title: JQuery accessing PHP generated content
tagged with: php
has body: I have &lt;?php include('print.php') ?&gt; That echoes html code inside my document, and after I load it I can't access the divs by id with jQuery $("#"+divId) It doesn't work even from chrome's console. I can access them with plain javascript document.getElementById(divId) If I hardcode the divs I can access them via jQuery. Can anyone explain me why php-generated code is not accessible via jQuery?
type: AnsweredQuestion

http://stackoverflow.com/comment/39804237
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25490007
has text: filename is 159005-57123123.PDF and link is not undefined.

http://stackoverflow.com/q/25550627
tagged with: morris.js
tagged with: javascript
has comment: http://stackoverflow.com/comment/39898349
tagged with: dev-to-production
favorite count: 0
has comment: http://stackoverflow.com/comment/39897362
has answer: http://stackoverflow.com/a/45050310
has comment: http://stackoverflow.com/comment/39896824
has title: morris.js chart doesn't work on production server
type: UnansweredQuestion
has body: I have this morris.js chart which I populated with random values (the ones provided in the exemple). Whereas it renders perfectly in localhost, once I upload on the production server it no longer works. Set up JS code new Morris.Line({ element: 'daily-chart', data: [ { y: '2006', a: 100, b: 90 }, { y: '2007', a: 75, b: 65 }, { y: '2008', a: 50, b: 40 }, { y: '2009', a: 75, b: 65 }, { y: '2010', a: 50, b: 40 }, { y: '2011', a: 75, b: 65 }, { y: '2012', a: 100, b: 90 } ], xkey: 'y', ykeys: ['a', 'b'], labels: ['Series A', 'Series B'] }); HTML code &lt;div id="daily-chart" style="height: 350px; width: 1000px"&gt; &lt;/div&gt; Rendering In Chrome/Opera Despite the width and height set up in the #daily-chart &lt;div&gt;, the dimensions are not set up properly. I only see one part of the chart, the rest being hidden. It's about 50px width despite of &lt;div id="daily-chart" style="height: 350px; width: 1000px"&gt;. In Firefox The script gets busy or does not respond at all. I get the following message : A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete. with Continue|Stop script choices and the browser freezes. It states that the line is the 1164 which is a while condition : while ((t = d.getTime()) &lt;= dmax) { // &lt;-- 1164 line if (t &gt;= dmin) { ret.push([spec.fmt(d), t]); } spec.incr(d); } No errors in console or whatsoever except when I stop the script where I get : Error: Script terminated by timeout at: Morris.labelSeries@https://&lt;url&gt;/js/uncompressed/morris.js:1164:1 Morris.Line&lt;/Line.prototype.drawXAxis@https://&lt;url&gt;/js/uncompressed/morris.js:930:11 Morris.Line&lt;/Line.prototype.draw@https://&lt;url&gt;/js/uncompressed/morris.js:890:9 Morris.Grid&lt;/Grid.prototype.redraw@https://&lt;url&gt;/js/uncompressed/morris.js:472:9 Morris.Grid&lt;/Grid.prototype.setData@https://&lt;url&gt;/js/uncompressed/morris.js:338:9 Grid@https://&lt;url&gt;/js/u…
upvote count: 1
linked to: http://stackoverflow.com/q/23061821
score: 1
tagged with: raphael
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/48264546
has comment: http://stackoverflow.com/comment/39897231
has comment: http://stackoverflow.com/comment/39898718
downvote count: 0
has comment: http://stackoverflow.com/comment/39899199

http://stackoverflow.com/q/25485395
possible better answer: http://stackoverflow.com/a/25485491
has answer: http://stackoverflow.com/a/25485491
tagged with: angularjs
has answer: http://stackoverflow.com/a/25485511
has title: How to show content based on template file in angular js
type: AnsweredQuestion
tagged with: wordpress
has body: I am a newbie to angular js, In my web applictaion I have to display some content only on a specific page but I dont Know how to achieve it. Here is my template of HTML (showContent.html), by this template my all pages are generating, and the url of my page where I just want to show content is http://localhost/myapps/top/ So I tried something like this: Week Month Year All {{post.id}} but its not working and my content is totally hide by this condition. So how can I achieve in angular js to display my this content only on http://localhost/myapps/top/ page. TIA
type: Question
accepted answer: http://stackoverflow.com/a/25485511
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25474196
linked to: http://stackoverflow.com/q/1478295
has answer: http://stackoverflow.com/a/25479522
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39760402
has comment: http://stackoverflow.com/comment/39755196
has comment: http://stackoverflow.com/comment/39755207
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39755242
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39757094
has comment: http://stackoverflow.com/comment/39759156
has comment: http://stackoverflow.com/comment/39755396
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39759144
type: Question
has answer: http://stackoverflow.com/a/25474456
has title: Completely page loaded event
has body: I have a page with multiple dropdown boxes. I want to make some dropdowns as ready only after the AJAX finish the dropdown content load and the default value selection. So in each dropdown's Ajax function, I have complete: function () { $("#Country").enable(); $("#ORG_ID").enable(); $('#Country option[value="@TempData["Country"]"]').prop('selected', true).change(); $('#ORG_ID option[value="@TempData["ORG_ID"]"]').prop('selected', true).change(); } "@TempData["Country"]"] is an ASP.NET MVC Razor variable. I hope after all the Ajax events are fired and completed, the JavaScript DOM can set the Country and ORG_ID field as ready only with the codes - &lt;script type="text/javascript"&gt; function pageLoad() { document.getElementById('Country').readOnly = true; document.getElementById('ORG_ID').readOnly = true; } &lt;/script&gt; It is supposed that pageLoad or window.onload will be fired after AJAX's complete event is finished. But after pageLoad has been set the Ajax events still continue to fire for the changes. The readOnly can never be set for these fields. What have I missed? Is there a more complete page load event than pageLoad or window.onload in Javescript? Thanks Update: The AJAX call is from $(document).ready(function () { GetCountry(); } The above AJAX function codes are in function GetCountry() { $("#Country").disable(); $("#ORG_ID").disable(); $.ajax({ type: 'POST', url: '@Url.Action("GetCountry/" + ViewBag.Id.ToString(), "RequestList")', data: { Direct: isDirect }, success: function (data, textStatus, jqXHR) { if (textStatus != "success") { alert("There was an error processing your request."); return; } $.each(data, function (i, item) { $('#Country').append($('&lt;option&gt;').val(item.Id).text(item.Text)); }); }, error: function (jqXHR, textStatus, errorThrown) { alert("There was an error processing your request."); }, complete: function () { $("#Country").enable(); $("#ORG_ID").enable(); $('#Country option[value="@TempData["Country"]"]').prop('selected',…
tagged with: asp.net-mvc

http://stackoverflow.com/a/25403373
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25403113
has body: Your question is related to usemin, see the doc here: https://github.com/yeoman/grunt-usemin Simply replace the comment in your index.html to this: &lt;!-- build:js(./) /dashboard/scripts/vendor.js --&gt; which means: &lt;!-- build:PATH_WHERE_TO_FIND_FILES DESTINATION_PATH --&gt; To replace ngmin by ngAnnotate: Modify your Gruntfile: Replace: // ngmin tries to make the code safe for minification automatically by // using the Angular long form for dependency injection. It doesn't work on // things like resolve or inject so those have to be done manually. ngmin: { dist: { files: [{ expand: true, cwd: '.tmp/concat/scripts', src: '*.js', dest: '.tmp/concat/scripts' }] } }, By ngAnnotate: { options: { singleQuotes: true }, dist: { files: [{ expand: true, cwd: '.tmp/concat/scripts', src: '*.js', dest: '.tmp/concat/scripts' }] } }, And replace: grunt.registerTask('build', [ 'clean:dist', 'wiredep', 'useminPrepare', 'concurrent:dist', 'autoprefixer', 'concat', 'ngmin', 'copy:dist', 'cdnify', 'cssmin', 'uglify', 'filerev', 'usemin', 'htmlmin' ]); By: grunt.registerTask('build', [ 'clean:dist', 'wiredep', 'useminPrepare', 'concurrent:dist', 'autoprefixer', 'concat', 'ngAnnotate', 'copy:dist', 'cdnify', 'cssmin', 'uglify', 'filerev', 'usemin', 'htmlmin' ]); Run these 2 commands to modify your package.json: 1. npm uninstall grunt-ngmin --save 2. npm install grunt-ng-annotate --save
has comment: http://stackoverflow.com/comment/39625939
score: 4
has comment: http://stackoverflow.com/comment/39626028
type: AcceptedAnswer
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/25403113

http://stackoverflow.com/comment/39749400
type: Comment
score: 1
type: AnswerComment
has text: by the way, keep in mind that when you use content-editable, the user will be able to insert all sorts of html into here, he can even paste images and there will be and image tag in there. you can manage this by handling paste and keystroke events. It's quite complex so I wont go into details unless its requested.
comment on: http://stackoverflow.com/a/25470980

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/25476349
tags question: http://stackoverflow.com/q/25459665
tag name: datetimepicker
tags question: http://stackoverflow.com/q/25412660

http://stackoverflow.com/comment/39890061
has text: As mobiles are of 900px and less , you can add class "visible-md and visible-lg" in div having id "bs-example-navbar-collapse-2" . Hope this would help !!
comment on: http://stackoverflow.com/a/25546689
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39618040
has text: didn't say it had to be dynamic, just said that your solution is unmaintainable in the long run. You don't have to post a solution just for me since i'm not the one needing it. I do however like the fact that you used the sliders' value instead of an intermediate value.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25399668
type: AnswerComment

http://stackoverflow.com/comment/39836910
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25517783
has text: You can try "Compatibility View". But as far as I know IE doesn't have a dropdown to roll back to older versions.

http://stackoverflow.com/a/25429368
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39672199
answers question: http://stackoverflow.com/q/25428561
has comment: http://stackoverflow.com/comment/39672208
has comment: http://stackoverflow.com/comment/39672413
has comment: http://stackoverflow.com/comment/39671955
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25428561
has comment: http://stackoverflow.com/comment/39674016
has comment: http://stackoverflow.com/comment/39672271
has body: You were right, you do need stopPropagation. The same click event that expands the sub-list is propagating up the chain, where the click handler on body immediately hides it again. You can also simplify your code in a few places. Try this: $('#nav &gt; li').on('click', function(e) { e.stopPropagation(); $('ul', this).show(); }); $('body').on("click", function () { $("#nav ul").hide(); }); Demo: http://jsfiddle.net/d60Lcq9j/1/ EDIT: Here's a slightly more complex version that lets you close the submenu with a second click to its header. This version doesn't stop event propagation: $('#nav li').on('click', function(e) { if (e.target === this) { $(this).children('ul').toggle(); } }); $('body').on("click", function (e) { var item = $(e.target).closest('#nav &gt; li'); $('#nav &gt; li') .not(item) .find('ul') .hide(); }); Demo: http://jsfiddle.net/Luk35kb6/
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39671987
score: 1

http://stackoverflow.com/q/25405667
accepted answer: http://stackoverflow.com/a/25405770
type: Question
has body: Using javascript (including jQuery), I’m trying to replace all but the last non-breaking space if multiple words are joined. For example: Replace A&amp;#160;String&amp;#160;of&amp;#160;Words with A String of&amp;#160;Words
has answer: http://stackoverflow.com/a/25405811
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has title: Regex to replace all but the last non-breaking space if multiple words are joined?
tagged with: regex
possible better answer: http://stackoverflow.com/a/25405887
has answer: http://stackoverflow.com/a/25405887
has answer: http://stackoverflow.com/a/25405770
type: AnsweredQuestion

http://stackoverflow.com/q/25454014
has answer: http://stackoverflow.com/a/25454032
tagged with: divider
score: 0
answer count: 2
tagged with: function
tagged with: javascript
has body: //divider is here How do I get the results to be on separate lines like: "You chose Rock. The computer chose Scissors. Rock smashes Scissors. You win!" as opposed to "You chose Rock. The computer chose Scissors. Rock smashes Scissors. You win!"
has answer: http://stackoverflow.com/a/25454116
accepted answer: http://stackoverflow.com/a/25454032
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25454116
type: AnsweredQuestion
type: Question
has title: How do I seperate text by lines in this divider?

http://stackoverflow.com/q/25529428
score: 0
has answer: http://stackoverflow.com/a/25529632
answer count: 1
has body: I want to Send DataSourceRequest object from a JavaScript function to a MVC Controller end-point, that filters an IQueryable taking into account the filter applied to the grid dataSource and then exports the result data into excel. this is what I'm doing on my javascript: exportData = function () { var grid = $("#QuoteGrid").data("kendoGrid"); var parameterMap = grid.dataSource.transport.parameterMap; var sortData = grid.dataSource.sort(); var filterData = grid.dataSource.filter(); var groupData = grid.dataSource.group(); var data = parameterMap({ sort: sortData, filter: filterData, group: groupData }); var request = $.toJSON(data); location.href = CUSTOMER_QUOTES_EXPORT_URL + "?request=" + request; return false; } This is my mvc controller end-point public FileResult ExportQuotes([DataSourceRequest]DataSourceRequest request) { ... } But the request parameter never gets populated with the data passed by the JavaScript call, as you can see from the pictures I've attached: What I'm doing wrong ? Thanks in advance for your help
tagged with: jquery
tagged with: kendo-ui
has title: Send DataSourceRequest object from a JavaScript function to a MVC Controller end-point
tagged with: asp.net-mvc-4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25529632
type: Question
tagged with: kendo-grid
tagged with: javascript

http://stackoverflow.com/comment/39760768
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25476678
type: AnswerComment
has text: _(Also, why call the async method at all in the factory?)_ Oh wow, why indeed. I've only done simple projects with Angular, so I was clinging to the "keep shared data/states out of controllers" mantra rather ineptly. I've left the `getNetworkInterfaces` method in the factory as `service.network_interfaces`, but moved the invocation of it into the controller and it works perfectly as expected now.

http://stackoverflow.com/comment/45212541
comment on: http://stackoverflow.com/a/25455767
type: AnswerComment
score: 0
type: Comment
has text: No... I tried all versions of Chrome including the experimental one, this callback simply doesn't work, bug was reported but it seems like they ignored it. What I did was manual callback, first I check the video duration and I set a callback after this amount of time, this callback will remove the video element. It's not a proper way, but it worked.

http://stackoverflow.com/a/25497975
has body: Have a look here for generic error handling Have a look at below working example from my application. My ExceptionController @ExceptionHandler(Exception.class) public ModelAndView getExceptionPage(Exception e, HttpServletRequest request) { BaseLoggers.exceptionLogger.error("Exception in Controller", e); if (isAjax(request)) { ModelAndView model = new ModelAndView("forward:/app/webExceptionHandler/ajaxErrorRedirectPage"); request.setAttribute("errorMessageObject", e.toString()); return model; } else { ModelAndView model = new ModelAndView("forward:/app/webExceptionHandler/nonAjaxErrorRedirectPage"); request.setAttribute("errorMessageObject", e.toString()); request.setAttribute("errorViewName", "error"); return model; } } //AnotherController where request is forwarded. // this mapping is responsible for rendering view for all exceptions in nonAjax calls. @RequestMapping(value = "/nonAjaxErrorRedirectPage") public String nonAjaxErrorRedirectPage(HttpServletRequest request, Model model) { Locale loc = RequestContextUtils.getLocale(request); String nonAjaxErrorMsg = messageSource.getMessage("label.error.msg.nonAjaxCalls", null, loc); model.addAttribute("errorMessage", nonAjaxErrorMsg); String errorViewName = (String) request.getAttribute("errorViewName"); return errorViewName; } // this mapping is responsible for sending error message with suitable error code for all exceptions in Ajax calls. @RequestMapping(value = "/ajaxErrorRedirectPage") @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) @ResponseBody public String ajaxErrorRedirectPage(HttpServletRequest request, Model model) { Locale loc = RequestContextUtils.getLocale(request); String ajaxErrorMsg = messageSource.getMessage("label.error.msg.ajaxCalls", null, loc); return ajaxErrorMsg; }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25497820

http://stackoverflow.com/a/25439252
accepted answer of: http://stackoverflow.com/q/25439162
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25439162
has body: This worked: $('.spectacle-contenu').children().on('mousedown touchstart', function () { $('.grab-contenu').val($(this).index() + 1); }); JSFiddle example. You can get rid of the +1 if you want a 0-based index instead. You were using .length, which is: Description: The number of elements in the jQuery object. By trying to get the .length, you were getting the number of elements in the parent, not the index of the element like you wanted.

http://stackoverflow.com/q/25430216
has comment: http://stackoverflow.com/comment/39677027
answer count: 0
has comment: http://stackoverflow.com/comment/39674077
has comment: http://stackoverflow.com/comment/39674260
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/39675319
has comment: http://stackoverflow.com/comment/39674861
has comment: http://stackoverflow.com/comment/39677153
tagged with: http://stackoverflow.com/tag/html
tagged with: input
score: 0
has body: I've been working on a site using angular and have came across a problem filling in an input. I have a form which I pull info in from a factory to let the user update their default settings. I use input type="number" like this: &lt;div class="div-table-row"&gt; &lt;input type="number" min="0" data-ng-model="locDefaults.NoDaysDlvryInst" /&gt; &lt;/div&gt; for integers. It works well and lets them use the up/down arrows like I want. However when I try to use the similar logic with decimal numbers it won't pull in my angular data... I've found a couple things online, but nothing worked. Most recently, I tried the logic this fiddle uses. It didn't work for me, but here is my code: HTML: &lt;div class="div-table-row"&gt; &lt;input type="number" step="0.01" data-ng-model="locDefaults.WarnNearCapacity" decimal-places /&gt; &lt;/div&gt; custom angular directive: myApp.directive('decimalPlaces',function(){ return { link:function(scope,ele,attrs){ ele.bind('keypress',function(e){ var newVal=$(this).val()+(e.charCode!==0?String.fromCharCode(e.charCode):''); if($(this).val().search(/(.*)\.[0-9][0-9]/)===0 &amp;&amp; newVal.length&gt;$(this).val().length){ e.preventDefault(); } }); } }; }); Has anyone run into this issue before? The data being pulled in will be a number like 0.950 it's used to represent a percentage so I really want to find a way to use the up/down arrow control to change the number.
has comment: http://stackoverflow.com/comment/39677077
has title: Using input type="number" with decimal angular data
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/39674947

http://stackoverflow.com/comment/39946314
has text: @PatrickW.McMahon I mean, your should have posted your original comment not to my answer but rather to OP's question.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25532451
type: Comment

http://stackoverflow.com/comment/39732407
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25461885
has text: that was the explanation, where is the code?
type: Comment

http://stackoverflow.com/q/25408419
has comment: http://stackoverflow.com/comment/39633366
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39633858
linked to: http://stackoverflow.com/q/18244696
has title: Json data is not getting loaded into Jqgird
has comment: http://stackoverflow.com/comment/39632975
answer count: 0
type: UnansweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
linked to: http://stackoverflow.com/q/6960208
has body: I have a Jqgrid that i am trying to load with server side Json data data is not getting loaded into Jqgrid.I am not getting any error either. This is my client side code.. function getdata() { $("#UsersGrid").jqGrid({ url: 'getGriddahico.ashx', datatype: 'json', colNames: ['AccountNumber', 'BillNumber', 'BillDate', 'Oprator', 'CallDate', 'Time', 'Destination', 'DialledNumber', 'CallType', 'Duration', 'CallCost', 'PhoneNumber'], colModel: [ { name: 'AccountNumber', width: 100, sortable: true, align: 'center' }, { name: 'BillNumber', width: 100, sortable: true, align: 'center' }, { name: 'BillDate', width: 100, sortable: true, align: 'center' }, { name: 'Oprator', width: 100, sortable: true }, { name: 'CallDate', width: 100, sortable: true, align: 'center' }, { name: 'Time', width: 100, sortable: true, align: 'center' }, { name: 'Destination', width: 100, sortable: true, align: 'center' }, { name: 'DialledNumber', width: 100, sortable: true, align: 'center' }, { name: 'CallType', width: 100, sortable: true, align: 'center' }, { name: 'Duration', width: 100, sortable: true, align: 'center' }, { name: 'CallCost', width: 100, sortable: true, align: 'center' }, { name: 'PhoneNumber', width: 100, sortable: true, align: 'center' } ], rowNum: 100, rowList: [100, 200, 300], pager: '#UsersGridPager', sortname: 'CallDate', viewrecords: true, ignoreCase: true, sortorder: 'asc', autowidth: true, toppager: true, height: '100%' }); And this is my client side code to get the data in json format.. while(rs.Read()){ if(rc){ json = json + ","; } json = json + "\n{"; json = json + "\"CallCost\":\"" + Convert.ToString(rs["CallCost"]) + "\","; json = json + "\"cell\":[" + Convert.ToString(rs["CallCost"]) + ""; json = json + ",\"" + Convert.ToString(rs["AccountNumber"]) + "\""; json = json + ",\"" + Convert.ToString(rs["BillNumber"]) + "\""; json = json + ",\"" + Convert.ToString(rs["BillDate"]) + "\""; json = json + ",\"" + Convert.ToString(rs["Oprator"]) + "\""; json = json + ",\"" + Con…
type: Question
tagged with: c#
tagged with: jqgrid
has comment: http://stackoverflow.com/comment/39633931
tagged with: javascript
has comment: http://stackoverflow.com/comment/39632898
has comment: http://stackoverflow.com/comment/39633296

http://stackoverflow.com/q/25481656
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25482227
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25482023
has comment: http://stackoverflow.com/comment/39769569
upvote count: 0
has body: I have created a Tic Tac Toe game using plain JavaScript. How can I put whole functions in Global Namespace? When I tried it gave me an error. I never tried using global namespace before. I want to learn more of javascript, so i am trying to make my code better. CodePen HTML ... Start a New Game ... JS var turn = 'X'; var score = { 'X': 0, 'O': 0 }; var gridValue = 0; function fnLoad() { var select = document.getElementById("grid"); for (i = 3; i <= 100; i += 1) { var option = document.createElement('option'); select.options[select.options.length] = new Option(i + ' X ' + i, i); } addEvent(document.getElementById("game"), "click", fnChoose); fnNewGame(); } function addEvent(element, eventName, callback) { if (element.addEventListener) { element.addEventListener(eventName, callback, false); } else if (element.attachEvent) { element.attachEvent("on" + eventName, callback); } } function fnChoose(e) { if (e.target && e.target.nodeName == "TD") { var targetElement = document.getElementById(e.target.id); var prevTurn; if ((targetElement.className).indexOf("disabled") == -1) { targetElement.innerHTML = turn; targetElement.classList.add('disabled'); targetElement.classList.add(turn); score[turn] += 1; prevTurn = turn; turn = turn === "X" ? "O" : "X"; if (fndecide(targetElement, prevTurn)) { alert(prevTurn + ' has won the game'); fnNewGame(); } else if ((score['X'] + score['O']) == (gridValue * gridValue)) { alert('Draw!'); fnNewGame(); } } } } function fndecide(targetElement, prevTurn) { var UL = document.getElementById('game'); var elements, i, j, cnt; if (score[prevTurn] >= gridValue) { var classes = targetElement.className.split(/\s+/); for (i = 0; i < classes.length; i += 1) { cnt = 0; if (classes[i].indexOf('row') !== -1 || classes[i].indexOf('col') !== -1 || classes[i].indexOf('dia') !== -1) { elements = UL.getElementsByClassName(classes[i]); for (j = 0; j < elements.length; j += 1) { if (elements[j].innerHTML == prevTurn) { cnt += 1; } } if (cnt == gridValue) { retur…
type: Question
answer count: 2
tagged with: javascript
score: -1
has title: Global Namespace in JavaScript

http://stackoverflow.com/a/25537468
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25537321
answers question: http://stackoverflow.com/q/25537321
upvote count: 3
score: 3
has body: You can always use $scope.$broadcast or $scope.$emit from the subject controller, and $scope.$on on the observer controller. See docs for more. I'm not sure how your controllers scopes are related hierarchy wise, but you can always user $rootScope.$broadcast.

http://stackoverflow.com/q/25436879
score: 0
has comment: http://stackoverflow.com/comment/39685927
tagged with: payment-processing
answer count: 0
has comment: http://stackoverflow.com/comment/39685958
type: UnansweredQuestion
has title: No 'Access-Control-Allow-Origin' error when calling payment service
type: Question
has body: I am trying to include Securepay on my website. In the documentation is written that I can call this url to perform a short test: https://securepay.epayworldwide.com/securepay/register.php?TID=93999966&amp;Userid=123456789012345678901234567890&amp;Password=transactdemotransactdemotransact&amp;Amount=10000&amp;Currency=EUR&amp;Paymode=direct&amp;TransID=AB_1234 The link itself works fine but when I try to send the request from a Javascript on my page like so: $.ajax({ async:false, complete: function(jqXHR, textStatus){ console.log(jqXHR, textStatus); }, data: { Userid: "123456789012345678901234567890", Password: "transactdemotransactdemotransact", TID: "93999966", Amount: "100", Currency: "EUR", Paymode: "direct" }, type: "GET", url: "https://securepay.epayworldwide.com/securepay/register.php" }); I allways get this error: XMLHttpRequest cannot load https://securepay... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mysite...' is therefore not allowed access. Am I doing something wrong here or am I forgeting about something?
tagged with: javascript
tagged with: jquery
tagged with: ajax

angularjs-directive
tags question: http://stackoverflow.com/q/25412171
tags question: http://stackoverflow.com/q/25397244
tags question: http://stackoverflow.com/q/25506827
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/25493022
tags question: http://stackoverflow.com/q/25518799
tags question: http://stackoverflow.com/q/25490438
tags question: http://stackoverflow.com/q/25484698
tags question: http://stackoverflow.com/q/25515598
tags question: http://stackoverflow.com/q/25544653
tags question: http://stackoverflow.com/q/25526532
tags question: http://stackoverflow.com/q/25496490
tags question: http://stackoverflow.com/q/25448493
tags question: http://stackoverflow.com/q/25413309
tags question: http://stackoverflow.com/q/25453755
tags question: http://stackoverflow.com/q/25396745
tags question: http://stackoverflow.com/q/25394663
tags question: http://stackoverflow.com/q/25496531
tags question: http://stackoverflow.com/q/25485911
tags question: http://stackoverflow.com/q/25497339
tags question: http://stackoverflow.com/q/25408766
tags question: http://stackoverflow.com/q/25459143
tags question: http://stackoverflow.com/q/25431442
tags question: http://stackoverflow.com/q/25507525
tags question: http://stackoverflow.com/q/25516389
tags question: http://stackoverflow.com/q/25397628
tags question: http://stackoverflow.com/q/25510298
tags question: http://stackoverflow.com/q/25431986
tags question: http://stackoverflow.com/q/25455286
tags question: http://stackoverflow.com/q/25402954
tags question: http://stackoverflow.com/q/25484543
tags question: http://stackoverflow.com/q/25389955
tags question: http://stackoverflow.com/q/25489225
type: Tag
tags question: http://stackoverflow.com/q/25436489
tags question: http://stackoverflow.com/q/25463175
tags question: http://stackoverflow.com/q/25490405
tags question: http://stackoverflow.com/q/25507905
tags question: http://stackoverflow.com/q/25463239
tags question: http://stackoverflow.com/q/25535850
tags question: http://stackoverflow.com/q/25465158
tags question: http://stackoverflow.com/q/25394683
tags question: http://stackoverflow.com/q/25466394
tags question: http://stackoverflow.com/q/25505116
tags question: http://stackoverflow.com/q/25437321
tags question: http://stackoverflow.com/q/25409497
tags question: http://stackoverflow.com/q/25487207

http://stackoverflow.com/a/76624215
has body: Or you can try to change: data : postData, to data : postData.entries(),
type: Answer
answers question: http://stackoverflow.com/q/25390598
score: 0

http://stackoverflow.com/comment/39807440
comment on: http://stackoverflow.com/q/25501710
score: 0
has text: @Teemu just realized, much appreciated, thanks for your help, if you could put this down as a answer i will accept it :-)
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39738131
type: Comment
type: QuestionComment
has text: @Mritunjay why the downvote if so? (I'll be able to mark your answer in 10 mins)
comment on: http://stackoverflow.com/q/25464947
score: 0

http://stackoverflow.com/q/25421948
has comment: http://stackoverflow.com/comment/39661182
has body: I have xhtml file (JSF app) and I am rendering a datatable with custom column. $(document).ready(function() { $('#example').dataTable( { "ajax": "/app_api/list/appsportfolio", "columns": [ { "data": "name" }, { "data": "scenarioName" }, { "data": "architecture" }, { "data": "status" }, { "data": "contact" }, { "data": "id", "mRender": function(data, type, row) { return " \ Actions \ \ Views \ Item 3-2 \ Actions \ Item 3-4 \ Item 3-5 \ \ \ "; }} ] } ); $( "#menu" ).menu(); } ); Because of last custom column, I receive: JBWEB000236: Servlet.service() for servlet jsp threw exception: javax.faces.view.facelets.FaceletException: Error Parsing applicationPortfolioList.xhtml: Error Traced[line: 111] Open quote is expected for attribute "id" associated with an element type "ul". I don't understand why it complains about quotes, isn't escaping correct? Even if I put the entire string on the same line, the same error remains. UPDATE: It seems that if I HTML encode the entire string it works fine: Actions Views Item 3-2 Actions Item 3-4 Item 3-5 but this is looks very ugly. If someone knows other solution please let me know.
answer count: 1
has answer: http://stackoverflow.com/a/25422169
type: AnsweredQuestion
tagged with: facelets
tagged with: jsf
accepted answer: http://stackoverflow.com/a/25422169
score: 0
has title: Why I receive "Error parsing..." in javascript multiline string?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39669078
has text: Perhaps instead you should just [`.finish()`](http://api.jquery.com/finish/) the animation at once? Won't work on CSS animations, though.
score: 0
comment on: http://stackoverflow.com/q/25428017
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39822234
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25505614
type: Comment
has text: Hey MT, did you try this solution in your app? Or did you have any concerns?

http://stackoverflow.com/comment/39999661
type: Comment
score: 1
has text: Usually all the script should go in your AngularJS Controller, and there you can access your data using $scope. There are some videos on youtube where you can find nice examples.
type: QuestionComment
comment on: http://stackoverflow.com/q/25535563

http://stackoverflow.com/comment/39788466
has text: @BNL Even on doing so, properties are received as null. I have added the GET request in my question which does show the parameter values though.
comment on: http://stackoverflow.com/a/25491611
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39697532
has text: One in every post loaded but only one in each post
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25443086
type: QuestionComment

http://stackoverflow.com/comment/39896513
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25550090
has text: That is really awesome thing and what I need! Thank you, I'll probably use this code =)
type: AnswerComment

http://stackoverflow.com/q/25461158
tagged with: jquery
has answer: http://stackoverflow.com/a/25461266
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25461236
tagged with: http://stackoverflow.com/tag/html
tagged with: iteration
has body: I made: http://jsfiddle.net/ablueman/sfjL9kyr/ and wanted to apply this to a class. So every DIV I put that class in, it would show the width and height. I started trying to create it but I've hit a brick wall: http://jsfiddle.net/ablueman/2uvpk2d5/ In the first DIV it puts 2 working div sets in. In the second DIV it puts 2 non-working div sets in. I've tried everything I can think of, but Im sure its just a fundamental error. Please help. if ($('div').hasClass('change')) { $('.change').each(function (iterate, val) { twoDivs = "&lt;div id='changelog"+iterate+"'&gt;&lt;/div&gt;&lt;div style='clear: right;'&gt;&lt;/div&gt;"; $('.change').append(twoDivs); $("#changelog"+iterate).text(' W: ' + $('.change').width() + 'px , H:' + $('.change').height() + 'px '); $(window).resize(function() { $("#changelog"+iterate).text(' W: ' + $('.change').width() + 'px , H:' + $('.change').height() + 'px '); }); }); } Andy
accepted answer: http://stackoverflow.com/a/25461266
tagged with: css
type: AnsweredQuestion
has title: Iteration of Jquery functions
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25461236

http://stackoverflow.com/a/25466156
has body: Your isPrime function will only make one iteration of the loop this is because you have a return statement in both your if and else statements. You could also speed your prime checker up quit a bit by building an constant array of known primes and checking against that first before you loop.
score: 0
has comment: http://stackoverflow.com/comment/39740411
answers question: http://stackoverflow.com/q/25466000
type: Answer
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/25415291
type: Answer
answers question: http://stackoverflow.com/q/25415026
score: 4
has body: Here's some edits. Note that I'm doing this without really checking, so typeos and mistakes are altogether possible, but the gist of it should make sense. var abyssApp = angular.module('abyssApp', []); abyssApp.service('abyssData', function($http) { this.products = $http.get('http://abyss.local/products.php'); }); abyssApp.controller('ItemListCtrl', function($scope, abyssData) { abyssData.products.then(function(data) { console.log(data); $scope.items = data; }).catch(function(err){console.log(err);}); }); I made it a service rather than a factory since you really only need a service (singleton) there. A factory would be appropriate if there were different URLs you'd be calling, and wanted to do something like product = new abyssData('potatoes') or something. Generally speaking, $http returns a promise object, which itself isn't the data you need, but instead will resolve to the data you need. This promise pattern is repeated a lot in angular (and is getting more and more popular in other javascript venues, because it's awesome (IMO)). That means, on the promise object, you call the .then() method and pass in a function to be called when the promise is resolved. The $http resolves with the result of the XHR. Other promises resolve with other things. At the end of the promise .then stack, it's good form to put a .catch() call, because exceptions thrown inside a promise generally go into the bitbucket unless you explicitly look for them. It's an in-general flaw to the way promises work, and means you have to be careful for exceptions. With older JS engines, you need to change that to .then()'catch', as catch is kind of a funny word in places. But I'm 90% sure that any JS environment that chokes on .catch won't run angular anyway.
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25415026
has comment: http://stackoverflow.com/comment/39646467

http://stackoverflow.com/comment/39844471
type: Comment
has text: and if you want to check and add the sum as the user selects (one at a time) then it will be done like this: http://jsfiddle.net/85bkfaqh/2/
comment on: http://stackoverflow.com/a/25522260
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39623305
score: 0
type: Comment
type: QuestionComment
has text: yeah, i know, i wantedd to know if there is such method...nevermind,for now on, always using arrays!
comment on: http://stackoverflow.com/q/25403120

http://stackoverflow.com/comment/39886140
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25545206
has text: @SSA not quite. In the solution offered the textvalue is always the last child. In my case my `td`can contain many things (including other html-tags\elements) which would have to be removed aswell. The problem isn't limited to simply replacing the text
score: 0

http://stackoverflow.com/comment/39605739
score: 0
type: Comment
type: QuestionComment
has text: If `Element.value === ''` then they didn't fill it out. Get used to doing everything AJAX, as well. Just a tip for the future.
comment on: http://stackoverflow.com/q/25393468

http://stackoverflow.com/q/25426849
favorite count: 0
has title: ExtJS load nested JSON
has body: I have nested json file. I use it to load treepanel. The problem is: when I load tree, it loads the whole json file. { "success": true, "data": [{ "id": "A", "name": "Parent", "data": [{ "id": "Aa", "name": "Child", "data": [{ "id": "Aaa", "name": "Grandchild", "data": [{ "id": "Aaaa", "name": "Grandgrandchild", "leaf": true, }] }] }] }] } So when I load tree all the store is loaded and when I expand folders nothings loads. I want it to work differently. I mean when I load the treepanel, only the first level of store loads, in this example, only parent should load, when I expand Parent folder, then the store loads Child, when I expand Child folder then it loads GrandChild folder. I need this because i have really big nested json file and I can't load it immediately full. Below is my store: Ext.define('Values.store.ThisStore', { extend: 'Ext.data.TreeStore', model: 'Values.model.Item', proxy: { type: 'rest', format: 'json', url: 'data/vg1', reader: { type: 'json', root: 'data' } } }); I know it should be simple to do, but I can't get it how. Looking forward for answers, thanks in advance! UPDATE I solved the problem, as I said it was really simple. Thanks "Sreek521" anyway. The main idea was to split one big json to several small jsons. I will show it: The big json looks that: { "success": true, "data": [{ "id": "A", "name": "Parent", "data": [{ "id": "Aa", "name": "Child", "data": [{ "id": "Aaa", "name": "Grandchild", "data": [{ "id": "Aaaa", "name": "Grandgrandchild", "leaf": true, }] }] }] }] } And it loads whole file instantly. but if you split it this way: root.json { "success": true, "data": [{ "id": "A", "name": "Parent" }] } A.json { "success":true, "data": [{ "id": "Aa", "name": "Child", }] } Aa.json { "success":true, "data": [{ "id": "Aaa", "name": "GrandChild", }] } Aaa.json { "success":true, "data": [{ "id": "Aaaa", "name": "GrandgrandChild", "leaf": true }] } Everything works just fine! Hope this problem solution will help others too, because it took me …
tagged with: tree
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25427044
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25427044
tagged with: extjs
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/39680873
has text: Thanks for looking into it!!! Can you please help with creating a working example with arrows showing atleast Height and Width both... Also is there any way to show both side arrows? If not can I simply replace the same code with line? Thanks one again... Also please update ur post in the answer so I can accept...
score: 1
comment on: http://stackoverflow.com/q/25432540
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25446108
score: 0
has body: newArray.set1 = newSet1; newArray.set2 = newSet2;
type: Answer
answers question: http://stackoverflow.com/q/25445957

http://stackoverflow.com/comment/39660805
type: Comment
comment on: http://stackoverflow.com/a/25423065
score: 0
type: AnswerComment
has text: OK, but basically in order to do that you'd have to use either node or browserify. Op seems to just want a mechanism for managing libraries on the client side rather than hooking into an engine

http://stackoverflow.com/comment/39818059
type: Comment
score: 1
type: QuestionComment
has text: Given it is a `click` on a link: `#serverDropdown ul li a`, you want to prevent the link to be followed using either `return false;` at the end or add the `ev` parameter to the function and doing `ev.preventDefault()`.
comment on: http://stackoverflow.com/q/25507806

http://stackoverflow.com/a/25494767
has body: function tagOverTime(tagToSearch) { var output=" " + tagtosearch + " "; var byDate = {}; for (var i = 0; i < data.data.length; i++) { var obj = data.data[i]; var tagsArray = obj.tags; if (tagsArray && containsObject(tagToSearch, tagsArray) { if (byDate[obj.date]) { // Have we already seen this date? byDate[obj.date]++; } else { // No, initialize it to 1 byDate[obj.date] = 1; } } } for (var date in byDate) { output += ' ' + date + ' - ' + byDate[date] + ' occurrences '; } output += ' '; document.getElementById("output").innerHTML=output; }
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/25494654
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25494654
type: Answer

http://stackoverflow.com/q/25393796
tagged with: firefox-addon
answer count: 1
has title: 'is undefined' using a html-table in a simple for-loop
has answer: http://stackoverflow.com/a/25393855
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39605901
has comment: http://stackoverflow.com/comment/39605883
upvote count: 1
downvote count: 1
type: Question
tagged with: html-table
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39605940
has body: I'm new to javascript and using the firefox sdk. I want to simply loop through a HTML-table. When I run the code I get a "Message: TypeError: table.rows[i].cells[1] is undefined" but the loop is working as intended, the problem is that the code after the loop is not executed. When I replace the variable 'i' with 0 or any other positive integer it works just fine and the code after the loop is executed. What have I missed? Thank you. for (var i = 0; table.rows[i].cells[1].innerHTML != null; i++){ console.log(table.rows[i].cells[1].innerHTML); } console.log("this line does not execute"); Solved it using: for (var i = 1; i &lt; table.rows.length-1; i++)

http://stackoverflow.com/comment/39896797
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25550792
type: QuestionComment
has text: If you're trying to match `X-Y`, then match that, rather than matching both numbers separately. What exactly are you trying to match? There is probably a better solution.

http://stackoverflow.com/comment/39702405
comment on: http://stackoverflow.com/a/25420973
has text: Who ever downvoted for this ans I am looking for a valid reason from him, may be help me out!
type: Comment
score: 0
type: AnswerComment

ubuntu
tags question: http://stackoverflow.com/q/25512316
tags question: http://stackoverflow.com/q/25505077
tag name: ubuntu
type: Tag

http://stackoverflow.com/comment/39623244
score: 0
has text: http://jsfiddle.net/arunpjohny/aaks69Lr/1/
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25403528

backbone.js
tags question: http://stackoverflow.com/q/25460121
tags question: http://stackoverflow.com/q/25399978
tags question: http://stackoverflow.com/q/25479453
tags question: http://stackoverflow.com/q/25528761
tags question: http://stackoverflow.com/q/25469800
tags question: http://stackoverflow.com/q/25411853
tags question: http://stackoverflow.com/q/25529000
tags question: http://stackoverflow.com/q/25395213
tags question: http://stackoverflow.com/q/25497200
tags question: http://stackoverflow.com/q/25463320
tags question: http://stackoverflow.com/q/25418495
tags question: http://stackoverflow.com/q/25450253
tags question: http://stackoverflow.com/q/25512808
tags question: http://stackoverflow.com/q/25472428
tags question: http://stackoverflow.com/q/25499263
tags question: http://stackoverflow.com/q/25532759
tags question: http://stackoverflow.com/q/25392463
tags question: http://stackoverflow.com/q/25536147
tags question: http://stackoverflow.com/q/25516112
tags question: http://stackoverflow.com/q/25545644
tags question: http://stackoverflow.com/q/25524369
tags question: http://stackoverflow.com/q/25457150
tags question: http://stackoverflow.com/q/25425786
tags question: http://stackoverflow.com/q/25550380
tags question: http://stackoverflow.com/q/25402090
tags question: http://stackoverflow.com/q/25489998
tags question: http://stackoverflow.com/q/25482884
tags question: http://stackoverflow.com/q/25451502
tags question: http://stackoverflow.com/q/25413313
tags question: http://stackoverflow.com/q/25436161
tags question: http://stackoverflow.com/q/25478329
tags question: http://stackoverflow.com/q/25524019
tags question: http://stackoverflow.com/q/25508362
tags question: http://stackoverflow.com/q/25511721
tags question: http://stackoverflow.com/q/25473606
tags question: http://stackoverflow.com/q/25514492
tags question: http://stackoverflow.com/q/25536254
tags question: http://stackoverflow.com/q/25536704
tags question: http://stackoverflow.com/q/25503634
tags question: http://stackoverflow.com/q/25535383
tags question: http://stackoverflow.com/q/25442960
tags question: http://stackoverflow.com/q/25453721
tags question: http://stackoverflow.com/q/25451260
tags question: http://stackoverflow.com/q/25454048
tags question: http://stackoverflow.com/q/25514510
tags question: http://stackoverflow.com/q/25421683
tags question: http://stackoverflow.com/q/25438614
type: Tag
tags question: http://stackoverflow.com/q/25394693
tags question: http://stackoverflow.com/q/25523785
tags question: http://stackoverflow.com/q/25460745
tags question: http://stackoverflow.com/q/25432603
tags question: http://stackoverflow.com/q/25494828
tag name: backbone.js

http://stackoverflow.com/a/25528524
has body: If you want, here is another possibility: $(document).on('keydown', function( e ){ if ( e.keyCode === 38 ) { $('.child').stop(1,0).animate({ 'bottom' : '50px' }, 250).animate({ 'bottom' : '0px' }, 250); } }); Adding the .stop(1,0) will keep the block in the air as long as you repeatedly press the up key and will also stop queuing. http://jsfiddle.net/duwtbux0/5/ This might not be what you are looking for, but it is worth mentioning.
upvote count: 3
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39855597
answers question: http://stackoverflow.com/q/25528226
type: Answer

http://stackoverflow.com/q/25546284
has answer: http://stackoverflow.com/a/25610492
type: Question
tagged with: c#
has body: During ASP.Net development i am often unsure weather i should be performing some functionality using an ajax request vs handling it all on the client with JavaScript. I often will want to use Jquery ajax functions in order to speed development up and improve maintainability even though i can achieve the same result without contacting the server. Here is one example. In my MVC view i need to update a partial view in response to a button click. Here is a simplified version of my partial view @foreach (Requestbox.Code.XmlContentField xmlControl in Model.RequestContentControls) { if (Model.IsInEditMode) { ViewContext.Writer.Write(" Edit Delete"); } switch (xmlControl.ControlType) { case "TextBoxField": @Html.DevExpress().Label(settings => { settings.Name = xmlControl.FieldName + "Label"; settings.AssociatedControlName = xmlControl.FieldName + "TextBox"; settings.Text = xmlControl.LabelText; }).GetHtml() @Html.DevExpress().TextBox(settings => { settings.Name = xmlControl.FieldName + "TextBox"; MvcExtensionHelpers.SetTextBoxSettings(settings); settings.ControlStyle.CssClass += " full-width"; }).GetHtml() break; case "Header": string header = string.Format("<{0}>{1}</{0}>", xmlControl.HeaderType,xmlControl.Value); @Html.Raw(header) break; } if (Model.IsInEditMode) { ViewContext.Writer.Write(" "); } } When the Edit button is clicked i need to wrap each of my sections in a div and add 2 anchor elements with onclick functions inside. I can do this by using an ajax post request and setting the Model with "IsInEditMode to true" here is the code i could call, which replaces the current partial view with the new one. function EnableEditClick() { $.post(rootDir + "Admin/EditClick",null, function(partialViewResult){ $("#refTable").html(partialViewResult); }); } Here is the Action that could handle the ajax request public ActionResult EditClick() { MyModel model = new MyModel(); model.IsInEditMode = true; return PartialView("CustomRequest", model); } This is one solution, another wo…
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25546454
answer count: 2
has title: How to decide when to use Ajax vs Javascript for maintainability
tagged with: javascript
tagged with: partial-views
score: 0
tagged with: maintainability
type: UnansweredQuestion

http://stackoverflow.com/q/25446966
answer count: 1
tagged with: jquery
tagged with: jquery-select2
has answer: http://stackoverflow.com/a/25448394
has body: I couldn't find any documentation on deleting tags with the delete or backspace key like you can with jquery tokeninput: http://loopj.com/jquery-tokeninput/ Can you do that with select2?
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25448394
has title: Select2 delete tag with backspace
tagged with: jquery-tokeninput
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39725091
type: QuestionComment
has text: `$(this).value` won't work. `$(this)` is a jQuery object, `value` is a DOM property. It should either be `this.value` or `$(this).val()`. Also, `this` should be `obj`.
comment on: http://stackoverflow.com/q/25457734
score: 0
type: Comment

http://stackoverflow.com/comment/39721071
has text: It seems that `">"` is valid since jQuery 1.8. It's not valid before.
comment on: http://stackoverflow.com/a/25455560
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/25489289
has title: How to submit (or not submit) a form based on the result of an Ajax request?
tagged with: javascript
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25489459
score: 0
has comment: http://stackoverflow.com/comment/39783229
tagged with: ruby-on-rails-4
has answer: http://stackoverflow.com/a/25489780
tagged with: asynchronous
has answer: http://stackoverflow.com/a/25489459
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39783238
possible better answer: http://stackoverflow.com/a/25489780
type: Question
answer count: 2
has body: I have a form on my site where users submit stuff and get results &lt;form accept-charset="UTF-8" action="/submit-stuff" data-remote="true" method="post"&gt; &lt;!-- various form fields --&gt; &lt;input type="submit" value="Run Code" id="submit-button"&gt; &lt;/form&gt; Before submitting their info to the backend, I try to get the results in Javascript. If I can get the results, I return false in Javascript to prevent the form submission. $('#submit-button').click(function() { if(canGetResults()){ //deal with submission and then return false; } //the button will work as usual if canGetResults is false or there's an error }); This works fine, but now I want to try to get the results through another ajax request and only submit to my regular backend if that fails. I call the following code after the button is clicked: $.post("http://example.com/submit-stuff", json, function(data) { //do stuff with data }); However, it's asynchronous (so I can't return results from it) so the code reaches return false even when the other ajax attempt fails. How should I fix this so it only submits to my own backend when the ajax attempt failed? I could change the $.post to $.ajax and make it synchronous, but that's not usually recommended. Alternatively, I can submit the form within the $.post callback, but how should I submit the whole form from there? And would it still submit if there's an error or http://example.com/submit-stuff doesn't work?

http://stackoverflow.com/q/25396137
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25398099
tagged with: ruby-on-rails
type: Question
has body: This maybe a simple question but i still cant find the answer Basically, how do I have a link/button to prompt an error if it met a certain condition ? With the example below, it will prompt on the link, but you can select yes/no. &lt;%= link_to 'Void', void_invoice_path(@invoice), data: { confirm: 'Are you sure you want to void the invoice ?' } %&gt; Thats not what I want. For example in this case, void button/link cannot work if there exist payment. I would like to still allow the user to click on the link but a javascript error prompts up. Thanks.
score: 0
accepted answer: http://stackoverflow.com/a/25398099
tagged with: ruby-on-rails-4
answer count: 1
tagged with: javascript
tagged with: jquery
has title: rails ujs link_to for prompting error on a certain condition

http://stackoverflow.com/q/25430991
linked to: http://stackoverflow.com/q/1313373
duplicate of: http://stackoverflow.com/q/1313373
upvote count: 0
tagged with: javascript
favorite count: 0
type: Question
has body: I've got this script which is working fine but i have 2 download buttons, one called downloadButton and one called downloadButtonUS. How can i make it so when either button is clicked? $(window).load(function(){ $('.downloadButton').click(function(){ $(".dlm").replaceWith(function(){
score: -1
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25431013
has title: How can i use this script with 2 buttons
type: UnansweredQuestion

http://stackoverflow.com/comment/39655126
type: Comment
comment on: http://stackoverflow.com/q/25420297
has text: This is my code but it is hard to explain. @MohitArora it is not what i want. I want change specific menu icon for all sub menus.
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39837177
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25517954
has text: That's what I thought it was but I'm having a hard time figuring out how to make it unique as I am still fairly new at coding could anyone show me an example?

http://stackoverflow.com/a/25425961
answers question: http://stackoverflow.com/q/25422938
score: 0
type: Answer
has body: We Can solve this by keeping $.support.cors = true; above JQuery Ajax call

http://stackoverflow.com/comment/39740335
type: QuestionComment
comment on: http://stackoverflow.com/q/25465980
score: 0
has text: I cant figure how to get this modal to work on plunkr. I have everything in place http://plnkr.co/edit/SZI4cvNCP96v3tHxJFeR?p=preview
type: Comment

http://stackoverflow.com/a/25522603
accepted answer of: http://stackoverflow.com/q/25522328
score: 3
has comment: http://stackoverflow.com/comment/39845092
answers question: http://stackoverflow.com/q/25522328
type: AcceptedAnswer
downvote count: 0
has body: Your Javascript Code is wrong, to open a Bootstrap 3 Modal you should use: $('#pageopen').modal({ show: true }); If you want to load an external Page, you can set the url here: $('#pageopen').modal({ show: true, remote: 'http://www.example.com' }); And better use the jQuery click Function instead of "onClick".
type: Answer
upvote count: 3

http://stackoverflow.com/comment/39784014
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25489607
has text: Your `checkboxes` variable is misleading since it contains all input elements on the page, which is probably why your loop starts from index `i = 1`.

http://stackoverflow.com/a/25442325
has body: try to create new instance of uploader with another name and try with uploader2 and bind with QueueChanged .
type: Answer
answers question: http://stackoverflow.com/q/25440360
score: 0

http://stackoverflow.com/a/25569472
has body: I would use an authentication plugin. You can use multiple authentication strategies at the same time, you are not limited to one. Here is an example how to do it: var Hapi = require('hapi'); var server = new Hapi.Server(3000); server.pack.register([require('hapi-auth-basic'), require('hapi-auth-cookie')], function(err) { server.auth.strategy('simple', 'basic', { ... }); server.auth.strategy('session', 'cookie', { ... }); server.route({ method: 'GET', path: '/', auth: { strategies: ['simple', 'session'] }, handler: function(request, reply) { reply('success'); } }); server.start(function() { console.log('Server running at:', server.info.uri); }); }); See Authentication for more details: When specifying one strategy, you may set the strategy property to a string with the name of the strategy. When specifying more than one strategy, the parameter name must be strategiesand should be an array of strings each naming a strategy to try. The strategies will then be attempted in order until one succeeds, or they have all failed.
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25478175
answers question: http://stackoverflow.com/q/25478175
has comment: http://stackoverflow.com/comment/39940652
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39941166
type: Answer

http://stackoverflow.com/a/25493381
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39791688
has body: You are using jQuery 1.5 and on() was not added until jQuery 1.7 hence the error. You need to upgrade to a newer version of jQuery. Since 1.5 to 1.7 had some big changes, would not be surprised if the date picker code would have issues. So you might have to load a newer version of jQuery in noConflict mode.
answers question: http://stackoverflow.com/q/25493155

http://stackoverflow.com/comment/39638169
has text: I succeeded in loading the data, but how can I create marker on these coordinates? Where should I put the code?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25410972
type: Comment

http://stackoverflow.com/comment/39638747
type: Comment
comment on: http://stackoverflow.com/q/25411232
type: QuestionComment
has text: @tymeJV The implementation of `contains` provides a more readable and understandable meaning. Why get the index when you don't care?
score: 0

http://stackoverflow.com/q/25426821
accepted answer: http://stackoverflow.com/a/25426931
has answer: http://stackoverflow.com/a/25426884
has body: I have eight Forms in a page (Form0, Form1, Form2 and so on). When a form is submitted, data is handed by JS and send to ReassignPreg.php, which search data in DB and send it back with json. Then the proper divs on the page are updated. The code below is doing its job. But I have eigh copies of almost the same code, one for each Form (I only copy two of them for brevity). Newbie and amateur as I am, I wander which would be the way for synthesize this code (get Form name, and then pass that to only one function). &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("#Form0").submit(function(){ var cadena = $(this).serialize(); $.get('ReassignPreg.php?cadena='+cadena, function(row2){ var text = row2; var obj = JSON.parse(text); var imagen='&lt;img src="../ImageFolder/'+obj.File+'.png" width="530" /&gt;' $("#PregBox00").html(imagen) $("#PregBox01").html(obj.Clase) $("#PregBox02").html(obj.Dificultad) $("#PregBox03").html(obj.Tipo) }); return false; }); }); $(document).ready(function(){ $("#Form1").submit(function(){ var cadena = $(this).serialize(); $.get('ReassignPreg.php?cadena='+cadena, function(row2){ var text = row2; var obj = JSON.parse(text); var imagen='&lt;img src="../ImageFolder/'+obj.File+'.png" width="530" /&gt;' $("#PregBox10").html(imagen) $("#PregBox11").html(obj.Clase) $("#PregBox12").html(obj.Dificultad) $("#PregBox13").html(obj.Tipo) }); return false; }); }); &lt;/script&gt;
type: Question
has answer: http://stackoverflow.com/a/25426855
tagged with: javascript
tagged with: forms
answer count: 3
possible better answer: http://stackoverflow.com/a/25426855
downvote count: 0
has answer: http://stackoverflow.com/a/25426931
tagged with: jquery
favorite count: 0
score: 2
has title: Know which Form is submitted
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39666705
upvote count: 2

http://stackoverflow.com/comment/39683529
has text: You are correct. That was fast. Thank you very much. I didn't think of looking into the link with the display:none elements.
comment on: http://stackoverflow.com/q/25435423
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25475165
downvote count: 1
has comment: http://stackoverflow.com/comment/39758950
has comment: http://stackoverflow.com/comment/39757474
has comment: http://stackoverflow.com/comment/39758523
answers question: http://stackoverflow.com/q/25475070
has body: add an EventListener to your HTML, which manages the state of your HTML. Within that listener function should be a condition to test whenever something has changed, once that is true, it can invoke torek(). If you want a more detailed example, tell me what behavior you seek, exactly. This gets the functionality you seek, though will need some finetuning: var button = document.getElementsByClassName('toggleButton')[0]; button.addEventListener('click', checkMargin, true); function checkMargin() { var iv = window.setInterval(check, 20); window.setTimeout(killLoop, 3000); function check() { var m = window.getComputedStyle(boxOne).getPropertyValue('margin-left'); if (m === '30px' || m === '200px') { console.log('did something'); } else { console.log('did nothing'); console.log(m); } } function killLoop() { clearInterval(iv); } }
has comment: http://stackoverflow.com/comment/39756931
upvote count: 0
has comment: http://stackoverflow.com/comment/39757798
type: Answer
has comment: http://stackoverflow.com/comment/39758250
has comment: http://stackoverflow.com/comment/39758693
has comment: http://stackoverflow.com/comment/39758104
score: -1
has comment: http://stackoverflow.com/comment/39758158

http://stackoverflow.com/comment/39608434
type: QuestionComment
type: Comment
score: 1
has text: Why not use a mixin for each command? Or just use a route with a dynamic segment. Here the segment will be the 'type attribute'. So you can use the same route for all the commands. You can put up ur api code at the route level.
comment on: http://stackoverflow.com/q/25391561

http://stackoverflow.com/comment/112937738
score: 1
has text: Looks great. But this caveat --> "Note: Safari is supported on desktop and iPad, but not on iPhone. This is a limitation in the browser, not in Screenfull."
comment on: http://stackoverflow.com/a/62130555
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39663347
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25424442
has text: Yeah i cannot type anything and it is still blank when using dark template
score: 0

http://stackoverflow.com/comment/124045520
has text: this seems to have worked for me. I was able to change the newwindow.location and load the page i wanted after json returned.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/39730240
type: Comment

http://stackoverflow.com/a/25455531
has comment: http://stackoverflow.com/comment/39836389
downvote count: 0
has comment: http://stackoverflow.com/comment/39784810
has comment: http://stackoverflow.com/comment/45021702
type: Answer
has comment: http://stackoverflow.com/comment/45682892
score: 1
answers question: http://stackoverflow.com/q/25455432
upvote count: 1
has body: document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Mask", "1.0") should do it

http://stackoverflow.com/a/25443047
has body: This might help you: http://api.jquery.com/jquery.unique/ http://jsfiddle.net/xb14h1ev/1/ HTML: Content1 goes here Content1 goes here too Content1 goes here again extra node JS: var filterarray = ["Content1", "goes"]; $(function(){ totalSum = 0; var divs = []; for (i=0;i<filterarray.length;i++){ $( "div.content:contains('"+ filterarray[i] +"')").css( "display", "block" ); $.merge(divs, $( "div.content:contains('"+ filterarray[i] +"')")); } totalSum = $.unique(divs).length; $("#results").append("Total Results: " +totalSum); });
answers question: http://stackoverflow.com/q/25442744
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25442744
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39896462
has text: add center-map on that location
type: Comment
comment on: http://stackoverflow.com/q/25550395
type: QuestionComment
score: 0

http://stackoverflow.com/q/25477474
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39761398
accepted answer: http://stackoverflow.com/a/25477537
type: Question
has comment: http://stackoverflow.com/comment/39761339
has body: Ok, so its been a while since I've built a website, and I'm trying to blow out the cobwebs, so to speak. I have built the following website: http://pinkgiraffecakes.tk/ As you may have noticed, it takes a long time to load the Title Bar. I am aware that you can pre-load images using Java and CSS, but the solutions provided all seem to be for use on other pages (i.e. pre load images on the home page so they are quicker to appear on other pages). What I would like to do, is to pre-load the title bar and all the other associated images, store them to the cache, THEN show the homepage. Is this possible? If so, could someone please provide sample code or a link to a tutorial on how to achieve this. Thanks.
has comment: http://stackoverflow.com/comment/39761424
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39761364
has title: Pre-loading a website title banner & adding it to Cache
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39761356
has answer: http://stackoverflow.com/a/25477537
linked to: http://stackoverflow.com/q/9240479
score: 0
has comment: http://stackoverflow.com/comment/39761344

http://stackoverflow.com/a/25442522
accepted answer of: http://stackoverflow.com/q/25442462
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 6
has body: That's not working because your $(document).ready(... line runs before jQuery loads, and so it fails because either $ is undefined (throwing a ReferenceError) or it refers to something other than jQuery. Also, you're calling jQuery.noConflict() before jQuery is loaded, and if that call did work, it would mean that $ no longer referred to jQuery at all, so $(document).ready(... still wouldn't work. In any modern browser, you can use the load event on the script element you're adding, which tells you that the script has been loaded. Probably best to pass a callback into a call you make to includejquery.js, like this: includejquery.js: function includejQuery(callback) { if(window.jQuery) { // jQuery is already loaded, set up an asynchronous call // to the callback if any if (callback) { setTimeout(function() { callback(jQuery); }, 0); } } else { // jQuery not loaded, load it and when it loads call // noConflict and the callback (if any). var script = document.createElement('script'); script.onload = function() { jQuery.noConflict(); if (callback) { callback(jQuery); } }; script.src = "http://code.jquery.com/jquery-2.1.1.min.js"; document.getElementsByTagName('head')[0].appendChild(script); } } Changes there: In includejquery.js, just define a function and wait to be called. Have that function accept a callback. Have it wait for the script to load. When the script is loaded, call jQuery.noConflict and then, if there's a callback, call it and pass in the jQuery function. In the HTML, I'm calling the function, and receiving the argument it passes me as $, so within that function only, $ === jQuery even though outside it, it doesn't (because of noConflict).
upvote count: 6
answers question: http://stackoverflow.com/q/25442462

http://stackoverflow.com/comment/39650259
score: 0
comment on: http://stackoverflow.com/q/25417483
type: Comment
has text: try using `defer` attribute along with or instead of `async`, as the hint explicitly recommends deferring.
type: QuestionComment

http://stackoverflow.com/q/25469434
score: 2
type: AnsweredQuestion
type: Question
has body: I have created a simple line chart using (the excellent) D3. It has a threshold value represented as a horizontal red line. What I would like to do is calculate the positions where the value line intersects the threshold line, like so: I can get pretty close because I have access to the data array, but I need to be very accurate and for it to work at all scales. If anyone can help I would be extremely grateful. Many thanks. Fiddle is here &lt;div id="chart"&gt;&lt;/div&gt; path.line { stroke-width: 2; fill: none; } var data = [{ "time": "2014-02-25T19:00:00Z", "temp": "39.08" }, { "time": "2014-02-25T21:00:00Z", "temp": "39.51" }, { "time": "2014-02-25T23:00:00Z", "temp": "39.14" }, { "time": "2014-02-26T01:00:00Z", "temp": "40.79" }, { "time": "2014-02-26T03:00:00Z", "temp": "41.17" }, { "time": "2014-02-26T05:00:00Z", "temp": "40.39" }, { "time": "2014-02-26T07:00:00Z", "temp": "40.49" }, { "time": "2014-02-26T09:00:00Z", "temp": "40.29" }, { "time": "2014-02-26T11:00:00Z", "temp": "39.90" }, { "time": "2014-02-26T13:00:00Z", "temp": "39.66" }, { "time": "2014-02-26T15:00:00Z", "temp": "39.01" }, { "time": "2014-02-26T17:00:00Z", "temp": "37.91" }, { "time": "2014-02-26T19:00:00Z", "temp": "39.64" }, { "time": "2014-02-26T21:00:00Z", "temp": "38.21" }, { "time": "2014-02-26T23:00:00Z", "temp": "39.60" }, { "time": "2014-02-27T01:00:00Z", "temp": "40.13" }, { "time": "2014-02-27T03:00:00Z", "temp": "40.51" }, { "time": "2014-02-27T05:00:00Z", "temp": "40.78" }, { "time": "2014-02-27T07:00:00Z", "temp": "40.54" }, { "time": "2014-02-27T09:00:00Z", "temp": "40.29" }, { "time": "2014-02-27T11:00:00Z", "temp": "40.24" }, { "time": "2014-02-27T13:00:00Z", "temp": "40.00" }, { "time": "2014-02-27T15:00:00Z", "temp": "40.01" }, { "time": "2014-02-27T17:00:00Z", "temp": "38.96" }, { "time": "2014-02-27T19:00:00Z", "temp": "39.20" }, { "time": "2014-02-27T21:00:00Z", "temp": "40.14" }, { "time": "2014-02-27T23:00:00Z", "temp": "38.71" }, { "time": "2014-02-28T01:00:00Z", "t…
linked to: http://stackoverflow.com/q/15798566
has answer: http://stackoverflow.com/a/25500469
has comment: http://stackoverflow.com/comment/39803498
tagged with: math
tagged with: javascript
has title: Finding threshold intersection in a D3 chart
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/39749022
has comment: http://stackoverflow.com/comment/39768555
downvote count: 0
has answer: http://stackoverflow.com/a/25482454
accepted answer: http://stackoverflow.com/a/25482454
favorite count: 0
possible better answer: http://stackoverflow.com/a/25500469
has comment: http://stackoverflow.com/comment/39753773
tagged with: d3.js

http://stackoverflow.com/comment/39844644
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25522318
has text: i just included the structure of what i am looping through. I just took out the customer data

http://stackoverflow.com/comment/39695551
type: QuestionComment
has text: Why are you using JavaScript for this instead of a regular form submission?
comment on: http://stackoverflow.com/q/25442387
score: 0
type: Comment

http://stackoverflow.com/a/25393102
has comment: http://stackoverflow.com/comment/39648860
has body: I think this is what you're looking for: function tableToJson(table){ var r = []; $(table+' &gt; tbody &gt; tr').each(function(){ var e = $(this); r.push({address:e.attr('name'), number:e.text()}); }); return r; } Of course, the above creates an Array of Objects. You can see their name and values like: var tblRws = tableToJson('#tableId'); $.each(tblRws, function(i, v){ console.log('Row:'+i+'; Address:'+v.address+'; Number:'+v.number+';'); }); I'm not sure why you wanted to JSON.strigify() the results. If it's for AJAX, you can just use an Object as the data argument. Also, you might want to set your dataType for the type of data you would like back from the Server.
downvote count: 0
has comment: http://stackoverflow.com/comment/39647979
has comment: http://stackoverflow.com/comment/39643779
type: AcceptedAnswer
score: 1
has comment: http://stackoverflow.com/comment/39648863
has comment: http://stackoverflow.com/comment/39605123
has comment: http://stackoverflow.com/comment/39647305
has comment: http://stackoverflow.com/comment/39647925
answers question: http://stackoverflow.com/q/25392857
type: Answer
has comment: http://stackoverflow.com/comment/39648815
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25392857
has comment: http://stackoverflow.com/comment/39647886

http://stackoverflow.com/comment/39664274
score: 0
has text: Can you update me your fiddle with code to close curent div? e.g. click on item 1 again, closes item 1.
comment on: http://stackoverflow.com/q/25424279
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25505358
has answer: http://stackoverflow.com/a/25506118
has comment: http://stackoverflow.com/comment/39812989
tagged with: java
has comment: http://stackoverflow.com/comment/39813139
type: Question
has comment: http://stackoverflow.com/comment/39813565
has body: I need your help and assistant in viewing the number of rows on each printed table at the top of it. I am using the below code to get the rows count: function count() { var tables = document.getElementsByClassName("tablesorter"); var rows; for (var i = 0; i < tables.length; i++) { rows = tables[i].rows.length-1; alert(rows); span.innerHTML = rows; } Currently the rows number are displayed in alerts and I want the number of the rows to be displayed in the html. I am printing the tables through while loop based on the retrieved values from the DB and they are having the same class and name. The class name is tablesorter and the id is detailsid . I tried to print the number of the rows in the span, however it prints only above the first table. It prints first 22 and then it was overwrited with 30 where the 30 should be printed above the second table. Here is my code for printing <% while (rs.next()) { count=0; name=rs.getString("name"); if (!(subcategory_name1).equals(temp_subcategory_name) ) { i=0; %> <%=category_name1%> / <%=subcategory_name1%> No. Name <% } %> <%=i%> <%=name%> Kindly assit me in printing the number of the rows above each table
linked to: http://stackoverflow.com/q/18539992
has title: Printing rows count above each table
answer count: 1
tagged with: jsp
tagged with: record-count
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39815646
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion

http://stackoverflow.com/comment/39806653
has text: Without highcharts-ng module works properly or not?
comment on: http://stackoverflow.com/q/25454184
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39746376
comment on: http://stackoverflow.com/a/25447211
type: AnswerComment
has text: Could you provide the full HTML and JS then please, and I'll try to answer your question again. Use jsfiddle or something like that to host the code.
score: 0
type: Comment

http://stackoverflow.com/comment/39817390
type: AnswerComment
type: Comment
score: 0
has text: Downvoter: please help me improve this answer by leaving some feedback. Thanks.
comment on: http://stackoverflow.com/a/25507503

http://stackoverflow.com/comment/39829276
score: 0
type: Comment
has text: Running "meteor add npm" seemed to sort it. That error has gone away now so looks like its working. :)
type: AnswerComment
comment on: http://stackoverflow.com/a/25508490

http://stackoverflow.com/comment/39617942
type: Comment
has text: I am using google script. In fact the code is being published from Google Script editor. Both google script and HTML files are edited & published in the editor. Google Script has a lot in common with Javascript
type: QuestionComment
comment on: http://stackoverflow.com/q/25400172
score: 0

http://stackoverflow.com/q/25454321
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25455938
tagged with: combobox
tagged with: extjs4.1
has body: I have an extjs grid which shows data from a store. The last column is always empty except for the entry in store where, a flag is_deleted=0(Only one entry will have is_deleted=0). I have to show a combobox for this entry with values edit and delete. The current grid code I have is as follows: Ext.define('TasoDesktop.view.taso.popups.accountComments.AccountCommentsGrid', { extend: 'Ext.grid.GridPanel', alias: 'widget.tasoAccountCommentsGrid', title: 'Previous Comments', initComponent: function () { this.store = 'AccountLevelComments'; this.columns = [ { header: 'Date Entered', dataIndex: 'modified_dt', flex: 0}, { header: 'Comment', dataIndex: 'c_comment', flex: 0 }, { header: 'Entered by', dataIndex: 'sid', flex: 0 }, { header: 'Expiry Date', dataIndex: 'valid_until_dt', flex: 0 }, { header: 'Action', flex: 0 } ]; this.height = 400; this.width = 900; this.viewConfig = { stripeRows: true }; this.autoScroll = true; this.callParent(arguments); } }); Only one of the Action column( with is_deleted = 0 in the store) should have the combo-box. How should I include the combobox for it based on the store value?
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25473437
tagged with: extjs
score: 0
tagged with: extjs4
has title: Add combobox in extjs grid for only one row

http://stackoverflow.com/comment/39722223
comment on: http://stackoverflow.com/a/25456286
score: 0
type: AnswerComment
has text: I assumed those other properties would be set statically in the CSS as shown, he only needs to use JS to vary the image.
type: Comment

regex
tags question: http://stackoverflow.com/q/25520667
tags question: http://stackoverflow.com/q/25460670
tags question: http://stackoverflow.com/q/25478076
tags question: http://stackoverflow.com/q/25531276
tags question: http://stackoverflow.com/q/25412866
tags question: http://stackoverflow.com/q/25487013
tags question: http://stackoverflow.com/q/25417037
tags question: http://stackoverflow.com/q/25463853
tags question: http://stackoverflow.com/q/25413541
tags question: http://stackoverflow.com/q/25431635
tags question: http://stackoverflow.com/q/25433489
tags question: http://stackoverflow.com/q/25433413
tags question: http://stackoverflow.com/q/25467045
tag name: regex
tags question: http://stackoverflow.com/q/25401903
tags question: http://stackoverflow.com/q/25452261
tags question: http://stackoverflow.com/q/25436845
tags question: http://stackoverflow.com/q/25436707
tags question: http://stackoverflow.com/q/25430855
tags question: http://stackoverflow.com/q/25503724
tags question: http://stackoverflow.com/q/25528095
tags question: http://stackoverflow.com/q/25524253
tags question: http://stackoverflow.com/q/25491557
tags question: http://stackoverflow.com/q/25513856
tags question: http://stackoverflow.com/q/25438569
tags question: http://stackoverflow.com/q/25472355
tags question: http://stackoverflow.com/q/25507365
tags question: http://stackoverflow.com/q/25467539
tags question: http://stackoverflow.com/q/25546174
tags question: http://stackoverflow.com/q/25391490
tags question: http://stackoverflow.com/q/25548501
tags question: http://stackoverflow.com/q/25506425
tags question: http://stackoverflow.com/q/25425329
tags question: http://stackoverflow.com/q/25541441
tags question: http://stackoverflow.com/q/25436006
tags question: http://stackoverflow.com/q/25495393
tags question: http://stackoverflow.com/q/25478750
tags question: http://stackoverflow.com/q/25448640
tags question: http://stackoverflow.com/q/25448481
tags question: http://stackoverflow.com/q/25416482
tags question: http://stackoverflow.com/q/25472054
tags question: http://stackoverflow.com/q/25533507
tags question: http://stackoverflow.com/q/25524653
tags question: http://stackoverflow.com/q/25430701
tags question: http://stackoverflow.com/q/25508516
tags question: http://stackoverflow.com/q/25432061
tags question: http://stackoverflow.com/q/25418791
tags question: http://stackoverflow.com/q/25546185
tags question: http://stackoverflow.com/q/25535225
tags question: http://stackoverflow.com/q/25485405
tags question: http://stackoverflow.com/q/25445438
tags question: http://stackoverflow.com/q/25447046
tags question: http://stackoverflow.com/q/25392512
tags question: http://stackoverflow.com/q/25533487
tags question: http://stackoverflow.com/q/25481213
tags question: http://stackoverflow.com/q/25390828
tags question: http://stackoverflow.com/q/25441545
tags question: http://stackoverflow.com/q/25438846
tags question: http://stackoverflow.com/q/25422046
tags question: http://stackoverflow.com/q/25474639
tags question: http://stackoverflow.com/q/25544805
tags question: http://stackoverflow.com/q/25449714
tags question: http://stackoverflow.com/q/25471813
tags question: http://stackoverflow.com/q/25485342
tags question: http://stackoverflow.com/q/25498580
tags question: http://stackoverflow.com/q/25524209
tags question: http://stackoverflow.com/q/25469219
tags question: http://stackoverflow.com/q/25497954
tags question: http://stackoverflow.com/q/25456428
tags question: http://stackoverflow.com/q/25405667
tags question: http://stackoverflow.com/q/25398071
tags question: http://stackoverflow.com/q/25456066
tags question: http://stackoverflow.com/q/25518865
tags question: http://stackoverflow.com/q/25546442
tags question: http://stackoverflow.com/q/25426464
tags question: http://stackoverflow.com/q/25532058
tags question: http://stackoverflow.com/q/25549803
tags question: http://stackoverflow.com/q/25461997
tags question: http://stackoverflow.com/q/25446145
tags question: http://stackoverflow.com/q/25425297

http://stackoverflow.com/q/25480917
tagged with: preventdefault
has answer: http://stackoverflow.com/a/25480986
has answer: http://stackoverflow.com/a/25480996
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has body: I have a page with a few links (anchor tags) that are used to call a function. Everything is working as intended but I wonder what is the proper way here to avoid issues with this cross-browser as I've seen different approaches on Google. I use jQuery to call the function instead of inline javascript as this way all my functions are called the same way + I want to call the same function from different elements by using a class. Can someone tell me if the following is the correct approach here to avoid issues cross-browser (IE8, IE9, FF, Chrome) ? Also, do I have to add one of the following or something similar here to my function ? return false; OR e.preventDefault(); My HTML: Site Map My jQuery: $('.showSiteMap').on('click', function() { showSiteMap(); });
type: Question
has title: HTML / jQuery: How to properly call a function on an anchor tag (cross-browser)
tagged with: void
accepted answer: http://stackoverflow.com/a/25480996
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25480986

gmail
type: Tag
tags question: http://stackoverflow.com/q/25447281
tags question: http://stackoverflow.com/q/25447401
tag name: gmail

http://stackoverflow.com/q/25417629
has answer: http://stackoverflow.com/a/25417744
tagged with: jquery
has comment: http://stackoverflow.com/comment/39650355
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Can't focus on textarea after change event in Firefox
has comment: http://stackoverflow.com/comment/39650555
linked to: http://stackoverflow.com/q/5278178
score: 1
accepted answer: http://stackoverflow.com/a/25417744
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39650376
has comment: http://stackoverflow.com/comment/39650603
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39650547
tagged with: javascript
duplicate of: http://stackoverflow.com/q/5278178
has body: Not sure why this doesn't work in Firefox (works fine in Chrome). Basically trying to focus on the current textarea with id "test" after making a change to the text. &lt;textarea id="test"&gt;&lt;/textarea&gt; &lt;textarea id="test2"&gt;&lt;/textarea&gt; And JQuery code: $('#test').change(function() { alert("You entered: "+$(this).val()); $(this).focus(); }); Refer to: http://jsfiddle.net/e0fahvh0/ This is not a duplicate, as the questions asked before (refer to Calling $().focus on a textarea in Firefox doesn&#39;t work as expected) was via a click event, this is a change event and it's somehow different!
has comment: http://stackoverflow.com/comment/39650409
tagged with: firefox
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25487550
tagged with: http://stackoverflow.com/tag/html
has body: I'm using HTML5 video tags in my webpage. I have a small "Watch Video" button that opens a modal displaying this video. Everything works as intended. I am, however, trying to determine what changes in the HTML document (or possibly the DOM?) when I hit the controller's play button. The goal in determining this is to have the video begin playing automatically once the modal is revealed which I plan to do with a small JS script. Also, when I close the modal window, I will have it disappear. I did a few Google searches and started to see people discussing creating custom controllers for these videos which I feel is unnecessary - I want to utilize/modify what is already in existence. To summarize: What is happening when I hit the play/pause controllers in an HTML5 video?
type: UnansweredQuestion
has title: What variable/attribute changes when you hit play on an HTML5 video controller?
tagged with: dom
has answer: http://stackoverflow.com/a/25489908
type: Question
answer count: 1
tagged with: javascript
tagged with: html5-video
score: 0

http://stackoverflow.com/q/25510183
has comment: http://stackoverflow.com/comment/39845144
has title: Check if Google Analytics or Universal Analytics is installed?
type: UnansweredQuestion
has body: I am trying, through javascript, to identify if Google Analytics or Universal Analytics is loaded. Some clients still use the old Google Analytics and we want to roll out a javascript that collects data. So i then need to write code for both versions to make sure it gets tracked regardless if its the normal or universal version of analytics.
has answer: http://stackoverflow.com/a/25512332
tagged with: google-analytics
tagged with: analytics
score: 4
has comment: http://stackoverflow.com/comment/39822647
type: Question
upvote count: 4
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/33097893
has answer: http://stackoverflow.com/a/40715674

http://stackoverflow.com/comment/39821517
has text: Yep. Thank you @Lee & @Teemu. by wrapping everything in `window.onload = function(){...}`
type: AnswerComment
comment on: http://stackoverflow.com/a/25509077
type: Comment
score: 1

http://stackoverflow.com/comment/39780939
has text: @Sebastien Incorrect. An element with `display: none;` behaves exactly like `hidden` and will not take up any space - you're probably confusing it with `visibility: hidden;`
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25487993

http://stackoverflow.com/comment/53751997
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/32950834
type: Comment
has text: Is there way make label out of fancy animation square and make text longer th ananimation box

http://stackoverflow.com/comment/40047551
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25575657
type: Comment
has text: Would you try again? This should make it wait until all the queries have been called.

http://stackoverflow.com/a/25459079
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25446593
type: Answer
has body: Finally I solved it using AJAX as follows, I don't know whether performance wise this method is correct or not, but perfectly worked for me. Write the following code in your JavaScript section. var xmlHttp; //FUNCTION TO CREATE BROWSER COMPATIBLE OBJECT. function createBrowserObject() { if (typeof XMLHttpRequest != "undefined") //Object for Netscape 5+, Firefox, Opera, Safari,and Internet Explorer 7 { xmlHttp = new XMLHttpRequest(); } else if (window.ActiveXObject) //Version for Internet Explorer 5 and 6. { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } if (xmlHttp == null) //Fails on older and nonstandard browsers { alert("Browser does not support XMLHTTP Request"); } } function getDataChange() { if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete") //Check whether server response came back with no errors. { //THE RESPONSE FROM SERVER. DO YOUR STUFF WITH xmlHttp.responseText alert("Responce= "+xmlHttp.responseText); //document.getElementById("cart_div").innerHTML = xmlHttp.responseText; } } function getData() { createBrowserObject();//CREATE BROWSER COMPATIBLE OBJECT.// var url = "http://yourdomain.com/your_script.php"; // URL of server-side resource. // Using following way you can send parameter to your script. //url += "?param1=" + param1 + "&amp;param2=" + param2; xmlHttp.onreadystatechange =getDataChange; //ASSIGN RESPONSE HANDLER FUNCTION NAME TO ONREADYSTATECHANGE// xmlHttp.open("GET", url, true); //INITIATE GET or POST REQUEST. (Here GET) xmlHttp.send(null); // SEND DATA. (Always null in case of GET.) } And finally create event to call "getData()" function. That's it. Thank you..!
score: 0
accepted answer of: http://stackoverflow.com/q/25446593

http://stackoverflow.com/comment/39651089
comment on: http://stackoverflow.com/q/25416349
score: 0
type: Comment
type: QuestionComment
has text: can you show your actual code please? If the error is on drawImage, we'd very much like to see the code involved with calling that

http://stackoverflow.com/comment/39658722
score: 0
type: AnswerComment
type: Comment
has text: Thank you so much, really appreciate your help :). Silly me :( Actually, I did the same thing, but not inside the render function and was wondering why it's not working. You know, when you are trying something for the first time you get excited and don't notice the basic mistakes. Thanks again :)
comment on: http://stackoverflow.com/a/25422275

http://stackoverflow.com/comment/39872171
has text: @matthias_h: unbind will only remove handlers added by javascript. It won't affect the natural behavior of the browser. Also, click events wouldn't be sufficient, since people can use keyboards and such to make selections.
comment on: http://stackoverflow.com/q/25537080
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39647886
has text: You send JSON, or a serialized String to the Server, as your `data` argument. When the response is sent PHP handles it, then passes the response into your `complete` function's argument. Of course that function is executed Asynchronously, when the `XMLHttpRequestObject.status === 200 && XMLHttpRequestObject.readyState === 4`. If you want to read a JSON response, after PHP has executed, you need to `echo json_encode($assoc_array_here)`. I don't get your question. Hope that helps.
type: AnswerComment
comment on: http://stackoverflow.com/a/25393102
type: Comment
score: 1

http://stackoverflow.com/q/25389969
has comment: http://stackoverflow.com/comment/39600866
tagged with: angularjs
type: UnansweredQuestion
tagged with: datetime
has body: In my angularjs controller i have this : Feed.parseFeed("https://www.facebook.com/feeds/page.php?id=618857251494402&amp;format=rss20").then(function(res){ $scope.feeds1=res.data.responseData.feed.entries; $scope.quantity1 = 5; }); this is the factory : app.factory('FeedService', ['$http', function($http){ return { parseFeed : function(url) { return $http.jsonp('https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&amp;num=50&amp;callback=JSON_CALLBACK&amp;q=' + encodeURIComponent(url), {cache: false}) .success(function(data, status, headers, config) { console.log(data); }).error(function(status) { console.log(status); }); } } }]); and html : &lt;li ng-repeat="feed in feeds1"&gt; &lt;p&gt; &lt;span&gt;&lt;/span&gt; &lt;a href="{{feed.link}}" ng-click="createTab(feed.link);"&gt;{{feed.title}}&lt;/a&gt; &lt;/p&gt; &lt;/li&gt; Problem is with this code i have date like "Wed, 13 Aug 2014 12:31:01 -0700", it's the original date parsed with google api, so nothing is changed here. How to format it ?
answer count: 0
has comment: http://stackoverflow.com/comment/39599054
has comment: http://stackoverflow.com/comment/39601851
type: Question
tagged with: javascript
score: 0
has title: How to custom date return by google ajax api feed service with angularjs

http://stackoverflow.com/comment/39615153
type: Comment
has text: Are you trying to pick up the current domain?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25399011

http://stackoverflow.com/comment/39659102
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25422436
has text: sorry, not realy effect I want... will edit original post to explain in more details

canvas
tags question: http://stackoverflow.com/q/25427403
tags question: http://stackoverflow.com/q/25417036
tags question: http://stackoverflow.com/q/25467825
tags question: http://stackoverflow.com/q/25510471
tags question: http://stackoverflow.com/q/25417967
tags question: http://stackoverflow.com/q/25467349
tags question: http://stackoverflow.com/q/25420261
tags question: http://stackoverflow.com/q/25513459
tags question: http://stackoverflow.com/q/25430955
tags question: http://stackoverflow.com/q/25527902
tags question: http://stackoverflow.com/q/25510248
tags question: http://stackoverflow.com/q/25395763
tags question: http://stackoverflow.com/q/25442709
tags question: http://stackoverflow.com/q/25508288
tags question: http://stackoverflow.com/q/25407926
tags question: http://stackoverflow.com/q/25403894
tags question: http://stackoverflow.com/q/25470730
tags question: http://stackoverflow.com/q/25503708
tags question: http://stackoverflow.com/q/25435944
tags question: http://stackoverflow.com/q/25416080
tags question: http://stackoverflow.com/q/25392324
tags question: http://stackoverflow.com/q/25414351
tags question: http://stackoverflow.com/q/25484085
tags question: http://stackoverflow.com/q/25480119
tags question: http://stackoverflow.com/q/25534387
tags question: http://stackoverflow.com/q/25480820
tags question: http://stackoverflow.com/q/25502417
tags question: http://stackoverflow.com/q/25455613
tags question: http://stackoverflow.com/q/25508957
tags question: http://stackoverflow.com/q/25457283
tag name: canvas
tags question: http://stackoverflow.com/q/25407655
tags question: http://stackoverflow.com/q/25459828
tags question: http://stackoverflow.com/q/25404241
tags question: http://stackoverflow.com/q/25492304
tags question: http://stackoverflow.com/q/25416349
tags question: http://stackoverflow.com/q/25525530
tags question: http://stackoverflow.com/q/25461405
type: Tag
tags question: http://stackoverflow.com/q/25440681
tags question: http://stackoverflow.com/q/25499376
tags question: http://stackoverflow.com/q/25538681
tags question: http://stackoverflow.com/q/25513485
tags question: http://stackoverflow.com/q/25408137
tags question: http://stackoverflow.com/q/25437250
tags question: http://stackoverflow.com/q/25455738
tags question: http://stackoverflow.com/q/25440678
tags question: http://stackoverflow.com/q/25414704
tags question: http://stackoverflow.com/q/25465959
tags question: http://stackoverflow.com/q/25517882
tags question: http://stackoverflow.com/q/25538734
tags question: http://stackoverflow.com/q/25474461
tags question: http://stackoverflow.com/q/25427542
tags question: http://stackoverflow.com/q/25427629
tags question: http://stackoverflow.com/q/25443534

http://stackoverflow.com/comment/39627059
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25404598
type: QuestionComment
has text: FWIW I've had cases where using the `$location` service (trigger by `ng-click`) was the only way to safely navigate to a page. It's pretty hard to tell what exactly is wrong here without being hands-on with the code, and if you produce a fiddle you might not even be able to reproduce. If I faced this problem I would try to remove things untill it stops not working, probably starting with the authService. Keep stripping away parts untill the problem goes away and you should be able to identify the culprit eventually.

http://stackoverflow.com/comment/39745421
comment on: http://stackoverflow.com/q/25468902
type: Comment
type: QuestionComment
has text: oops. I was playing around and forgot to change that. I added them back but it still does not work
score: 0

http://stackoverflow.com/a/25464664
has body: I would build a tree from the path, and finally add intermediate 'includes' array function buildFromPath(tree, pathVar){ var a = pathVar.split('.'), parent = tree; for(var i = 0, max = a.length; i &lt; max; i++){ var n = a[i]; if(!(n in parent)) parent[n] = {}; parent = parent[n]; } } var exampeInclude= [ "Product", "Group", "Product.Tax", "Product.ProductUnit", "Product.Variant.Original", "Product.Variant.Original.Tax", "Product.Variant.Original.ProductUnit" ], tree = {}; for(var i = 0, max = exampeInclude.length; i &lt; max; i++){ buildFromPath(tree, exampeInclude[i]); } // normally here you should have a tree structure // like {Product:{Tax:{},ProductUnit:{},Variant:{Original:{Tax:{},ProductUnit:{}}}},Group:{}} // then you parse the tree and add format with intermediates function formatObj(obj){ var res = []; for(var name in obj){ var o = obj[name]; res.push(o); o.includes = formatObj(o); } return res; } var res = formatObj(tree);
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25464186
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25464186
score: 1
downvote count: 0

http://stackoverflow.com/q/25466557
has comment: http://stackoverflow.com/comment/39741430
answer count: 0
type: UnansweredQuestion
tagged with: iframe
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39741585
tagged with: javascript
has title: Automatically Resize iFrame created using document.write
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39741778
has body: So, I have a Javascript file: function resize(id) { var newheight; var newwidth; id = id.trim(); if (document.getElementById) { newheight=document.getElementById(id).contentWindow.document .body.scrollHeight; newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth; } document.getElementById(id).height= (newheight) + 'px'; document.getElementById(id).width= (newwidth) + 'px'; } document.write("&lt;iframe frameborder='0' id='vote-frame' scrolling='no'&gt;&lt;/iframe&gt;") $("#vote-frame").attr("src", "&lt;%= server_embed_url(@server) %&gt;"); $("#vote-frame").load(function(){ resize("vote-frame") }) This should write an iFrame to the page, and resize it based on the width/height of the content in the iFrame, but for some reason that is not working. I'm displaying the script on my page with: %script{src: server_display_url(@server, format: :js)} Is this a limitation of Rails' .js.erb, or is it just not possible because the iFrame is being created dynamically by document.write? I should probably mention that this all works fine when I put the iFrame directly into the HAML view, and it resizes just fine. EDIT: I also tried the usual onload attribute in the iFrame tag: function resize() { var id = "vote-frame" var newheight; var newwidth; if (document.getElementById) { newheight=document.getElementById(id).contentWindow.document .body.scrollHeight; newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth; } document.getElementById(id).height= (newheight) + 'px'; document.getElementById(id).width= (newwidth) + 'px'; } document.write("&lt;iframe frameborder='0' onload='resize()' src='&lt;%= server_embed_url(@server) %&gt;' id='vote-frame' scrolling='no'&gt;&lt;/iframe&gt;") For some reason, it's still not resizing...
has comment: http://stackoverflow.com/comment/39741671

http://stackoverflow.com/a/25567613
accepted answer of: http://stackoverflow.com/q/25550636
has body: In the end I did something like this, it works but I am not sure is the best way to do it. 'idx' is an index for store object store. var range = new ydn.db.KeyRange.lowerBound(index+1); var iter = new ydn.db.Iterator(store, 'idx', range); // 'idx' is an index for store object store db.values(iter, 1).done(function(item) { if(item.length &gt; 0){ var req = db.get(store, item[0]); req.done(function(record) { if(record!==undefined || typeof record=='object'){ // do soemthing with the record } else { console.log('record could not be found'); } }); req.fail(function(e) { console.log(e); }); } }); I tried the same thing with range = new ydn.db.KeyRange.upperBound(index); if I want to retrieve a previous record, but I always get the first record from the store, so I used instead range = new ydn.db.KeyRange.lowerBound(index-1); Please give me some feedback. Thanks again for the library. Regards, Florin.
has comment: http://stackoverflow.com/comment/40019733
answers question: http://stackoverflow.com/q/25550636
score: 0
has comment: http://stackoverflow.com/comment/39931800
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/39772008
type: Comment
has text: But whenever i try to use it in a directive inside of DaftMonk/generator-angular-fullstack frame it renders again everything except the arrows at the end of the links.
comment on: http://stackoverflow.com/a/25449001
type: AnswerComment
score: 0

ruby-on-rails
tags question: http://stackoverflow.com/q/25498834
tags question: http://stackoverflow.com/q/25457009
tags question: http://stackoverflow.com/q/25506563
type: Tag
tags question: http://stackoverflow.com/q/25466557
tags question: http://stackoverflow.com/q/25443273
tags question: http://stackoverflow.com/q/25497200
tags question: http://stackoverflow.com/q/25507980
tags question: http://stackoverflow.com/q/25427582
tags question: http://stackoverflow.com/q/25434205
tags question: http://stackoverflow.com/q/25449000
tags question: http://stackoverflow.com/q/25515634
tags question: http://stackoverflow.com/q/25438227
tags question: http://stackoverflow.com/q/25396302
tags question: http://stackoverflow.com/q/25545791
tags question: http://stackoverflow.com/q/25396137
tags question: http://stackoverflow.com/q/25444799
tags question: http://stackoverflow.com/q/25422623
tags question: http://stackoverflow.com/q/25488027
tags question: http://stackoverflow.com/q/25434106
tags question: http://stackoverflow.com/q/25459366
tags question: http://stackoverflow.com/q/25415797
tags question: http://stackoverflow.com/q/25453544
tags question: http://stackoverflow.com/q/25394806
tags question: http://stackoverflow.com/q/25478729
tags question: http://stackoverflow.com/q/25398086
tags question: http://stackoverflow.com/q/25415703
tags question: http://stackoverflow.com/q/25462917
tags question: http://stackoverflow.com/q/25474329
tags question: http://stackoverflow.com/q/25394909
tags question: http://stackoverflow.com/q/25414028
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/25404617
tags question: http://stackoverflow.com/q/25402191
tags question: http://stackoverflow.com/q/25487012
tags question: http://stackoverflow.com/q/25466707
tags question: http://stackoverflow.com/q/25545495
tags question: http://stackoverflow.com/q/25526854
tags question: http://stackoverflow.com/q/25394456
tags question: http://stackoverflow.com/q/25502883
tags question: http://stackoverflow.com/q/25467327
tags question: http://stackoverflow.com/q/25458665
tags question: http://stackoverflow.com/q/25472121
tags question: http://stackoverflow.com/q/25395008
tags question: http://stackoverflow.com/q/25409406
tags question: http://stackoverflow.com/q/25474265
tags question: http://stackoverflow.com/q/25504181
tags question: http://stackoverflow.com/q/25490699
tags question: http://stackoverflow.com/q/25468650
tags question: http://stackoverflow.com/q/25459147
tags question: http://stackoverflow.com/q/25441613
tags question: http://stackoverflow.com/q/25462025
tags question: http://stackoverflow.com/q/25459985
tags question: http://stackoverflow.com/q/25451015
tags question: http://stackoverflow.com/q/25435244
tags question: http://stackoverflow.com/q/25409937
tags question: http://stackoverflow.com/q/25456565
tags question: http://stackoverflow.com/q/25390121
tags question: http://stackoverflow.com/q/25455399
tags question: http://stackoverflow.com/q/25411154

http://stackoverflow.com/q/25451769
has title: jQuery/Javascript code repetition
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25451912
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39713446
upvote count: 1
has answer: http://stackoverflow.com/a/25451906
has answer: http://stackoverflow.com/a/25451848
type: Question
has answer: http://stackoverflow.com/a/25451892
possible better answer: http://stackoverflow.com/a/25451906
tagged with: javascript
has comment: http://stackoverflow.com/comment/39713359
downvote count: 0
answer count: 7
has answer: http://stackoverflow.com/a/25451971
has body: I am trying to use the scrollTop function for my program, but I am finding that I am writing a lot of repetitive code. This is an example: title One title Two I am content one I am content two If i was to click on 'title One' I want to scroll to 'I am content one' Likewise for title two and content two. This is easy enough to do with jQuery/JS $("#one").click(function() { $('html, body').animate({ scrollTop: $("#target_one").offset().top -20 }, 800); }); But say for example my table of contents has 15 elements in it, and I want to make each clickable to scroll to its content. For this I would have to repeat the above code 15 times for each element. Is there a better way than that?
has answer: http://stackoverflow.com/a/25451929
tagged with: jquery
has answer: http://stackoverflow.com/a/25451917
favorite count: 0
accepted answer: http://stackoverflow.com/a/25451892

http://stackoverflow.com/q/25421258
has answer: http://stackoverflow.com/a/25423431
has body: Here is the UI What I want is, when user will click on any of the "Approve" or "Reject" button, I want to get the "Remarks" value of that particular row. Here is the cshtml code I have so far @model IEnumerable<HrmsMvc.Models.DataContext.LeaveRecord> @{ using (Html.BeginForm()) { Approve Leave @{ if (Model != null) { Apply Date Name From To Type Reason Status Remarks Actions @{ try { foreach (var leave in Model) { @Html.LabelForModel(leave.ApplicationDate.Value.ToString("dd-MMM-yyyy")) @Html.LabelForModel(leave.EmployeeInfo.FullName) @Html.LabelForModel(leave.EffectiveFrom.Value.ToString("dd-MMM-yyyy")) @Html.LabelForModel(leave.EffectiveTo.Value.ToString("dd-MMM-yyyy")) @Html.LabelForModel(leave.LeaveType) @Html.LabelForModel(leave.Reason) @Html.LabelForModel(leave.LeaveStatus) } } catch { } } } } } } @section scripts { } Each button has a data-id attribute which contains the related RecordID. I do not understand how to get this or where to start?
tagged with: javascript
tagged with: jquery
has title: How to find the data relevant to the clicked button within table in jquery?
has answer: http://stackoverflow.com/a/25421649
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25421363
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25421307
has answer: http://stackoverflow.com/a/25421403
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/25421307
answer count: 5
tagged with: asp.net-mvc-3
has comment: http://stackoverflow.com/comment/39656791
has comment: http://stackoverflow.com/comment/39660854
possible better answer: http://stackoverflow.com/a/25423431

http://stackoverflow.com/a/25515327
type: Answer
answers question: http://stackoverflow.com/q/25515239
has body: If you wrap your script in a $(document).ready(function () {});?
has comment: http://stackoverflow.com/comment/39832789
has comment: http://stackoverflow.com/comment/39832684
has comment: http://stackoverflow.com/comment/39832896
score: 0
has comment: http://stackoverflow.com/comment/39832591

http://stackoverflow.com/q/25549374
tagged with: jquery
has body: Still learning basic php &amp; jquery, but stuck a bit with one idea: i have two pages and on second page i have show/hide DIVs, here is jsfiddle demo: $('.navLink').on('click', function(e){ e.preventDefault(); var targetDiv = $($(this).attr('href')); if(!targetDiv.is(':visible')){ $('.page').slideUp().delay(300); targetDiv.slideDown(); }else{ $('.page').slideUp().delay(500); } }); And i'd like to have a link from first page (page1.html) to second page (page2.html) so with option like page2.html#div1 it would open selected #div. I've tried to workout with jsfiddle: window.addEventListener("hashchange", function(){ var targetDiv = $(location.hash); if(!targetDiv.is(':visible')){$('.page').slideUp();targetDiv.slideDown();} else{$('.page').slideUp();} }, false); but it's not working properly when you're givitn that link to some one and not working on some chrome versions at all... Is there better idea or? Thanks in advance!
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39893876
tagged with: hide
has answer: http://stackoverflow.com/a/25550073
has comment: http://stackoverflow.com/comment/39894147
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39894338
type: Question
linked to: http://stackoverflow.com/q/979975
score: 0
has comment: http://stackoverflow.com/comment/39894359
answer count: 1
has title: Show/hide content redirecting from one page to another
has comment: http://stackoverflow.com/comment/39894113
accepted answer: http://stackoverflow.com/a/25550073
tagged with: javascript
tagged with: show

http://stackoverflow.com/q/25443160
has answer: http://stackoverflow.com/a/25443188
type: Question
tagged with: javascript
has body: When an HTML form contains &lt;input type="file"&gt; I need to specify the enctype="multipart/form-data" attribute on the form. However, when I send a binary file over XMLHttpRequest I don't need to specify that type anywhere: var builder = new BlobBuilder(); builder.append("Hello world!"); var blob = builder.getBlob("text/plain"); var oReq = new XMLHttpRequest(); oReq.open("POST", url, true); oReq.send(blob); Why so?
accepted answer: http://stackoverflow.com/a/25443188
has comment: http://stackoverflow.com/comment/39697372
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
has title: why do I need to include enctype="multipart/form-data" when sending data through form but don't need when sending through xmlhttprequest
tagged with: forms

http://stackoverflow.com/q/25401886
tagged with: javascript
has title: Instantiate a value received from issuing a GET request
tagged with: asp.net
score: 0
has comment: http://stackoverflow.com/comment/39620421
has comment: http://stackoverflow.com/comment/39620507
type: UnansweredQuestion
has body: I have this JS code, that will receive a string value, from the C# code function getMsg() { var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "andSert.asmx/GetMessage", true); //async var temp = the string I receive from the GET above return temp; } Here is the C# code [WebMethod] public string GetMessage() { XmlTextReader reader = new XmlTextReader (Global.sAppPath + "/alt/importantMsg.xml"); string message = null; while (reader.Read()) { if (reader.IsStartElement ()) { switch (reader.Name.ToString ()) { case "Message": message = reader.ReadString(); break; } } } return message; } My problem is that I don't know how to instantiate the message I get from doing a GET request in the JS code. I have tested that everything works, and returns a string. But I need to instantiate that string, so that I can use it in another JS file. How can I do this?
has answer: http://stackoverflow.com/a/25403368
tagged with: webmethod
tagged with: web-services
has comment: http://stackoverflow.com/comment/39620404
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/39620302
has comment: http://stackoverflow.com/comment/39620334
answer count: 1

http://stackoverflow.com/comment/39709546
type: QuestionComment
has text: People here will be willing to help you out with specific problems, but I doubt anybody will write your code for you, you should really start on that yourself.
score: 0
comment on: http://stackoverflow.com/q/25449675
type: Comment

http://stackoverflow.com/q/25530365
tagged with: php
upvote count: 1
has comment: http://stackoverflow.com/comment/39859119
type: Question
has answer: http://stackoverflow.com/a/25530498
downvote count: 0
tagged with: javascript
has title: How to add new line character in ajax responsetext
has body: How to add a new line character in ajax responsetext. I have to return the Exception message containing error code and description which I have to then show using Javascript alert box. PHP code snippet returning an error exception: echo('Update Aborted\r\n'.$mIAPException-&gt;getErrorCode() . ': ' . $mIAPException-&gt;getFurtherDetails()); Javascript code snippet: alert(client.responseText); This is not working.
has comment: http://stackoverflow.com/comment/39859373
has comment: http://stackoverflow.com/comment/39859471
answer count: 1
score: 1
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39859157
type: UnansweredQuestion

http://stackoverflow.com/q/25406935
has comment: http://stackoverflow.com/comment/39630040
type: Question
has comment: http://stackoverflow.com/comment/39630239
has comment: http://stackoverflow.com/comment/39630718
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39640039
has answer: http://stackoverflow.com/a/25408013
has comment: http://stackoverflow.com/comment/39632079
tagged with: http://stackoverflow.com/tag/html
has body: Not a newbie to working with the API JSON data itself, as I can parse it in PHP rather easily. But I want to do it using jQuery to use in a personal project I'm working on. As you'll see in the code below, I am trying to do is grab each of the current day's games and display them in the body of the html, with each individual game wrapped in a div called "contentdiv". I just can't seem to get things to work... the object references appear to be correct in the each, but I can't get anything to return. This is a part of the response body I get when viewing the API response using a JSON editor: { "contents": [ { "contents": [ { "uid": "10:340819123", "gameType": "1", "status": "Final", "statusType": "3", "competitors": [ { "uid": "10:15", "logo": { "logoFormat": "scoreboard", "logo": "atl" }, "record": "66-60", "location": "Atlanta", "color": "#002248", "name": "Braves", "score": "11", "winner": "true", "type": "team", "displayName": "Braves", "shortName": "ATL" }, { "uid": "10:23", "logo": { "logoFormat": "scoreboard", "logo": "pit" }, "record": "64-62", "location": "Pittsburgh", "color": "#111111", "name": "Pirates", "score": "3", "winner": "false", "type": "team", "displayName": "Pirates", "shortName": "PIT" } ], "sport": "mlb", "buttons": [ { "text": "Recap", "link": { "type": "internal", "format": "gamecast", "defaultFormat": "", "uri": "mlb/gamecast?gameId=340819123&appsrc=sc", "deleteUri": "", "share": { "text": "MLB: FINAL - BRAVES 11 PIRATES 3 via @ScoreCenter", "url": "http://scores.espn.go.com/mlb/gamecast?gameId=340819123" } }, "type": "custom" }, { "text": "Stats", "link": { "type": "internal", "format": "gamecast", "defaultFormat": "", "uri": "mlb/gamecast?gameId=340819123&appsrc=sc&gcSection=boxscore", "deleteUri": "", "share": { "text": "MLB: FINAL - BRAVES 11 PIRATES 3 via @ScoreCenter", "url": "http://scores.espn.go.com/mlb/gamecast?gameId=340819123" } }, "type": "custom" } ], "type": "team", "gameDate": "2014-08-19T23:05:00Z", "macro": { "type": "", "…
has title: ESPN API, how can I parse/display the JSON data?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39630736

http://stackoverflow.com/q/25532318
tagged with: cookies
has comment: http://stackoverflow.com/comment/39862849
type: Question
has comment: http://stackoverflow.com/comment/39863469
tagged with: c#
has comment: http://stackoverflow.com/comment/39862799
has comment: http://stackoverflow.com/comment/39863021
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39862777
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39862738
has body: I've initialized a cookie in jQuery and set it's value to true. When I check the cookie in .NET/C#: Request.Cookies["test"].Value.toString(); I can see that the value is indeed true as expected. The problem that I wasn't to see the new value of the cookie when changing it to false. Using a chrome extension I can see that the value was changed to false, but in .NET when I read the Cookie value it's still true. I assume that something happens from the time I updated the cookie in the client and the time the page got back. Any reason why I can't see the changed value in the cookie on the server side? BTW: the cookie was created on the client side, not on the server side. JS: var a = 0; $(document).ready(function(){ if(a === 0){ $.cookie('test','true'); } else{ $.cookie('test','false'); } }); In chrome the cookie shows: Putting a breakpoint at the line that reads the cookie value and right after checking the value of the cookie (as "true") in Chrome, .NET shows the value as "false".
has comment: http://stackoverflow.com/comment/39862714
has comment: http://stackoverflow.com/comment/39862877
has title: Cookie value not being updated in .NET after changing in client side
answer count: 0

http://stackoverflow.com/a/34006072
upvote count: 0
answers question: http://stackoverflow.com/q/25429568
type: Answer
has body: The best way is to use: dt = moment("Wed Sep 16 2015 18:31:00 GMT-0400", "ddd MMM DD YYYY HH:mm:ss GMT-0400",true); And to display convert again to desired timezone: dt.utcOffset("-04:00").toString() output &gt; Wed Sep 16 2015 18:31:00 GMT-0400
downvote count: 1
score: -1

http://stackoverflow.com/q/25540611
has body: I'm new to angularjs, maybe someone can help me to learn. I want to create an image gallery that has buttons to switch from one image to another. how to create an image gallery with angularjs? and include a navigation bar?
has comment: http://stackoverflow.com/comment/39878381
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39881560
has comment: http://stackoverflow.com/comment/39880498
type: AnsweredQuestion
score: -1
has comment: http://stackoverflow.com/comment/39880134
has comment: http://stackoverflow.com/comment/39878252
has title: Angularjs how to create image gallery
type: Question
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39880358
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39878296
has answer: http://stackoverflow.com/a/25540938
accepted answer: http://stackoverflow.com/a/25540938

http://stackoverflow.com/q/25453798
linked to: http://stackoverflow.com/q/28707548
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/39718035
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39717399
has body: I have successfully centered a bootstrap modal using the solution found here: Demo: http://codepen.io/dimbslmh/full/mKfCc Code: http://codepen.io/dimbslmh/pen/mKfCc var contentHeight = $(window).height() - 60; var headerHeight = $(this).find('.modal-header').outerHeight() || 2; var footerHeight = $(this).find('.modal-footer').outerHeight() || 2; However, it doesn't work well with remotely loaded content. It's calculating the heights before the content is loaded. Then, after the content is loaded, the position is way off. I've tried various methods to delay the calculations by a set time, but these methods have resulted in the modal loading at the top of the page, and then jumping down to the center. It seems like the nicest solution would be to have it RE-CALCULATE the heights after the content is loaded. That way, the smaller modal (without the content) will load in the center, and then it will re-center once the content is loaded. Is there a good way to do this?
type: Question
has comment: http://stackoverflow.com/comment/39717480
has title: Re-center bootstrap modal vertically after content has loaded
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25454132
score: 0
has comment: http://stackoverflow.com/comment/39717267
answer count: 1
accepted answer: http://stackoverflow.com/a/25454132

http://stackoverflow.com/comment/39771359
score: 0
type: Comment
has text: @32bitkid Excellent note. As far as face-value aesthetics, I liked this answer better, however performance is critical. Elena I must thank you, though, for broadening my mindset on closures.
comment on: http://stackoverflow.com/a/25482157
type: AnswerComment

http://stackoverflow.com/comment/39603388
type: Comment
comment on: http://stackoverflow.com/a/25392279
score: 0
type: AnswerComment
has text: I added `toggle` as you prefer to want!

http://stackoverflow.com/comment/39633730
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25408728
has text: thanks Elliott, the problem was actually due to the jb.toString() being passed directly into the JSONObject constructor ! It seems like it has be put into a variable before. However another error was just raised, "A JSONObject text must begin with '{' at 1 [character 2 line 1]". This seems quite weird since the jb.toString() print seems correct. I edited the first post.

http://stackoverflow.com/a/25545509
score: 0
has body: Use position:absolute instead of position:fixed in your main modal container class .modal_name { position: absolute; }
has comment: http://stackoverflow.com/comment/39902251
type: Answer
answers question: http://stackoverflow.com/q/25545367

http://stackoverflow.com/q/25525100
has answer: http://stackoverflow.com/a/25525265
tagged with: javascript
has answer: http://stackoverflow.com/a/25525353
has comment: http://stackoverflow.com/comment/39849307
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25525353
has body: does anyone know if there is a way to make a dropdown menu that when an option is chosen it then turns that option into a button using html or is that only possible in php or is it not possible at all
tagged with: php
answer count: 4
has title: DropDown menu that when chosen turns option into a button
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39850135
score: 0
has answer: http://stackoverflow.com/a/25525253
type: Question
possible better answer: http://stackoverflow.com/a/25525265
has answer: http://stackoverflow.com/a/25525592

http://stackoverflow.com/q/25410860
answer count: 2
has title: Angular data table adding "tree view"
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has body: I need some help how to modify ng table to add tree functionality- to make additional embedded JSON arrays expandable under the main nodes. Clear sorting Sorting: {{user.name}} {{user.age}} And then code where I want to modify the JSON data source: var app = angular.module('main', ['ngTable']). controller('DemoCtrl', function($scope, $filter, ngTableParams) { var data = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}]; $scope.tableParams = new ngTableParams({ page: 1, // show first page count: 10, // count per page sorting: { name: 'asc' // initial sorting } }, { 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())); } }); }); This example is in here: [http://plnkr.co/edit/5SQ2YB?p=info][1] My Custom JSON would look like: [{ "name": "Tiancum", "age": "43", "favoriteCars": [{ "name": "Audi", "engines": [{ "type": "diesel", "size": "big" }, { "type": "gas", "size": "small" }] }, { "name": "Subaru", "engines": [{ "type": "diesel", "size": "big" }, { "type": "gas", "size": "small" }] }] }, { "name": "JAcob", "age": "54", "favoriteCars": [{ "name": "BMW", "engines": [{ "type": "diesel", "size": "big" }, { "type": "gas", "size": "small" }] }, { "name": "VW", "engines": [{ "type": "diesel", "size": "big" }, { "type": "gas", "size": "small" }] }] }] What I am trying to achieve is to make the embedded JSON arrays e…
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39638906
has answer: http://stackoverflow.com/a/25431174
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25411083
has comment: http://stackoverflow.com/comment/39638417
tagged with: angularjs
type: Question

http://stackoverflow.com/q/25496531
accepted answer: http://stackoverflow.com/a/25496569
type: Question
tagged with: angularjs-directive
tagged with: javascript
has title: Confusion on Angular Attributes on Custom Directive
has body: I'm confused as to why this isn't working... here is my directive: app.directive('dateDropDowns', function () { function link($scope, elem, attr) { console.log($scope.startYear); }; function controller($scope, $attrs, $location) { }; return { link: link, scope: { startYear: "&amp;", endYear: "&amp;", date: "=", required: "&amp;" }, restrict: "EA", templateUrl: "/scripts/templates/datedropdowns.html", controller: controller } }); Here is my directive html: &lt;div date-drop-downs start-year="startYear" end-year="endYear" required="true" date="testDate"&gt;&lt;/div&gt; startYear, endYear, testDate are all defined in the scope of the controller on which the above html exists. The console.log in the link function is returning: function (locals) { return parentGet(scope, locals); } However, the startYear should be returning 1910 as that is what is set to in the controller on which the "date-drop-downs" directive is being called. I've tried console.log($scope.$eval($scope.startYear)); but it returns the same thing above I've tried console.log($scope.$eval(attr.startYear)); but it returns the same thing above I've tried console.log(attr.startYear); but that just returns the text "startYear" I'm not sure what to do to actually get the startYear value. Any help is greatly appreciated.
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25496569
has comment: http://stackoverflow.com/comment/39797093
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/comment/39784451
comment on: http://stackoverflow.com/a/25479925
type: Comment
has text: I do not have spoken of any popup! I Understand that you have a paginated list of elements and you want print all the pages in one step and with perhaps a different presentation.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39792084
comment on: http://stackoverflow.com/a/25493839
type: Comment
has text: I like this answer Just `#IsStudent` value must be either 'true' or 'false'.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39819289
type: Comment
has text: What you describe is possible, but the specifics of how to od it will depend on which Twitter library you choose to use.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25506453

http://stackoverflow.com/comment/39697996
comment on: http://stackoverflow.com/q/25443086
has text: no, `<postid>` is just a placeholder for the concept. You need to use `get_the_id()` and echo the id there.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39749262
score: 0
type: QuestionComment
type: Comment
has text: I give you an answer with a demo, pleas visit my demo and test :: and then you will understand how to do it.
comment on: http://stackoverflow.com/q/25470811

http://stackoverflow.com/q/25481571
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: I am using autocomplete for my project of auto selecting cities and areas. I want to now dynamically autoselect areas of city selected. Though the autosearch is working quite well I just not able to send the dynamice cityid for the area. How am I to do this? I tried the option given in this stack answer but to no avail.My code till date: HTML &lt;input type="hidden" id="hid_search_city_id" name="hid_search_city_id" value=""&gt; SCRIPT $(document).ready(function(e) { $("#hid_search_city_id").change(function() { areas.setOptions({ params: { entity_type: $('#hid_search_city_id').val() } }); }); }); var baseUrl = $('input#baseUrl').val(); var url = baseUrl + 'ajax/getSearchCities'; $('input#search_cities').autocomplete({ serviceUrl: url, minChars: 1, delimiter: /(,|;)\s*/, maxHeight: 400, width: 300, deferRequestBy: 0, onSelect: function(value, data) { $('#id').val(+data); $('#hid_search_city_id').val(''); $('#hid_search_city_id').val(data); } }) var url = baseUrl + 'ajax/getSearchAreas'; var areas = $('input#search_areas').autocomplete({ serviceUrl: url, minChars: 1, delimiter: /(,|;)\s*/, maxHeight: 400, width: 300, params: { entity_type: $('#hid_search_city_id').val() }, deferRequestBy: 0, onSearchStart: function(q) { areas.entity_type = $('input#search_cities').val(); }, onSelect: function(value, data) { $('#id').val(+data); }, }); areas.setOptions({ params: { entity_type: $('#hid_search_city_id').val() } });
score: 0
has comment: http://stackoverflow.com/comment/39768965
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39769056
has comment: http://stackoverflow.com/comment/39769148
type: Question
has comment: http://stackoverflow.com/comment/39768931
has comment: http://stackoverflow.com/comment/39769004
tagged with: jquery-ui
tagged with: autocomplete
has title: how to pass dynamic parameters in jquery.autocomplete.js
linked to: http://stackoverflow.com/q/10868537

http://stackoverflow.com/comment/39666480
score: 0
type: AnswerComment
type: Comment
has text: Awesome thanks a lot! Just a couple questions to help me understand better 1. why do I need to create closure for the x variable 2. whats the difference between target and targetNode?
comment on: http://stackoverflow.com/a/25419190

http://stackoverflow.com/comment/39773330
comment on: http://stackoverflow.com/q/25482275
score: 0
has text: updated with the code I am trying to achieve
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41182491
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26228769
has text: I don't know if I'm at the tinymce. I test the workflow on an actual browser manually, but if the site changes the structure of the web page, then the script will stop working. That's why the solution is not ideal. So basically, I select an element on the page that I can reference using this.click("some_selector"); then Tab to the tinymce with this.page.sendEvent('keypress', 16777217);

http://stackoverflow.com/a/75348795
upvote count: 1
score: 0
answers question: http://stackoverflow.com/q/25523289
has body: yes it is possible to send MediaStream to your server, but the only way you can achieve is by going through WebSocket which enable client browser to send data to your server in real time connection. so i recommend you to use websocket
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/136636141

http://stackoverflow.com/q/25516022
possible better answer: http://stackoverflow.com/a/25516309
has answer: http://stackoverflow.com/a/25516281
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39834080
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25516281
has body: I am really new with bootstrap, and I'm trying to apply the active class to a menu, but for some reason is not working, I don't know if it is the jquery function (I got it from a tutorial) or if bootstrap won't allow the use of active links. JS Fiddle Demo HTML Home Cars Models Colors CSS nav-justified a.activee { background:red !important; } JS jQuery(function() { jQuery('.nav-justified a').each(function() { if (jQuery(this).attr('href') === window.location.pathname) { jQuery(this).addClass('activee'); } }); });
tagged with: twitter-bootstrap
tagged with: css
has comment: http://stackoverflow.com/comment/39834136
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25516309
has title: Active links not working on bootstrap

http://stackoverflow.com/a/25451264
answers question: http://stackoverflow.com/q/25451129
has comment: http://stackoverflow.com/comment/39712611
score: 1
accepted answer of: http://stackoverflow.com/q/25451129
has body: You can do this with pure CSS (will only work in Webkit browsers) .am-container a img { filter: url(#blurred); -webkit-filter: blur(5px); } .am-container a:hover img { filter: url(#unblurred); -webkit-filter: blur(0px); } Add this SVG into the HTML code or reference it from an external file (to add Firefox support): <feGaussianBlur in="SourceGraphic" stdDeviation="5" /> <feGaussianBlur in="SourceGraphic" stdDeviation="0" /> JSFiddle
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39712788
has comment: http://stackoverflow.com/comment/39712671
has comment: http://stackoverflow.com/comment/39712746
type: Answer
upvote count: 1

http://stackoverflow.com/q/25468734
tagged with: mongoose
tagged with: javascript
tagged with: express
tagged with: node.js
has comment: http://stackoverflow.com/comment/39745029
has comment: http://stackoverflow.com/comment/39745051
has comment: http://stackoverflow.com/comment/39745041
answer count: 0
type: UnansweredQuestion
has body: I have a function called UpdateDocument.js and I have to run this function when I do request. It's only running once. After first request, it's not updating document. I have to refresh page but this is not why I want. I'm requesting from client side and running function in server side. socket.emit('UpdateDocumentRequest', ....); UpdateDocument.js : var users = require('./datas/user'); exports.UpdateDocument = function(app, passport, io) { io.on('connection', function(socket){ socket.on('UpdateDocumentRequest', function(data) { //console.log(data); socket.emit('UpdateDocumentRequest__return', { last_balance: last_balance }); var query = {....}; users.update(query, { ...}, function (err, statu) { }); }); } In server.js UpdateDocument.UpdateDocument(app, passport, io); Console : As you can see, they have different dates. { user: '', btc_balance: '0.00008630', betAmount: '0.00000002', betPayout: '2', betProfit: '0.00000002', betTime: '2014-08-24T05:17:45.328Z' } { user: '', btc_balance: '0.00008630', betAmount: '0.00000002', betPayout: '2', betProfit: '0.00000002', betTime: '2014-08-24T05:17:47.225Z' } { user: '', btc_balance: '0.00008630', betAmount: '0.00000002', betPayout: '2', betProfit: '0.00000002', betTime: '2014-08-24T05:17:49.871Z' }
tagged with: socket.io
type: Question
has comment: http://stackoverflow.com/comment/39745007
has title: Nodejs function is working only once
score: 0

http://stackoverflow.com/comment/39636602
type: QuestionComment
has text: the on `click = popup()`; is not the function that calls the color picker. the color picker should be called by the `<input id="background" class="color"` the class=color should do the trick, and normally does
comment on: http://stackoverflow.com/q/25406239
score: 0
type: Comment

http://stackoverflow.com/a/25508919
answers question: http://stackoverflow.com/q/25507023
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39821283
upvote count: 1
type: Answer
has body: I was missing the [ScriptService] attribute on my WebService class, similar to this: [ScriptService] public class MyWebService : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } } Now it's working perfectly.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25507023

http://stackoverflow.com/comment/39633718
has text: where have you included js files??
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25408812

http://stackoverflow.com/comment/39706861
has text: Well if you remove it then immediately after set it back , of course it is never removed. Note also that using the id attribute is probably not the best idea... using a class would be better
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25448567

http://stackoverflow.com/comment/39706186
type: AnswerComment
has text: ``npm`` was primary created for *backend* dependencies. I think most developers don't see much benefit to minifying backend packages, seeing as they live on servers where memory is cheap, and IO is fast. If someone could come up with a compelling study showing that minifying backend libraries would give significant benefits, then the folks responsible for ``npm`` might add support for having a standard way to request minified code. I do recall reading that they are thinking about improving ``npm`` for packaging client-side code. I don't have a URL to that discussion handy.
type: Comment
comment on: http://stackoverflow.com/a/25447302
score: 3

http://stackoverflow.com/a/25532751
has comment: http://stackoverflow.com/comment/39868105
has body: Add proper event handlers and listen for the submit event instead Submit FIDDLE
has comment: http://stackoverflow.com/comment/39867031
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39866576
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39867192
accepted answer of: http://stackoverflow.com/q/25532693
answers question: http://stackoverflow.com/q/25532693

http://stackoverflow.com/q/25478719
has body: I want to disable four links until a particular link is clicked by the user and he completes the registration. Here is how it would look. Link 1 Link 2 Link 3 Link 4 Link 5 I want to disable the links except Link 1, so that the user clicks on it and completes the registration. After completing the registration the status field in a table is changed to 'C'. Only after which the four other links must be enabled. Can you suggest a way to achieve this using JS or PHP. This is how i tried. LINK 1 IF (mysqli_query()== Condition specified ) //To query if the particular value is set in the database { Link 2 Link 3 Link 4 Link 5 } But by this way all the four links would appear only if the registration is complete by clicking on link 1. How do I show the four links as disabled until the registration is complete.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25478941
tagged with: php
has answer: http://stackoverflow.com/a/25478767
downvote count: 2
type: Question
score: -2
tagged with: hyperlink
tagged with: javascript
has comment: http://stackoverflow.com/comment/39763657
answer count: 2
upvote count: 0
has title: How to disable links in HTML until a values is set in the database
favorite count: 0

http://stackoverflow.com/comment/39842282
comment on: http://stackoverflow.com/q/25520930
type: Comment
type: QuestionComment
score: 1
has text: use a cookie or add a query to the url which you can then read out

http://stackoverflow.com/comment/39790829
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25493134
has text: Related questions/answers: [Why are global variables considered bad practice?](http://stackoverflow.com/questions/10525582/why-are-global-variables-considered-bad-practice-javascript) and [jQuery global variable best practice & options?](http://stackoverflow.com/questions/2866866/jquery-global-variable-best-practice-options).

http://stackoverflow.com/comment/39650707
type: Comment
has text: @RobG *"minify before UAT at least"* -- I would consider setting up or pushing to a UAT environment to be a form of deployment.
type: AnswerComment
comment on: http://stackoverflow.com/a/25416450
score: 0

http://stackoverflow.com/comment/39819391
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25506453
type: AnswerComment
has text: Okay is there any library you can recommend

http://stackoverflow.com/comment/39780686
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25487865
has text: Could use JQuerys addClass/removeClass to add and remove a class that would contains css `display:none/block`?
score: 0

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/25505077

http://stackoverflow.com/q/25540093
has answer: http://stackoverflow.com/a/25591244
tagged with: php
accepted answer: http://stackoverflow.com/a/25591244
type: AnsweredQuestion
has title: Zend append javascript url with parameter
score: 0
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25575107
tagged with: zend-framework
has answer: http://stackoverflow.com/a/25575107
tagged with: javascript
has body: I used Zend Framework to append Javascript file from other domain with some parameter, the URL is: http://my-js-lib.com/lib.js?rev=1.2&scope=all. But when I used this code in controller: $this->view->inlineScript()->appendFile('http://my-js-lib.com/lib.js?rev=1.2&scope=all'); The result is: I do not want the "&" sign be parsed into "&". What should I do now?

http://stackoverflow.com/comment/39859896
has text: @DJDavid98 "to my download script getsonginfo.php" the `url=` part was improvisation on my part, but working in PHP that's the most likely construction.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25530759
type: Comment

http://stackoverflow.com/comment/39757405
comment on: http://stackoverflow.com/q/25475405
score: 0
has text: Set proper ids in your fiddle.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39642743
type: QuestionComment
comment on: http://stackoverflow.com/q/25412959
has text: http://stackoverflow.com/questions/5173796/html5-get-image-dimension should get you in track.
score: 0
type: Comment

http://stackoverflow.com/q/25467081
type: Question
linked to: http://stackoverflow.com/q/332872
tagged with: javascript
has comment: http://stackoverflow.com/comment/39742136
has comment: http://stackoverflow.com/comment/39742185
has comment: http://stackoverflow.com/comment/39742244
has comment: http://stackoverflow.com/comment/39742150
downvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25467152
has answer: http://stackoverflow.com/a/25467152
type: AnsweredQuestion
score: 1
has title: Write \: on a URL
has body: I'm using an API that needs a URL like this one: var URL_PARADAS = 'http://datos.santander.es/api/rest/datasets/paradas_bus.json'; function paradas(lat, lon, dist) { console.log(lat); console.log(lon); var lat_min = lat - dist; var lat_max = lat + dist; var lon_min = lon - dist; var lon_max = lon + dist; var xmlHttp = null; xmlHttp = new XMLHttpRequest(); xmlHttp.open('GET', URL_PARADAS + '?query=wgs84_pos\:lat:{' + lat_min + '%20TO%20' + lat_max + '}' + '%20AND%20' + 'wgs84_pos\:long:{' + lon_max + '%20TO%20' + lon_min + '}', false); xmlHttp.send(null); var result = JSON.parse(xmlHttp.responseText); console.log(result); } working url Without slash: on the URL it won't work, if I use xmlHttp.open(url) it's replaced by : so it doesn't receive anything. Edit: I needed to replace \ to "slash" on this question due to bad output.
upvote count: 1

http://stackoverflow.com/a/25398477
has comment: http://stackoverflow.com/comment/39617894
type: Answer
answers question: http://stackoverflow.com/q/25397475
accepted answer of: http://stackoverflow.com/q/25397475
score: 0
type: AcceptedAnswer
has body: The Problem is z-index. Both z-index are 100. Keep like this if click on panel1, the panel1 z-index to be 105 and panel2 z-index to be 100. If click on panel2, the panel2 z-index to be 105 and panel1 z-index to be 100.
has comment: http://stackoverflow.com/comment/39618345

http://stackoverflow.com/comment/56543867
score: 3
comment on: http://stackoverflow.com/a/32838466
type: AnswerComment
type: Comment
has text: One thing to note is that it's not possible to use the console for request payload. Because the dev doesn't think it's useful lol. https://github.com/hapijs/good-console/issues/36 . So you'll need to use the log for that.

http://stackoverflow.com/comment/39720490
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25455344
has text: Where did you declare the array `siteIDArray`?

http://stackoverflow.com/comment/39858033
comment on: http://stackoverflow.com/q/25529743
score: 0
type: Comment
type: QuestionComment
has text: I would suggest you to use "mixitup" jQuery plugin. Take a look at this example http://www.jqueryscript.net/demo/jQuery-Plugin-For-Filtering-Sorting-Html-Elements-MixItUp/ OR https://mixitup.kunkalabs.com/

http://stackoverflow.com/q/25492329
has title: Is array.slice enough to handle a multidimensional Array in JavaScript?
type: Question
possible better answer: http://stackoverflow.com/a/25492386
tagged with: javascript
has answer: http://stackoverflow.com/a/25492386
has body: Is array.slice enough to clone a multidimensional Array in JavaScript? For example: var array = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]; var b = array.slice(); console.log(b); I saw a secondary implementation as this from Play by Play: Lea Verou on pluralsight: b = array.slice().map( function(row){ return row.slice(); });
answer count: 2
has comment: http://stackoverflow.com/comment/39790209
has comment: http://stackoverflow.com/comment/39790560
downvote count: 0
has comment: http://stackoverflow.com/comment/77711625
favorite count: 0
linked to: http://stackoverflow.com/q/2294703
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25492372
has comment: http://stackoverflow.com/comment/39789105
accepted answer: http://stackoverflow.com/a/25492372
score: 7
has comment: http://stackoverflow.com/comment/39789138
upvote count: 7

http://stackoverflow.com/comment/39751593
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25471880
has text: basically yes. and add that part to and each key:value to .
score: 0

http://stackoverflow.com/comment/39772183
comment on: http://stackoverflow.com/a/25478362
score: 0
type: AnswerComment
has text: Do I need to clear the cache at some point? When is in case I zoom the group do I have to execute cache() again with the neu width and height?
type: Comment

http://stackoverflow.com/comment/39706653
type: Comment
comment on: http://stackoverflow.com/a/25446750
type: AnswerComment
has text: FWIW this is also something things like [iced coffeescript](http://maxtaco.github.io/coffee-script/) and [toffee-script](https://github.com/jiangmiao/toffee-script) purport to provide. You write you code in a synchronous style and it generates async javascript for you.
score: 0

http://stackoverflow.com/q/25451861
has comment: http://stackoverflow.com/comment/39713450
tagged with: javascript
has comment: http://stackoverflow.com/comment/39713700
has answer: http://stackoverflow.com/a/25451904
has body: I've switched some Angular Js controller code from using the $scope object t "Controller as syntax with this". However I can't quite get promises to update "this" correctly in my controllers. For example in this case I'm making an $http call, and though it is getting called successfully, myProperty does not get updated. &lt;div ng-controller="MyController as controller"&gt; {{controller.myProperty}} &lt;/div&gt; &lt;script type="text/javascript"&gt; function MyController($http) { this.myProperty = "First"; this.myMethod = function(){ this.myProperty = "Second"; $http.get("someUrl.html").success(function(){ this.myProperty = "Third"; }); }; this.myMethod(); }; &lt;/script&gt; Expected result -- "Third" , actual result - " Second"
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39713585
has comment: http://stackoverflow.com/comment/39713441
favorite count: 0
has comment: http://stackoverflow.com/comment/39713314
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39713479
accepted answer: http://stackoverflow.com/a/25451904
type: AnsweredQuestion
has title: AngularJs -- Setting 'this' object within $http call in a controller?
linked to: http://stackoverflow.com/q/11605917
score: 1
has comment: http://stackoverflow.com/comment/39713174
has comment: http://stackoverflow.com/comment/39713291
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39713356

http://stackoverflow.com/q/25467010
has comment: http://stackoverflow.com/comment/39742361
upvote count: 5
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/39742405
has comment: http://stackoverflow.com/comment/39742063
tagged with: mongodb
answer count: 1
downvote count: 0
tagged with: meteor
favorite count: 0
has answer: http://stackoverflow.com/a/25467237
score: 5
tagged with: node.js
has comment: http://stackoverflow.com/comment/39742075
has title: MongoDB: How to Sort a Query Before Updating
accepted answer: http://stackoverflow.com/a/25467237
has body: I'm writing a Meteor (Node.js) app which uses MongoDB on the backend. At a certain point in my code, I need to update a specific document within a collection. I need to use Mongo's update() method, but I'm having trouble passing in the proper (complex) query to narrow down to that one, specific document. The document I'm trying to update is: db.collection.find({market: 'AAA'}).sort({creationDate:-1}).limit(1) In words, the one document in collection that has a market of AAA and was created most recently (creationDate is a UNIX timestamp number, e.g. 1408829429914). There are multiple documents with a market of AAA, so I am using sort() and limit(1) to find the document which was created most recently. Mongo's update() doesn't seem to accept sorting parameters as part of the query before the update process. What can I do to narrow down to this document and update it? Thanks!
type: AnsweredQuestion

http://stackoverflow.com/a/25436315
answers question: http://stackoverflow.com/q/25436177
type: Answer
has comment: http://stackoverflow.com/comment/39686134
has body: ng-include is for including HTML template partials, not javascript. You should use the &lt;script&gt; tag to include javascript files.
score: 0

http://stackoverflow.com/comment/39648410
type: Comment
comment on: http://stackoverflow.com/a/25416435
has text: @sdla4ever Didn't try `textarea` , though `var _arr = [content.prop("value")];` should return same for `textarea` . Issue may have been escaping of `[]` within `name` ? Thanks
score: 0
type: AnswerComment

http://stackoverflow.com/q/25501763
has title: AngularJS : How to bind an event to a dynamically generated html with ng-bind-html
answer count: 1
has comment: http://stackoverflow.com/comment/39879309
has comment: http://stackoverflow.com/comment/39806281
linked to: http://stackoverflow.com/q/21370080
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39851207
has body: I am working on a custom AngularJS directive. How to bind an event to the dynamically generated html which is generated by the directive itself. Upon research I found that we need to use $watch and $compile, but I couldn't get it working. I found this answer relevant to my question. What is the alternative for jQuery ON in AngularJS Any help is greatly appreciated. Please check this out in plunker app.directive( 'btn', [ '$sce', function( $sce ){ return { restrict: 'E', replace: true, template: ' ', link : function ($scope, element, attrs) { $scope.buttonHtml = $sce.trustAsHtml(' Click Me '); $scope.showMessage = function () { alert("You clicked Me"); } } }; }]); Thanks in advance
has comment: http://stackoverflow.com/comment/39812306
has answer: http://stackoverflow.com/a/25502102
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39806392
has comment: http://stackoverflow.com/comment/75856464
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39806441
type: Question
has comment: http://stackoverflow.com/comment/39806284
accepted answer: http://stackoverflow.com/a/25502102
tagged with: javascript
has comment: http://stackoverflow.com/comment/39806412
has comment: http://stackoverflow.com/comment/39806362
score: 0

http://stackoverflow.com/q/25501969
has comment: http://stackoverflow.com/comment/39807092
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39806794
score: 0
has comment: http://stackoverflow.com/comment/39806617
type: Question
has answer: http://stackoverflow.com/a/25502290
tagged with: javascript
has comment: http://stackoverflow.com/comment/39806587
has answer: http://stackoverflow.com/a/25502097
answer count: 3
has title: PHP variable with a value of string is not equal in PHP variable with a value of html id from javascript?
has body: This is my example code &lt;script&gt; var item = "yooow"; jQuery("#view").html(item); &lt;/script&gt; &lt;?php $str_html = '&lt;p id="view"&gt;&lt;/p&gt;'; echo $str_html; //it will output "yooow" ?&gt; but... when i'm trying to compare this into another php variable &lt;?php $str_php ="yooow"; if($str_html == $str_php) { echo "true"; } else { echo "false"; } ?&gt; but it returns to false how can they be an equal?
tagged with: variables
tagged with: string
accepted answer: http://stackoverflow.com/a/25502290
possible better answer: http://stackoverflow.com/a/25502005
has comment: http://stackoverflow.com/comment/39806833
has answer: http://stackoverflow.com/a/25502005
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/a/25545611
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39888605
has comment: http://stackoverflow.com/comment/39886918
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25545486
type: Answer
score: 1
downvote count: 1
has body: You can use this inside an event handler to refer to the element. You can use jquery selectors to access the next textbox as follows: $(".ppp").on("keydown", function () { //var bp = $("#ItemBuyingPrice" + cnt); this can be replaced with $(this) var converted = $(this).parent().next().find("input"); BindBPCustom($(this), converted); alert(cnt); });
answers question: http://stackoverflow.com/q/25545486

http://stackoverflow.com/comment/39654943
type: Comment
comment on: http://stackoverflow.com/q/25420287
score: 0
type: QuestionComment
has text: Your code is working as expected, see [this](http://jsfiddle.net/zvam3xqx/1/) Check value of `value.lastConnectedAt`

http://stackoverflow.com/a/25401684
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25401376
has comment: http://stackoverflow.com/comment/56509686
has comment: http://stackoverflow.com/comment/56534271
has comment: http://stackoverflow.com/comment/56534594
type: AcceptedAnswer
downvote count: 0
has body: The issue occurs because you have set the multiple property to true. In this case to set a value you need to use an array instead of a string. For example: $(function () { $("#message_type").select2({ placeholder: "Email/SMS/PIMS Modal", multiple: true, width: "300px", tokenSeparators: [',', ' '], data: [{ id: "email", text: "Email" }, { id: "pims modal", text: "PIMS Modal" }, { id: "sms", text: "SMS" }, ], }); $("#message_type").select2("val", ["email"]); }); A working demo here: http://jsfiddle.net/nww22qoj/19/ Edit: Here is a working jsfiddle using the 4.0.1 version of the plugin http://jsfiddle.net/nww22qoj/20/ (using the full version of the plugin)
accepted answer of: http://stackoverflow.com/q/25401376
type: Answer
has comment: http://stackoverflow.com/comment/56454276

http://stackoverflow.com/q/25516210
tagged with: closures
linked to: http://stackoverflow.com/q/958983
tagged with: javascript
has answer: http://stackoverflow.com/a/25516249
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/1047454
accepted answer: http://stackoverflow.com/a/25516249
has body: I want to create a closure dynamically. See code below for explanation. function myFunction(){ parentScopedVar(); //Would like to be able to call without using 'this'. } function myDynamicFunc(dynamicClosure){ //What do I need to do here to dynamically create //a var called 'parentScopedVar' that can be referenced from myFunction? myFunction.call(self); } myDynamicFunc( { parentScopedVar : function() { alert('Hello World'); } });
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/10060857
has comment: http://stackoverflow.com/comment/39834199
has title: Javascript call with dynamic closure

http://stackoverflow.com/comment/39862860
type: Comment
has text: This gets the cell in question, but I'm interested in getting the object in that cell. Once I have the cell, how do I get the relevant ID of the span tag inside?
comment on: http://stackoverflow.com/a/25524118
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39652355
has text: This is commonly known as the "scratch off" effect. It is done using canvas's `context.globalCompositeOperation`. Here's a link to a tutorial: http://beej.us/blog/data/html5-canvas-globalcompositeoperation/ Check out the tutorial, experiment with coding it yourself and come back to Stackoverflow if you have more specific questions about your code. Good luck with your project!
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25417967

http://stackoverflow.com/q/25416244
answer count: 1
has comment: http://stackoverflow.com/comment/104376442
favorite count: 0
tagged with: mapbox
type: UnansweredQuestion
upvote count: 1
has title: Mapbox center and set appropriate zoom level for a country
tagged with: leaflet
has body: I'm trying to find a way to center and zoom to a country using Mapbox. I am able to get a country its coordinates using the geocoder, however, the zoom levels differ per country. (E.g. the zoom level for Spain is not the same level for the U.S.A.) function showMap(err, data) { console.log(data); console.log(err); if (err == true) { console.log("Couldn't find this place!"); } else { map.fitBounds(data.lbounds); } } var geocoder = L.mapbox.geocoder('x',map); geocoder.query("Spain", showMap); Would I need an additional layer with fusion tables to achieve this? Thanks for any help!
score: 1
type: Question
has answer: http://stackoverflow.com/a/25430728
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39727281
type: AnswerComment
score: 0
type: Comment
has text: Thanks, I was afraid I would have to do that.
comment on: http://stackoverflow.com/a/25455755

http://stackoverflow.com/comment/39892312
score: 0
comment on: http://stackoverflow.com/q/25542804
type: Comment
type: QuestionComment
has text: what do you mean with "does not work"?

http://stackoverflow.com/comment/39651390
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25417461
has text: yes, you changed a lot from the code I gave you. For the background issue, try this: `background:url('bg/old-paper-texture.jpg') no-repeat; background-size:800px 100%; ` and now you'll have it covering everything you need yet leaving those buttons out
score: 0

http://stackoverflow.com/comment/39793239
has text: Is it `12:00 AM` local time or GMT?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25494370

http://stackoverflow.com/comment/39696045
comment on: http://stackoverflow.com/q/25442681
type: Comment
type: QuestionComment
has text: use Autocomplete textbox instead of select http://jqueryui.com/autocomplete/
score: 0

http://stackoverflow.com/comment/39690002
comment on: http://stackoverflow.com/q/25439268
type: Comment
type: QuestionComment
score: 1
has text: Is this what you need??? [link](http://www.davidjrush.com/blog/2011/01/javascript-creating-a-simple-textbox-watermark-with-text/)

http://stackoverflow.com/a/68842412
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25540791
has body: This might help users of HTML Minifier which uses UglifyJS under the hood: const htmlmin = require('gulp-html-minifier-terser'); // new fork of gulp-htmlmin .pipe(htmlmin({ collapseWhitespace: true, // etc. minifyJS: {compress:{sequences:false}}, }); I found you can pass through Uglify options via the minifyJS instead of just true which uses all the defaults.

http://stackoverflow.com/comment/39773154
type: Comment
type: AnswerComment
has text: try to chmod 777 in the project root folder
comment on: http://stackoverflow.com/a/25483888
score: 0

http://stackoverflow.com/comment/39651133
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25417667
has text: @slynthin If you see "'u' is undefined" in the console log, then that means that the Fiddle is working.

http://stackoverflow.com/a/25487307
has comment: http://stackoverflow.com/comment/39997012
has comment: http://stackoverflow.com/comment/39845211
has body: 2013 2012 June December You can see the working fiddle - http://jsfiddle.net/grvngr/fak1s583/ Hope this helps!
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25482275
has comment: http://stackoverflow.com/comment/39805879
has comment: http://stackoverflow.com/comment/40132830
has comment: http://stackoverflow.com/comment/40096355

http://stackoverflow.com/q/25486686
tagged with: express
has comment: http://stackoverflow.com/comment/39777953
has comment: http://stackoverflow.com/comment/39778107
score: 0
has title: Struggling with ajax PUT request
has answer: http://stackoverflow.com/a/25486839
tagged with: ajax
has comment: http://stackoverflow.com/comment/39782572
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39782824
has answer: http://stackoverflow.com/a/25492899
type: Question
has body: EDIT: No longer getting an undefined URI once I passed $(this).attr('red') to a variable. Still getting the 500 Server error though. EDIT: Here is all the code on github (just in case I have missed something!) EDIT: Here is the how the function is called in global.js $('#userList table tbody').on('click', 'td a.linkedituser', editUser); And here is the html. User Info Name: Age: Gender: Location: User List UserName Email Delete Edit Edit User Edit User I am trying to submit a form as a PUT request to edit a user's information. I receive the following error in my Chrome console when I submit the form. [Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (undefined, line 0) The right of the error shows the ID just fine so I imagine this is something to do with the router end? http://localhost:3000/users/edituser/53fa0acbc069f52257312d2c Here is my client side function. function editUser(event) { event.preventDefault(); var thisUserID = $(this).attr('rel'); var arrayPosition = userListData.map(function(arrayItem) { return arrayItem._id; }).indexOf(thisUserID); var thisUserObject = userListData[arrayPosition]; $('#editUserName').val(thisUserObject.email); $('#editUserEmail').val(thisUserObject.email); $('#editUserFullname').val(thisUserObject.fullname); $('#editUserAge').val(thisUserObject.age); $('#editUserLocation').val(thisUserObject.location); $('#editUserGender').val(thisUserObject.gender); var editUser = { 'username' : $('#editUserName').val(), 'email' : $('#editUserEmail').val(), 'fullname' : $('#editUserFullname').val(), 'age' : $('#editUserAge').val(), 'location' : $('#editUserLocation').val(), 'gender' : $('#editUserGender').val(), } //just a test to prove that I can read the id from the db $('body > h1').text($(this).attr('rel')); $('#btnEditUser').on('click', function() { $.ajax({ type: 'PUT', url: '/users/edituser/' + thisUserID, data: JSON.stringify(editUser), dataType: 'json', success: function(msg) { alert('S…
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39748083
type: Comment
has text: @AthulAK I want to use a code similar to this in a forum to allow the user to include it multiple times in a post.
comment on: http://stackoverflow.com/q/25470213
score: 0
type: QuestionComment

http://stackoverflow.com/q/25453686
tagged with: mysql
type: Question
has body: I am trying to call an insert statement multiple times within a javascript loop (requestAnimFrame) using ajax, but only a single entry will be entered into the table. Ajax call (mainpage.php): $.ajax({ type: "POST", url: "ajaxPHP.php", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { }, error: function(err) { // alert(err.toString()); if (err.status == 200) { } else { alert('Error:' + err.responseText + ' Status: ' + err.status); } } }); My insert statement (inserts.php): $con = mysqli_connect("localhost", "root", "", "database"); $sql = "INSERT INTO testing values( '$x1', '$x2', '$x3','$x4', '$x5', '$x6', '$x7', '$x8', '$x9', '$x10', '$x11')"; mysqli_query($con, $sql); mysqli_close($con); Note: the ajax block runs when it is supposed to (it is been reached), but the insert statement does NOT insert a new row, instead it overwrites the first rows values. Any help would be much appreciated, Thanks!
has answer: http://stackoverflow.com/a/25453809
has title: Creating iterated SQL `INSERT` statements using ajax
tagged with: javascript
has comment: http://stackoverflow.com/comment/39716989
score: 0
tagged with: sql
answer count: 1
tagged with: ajax
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39717009
has comment: http://stackoverflow.com/comment/39717135

http://stackoverflow.com/comment/39643026
has text: What have you tried? You should not expect others to code things for you. Besides, the task is not well-defined. What should happen when the user tries to type or paste more data than the limits specify? E.g., should an overlong line wrap?
comment on: http://stackoverflow.com/q/25412230
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/39810042
type: Comment
type: QuestionComment
has text: With this function: `function paste_coord(){ window.location = 'f?p=&APP_ID.:202:&APP_SESSION.::NO::P202_Text_Field:' + popup_coord; }` When I look into the link in my browser on the new page, I see `P202_TEXT_FIELD:LatLng(48.30247,%2016.02837)` so that should be right. The **popup_coord** is my string where the coordinates are stored.
score: 0
comment on: http://stackoverflow.com/q/25502300

http://stackoverflow.com/comment/39767335
has text: C:\wamp\www\CodeIgniter_2.2.0\files\css\cssfile.css for css and C:\wamp\www\CodeIgniter_2.2.0\files\js\myjs.js for js
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25480410
type: Comment

http://stackoverflow.com/q/25418547
type: Question
has title: document.getElementById New Browser
has body: I was use document.getElementById("MyDiv1").style = "display:block"; for displaying MyDiv1 with javascript , That work on my pc but not work on other pc (mac) , Then I use : MyDiv1.style.display = "block"; That work on other pc too ! But the error in the function... The function before : function Show(What){ document.getElementById("MyDiv1").style = "display:block"; } The function that i right now use : ( Error ) function Show(What){ What.style.display = "block"; } The Error Message : TypeError: Cannot set property 'display' of undefined message: "Cannot set property 'display' of undefined" stack: (...) get stack: function () { [native code] } set stack: function () { [native code] } __proto__: Error
tagged with: javascript
has answer: http://stackoverflow.com/a/25418690
has comment: http://stackoverflow.com/comment/39651964
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/39651984
has comment: http://stackoverflow.com/comment/39652012
downvote count: 3
has comment: http://stackoverflow.com/comment/39653176
has comment: http://stackoverflow.com/comment/39651865

http://stackoverflow.com/comment/39601342
type: Comment
type: QuestionComment
has text: Sorry should have included that, edited.
comment on: http://stackoverflow.com/q/25391490
score: 0

http://stackoverflow.com/comment/88925672
score: 0
type: Comment
type: QuestionComment
has text: Possible duplicate of [Unsigned Right Shift / Zero-fill Right Shift in PHP (Java/JavaScript equivalent)](https://stackoverflow.com/questions/41134337/unsigned-right-shift-zero-fill-right-shift-in-php-java-javascript-equivalent)
comment on: http://stackoverflow.com/q/25463352

http://stackoverflow.com/comment/65810694
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/37768679
has text: Please let me know if you had any luck with this!

http://stackoverflow.com/q/25539017
has comment: http://stackoverflow.com/comment/39921798
has body: Good day everyone. I was trying to send a post request on rextester restful API that will return a json string, but it will just throw an error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://rextester.com/rundotnet/api. This can be fixed by moving the resource to the same domain or enabling CORS. with my code: $.ajax({ // ajax call starts type: 'POST', url: 'http://rextester.com/rundotnet/api', data: data, dataType: 'json', contentType: "application/json", accepts: "application/json", success: function(data) { console.log( "success" + JSON.stringify( data ) ); }, error: function (data) { console.log( "error" + JSON.stringify( data ) ); }, complete: function ( data ) { console.log( "complete" + JSON.stringify( data ) ); } }); but if i change the dataType to jsonp the error would recede to Uncaught SyntaxError: Unexpected token : rextester.com/rundotnet/api?callback=jQuery110202748815272934735_1409212747…%22Hello,%20Worlds!\%22);%20}%20}%22,%22Input%22:%22%22}&amp;_=1409212747488:1 which if i click will show the return value that i'm expecting in json format from the console: {"Warnings":null,"Errors":"Method \u0027main\u0027 must be in a class \u0027Rextester\u0027.","Result":"","Stats":"Compilation time: 0.84 sec, absolute service time: 0.85 sec","Files":null} any suggestions? tnx The API only supports POST requests and will return a JSON string value.
has title: rextester restful api json errors
answer count: 0
upvote count: 1
type: Question
tagged with: restful-url
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
tagged with: jsonp
has comment: http://stackoverflow.com/comment/39926874
tagged with: api
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39906139
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39907256

http://stackoverflow.com/a/25447556
type: Answer
has comment: http://stackoverflow.com/comment/39803737
has comment: http://stackoverflow.com/comment/39705401
score: 0
has body: When making a style change, turn off readonly, apply the style, and turn it back on. It will take milliseconds.
has comment: http://stackoverflow.com/comment/39705032
has comment: http://stackoverflow.com/comment/39705462
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25447463
accepted answer of: http://stackoverflow.com/q/25447463

http://stackoverflow.com/a/25487462
type: Answer
answers question: http://stackoverflow.com/q/25487314
score: 2
upvote count: 2
has body: I think name is not an legal name to use it as value for name attribute. If this is the case, then use a proper legal name to use it as value of name attribute. And, anyways try with different name as: document.getElementsByName('divName')[0].style.display='block';
downvote count: 0

http://stackoverflow.com/comment/39837908
type: Comment
has text: Also I just noticed in the demo that when homebutton is clicked then the navbar still goes back to default and expands after reload
comment on: http://stackoverflow.com/a/25518460
score: 0
type: AnswerComment

http://stackoverflow.com/a/25395720
upvote count: 1
has body: You could call window.setTimeout recursively or use window.setInterval. These both accept a callback method that will be called based on a timer (number of milliseconds). Here is an example: window.setTimeout(function() { // ... do your work ... }, 1000 ); You can find more information on MDN.
answers question: http://stackoverflow.com/q/25395697
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/25486160
has comment: http://stackoverflow.com/comment/39776981
score: 0
has body: Duplicate ids are invalid html, you should rather use class instead. You will also need to hide one element in beginning for toggling.: $( "button" ).click(function() { $( ".nav" ).slideToggle( "slow" ); }); Working Demo
type: Answer
has comment: http://stackoverflow.com/comment/39777528
has comment: http://stackoverflow.com/comment/39777183
answers question: http://stackoverflow.com/q/25486097
has comment: http://stackoverflow.com/comment/39777072

http://stackoverflow.com/q/25481206
has title: Jquery how to know if value exists on data attribute or not?
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25481311
tagged with: javascript
tagged with: jquery
has body: I have a html div like this. &lt;div id="myDiv" data-numbers="1 4 5 3 9 88 57 "&gt;&lt;/div&gt; Here on data-numbers attribute of div there are random numbers separated with white space. Now i want to find a value exists on data-number or not using jQuery. For example 1 should return true, 2 should false because 2 is not in data-numbers, 4 should return true and 7 should return false. Please help me on finding its solution. PS. I want to avoid loops. Thanks in advance.
has comment: http://stackoverflow.com/comment/39768538
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25481263
has comment: http://stackoverflow.com/comment/39770332
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25481298
has comment: http://stackoverflow.com/comment/39771619
accepted answer: http://stackoverflow.com/a/25481263
has answer: http://stackoverflow.com/a/25481298
has comment: http://stackoverflow.com/comment/39768638
type: Question

jquery-plugins
tags question: http://stackoverflow.com/q/25436265
tags question: http://stackoverflow.com/q/25461367
tags question: http://stackoverflow.com/q/25457267
tags question: http://stackoverflow.com/q/25438069
tags question: http://stackoverflow.com/q/25507737
tags question: http://stackoverflow.com/q/25461339
tags question: http://stackoverflow.com/q/25541594
type: Tag
tags question: http://stackoverflow.com/q/25547153
tags question: http://stackoverflow.com/q/25456254
tags question: http://stackoverflow.com/q/25403367
tags question: http://stackoverflow.com/q/25464625
tags question: http://stackoverflow.com/q/25393091
tags question: http://stackoverflow.com/q/25468965
tag name: jquery-plugins
tags question: http://stackoverflow.com/q/25530736
tags question: http://stackoverflow.com/q/25441213
tags question: http://stackoverflow.com/q/25462196
tags question: http://stackoverflow.com/q/25426503

http://stackoverflow.com/q/25409184
tagged with: jquery
has title: highchart stacked column, display extremely small values in shift lable
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: charts
has answer: http://stackoverflow.com/a/25423995
has body: i am currently using [highchart js lib][1] to create a stacked column chart for my project. here is my exact code: $(function () { $('#container').highcharts({ yAxis: { min: 0, title: { text: 'Total fruit consumption' }, stackLabels: { enabled: true, style: { fontWeight: 'bold', color: (Highcharts.theme &amp;&amp; Highcharts.theme.textColor) || 'gray' } } }, legend: { align: 'right', x: -70, verticalAlign: 'top', y: 20, floating: true, backgroundColor: (Highcharts.theme &amp;&amp; Highcharts.theme.background2) || 'white', borderColor: '#CCC', borderWidth: 1, shadow: false }, tooltip: { formatter: function() { return '&lt;b&gt;'+ this.x +'&lt;/b&gt;&lt;br/&gt;'+ this.series.name +': '+ this.y +'&lt;br/&gt;'+ 'Total: '+ this.point.stackTotal; } }, plotOptions: { column: { stacking: 'normal', dataLabels: { enabled: true, color: (Highcharts.theme &amp;&amp; Highcharts.theme.dataLabelsColor) || 'white', style: { textShadow: '0 0 3px black, 0 0 3px black' } } } } }); }); so the extremely small value shows up in extra label . i am not even sure highchart lib can do that or not, please suggest with some code example. cheers
tagged with: stacked-chart
type: Question
tagged with: highcharts
tagged with: javascript

http://stackoverflow.com/q/25452082
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39716742
has title: The returned code not stopping on ajax call
tagged with: vb.net
has comment: http://stackoverflow.com/comment/39716863
has body: this is my ajax call function $.ajax({ url: "webservices/mywebserveice.vb", data: "{'myactivity':'" + myactivity + "','myproddate':'" + mynewprddatee + "'}", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", async: true, success: function (data) { var obj = jQuery.parseJSON(data.d); //obj[0]["ColumnName"] var returnlist = new Array(); my vb. code returns some data and pass I to ajax call using Return New JavaScriptSerializer().Serialize(rows) .It stops at var obj in ajax call for some data but it is not stopping when i pass some other data in vb file. even if i have identical dataset result. here is a part of vb code 'Convert Dataset to DataReader Dim dr As DataTableReader = ds.Tables(0).CreateDataReader() If dr.HasRows Then Do While dr.Read() row = New Dictionary(Of String, Object) For c As Integer = 0 To dr.FieldCount - 1 '//fieldcount gives the column count. row.Add(dr.GetName(c), dr.GetValue(c)) '//getname-&gt;gets the column name; getvalue-&gt;gets the col value. Next rows.Add(row) Loop End If Return New JavaScriptSerializer().Serialize(rows) I also tried asycn = false/ture , same issue .. Any help appreciate
has comment: http://stackoverflow.com/comment/39785449
type: Question
has comment: http://stackoverflow.com/comment/39718192
tagged with: javascript
has comment: http://stackoverflow.com/comment/39713952
tagged with: jquery
has comment: http://stackoverflow.com/comment/39713892
tagged with: ajax
has comment: http://stackoverflow.com/comment/39714189
score: 0
has comment: http://stackoverflow.com/comment/39714019
has comment: http://stackoverflow.com/comment/39717045

http://stackoverflow.com/comment/39823944
comment on: http://stackoverflow.com/q/25510471
score: 0
has text: do was click buttons and add things that way. The closest thing to this that we have today is Dreamweaver, and I don't even use it. Coding from scratch is more fun in my opinion!
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39753288
has text: @ShadowWizard Ok. I thought that you wanted to tell him that the code improvement was not correct.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25472459

http://stackoverflow.com/comment/39628976
has text: @halfer I assumed you would know how to add url to ajax request. Now fixed.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25406172

http://stackoverflow.com/comment/39876222
comment on: http://stackoverflow.com/a/25539559
score: 0
type: Comment
has text: This question was answered before, why not just redirect him?
type: AnswerComment

http://stackoverflow.com/q/25399725
favorite count: 0
duplicate of: http://stackoverflow.com/q/14220321
tagged with: node.js
type: AnsweredQuestion
has title: NodeJS get async return value (callback)
has comment: http://stackoverflow.com/comment/39616582
has answer: http://stackoverflow.com/a/25399904
type: Question
answer count: 2
upvote count: 20
tagged with: javascript
has answer: http://stackoverflow.com/a/25399902
score: 20
has body: I have read around the internet about callbacks but I just can't understand them in my case. I have this function, and it logs to console when it runs. However I now need this response in another function and I am struggling to do so. var asyncJobInfo = function(jobID, next) { var oozie = oozieNode.createClient({ config: config }); var command = 'job/' + jobID + '?show=info'; console.log("running oozie command: " + command); oozie.get(command, function(error, response) { console.log("*****response would dump to console here:*****"); // console.log(response); return response; }); }; This is where I should get it: (This obviously doesn't work because it doesn't wait for the response.) exports.getJobInfoByID = function(req, res) { var jobIDParam = req.params.id; res.send(asyncJobInfo(jobIDParam)); } I really struggle to wrap my head around callbacks and I'm staring myself blind here.
downvote count: 0
accepted answer: http://stackoverflow.com/a/25399904
possible better answer: http://stackoverflow.com/a/25399902
tagged with: callback
linked to: http://stackoverflow.com/q/14220321

http://stackoverflow.com/comment/39697109
comment on: http://stackoverflow.com/q/25442869
type: QuestionComment
score: 1
type: Comment
has text: It isn't necessary to provide both _in_ and _out_ functions. [W3Schools](http://www.w3schools.com/jquery/event_hover.asp)

http://stackoverflow.com/a/25501142
has body: Check you load() handler first, is it getting called or not because there is no such a thing to determine that particular element is loaded, You can set style attributes at the time of element generation, though you can try this: this.style.color = "#0C6A13"; OR $(this).css("color","#0C6A13");
type: Answer
answers question: http://stackoverflow.com/q/25501107
score: 0

http://stackoverflow.com/q/25531186
accepted answer: http://stackoverflow.com/a/25531223
has body: I've tried various things found here on SO, but I cannot get this to work. Below is my entire HTML test document. I'm loading it with the following url: file:///Users/aaronbratcher/Documents/Tester.html?Donor.firstName=John&Donor.lastNameBusiness=Smith What I'm expecting is for the 2 text fields to be populated by the javascript with the values passed on the URL, however they are not being populated. The log messages indicate everything is found as expected. No errors or warnings reported. What am I doing wrong? Thanks. Accept Donation Donor Name
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39861011
has title: Unable to assign value using javascript
has answer: http://stackoverflow.com/a/25531587
tagged with: safari
has answer: http://stackoverflow.com/a/25531223
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39860853
possible better answer: http://stackoverflow.com/a/25531587
type: Question
tagged with: javascript

http://stackoverflow.com/a/25536213
has body: Multiple class selector: .class1.class2 { } Multiple selectors are separated by comma: .class1.class2, .class1 { } So, in your case: .more-options, .show-required.more-options { //style } EDIT As required, jquery selector uses css selectors, so: $(".more-options, .show-required.more-options").show(); // or hide
type: AcceptedAnswer
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/25536169
type: Answer
accepted answer of: http://stackoverflow.com/q/25536169
score: 3

http://stackoverflow.com/a/25467322
upvote count: 10
has comment: http://stackoverflow.com/comment/39742593
downvote count: 0
type: Answer
has body: The answer is simpler than you think. The $ is indeed an alias for the jQuery library... which is implemented as a single function. When you see code that looks like this: $(document).ready(function() { ... }); What you are seeing is: The jQuery function ($) being called... ... with the argument document ... ... which returns an object ... ... which has a ready method, that gets called ... ... with an anonymous function for its argument. I had trouble with this when I first ran into it. I knew that in JavaScript, functions are first-class objects (which is why you can pass one as an argument) but somehow, that didn't make clear to me that something which was clearly a large, sophisticated object (i.e., the jQuery library) might also be a function. In fact, it's both. It's a function, and it's also an object that has its own properties, which include functions. That's why sometimes you'll see code like the following: $.getJSON('http://www.foo.com/search?q=.... In our previous code, $ was the function we were calling. In this code, $ is the object on which the function we are calling, getJSON, is located.
has comment: http://stackoverflow.com/comment/39742624
answers question: http://stackoverflow.com/q/25467321
score: 10
has comment: http://stackoverflow.com/comment/39742734

http://stackoverflow.com/a/25474166
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25474089
has body: You may want to give jQuery a try to help you with this. While it can be done in standard javascript, jQuery packages all in nice and easy to use features. In jQuery it would look something like this $(".listenForMouse").bind("click dblclick hover", function(event) { }); A listing of the different mouse events can be found at http://api.jquery.com/category/events/mouse-events/

http://stackoverflow.com/q/25507234
tagged with: jquery
has title: How to add new property with same key name inside declared object?
favorite count: 0
has comment: http://stackoverflow.com/comment/39817203
answer count: 3
has body: How can I append/add new property with same key name inside declared object ? Here the code: // Declared object var myObject = { name : 'John', age : 15, }; // Array list of new property need to be add to myObject var others = [ { key : 'hobby', value: 'reading' }, { key : 'hobby', value: 'writing' } ]; What i've been try so far: ko.utils.arrayForEach(others, function(other) { myObject[other.key] = other.value; }); and ko.utils.arrayForEach(others, function(other) { var extendObject = new Object(); extendObject[other.key] = other.value; $.extend(myObject, extendObject); }); The result still both doesn't work either. It just replace existing property value What I need is something like this: myObject: { name: 'John', age: 15, hobby: 'reading', hobby: 'writing' } Please note: I don't want to make it array : hobby: ['reading', 'writing'] UPDATE: I was implement this for search functionality, code and details above is simplified version of the part I was stuck. and here is the full code of what i've try to accomplish: my views: &lt;form data-bind="submit: $root.getSearchData"&gt; &lt;input name="date_start" class="datepicker"&gt; &lt;div class="checkbox"&gt; &lt;label&gt; &lt;input type="checkbox" name="user_id[]" value="1"&gt; John &lt;/label&gt; &lt;label&gt; &lt;input type="checkbox" name="user_id[]" value="2"&gt; Michael &lt;/label&gt; &lt;/div&gt; &lt;/form&gt; my viewmodels: // Will contains new search property need to append to queryData self.searchPropertyList = ko.observableArray(); // This function will fetch tasks from server self.getTasksFromServer = function() { // Query data var queryData = { sort : 'start', order: 'asc' }; /** * When getSearchData function fill formData into searchPropertyList observable, * this function will get a notify and it will automatically loop through it * and append new property to queryData. */ ko.utils.arrayForEach(self.searchPropertyList(), function(opt) { queryData[opt.name] = opt.value; } $.ajax({ url: 'api/tasks', type: 'j…
has answer: http://stackoverflow.com/a/25507379
linked to: http://stackoverflow.com/q/19149496
has comment: http://stackoverflow.com/comment/39816829
has comment: http://stackoverflow.com/comment/39816892
has comment: http://stackoverflow.com/comment/39817955
has comment: http://stackoverflow.com/comment/39816841
upvote count: 5
tagged with: javascript-objects
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25507379
linked to: http://stackoverflow.com/q/18062306
has comment: http://stackoverflow.com/comment/39816940
has comment: http://stackoverflow.com/comment/39816821
has answer: http://stackoverflow.com/a/25507358
accepted answer: http://stackoverflow.com/a/25507358
tagged with: knockout.js
has answer: http://stackoverflow.com/a/25507476
type: Question
score: 5
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39678964
comment on: http://stackoverflow.com/a/25414489
type: Comment
has text: Not sure, I've never tried any animation with the canvas. I've seen topics about canvas animations here, so there's probably some good info floating around.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25455863
has title: can you get year/month/date from Date().getTime
has comment: http://stackoverflow.com/comment/39721401
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/25455882
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25455933
has comment: http://stackoverflow.com/comment/39721435
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25456450
has body: I'm trying to figure out what the best way to store date in DB is. Using new Date().getTime() seems to be the most common but is it possible to get the year/month/date from the timestamp? or is getTime meant as a way to sort data. Should I just store new Date() directly if I want retrieve the y/m/d information again? Thanks
upvote count: 2
accepted answer: http://stackoverflow.com/a/25455933
answer count: 3
has comment: http://stackoverflow.com/comment/39721391
has answer: http://stackoverflow.com/a/25455882

http://stackoverflow.com/comment/39812789
comment on: http://stackoverflow.com/q/25504771
type: Comment
type: QuestionComment
has text: possible duplicate of http://stackoverflow.com/questions/9158238/why-js-function-name-conflicts-with-element-id
score: 0

http://stackoverflow.com/a/25482410
answers question: http://stackoverflow.com/q/25482366
has comment: http://stackoverflow.com/comment/39770576
accepted answer of: http://stackoverflow.com/q/25482366
type: Answer
downvote count: 0
has body: The OnClick event will reload the page and therefore the JS called from the OnClientClick will never be triggered. Remove the OnClick event. Edit: If you need to trigger the serverside event let your JS trigger it after the alert.
score: 1
upvote count: 1
type: AcceptedAnswer

express
tags question: http://stackoverflow.com/q/25462159
tags question: http://stackoverflow.com/q/25419092
tags question: http://stackoverflow.com/q/25415296
tags question: http://stackoverflow.com/q/25393794
tags question: http://stackoverflow.com/q/25477210
tags question: http://stackoverflow.com/q/25473449
tags question: http://stackoverflow.com/q/25441507
tags question: http://stackoverflow.com/q/25503536
tags question: http://stackoverflow.com/q/25525467
tags question: http://stackoverflow.com/q/25443956
tags question: http://stackoverflow.com/q/25448681
tags question: http://stackoverflow.com/q/25448269
tags question: http://stackoverflow.com/q/25488917
tags question: http://stackoverflow.com/q/25483078
tags question: http://stackoverflow.com/q/25400722
tags question: http://stackoverflow.com/q/25467697
tags question: http://stackoverflow.com/q/25475033
tags question: http://stackoverflow.com/q/25533983
tags question: http://stackoverflow.com/q/25412741
tags question: http://stackoverflow.com/q/25510410
tags question: http://stackoverflow.com/q/25515385
tags question: http://stackoverflow.com/q/25407282
tags question: http://stackoverflow.com/q/25396592
tags question: http://stackoverflow.com/q/25514996
tags question: http://stackoverflow.com/q/25486686
tags question: http://stackoverflow.com/q/25505789
tags question: http://stackoverflow.com/q/25493110
tags question: http://stackoverflow.com/q/25441387
tags question: http://stackoverflow.com/q/25468734
tags question: http://stackoverflow.com/q/25471789
tags question: http://stackoverflow.com/q/25515642
tags question: http://stackoverflow.com/q/25465381
tags question: http://stackoverflow.com/q/25527719
tags question: http://stackoverflow.com/q/25448343
tags question: http://stackoverflow.com/q/25448947
tags question: http://stackoverflow.com/q/25431518
tags question: http://stackoverflow.com/q/25410482
tags question: http://stackoverflow.com/q/25528052
tags question: http://stackoverflow.com/q/25411630
tag name: express
tags question: http://stackoverflow.com/q/25521750
tags question: http://stackoverflow.com/q/25518591
tags question: http://stackoverflow.com/q/25498775
tags question: http://stackoverflow.com/q/25514899
tags question: http://stackoverflow.com/q/25452672
tags question: http://stackoverflow.com/q/25544897
tags question: http://stackoverflow.com/q/25525177
type: Tag
tags question: http://stackoverflow.com/q/25549731
tags question: http://stackoverflow.com/q/25470595
tags question: http://stackoverflow.com/q/25533294
tags question: http://stackoverflow.com/q/25420934
tags question: http://stackoverflow.com/q/25459434
tags question: http://stackoverflow.com/q/25497274
tags question: http://stackoverflow.com/q/25439801

http://stackoverflow.com/q/25496625
downvote count: 0
has answer: http://stackoverflow.com/a/25499748
accepted answer: http://stackoverflow.com/a/25499748
score: 8
favorite count: 0
has comment: http://stackoverflow.com/comment/136096972
upvote count: 8
has title: Add local image as custom marker in google maps
has answer: http://stackoverflow.com/a/57734659
type: AnsweredQuestion
has body: i'm trying to create a custom marker using google maps. var iconBase = //some url; var marker = new google.maps.Marker({ position: myLatLng, map: map, icon: iconBase + 'marker.png' }); This basically works. I host my images in a google drive. It's good, but a little slow, takes about 500-700ms to load the image for the first time upon clicking to a map and rendering the marker. So I'm trying to add the image locally, sadly, I can't seem to find resources regarding this one. How do I use local (in my project directory) images? Assuming I put it in a folder "icons" within the same directory level as my php file where I call google maps services, if that helps. Thank you! Update! I tried: maker = new google.maps.Marker({ position: location, map: globalMap, icon : "pubIcons/male-2.png" }); where pubIcons is a folder in the same directory as the php file where I render the map. and I get this error : GET http://localhost/bims-2.0/index.php/location/view/pubIcons/male-2.png 404 (Not Found) It sort of behaves like pubIcons/male-2.png is an action in my controller "view", i'm using Yii btw.
has comment: http://stackoverflow.com/comment/111672360
type: Question
tagged with: google-maps
tagged with: javascript
possible better answer: http://stackoverflow.com/a/57734659
linked to: http://stackoverflow.com/q/23949867
tagged with: google-maps-api-3
answer count: 3
has answer: http://stackoverflow.com/a/61568795

http://stackoverflow.com/q/25509210
downvote count: 0
tagged with: jquery
has title: How can I remove all text after the last of every ?
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
upvote count: 2
has body: I have a menu with their submenus too. After the page loads.. The website generates random texts after every end of submenus.. This is the current markup that is generated from firebug: &lt;nav class="shopMenuHover"&gt; &lt;div id="bx_incl_area_5_1"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#" &gt;First Menu&lt;/a&gt; &lt;div class="" style=""&gt;&lt;h2&gt;&lt;a href="#"&gt;First Sub Menu&lt;/a&gt;&lt;/h2&gt; &lt;ul&gt; &lt;li&gt; &lt;a href=""&gt;Sub Menu &amp;gt; Sub Menu&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Sub Menu &amp;gt; Sub Menu&lt;/a&gt; 90797&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class="firstLevel hasSubmenu instrumentarium-en-fresen"&gt; &lt;a href="#" class="firstLevel"&gt;Second Menu&lt;/a&gt; &lt;div&gt;&lt;h2&gt;&lt;a href=""&gt;Second Menu&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=""&gt;&lt;font&gt;&lt;font&gt;Sub Menu &amp;gt; Sub Menu&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Sub Menu &amp;gt; Sub Menu&lt;/a&gt; 896346&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/nav&gt; Problem: The texts 90797 and 896346 are texts generated randomly by the website. How can I remove these texts after every last li > a inside every ul? This is the current jquery i used to select only the text inside a tag: &lt;script type="text/javascript"&gt; $(document).ready(function() { $(".shopMenuHover ul li:last-child &gt; a").css( "border", "2px solid red"); }); &lt;/script&gt; Output: Remove all texts after a tag of every last li-last-child.. Please Help Me...
has answer: http://stackoverflow.com/a/25509260
type: Question
has comment: http://stackoverflow.com/comment/39821425
linked to: http://stackoverflow.com/q/25505930
has answer: http://stackoverflow.com/a/25510080
tagged with: javascript
has answer: http://stackoverflow.com/a/25510348
answer count: 3

http://stackoverflow.com/comment/39738360
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25463908
has text: Thank you. Now, no exception appear, but the function does not work. Nothing happens. No `alert message` will be displayed.
score: 0

http://stackoverflow.com/q/25415441
type: Question
has body: The code below allows me to have an array with a set of numbers such as "thearray=[2,8,9]" and loop through that array, and for each number item in the array for example "2,8,9", the code calls a function an amount of times equal to the current number item in the array. So if the current number item is 2, the function gets called twice. After the set of calls, there is a pause, and then the function is called again an amount of times equal to the current number in the array etc. In other words, as the array is being looped through, if the current number item is 2, the function named "thefunction" will be called twice then there is a pause and the function "thefunction" is then again called an amount of times equal to the next number in the array. In my case, "thefunction" simply displays an alert box message two times followed by a pause, then 8 times followed by a pause, then 9 times followed by a pause etc. Of course, with the alert box messages, I get the messages in sequence because I must select ok before I see the next alert message. The problem is, I can't get the calls to "thefunction" to appear sequential like when the code to be executed within "thefunction" displays an alert box, when other code such as appending an li item with data to a ul is within that function. It's as if the 2 calls are made at once, then the 8 calls are made at once, etc. Even though that may not be the case, it happens so fast, it seems like it. I would like to slow it down. So if the code within "thefunction" was code that would append information to an li element, instead of just seeing the information rapidly added where the sequence of calls isn't noticeable, I would like there to be a delay so that when li elements are appended, the sequence is more obvious rather than rapid where it's hard to see the sequence. Here is the code: function runArray(arr, fn) { // initialize array index - can't use for loop here with async var index = 0; function next() { var cnt = +arr[index]; f…
tagged with: javascript
has answer: http://stackoverflow.com/a/25415639
has title: How can I get this code to make the sequence obvious?
possible better answer: http://stackoverflow.com/a/25415813
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25415652
has answer: http://stackoverflow.com/a/25415813
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25415639

http://stackoverflow.com/comment/60619499
comment on: http://stackoverflow.com/a/30884781
score: 2
has text: there are 2 major problems with this solution. #1 it does not prevent the browser from storing the password. I tried this method anyways and that lead to another major problem. #2 in my FireFox it clears the password initially but as soon as I tab out of the username field, the password gets autofilled. I think I will have to make and implement a custom input class
type: AnswerComment
type: Comment

dataview
tags question: http://stackoverflow.com/q/25453814
tag name: dataview
type: Tag

http://stackoverflow.com/q/25417483
has answer: http://stackoverflow.com/a/25417536
type: Question
has body: I have added this Adsense (for content) code on my page to display 1 ad: All the code is located where the ad is displayed. However Chrome PageSpeed tells me that the code is not asynced: 68.6KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering. http://googleads.g.doubleclick.net/.../ads?... (45.4KiB of inline JavaScript) http://pagead2.googlesyndication.com/.../abg.js (23.1KiB) What am I doing wrong?
has title: Why is JavaScript code parsed during initial page load?
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/25417536
tagged with: asynchronous
tagged with: adsense
has comment: http://stackoverflow.com/comment/39650326
has comment: http://stackoverflow.com/comment/39650259
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39650095

http://stackoverflow.com/comment/39837604
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25518244
type: Comment
has text: Yep, just found that answer a few min ago. Cheers for the help :)

http://stackoverflow.com/comment/39904087
type: Comment
type: QuestionComment
has text: I am sorry I meant this sample with fully complaint UX guidelines https://github.com/googlecast/Cast-Player-Sample
comment on: http://stackoverflow.com/q/25533627
score: 0

http://stackoverflow.com/q/25470198
accepted answer: http://stackoverflow.com/a/25470584
answer count: 1
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/39747836
has comment: http://stackoverflow.com/comment/39747966
linked to: http://stackoverflow.com/q/9515704
type: AnsweredQuestion
has body: I'm working on a devtool Chrome extension and would like to log all XHR request of the current website. So in my injected script ea "messageback-script" I have this: (function(open) { XMLHttpRequest.prototype.open = function(method, url, async) { console.log('The URL is: ' + url); }; })(XMLHttpRequest.prototype.open); And I have given required permissions in the manifest.json: { "name": "DevToolsPanel", "version": "0.1", "description": "Log XHR requests", "devtools_page": "devtools.html", "background": { "scripts": [ "background.js" ] }, "permissions": [ "tabs", "http://*/*", "https://*/*" ], "manifest_version": 2 } The problem is that I don't see anything in the console log (blank). What am I doing wrong?
tagged with: google-chrome-devtools
has answer: http://stackoverflow.com/a/25470584
type: Question
has comment: http://stackoverflow.com/comment/39747924
has comment: http://stackoverflow.com/comment/39747911
tagged with: javascript
has comment: http://stackoverflow.com/comment/39747845
has comment: http://stackoverflow.com/comment/39747961
score: 0
has title: Enable Cross-Origin XMLHttpRequest in devtool
tagged with: google-chrome-extension

http://stackoverflow.com/comment/39822268
score: 0
type: AnswerComment
type: Comment
has text: Lol yes I got that, but how would you want to do it if you cannot change the code ?? You seem very confused
comment on: http://stackoverflow.com/a/25509906

http://stackoverflow.com/a/25485120
type: Answer
answers question: http://stackoverflow.com/q/25479619
accepted answer of: http://stackoverflow.com/q/25479619
type: AcceptedAnswer
has body: You could simply push the entire event to Firebase in one big push. firebaseRef.child("events").push(data); // bad practice, don't do this! But that means you'll end up using array indices for child nodes on the server. Array indices are notoriously likely to cause problems in distributed data structures. So whenever you have a list-like structure, it is best to simply push each item into Firebase and let them generate a unique ID for you. For your case that means that you need to loop-and-push for each event (only one in the example), race and participant. Code sample: // Add the event var event = firebaseRef.child("events").push({ event_id: data.event_id, event_venue: data.event_venue, event_name: data.event_name, event_type: data.event_type, event_url: data.event_url, event_datetime: data.event_datetime }); // Add then races to the event data.races.forEach(function(race) { var race = event.child("races").push({ race_id: race.race_id, race_type: race.race_type, race_url: race.race_url, race_name: race.race_name, race_venue: race.race_venue, race_datetime: race.race_datetime, }); // Add the participants to the race race.race_participants.forEach(function(participant) { race.child("participants").push({ participants_id: participant.participants_id, participants_name: participant.participants_name, participants_place_odds: participant.participants_place_odds, participants_win_odds: participant.participants_win_odds, participants_result: participant.participants_result }); }); });
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/68321361
upvote count: 6

http://stackoverflow.com/a/25455586
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25455516
answers question: http://stackoverflow.com/q/25455516
has comment: http://stackoverflow.com/comment/39722086
type: Answer
has body: The first argument is the selector, the second argument is the context $('selector', 'context'); Selector is restricted in this case and will only match descendants of your context. This is equivalent of the find method: $('context').find('selector'); Both will get the same result.
score: 0

http://stackoverflow.com/q/25442359
accepted answer: http://stackoverflow.com/a/25443392
has body: I'd like to know the most efficient way of using JS/jQuery to obtain the cell IDs and text for a single column of an HTML table (excluding the header), so that these two arrays can be passed into another function. The function called is a widget that takes the ID and data and acts upon it. I know the column headers, so presumably I can use this to select the correct column. I see by searching, that there are many different ways of doing it, but which one would be most efficient? Many Thanks Richard
possible better answer: http://stackoverflow.com/a/25442748
type: AnsweredQuestion
has title: Build an array of table cell IDs for a column
type: Question
has answer: http://stackoverflow.com/a/25442748
has answer: http://stackoverflow.com/a/25443262
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25443392

http://stackoverflow.com/q/25447054
has answer: http://stackoverflow.com/a/25447098
type: UnansweredQuestion
downvote count: 2
type: Question
linked to: http://stackoverflow.com/q/987967
has answer: http://stackoverflow.com/a/25447155
has answer: http://stackoverflow.com/a/25447267
has answer: http://stackoverflow.com/a/25447185
upvote count: 0
has comment: http://stackoverflow.com/comment/39703758
score: -2
tagged with: javascript
tagged with: jquery
has title: Set the title property of html button with JavaScript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have one button with its corresponding ID. I wish to set the tooltip property of it with JS. HTML How am I able to do this ? Is it title property or some other ? Thank you in advance
duplicate of: http://stackoverflow.com/q/987967
answer count: 4

http://stackoverflow.com/q/25476342
answer count: 0
has comment: http://stackoverflow.com/comment/39759657
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has title: Bootstrap: dropdown doesnt work after using ajax modal
tagged with: modal-dialog
tagged with: ajax
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/39761015
type: UnansweredQuestion
has body: This is how I open up an ajax modal: // MODAL AJAX $('body').on('hidden.bs.modal', '.modal', function() { $(this).removeData('bs.modal'); }); $('.remote-click').click(function(){ var dataContent = $(this).attr("data-content"); $('.spinner').show(); setTimeout(function(){ $('#remote').modal({remote: 'ajax.php?' + dataContent, backdrop: 'static', show: true}); }, 1000); setTimeout(function(){ $('.spinner').hide(); }, 2000); }); After opening a modal this way the bootstrap dropdown function on the site doesnt work. It only works if I refresh the whole page. Also I have the problem that you'll see the old ajax modal content for some seconds using this code, before the new one loads. But the loading indicator will be shown first. I couldn't figure out how to solve this. Appreciate any suggestions on both issues!

http://stackoverflow.com/comment/39779318
type: Comment
score: 1
has text: I'm not sure that `getElementsByName()` will include ` ` nodes in its result, because "name" is not a meaningful attribute for a ` `. *edit* nope I'm wrong :)
comment on: http://stackoverflow.com/a/25487361
type: AnswerComment

http://stackoverflow.com/q/25448220
has title: HTML / CSS inline textarea set width to same as input
has comment: http://stackoverflow.com/comment/39768978
has answer: http://stackoverflow.com/a/25450912
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I'm not sure if this is possible by CSS alone, but I'm attempting to create an inline textarea element where the text is selectable but still looks like part of a sentence. It looks fine when the number of characters are known (cols="11") by: To run nload for your device run nload p3p1 in your terminal. and the CSS: textarea { display: inline; border:none; resize: none; } Is there a way of doing this dynamically, without specifying the columns for each textarea in CSS? So each textarea is inline and looks unobtrusively part of a normal paragraph but selectable? Failing a CSS solution, is there a (pure) JavaScript one?
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39706138
has comment: http://stackoverflow.com/comment/39706721
has comment: http://stackoverflow.com/comment/39706211
score: 1
type: Question
has answer: http://stackoverflow.com/a/25449937
answer count: 2
has comment: http://stackoverflow.com/comment/39706890
upvote count: 1
has comment: http://stackoverflow.com/comment/39706255
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39706609

http://stackoverflow.com/comment/39803826
type: QuestionComment
comment on: http://stackoverflow.com/q/25499948
has text: @diEcho - ideally I would do real time memory monitoring to figure out when the client cannot handle storing more data in the memory, but since it is not possible in browser JS (no browser API's for that), I am looking to perform some kind of an estimation.
score: 0
type: Comment

http://stackoverflow.com/q/25412425
type: UnansweredQuestion
tagged with: coldfusion-7
tagged with: cffile
has title: Coldfusion 7: Saving Base64 Image to Server
has body: A client needs us to generate a lot of dynamic QR codes for a project their doing. I think the end up being some hybrid between Name tags and event markers. In any case I've generated the QR just fine in JavaScript. Between JS and ColdFusion I'm even able to generate hundreds of dynamic QR codes in a second. The problem is now they're just sitting in the temporary memory of what ever client machine made them. I can send them as a form post in a 'text' input so I could begin something like a file upload, but that's where I stop having ideas. How do I have these Base64 blob strings as PNGs on my server using ColdFusion? I have CF7 so I don't have access to cfImage that I'm aware of.
tagged with: base64
type: Question
answer count: 2
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/10058780
has answer: http://stackoverflow.com/a/25413055
has answer: http://stackoverflow.com/a/25413196
tagged with: coldfusion

http://stackoverflow.com/comment/39687093
has text: Remove brackets from ngmodel. You shouldnt put that for ngmodel.
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/25437032

http://stackoverflow.com/a/25410595
has body: Use an array they are much simpler than Relations and good for 100 relations. Add an array to your PFUser subclass and then simply store pointers to the word object here's the Parse docs on one-to-many with Arrays: https://parse.com/docs/relations_guide#onetomany
score: 0
answers question: http://stackoverflow.com/q/25401249
type: Answer
has comment: http://stackoverflow.com/comment/39700295
has comment: http://stackoverflow.com/comment/39842126

http://stackoverflow.com/a/25549468
score: 2
has comment: http://stackoverflow.com/comment/39987942
answers question: http://stackoverflow.com/q/25548779
accepted answer of: http://stackoverflow.com/q/25548779
type: AcceptedAnswer
downvote count: 0
has body: The best way I can think to do this with your current set up is to apply a class to the items that you want to be hidden based off what is currently in the selected 3 items. I added a $scope.leftMost variable to monitor the index in $scope.items is on the left of the visible area. Then added a boolean to each $scope.items element called isVisible. In the html file we add an ng-class that toggles a class based on this boolean ng-class="{ hidden: !item.isVisible}" Then based off the moveLeft and moveRight methods you have already defined we use the $scope.leftMost variable to toggle the isVisible boolean as needed. A little CSS magic for the .hidden class thrown in as well. .menucontainer .hidden{ opacity:0; visibility:hidden; } PLUNKER ADDITIONAL Further to OP's comment, you can parse your returned data as it comes back into your service. For example: .factory('MenuItems', ['$http', function ($http) { var factory = {}; var addVisible = function(menuItems){ for(var x = 0; x &lt; menuItems.videos.length; x++){ var menuItem = menuItems[x]; if(x &lt; 3){ menuItem.isVisible = true; }else{ menuItem.isVisible = false; } } return menuItems; } factory.get = function () { var path = '/menuItemUrl/'; return $http.get(path).then(function (resp) { if(resp.data.length){ return addVisible(resp.data[0]); } }); }; return factory; }])
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/39987260

http://stackoverflow.com/a/25481742
type: Answer
has body: Just prepend '/' to make the path relative to the domain root instead your current location. window.location = "/blogg/" + id;
answers question: http://stackoverflow.com/q/25481677
has comment: http://stackoverflow.com/comment/39769361
has comment: http://stackoverflow.com/comment/39769263
score: 0

http://stackoverflow.com/q/25542880
has comment: http://stackoverflow.com/comment/39882625
type: AnsweredQuestion
upvote count: 1
tagged with: loops
type: Question
has body: Following is the working code - http://plnkr.co/edit/6lRhiTd1BrKRdThY0WNB?p=preview In this if you select the number from drop down and fill data then click and check console you will see the result like - [ Object { start_time="12Start", end_time="12END"}, Object { start_time="34start", end_time="786"}, Object { start_time="123", end_time="5656"}, Object { start_time="098", end_time="77"}, Object { start_time="75757", end_time="57567"} ] Now If you check, there are two arrays - $scope.shiftstart | $scope.shiftend I am looping through these but one problem with this approach is that- 1) It needs to be dependent on the equal length of arrays. 2) If some one leaves the first end time input field then it comes as undefined in the console. What I am thinking is to not to use - separate ng-model="shiftstart[shiftnumber]" &amp; ng-model="shiftend[shiftnumber]" instead I could use ONE single array containing multiple objects but I am unable to integrate the solution, let me know what I can amend in my code to make that happen.
tagged with: javascript
has answer: http://stackoverflow.com/a/25544944
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/39884337
has title: Creating Dynamic ng-model in AngularJS
answer count: 1
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25544944
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25398830
has body: I think you should do it using a filter function. Something like this: filter:function(value){return ['concert','theater'].indexOf(value.itemType) !== -1;}
score: 0
has comment: http://stackoverflow.com/comment/39616286
answers question: http://stackoverflow.com/q/25398713
has comment: http://stackoverflow.com/comment/39614877
type: Answer
has comment: http://stackoverflow.com/comment/39615491

http://stackoverflow.com/comment/39655981
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25420845
has text: Probably, since it has to parse the selector and then figure out what to do, and what to do is what getting by id and classname does.

http://stackoverflow.com/comment/39601550
type: Comment
comment on: http://stackoverflow.com/a/25390810
type: AnswerComment
has text: as you can see from the example in the docs, after the templates directory the directory structure reflects the module name and then the template name. In your example you have the module name `MyModule` and the template name `directivea` but your directory structure is `grails-app/assets/templates/directivea.tpl.html`. It should be `grails-app/assets/templates/my-module/directivea.tpl.html`. The other thing is, that you do this: `templateUrl: 'directives/directivea.html'` which seems not to be correct. According to the docs it should be `templateUrl: 'directivea.html'`
score: 0

http://stackoverflow.com/a/25477431
downvote count: 0
has comment: http://stackoverflow.com/comment/39776663
score: 1
answers question: http://stackoverflow.com/q/25476929
has comment: http://stackoverflow.com/comment/39762728
type: Answer
has body: In javascript, each function is always evaluated against a context, which defines the value for the this. A function's context could be set explicitly or implicitly at the moment of calling the function. For setting the context implicitly you have to call a function like this: //z will be the context, in other words, inside method: this = z a.b.c.d...z.method(); For setting the context explicitly there are two functions in the prototype of the Function object that you can use: apply and call. These two are compatible with every browser so you won't have problems. The thing is that, with these two, you are setting the context each time you call the function so it wouldn't help you with your problem if you use them directly. You must define a function that always evaluates against the same context every time you call it. For this you could use the bind function, defined in the Function object prototype, the problem is that it is not compatible with old browsers because is a recent addition to ECMA-262, 5th edition. Nevertheless the solution could be bind every condition function to your object in the addCondition function: Thing.prototype.exampleCondition = function(value) { return function() { return this.currentValue === value; }; }; Thing.prototype.addCondition = function(condition) { //The bind function will return a function that will always execute with your object as context this.conditions.push(condition.bind(this)); } For the browser compatibility thing you could try this code. Put it at the beginning of your script and you can be sure that you will have the bind function for every browser. Another possible solution could be: Thing.prototype.exampleCondition = function(value) { var self = this; return function() { return self.currentValue === value; }; }; The thing is that, in this case, you are not using the context, you are ignoring it inside the returned function. Instead of using the context you are replacing it with some variable defined in the scope. Fo…
upvote count: 1

http://stackoverflow.com/comment/39753696
type: Comment
has text: GMambaG explained it above.
comment on: http://stackoverflow.com/a/25473334
score: 0
type: AnswerComment

http://stackoverflow.com/q/25478147
tagged with: css
type: AnsweredQuestion
has title: Convert text into css
type: Question
has answer: http://stackoverflow.com/a/25478154
tagged with: javascript
has comment: http://stackoverflow.com/comment/39762617
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25478199
accepted answer: http://stackoverflow.com/a/25478161
has body: I want to convert a text into css. For example in my javascript code . I am getting a value like var text1= sales headline ; which i want set in the text div with the style and i am doing like $("#divVar").text(text1); But it is setting the whole value as sales headline but i want the text Sales headline with red color. Any idea what i am doing wrong here or it can be fixed?
possible better answer: http://stackoverflow.com/a/25478154
has answer: http://stackoverflow.com/a/25478161
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25436845
tagged with: regex
has title: Is it possible to match different specific length using RegExp in JavaScript?
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/39687251
type: Question
accepted answer: http://stackoverflow.com/a/25436914
tagged with: javascript
has comment: http://stackoverflow.com/comment/39686955
answer count: 1
linked to: http://stackoverflow.com/q/12784338
downvote count: 0
has body: I know that with JS RegExp I can match: Exact length; /^[a-zA-Z]{7}$/ A length range; /^[a-zA-Z]{3,7}$/ A minimum length; /^[a-zA-Z]{3,}$/ What if I wanna match varying specific lengths? Something like: /^[a-zA-Z]{2|4|6}$/ meaning that the string must have either length of 2, 4 or 6 characters. Can I do it using JavaScript's RegExp? I tried googling but couldn't find a way to search for this specific case, I always end up finding how to match length ranges. Scenario: I currently have this if statement that I would like to make shorter: if(typeof ean !== 'string' || !/^\d+$/.test(ean) || [8, 12, 13, 14].indexOf(ean.length) === -1) { return false; }
favorite count: 0
has answer: http://stackoverflow.com/a/25436914
has comment: http://stackoverflow.com/comment/39686034

http://stackoverflow.com/q/25531905
has answer: http://stackoverflow.com/a/25532055
downvote count: 0
tagged with: javascript
tagged with: gruntjs
has title: Should I inline all CSS and JS for a static SPA?
tagged with: bundling-and-minification
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25532216
score: 8
favorite count: 0
has comment: http://stackoverflow.com/comment/39862218
has answer: http://stackoverflow.com/a/25532402
accepted answer: http://stackoverflow.com/a/25532055
upvote count: 8
has comment: http://stackoverflow.com/comment/39862466
possible better answer: http://stackoverflow.com/a/31867486
answer count: 5
has answer: http://stackoverflow.com/a/31867486
tagged with: css
has body: I am creating a Single Page Application that consists of only static HTML, JS and CSS. I need to support IE9+, modern desktop browsers and iOS 6+. The web is built using grunt, and I'm considering inlining all JS and CSS the HTML file, which would simplify handling a little bit. As there is no server-generated content, and the .html page is cached as well, do you see any pitfalls or drawbacks when inlining all JS and CSS? As far as I understand it could even increase performance, as there are fewer roundtrips for the browser, but maybe there are some good reasons to not inline those (quite huge) files? Do you have any experiences with this? [Edit] It seems to be quite unclear. I do not want to manually put all JS and CSS I am working with in the resulting HTML file. I have a clean project structure, and think about letting grunt generate an inlined version as release output. I won't work with the inlined version, neither for developing nor for debugging. My question is only about the technical part: Will there be any negative influence on the browser (except for caching, the whole html is cached, and I can live with invalidating it as a whole)? Why is inlining as a result of an automated build process still considered bad practice (except for the caching topic)?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25532140
type: Question

http://stackoverflow.com/comment/39639870
type: Comment
has text: Just return inside of `worker.getFamilies`: `return getFamiliesFromDb(...)...`
comment on: http://stackoverflow.com/q/25411630
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39866449
score: 0
type: QuestionComment
type: Comment
has text: Is it the right way to print the values in the appropriate spans?
comment on: http://stackoverflow.com/q/25534432

http://stackoverflow.com/a/25418690
answers question: http://stackoverflow.com/q/25418547
type: Answer
has comment: http://stackoverflow.com/comment/39725663
has comment: http://stackoverflow.com/comment/39727245
has body: The "safe" way to write such functions is to check that the first method returns a suitable object before proceeding, so as a minimum you should do: function show(id) { var el = document.getElementById(id); if (el) { el.style.display = "block"; // Consider using '' (empty string) instead } } Since if getElementById finds a DOM element, it will be returned and you can assumed that it will have a suitable style property. And if such an element isn't found, it returns null and the function does nothing (or you might choose to throw some kind of error). Also, if you are hiding elements by element.stlye.display = 'none'; then it's best to show them again by: element.stlye.display = ''; // empty string that way the element can adopt its default display property or whatever it inherits through CSS. Not all visible elements have a display of block, e.g. span is inline, tr is table-row or block depending on browser, and so on.
score: 0

http://stackoverflow.com/a/25431742
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39676698
answers question: http://stackoverflow.com/q/25431648
has body: content is initially empty, but the innerHTML of div is not. You could change this line to get the desired result: div.innerHTML += content; // ^ here

http://stackoverflow.com/comment/39796499
type: Comment
comment on: http://stackoverflow.com/q/25496122
type: QuestionComment
has text: I have changed the numbers to strings and still get undefined. Thanks, @LJ_1102. What do you mean by break? And how would I fix that?
score: 0

http://stackoverflow.com/a/25494032
has comment: http://stackoverflow.com/comment/39795206
has comment: http://stackoverflow.com/comment/39887476
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39875214
type: Answer
has body: All you need is in your question's tags: JavaScript, PHP and AJAX. You need this things: create an endpoint in PHP, which returns just song/artist information, for example formatted in JSON or XML put JavaScript code in your page with the player, which periodically (for example once in 1 or 5 seconds) calls endpoint from point 1 (using for example JavaScript function XMLHttpRequest) and replace part of DOM, which contains song/artist information (probably DIV/SPAN with some ID) That's all. That two things together are called AJAX. That abbreviation originally means Asynchronous JavaScript and XML, but you can use also JSON or plain HTML as response from your endpoint, not just XML. AJAX isn't a real thing, it's just a nickname for technique of asynchronous calls in JavaScript. In a dumbest way: imagine you have this in your HTML page with a player: Now playing: Create a JavaScript code, which will be executed each 1 second, it will call PHP script you have posted in your question, which returns currently played song as text without any other content (just "Artist - Song") and JavaScript code will put it (overwrite previous content) into span#now_playing. That's all.
accepted answer of: http://stackoverflow.com/q/25493702
has comment: http://stackoverflow.com/comment/39795256
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25493702
has comment: http://stackoverflow.com/comment/39871083

http://stackoverflow.com/q/25540997
type: Question
linked to: http://stackoverflow.com/q/25560646
has title: Search values from first column in html table using JS?
tagged with: javascript
has answer: http://stackoverflow.com/a/25541309
has answer: http://stackoverflow.com/a/25542644
score: 4
has answer: http://stackoverflow.com/a/25541164
accepted answer: http://stackoverflow.com/a/25541164
has body: I have this table Example No. Column 1 3512376894 two.test2@hotmail.com I have script that search the values by all columns. But all I want to do is search the values by first column only with td id. But I don't know how to do that. Please kindly, help me to do that? Thanks! Here's the jsfiddle file Here's the JScript: function doSearch() { var searchText = document.getElementById('searchTerm').value; var targetTable = document.getElementById('dataTable'); var targetTableColCount; for (var rowIndex = 0; rowIndex < targetTable.rows.length; rowIndex++) { var rowData = ''; if (rowIndex == 0) { targetTableColCount = targetTable.rows.item(rowIndex).cells.length; continue; //do not execute further code for header row. } for (var colIndex = 0; colIndex < targetTableColCount; colIndex++) { rowData += targetTable.rows.item(rowIndex).cells.item(colIndex).textContent; if (rowIndex <= 1) { document.getElementById('noresults').style.display = "block"; } } } }
tagged with: search
tagged with: html-table
favorite count: 0
possible better answer: http://stackoverflow.com/a/25541687
has answer: http://stackoverflow.com/a/25541687
upvote count: 4
tagged with: search-engine
answer count: 4
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/39682995
type: QuestionComment
comment on: http://stackoverflow.com/q/25435242
score: 1
has text: When you find a matching item you are `return`ing from the function. The rest of the loop won't get executed. Hence no `SortAs` or `Acronym`. And do you actually want `GlossEntry`, `GlossList`, `GlossDiv` and `glossary`? What are you actually trying to do here?
type: Comment

http://stackoverflow.com/a/25462987
has body: You could use a backtracking algorithm to solve this type of problem: function process(var blockstate) { if(gridIsFullOfBlocks(blockstate)) return true; if(canPlaceBlock(blockstate)) { blockstate = placeLargestBlock(blockstate); return process(blockstate); } return false; } function fillBlocks(int size) { var blockstate = new Array(size); if(process(blockstate)) displayBlockstate(blockstate); else displayError(blockstate); }
answers question: http://stackoverflow.com/q/25462822
score: 0
type: Answer

http://stackoverflow.com/q/25418109
has comment: http://stackoverflow.com/comment/39763774
answer count: 0
type: Question
tagged with: javascript
score: 0
has body: Using Vugen, working on a application that generates a component to upload files on client-side, component doesn't appear during runtime as it is generated by JavaScript functions on the client side. I have two issues: I have the functions that generate the browse field. How do I use it in my script? I have also created a javascipt based script in Vugen as well. Facing issues with correlation using web.create_html_param, as it doesn't capture anything. Note: If possible, please let me know how to convert javascript function to loadrunner C function. The function cant be used as-is in the script. Can anyone help me with this?
tagged with: client
has title: JavaScript generating an upload component for Vugen
tagged with: correlation
tagged with: loadrunner
has comment: http://stackoverflow.com/comment/39745659
type: UnansweredQuestion

http://stackoverflow.com/comment/39739839
score: 0
type: Comment
has text: status is always "success"
type: AnswerComment
comment on: http://stackoverflow.com/a/25465789

http://stackoverflow.com/a/25483076
downvote count: 0
has comment: http://stackoverflow.com/comment/39774055
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/39771504
upvote count: 3
has body: It works fine if you remove the ::-webkit part: $('.button').on('click', function (e) { $('.topcoat-range-input').css('background', 'rgba(255, 208, 255, 0.75)'); }); EDIT: Since you need the -webkit part, one (slightly messy) way of doing this, would be to add a style rule each time you click the button: $('.button').on('click', function (e) { $("&lt;style type='text/css'&gt;.topcoat-range-input::-webkit-slider-thumb{background:rgba(255, 208, 255, 0.75)}&lt;/style&gt;").appendTo($("head")); });
has comment: http://stackoverflow.com/comment/39771348
accepted answer of: http://stackoverflow.com/q/25482971
answers question: http://stackoverflow.com/q/25482971
has comment: http://stackoverflow.com/comment/39840949
type: AcceptedAnswer

search-engine
type: Tag
tags question: http://stackoverflow.com/q/25540997
tag name: search-engine
tags question: http://stackoverflow.com/q/25443556

http://stackoverflow.com/comment/39789725
comment on: http://stackoverflow.com/q/25492563
score: 0
type: QuestionComment
has text: @cdhowie Of course, it's a string literal
type: Comment

http://stackoverflow.com/q/25537046
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25537117
type: Question
tagged with: mobile
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25537117
has title: How get device resolution for loading sharp images but size fonts/divs properly with viewport width=device-width?
has body: On mobile, if I don't use the tag (see below) to set the viewport width to device width, then fonts are too small and hard to read and divs size more like on a desktop. &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; But if I use that, then choosing what size image to load will return a small, pixelated image because the reported pixel width is half what it really is. For example, an iPhone 5S will report a width of 320px when it's really showing a resolution of 640px wide. How do I allow for both these differences? (without the viewport tag, the css will not size properly. with it, my code loads too low a resolution image on devices that report 1 pixel width for every pixel on screen) I can't just double the pixel width when loading images because not every device/browser halves the pixel size. I want the fonts and elements to be sized based on width=device-width but not the images I load. How do I combine these?
has comment: http://stackoverflow.com/comment/39871750

http://stackoverflow.com/q/25510738
has body: I was wondering if it was at all possible to modify a page that doesn't refresh (I'm using Ajax) via PHP. It sounds like a stupid question, and I'm 99.999999% sure it's not possible. The only way I could think of doing it was if I were to output an array with the values and use javascript to modify the page. I need to return multiple things, which is why I didn't want to use javascript and communicate with ajax, but I think an array is the only choice. if(isset($_FILES['payload'])) { $file = $_FILES['payload']; try { $file['name'] = htmlentities($file['name']); $name = $file['name']; $extension = pathinfo($name, PATHINFO_EXTENSION); $finfo = new finfo; $fileinfo = htmlentities($finfo-&gt;file(htmlentities($file['tmp_name']), FILEINFO_MIME)); } catch (Exception $e) { echo "NULL NAME"; } if($extension == 'exe' &amp;&amp; (substr($fileinfo, 0, 15) == 'application/exe' || substr($fileinfo, 0, 21) == 'application/x-dosexec')) { try { /* * Encryption Removed */ mkdir("REMOVED"); move_uploaded_file($file['tmp_name'], "REMOVED"); $td[0] = filesize("REMOVED"); $td[1] = htmlentities($file['name']); $td[2] = $fileinfo; echo "NULL NULL"; } catch(Exception $e2) { echo "NULL ENCRYPTION"; } } else echo "NULL FILESTATUS"; The above is what I currently have, I apologise for the poor formatting. $td is the array that contains information about the file - which is what I need to return to javascrpt, but I also need to return another variable which is either NULL FILESTATUS, NULL ENCRYPTION, NULL NAME or NULL NULL. Any help is appreciated.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25510840
tagged with: ajax
type: Question
tagged with: php
accepted answer: http://stackoverflow.com/a/25510840
possible better answer: http://stackoverflow.com/a/25510793
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25510793
has title: Display PHP values to a page that doesn't refresh
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39796659
comment on: http://stackoverflow.com/a/25496243
type: AnswerComment
type: Comment
has text: @canon Judging by `container.getElementsByClassName("bar");`, the OP was targeting the `.bar` elements.
score: 1

http://stackoverflow.com/comment/39648386
has text: Thanks. Checking now.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25416380
type: Comment

http://stackoverflow.com/comment/50980314
has text: ok I think it's working now. Just adsense doesn't show any ads at the first 2-3 days. thanks!
type: Comment
comment on: http://stackoverflow.com/a/25436675
score: 0
type: AnswerComment

http://stackoverflow.com/q/25509911
tagged with: sapui5
upvote count: 5
has comment: http://stackoverflow.com/comment/62152132
downvote count: 1
type: Question
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/31470506
tagged with: wrapper
has answer: http://stackoverflow.com/a/30044559
tagged with: shell
has title: SAPUI5: What are strengths and weaknesses of the sap.m.Shell and sap.m.App as container for an application wrapper?
favorite count: 0
has body: What are strengths and weaknesses of the sap.m.Shell and sap.m.App as container for an SAPUI5 application wrapper? I currently use non of them, but I see the advantages. SAP best practise is to use one of them or nest them as shell > app. What are strengths and weaknesses of the approaches?
type: UnansweredQuestion
score: 4

http://stackoverflow.com/a/25434870
answers question: http://stackoverflow.com/q/25434781
has comment: http://stackoverflow.com/comment/39702095
type: Answer
has comment: http://stackoverflow.com/comment/39683815
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39682513
has comment: http://stackoverflow.com/comment/39701103
has comment: http://stackoverflow.com/comment/39715837
has body: Javascript uses garbage collection and it is best not to free memory explicitly. Good reading on this is in "De-referencing Misconceptions" in the article "Writing Fast, Memory-Efficient JavaScript". A quote from the article: It’s not possible to force garbage collection in JavaScript. You wouldn’t want to do this, because the garbage collection process is controlled by the runtime, and it generally knows best when things should be cleaned up.
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25434781
has comment: http://stackoverflow.com/comment/39683172

http://stackoverflow.com/comment/96830895
has text: I have a related question: https://stackoverflow.com/q/55039923/3683187
comment on: http://stackoverflow.com/q/25498911
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39803427
has text: guess you have got the answers needed, just one small correction, please close the ` ` tag in the `thead` properly.
comment on: http://stackoverflow.com/q/25500113
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/39757082
type: Comment
has text: Does your `thread_id` contains correct value? Do you add a backslash on the end?
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25475048

http://stackoverflow.com/comment/39699678
type: QuestionComment
type: Comment
has text: are IDs 'fromdate' 'todate' or 'from_date' 'to_date'
score: 0
comment on: http://stackoverflow.com/q/25444739

http://stackoverflow.com/comment/39880498
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25540611
has text: Yeah good good......
score: 0

http://stackoverflow.com/comment/40712115
score: 0
comment on: http://stackoverflow.com/a/25972207
type: AnswerComment
has text: Except it worked before hand just fine... And it works just fine when manually using console.log from within the console...
type: Comment

http://stackoverflow.com/comment/39872043
score: 1
type: AnswerComment
has text: I've just opened [issue #1247](https://github.com/angular/protractor/issues/1247) check Julie / Hank answers there later on.
type: Comment
comment on: http://stackoverflow.com/a/25533985

http://stackoverflow.com/comment/39723618
comment on: http://stackoverflow.com/q/25456912
type: Comment
type: QuestionComment
has text: @Jason Goemaat The reason for the array is that the user of this API can register these handlers to listen to a certain event, so there could be 1 handler or 20. Essentially I need to execute each handler in the order they were registered. However since the handlers are intended to modify a single instance of an object. It is necessary to wait for each to have completed its work with the current instance before moving on to the next. Hopefully that clarifies the scenario.
score: 0

http://stackoverflow.com/q/25424761
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25424851
has body: I have a system that lists an number of items from a database, these items can have three different states that can be attached to it, Manual, Auto and VIP. A single item in this list could be either of this states and sometimes two or all three at the same time. The system also has three filters, Manual, Auto and VIP. I am trying to build a system so that when a state has changed on a filter (box is checked/unchecked) the system will hide or show items from this list. So i am struggling with this concept with my current implementation. here is some code: A/M Update #1 11/11/13 A/M Update #2 11/11/13 M Update #3 11/11/13 I have three "data-" attributes attached to each list item, i wanted to use these to detect if the item show be displayed or not but i can't think of a simple way of doing this. My other thought on the matter would be to add a class to each item saying if it is Manual, Auto or VIP for example I understand how to remove and display elements this way however it seems a little messy to me. So what is the best way of achieving this using Jquery? I think i might be over engineering the whole thing. Thanks for your time.
type: AnsweredQuestion
type: Question
answer count: 1
has title: Removing items based on values where an item can have multiple values
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25424851

http://stackoverflow.com/a/25448787
has comment: http://stackoverflow.com/comment/39709861
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25441563
answers question: http://stackoverflow.com/q/25441563
has body: You don't want your outside code to know about your Ember application. The best way to deal with this in this case is using DOM events. DOM events would be the means of communication between your Ember application and the "outside world". See http://emberjs.com/api/classes/Ember.View.html#toc_responding-to-browser-events for some documentation on this. For instance App.ApplicationView = Ember.View.extend({ // See comment by @Wishy click: function() { this.send('actionThatWillBeSentToYourRoute'); }, /* didInsertElement: function() { var self = this; // Replace 'click' with a custom DOM event this.$().on('click', function() { Ember.run(self, function() { this.send('actionThatWillBeSentToYourRoute'); }); }); } */ }); The Ember.run is required because you want to run the callback inside the Ember runloop. Note that it is a bit cleaner to register your custom DOM events as in http://emberjs.com/api/classes/Ember.Application.html#property_customEvents. Then in your Route you would have App.ApplicationRoute = Ember.Route.extend({ actions: { actionThatWillBeSentToYourRoute: function() { ... } } }); Note that you can define your own custom DOM events, for instance an event updateFolder. Then you can do function updateFolderModel(obj){ $.trigger('updateFolder', obj); } I hope this is of any help!
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25531491
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39861966
has comment: http://stackoverflow.com/comment/39862190
accepted answer of: http://stackoverflow.com/q/25531071
type: Answer
answers question: http://stackoverflow.com/q/25531071
score: 1
upvote count: 1
has body: you can overwrite method2, after your external js create your anchors, you can use load event of your body tag, after all assets have been loaded: function window_load() { var newHandler = method2; method2 = function(arg){ var result = newHandler(arg); // ... // you can call here any function or something else // ... return result; }; } i tried to overwrite method2, by this approach you can change any method you want
has comment: http://stackoverflow.com/comment/39862344
has comment: http://stackoverflow.com/comment/39861767
downvote count: 0
has comment: http://stackoverflow.com/comment/39862274
has comment: http://stackoverflow.com/comment/39862517

http://stackoverflow.com/comment/39734436
has text: Instead of regex, you should consider using $('textarea').html() to create a DOM tree from your plaintext. Then you can use either plain JS or jQuery functions to iterate across the tree and output code accordingly. This is the most powerful, and IMO easiest, form of syntax highlighting with javascript. That or use a library.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25461497
score: 1

http://stackoverflow.com/a/25542659
has comment: http://stackoverflow.com/comment/39882656
has comment: http://stackoverflow.com/comment/39883146
score: 1
has comment: http://stackoverflow.com/comment/39883156
has body: First of all you should not use id for multiple elements, so change id="tddelete" to class="tddelete" for all button elements. &lt;input type="button" class="tddelete" /&gt; You can find for input element present in next td of button's parent td. Don't forget to put name attribute for input elements. $('.tdiv').on("click", ".tddelete", function () { var val = $(this).closest("td").siblings().find("input[name=flag]").val(); alert(val); }); Demo
has comment: http://stackoverflow.com/comment/39884080
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25542481
has comment: http://stackoverflow.com/comment/39882069
answers question: http://stackoverflow.com/q/25542481
has comment: http://stackoverflow.com/comment/39882718
type: Answer
has comment: http://stackoverflow.com/comment/39882894
has comment: http://stackoverflow.com/comment/39882276
upvote count: 1

http://stackoverflow.com/comment/39636317
type: Comment
has text: if you make the text red, make sure the background color isn-t red too!!
comment on: http://stackoverflow.com/a/25410100
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39792470
comment on: http://stackoverflow.com/a/25492708
score: 0
type: AnswerComment
has text: would returning that anonymous function "reset" the stack?
type: Comment

http://stackoverflow.com/comment/39714536
comment on: http://stackoverflow.com/q/25451284
has text: Sorry, question edited.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39886125
type: Comment
has text: is it because of this: `innerDoc.location.reload(true);`?
type: QuestionComment
comment on: http://stackoverflow.com/q/25545336
score: 0

http://stackoverflow.com/a/25483019
has body: jQuery.position() doesn't return value for style.right. It returns only Object{top: somVal, left: somVal} so if u want to get the value of right then get it from style attribute Eg- $("#efficacia").click(function() { // var posizione = $("#efficacia").position();//here right is undefined var right=this.style.right.replace("px", "") * 1;//fetch value of right from style if(right != 0) { $(this).animate({ right: '0' }, 1000); } else { $(this).animate({ right: '202' }, 1000); } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25482636

http://stackoverflow.com/comment/39880895
comment on: http://stackoverflow.com/a/25542292
score: 1
type: AnswerComment
has text: eval function is evil
type: Comment

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/25448556
tag name: google-fusion-tables

http://stackoverflow.com/a/25399691
upvote count: 2
answers question: http://stackoverflow.com/q/25399554
type: Answer
score: 2
downvote count: 0
has body: You should use parseFloat in case of Version number like "5.01" document.write(parseFloat(navigator.appVersion).toFixed(1)); toFixed() tells how many dezimal places should be visible.

http://stackoverflow.com/comment/39877708
type: QuestionComment
comment on: http://stackoverflow.com/q/25539788
score: 0
type: Comment
has text: Is your app fully in java script?

http://stackoverflow.com/q/25416611
has comment: http://stackoverflow.com/comment/39648497
has answer: http://stackoverflow.com/a/25416616
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39648696
has body: I've been staring at this for half an hour and can't find my error. I just have to make a simple for loop that can print something onto the console. for(var i=0;i&lt;4;i+1){ console.log(i); } It also is asking for a while loop and a do/while loop. I haven't done those yet, but I don't think that's the error. It says: SyntaxError: Unexpected token ILLEGAL
has comment: http://stackoverflow.com/comment/39648559
has answer: http://stackoverflow.com/a/25416787
tagged with: javascript
type: UnansweredQuestion
tagged with: for-loop
has answer: http://stackoverflow.com/a/25417224
has title: For loop - syntax error
has comment: http://stackoverflow.com/comment/39648678
has comment: http://stackoverflow.com/comment/39648556
type: Question
has comment: http://stackoverflow.com/comment/39648474
has comment: http://stackoverflow.com/comment/39648546

http://stackoverflow.com/a/25404205
has comment: http://stackoverflow.com/comment/39624944
has comment: http://stackoverflow.com/comment/39624778
downvote count: 0
has comment: http://stackoverflow.com/comment/39625519
accepted answer of: http://stackoverflow.com/q/25404115
has comment: http://stackoverflow.com/comment/39624871
answers question: http://stackoverflow.com/q/25404115
type: AcceptedAnswer
has body: you do not need to use jQuery in success call back and you have extra comma(,) after success call back. replace this: success: function(data) { jQuery("#ajax-load").html(jQuery(data)); alert(''); wrapDiv(); }, by : success: function(data) { jQuery("#ajax-load").html(data); alert(''); wrapDiv(); }, error: function(xhr, error){ alert(error); }
score: 4
has comment: http://stackoverflow.com/comment/39625093
has comment: http://stackoverflow.com/comment/39625657
type: Answer
upvote count: 4

http://stackoverflow.com/comment/39723778
has text: @jfriend00 You have a good point the very nature of it makes it difficult to step through the code, and another good point that this should probably be posted on codereview. Thanks for your feedback.
comment on: http://stackoverflow.com/q/25456912
score: 0
type: Comment
type: QuestionComment

google-api
tags question: http://stackoverflow.com/q/25428541
tag name: google-api
type: Tag

http://stackoverflow.com/q/25548173
accepted answer: http://stackoverflow.com/a/25548391
type: AnsweredQuestion
downvote count: 0
has body: I'm ussing gmaps.js to display a basic google map with a marker placed on the current location. I am storing latitude and longitude coordinates in variables and using them to define the longitude and latitude. The Latitude and Longitude variables are updated from my server constantly. When this happens, the map displays the marker in a new position on the map however the entire map refreshes. I would like simply to just update the marker and keep the map from refreshing. Is there a way to do this?
has title: How can I update markers in gmaps without refreshing the map?
type: Question
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/39891493
upvote count: 3
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25548391

http://stackoverflow.com/q/25438418
has comment: http://stackoverflow.com/comment/39701641
has comment: http://stackoverflow.com/comment/39694036
type: UnansweredQuestion
has body: I am having trouble consuming a rest service that did. Already implemented a CORS filter in my Java application, but when I use the $.ajax() it returns the problem of CORS. Using $.getJSON can access the method, however I can not add headers on it. I need to know how to add the header in $.getJSON or how to make it recognize the CORS I added in my Java service. I'm using Java 8, Wildfly 8.1-Final, RestEasy, etc. My ajax like this: var url = "http://pacoteiro-trysoft.rhcloud.com/api/v1/pacote/RC824435750CN"; $.ajax({ async : true, type:'GET', contentType: 'application/json', url: url, cache:false, dataType: 'json', headers: { "token":"123" }, success: function(data) { alert("Cadastrado com sucesso!", data); }, error: function(data) { alert("Erro!", data); } }); and my filter this way: @Provider public class ConfigureCORSFilter implements ContainerResponseFilter { @Override public void filter(ContainerRequestContext requestContext,ContainerResponseContext responseContext) throws IOException { responseContext.getHeaders().add("Access-Control-Allow-Origin", "*"); responseContext.getHeaders().add("Access-Control-Allow-Headers", "application/json, origin, content-type, accept, authorization"); responseContext.getHeaders().add("Access-Control-Allow-Credentials", "true"); responseContext.getHeaders().add("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS, HEAD"); responseContext.getHeaders().add("Access-Control-Max-Age", "1209600"); } }
has title: How implements CORS with Javascript, jQuery?
tagged with: java-8
has comment: http://stackoverflow.com/comment/39701664
type: Question
has comment: http://stackoverflow.com/comment/39688748
has comment: http://stackoverflow.com/comment/39701800
tagged with: java
answer count: 2
tagged with: cors
has comment: http://stackoverflow.com/comment/39701822
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25447510
has answer: http://stackoverflow.com/a/25438537
score: 0
has comment: http://stackoverflow.com/comment/39701594
has comment: http://stackoverflow.com/comment/39688716

http://stackoverflow.com/q/25546648
has answer: http://stackoverflow.com/a/25547002
type: AnsweredQuestion
type: Question
has body: I've looked around on the web for an answer to my question. Found lots of scripts that I've copied and messed around with but can't get it working properly. When I run it, my script below initially works but then displays 'NaN'. I'm trying to create a simple order form that uses JavaScript to dynamically update and display the order total. Each item for sale has an input (type=number) tag that contains the item's price in a 'data-price' attribute. What I'm trying to do is grab the price out of the data-price attribute and use it in a JS script to display a total. Users can enter a quantity into text field and the TOTAL text field should automatically update with correct 'running total'. Would appreciate any advice as to where I'm going wrong. I've used JavaScript (as opposed to jQuery) because I'm more familiar with the syntax. Image Description Price Quantity Poster $24.00 T-shirt $66.00 Bag $120.00 TOTAL:
accepted answer: http://stackoverflow.com/a/25547002
score: 0
answer count: 1
tagged with: javascript
has title: JavaScript - HTML5 data attributes
tagged with: http://stackoverflow.com/tag/html
tagged with: custom-data-attribute

http://stackoverflow.com/a/25471982
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25464574
type: Answer
has body: $timeout is only a tiny angular wrapper around javascript setTimeout function and as such behaves in a similar fashion. Consider following example: var foo = { bar: function(){ console.log('bar this =', this); } }; foo.bar(); //-&gt; bar this = Object {bar: function} setTimeout(foo.bar); //-&gt; bar this = Window {top: Window, window: Window, location: Location, external: Object, chrome: Object…} When you call foo.bar() javascript runtime sets this context of function bar to foo. When you call setTimeout(foo.bar) the setTimeout function has a only reference to bar function and calls it with a this context set to Window - exactly as stated in documentation. Finally you can make your code work with a following change: $timeout(function(){ MyAuthentication.isLoggedIn() }, 1000);
upvote count: 1
answers question: http://stackoverflow.com/q/25464574
score: 1
has comment: http://stackoverflow.com/comment/40012826

http://stackoverflow.com/q/25499179
tagged with: jquery
has answer: http://stackoverflow.com/a/25506732
favorite count: 0
has comment: http://stackoverflow.com/comment/39815619
tagged with: ytplayer
has comment: http://stackoverflow.com/comment/39814422
type: AnsweredQuestion
upvote count: 3
accepted answer: http://stackoverflow.com/a/25506732
has comment: http://stackoverflow.com/comment/39814759
tagged with: youtube-api
tagged with: youtube
has title: YouTube fullscreen background autoplay not working in YTplayer
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39815640
has comment: http://stackoverflow.com/comment/39815345
has body: I am using YTplayer plugin for fullscreen youtube player in this-website Get inspired tab! I have provided code below with usefull links! I think the code is correct! Player is working if we click on the play control on hover at bottom of video player!(image below)! Please help me to sort out why autoplay is not working? where my code is having error? Useful Links >> https://github.com/pupunzi/jquery.mb.YTPlayer http://pupunzi.open-lab.com/mb-jquery-components/jquery-mb-YTPlayer/ http://pupunzi.com/#mb.components/mb.YTPlayer/YTPlayer.html Here is the code >> INNOVATING THROUGH TRAVEL Travel is more than the seeing of sights; it is a change that goes on, deep and permanent, in the ideas of living. solution Use Latest version of the java script for ytplayer.
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39837288
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25517325
has text: All I asked for is the HTML you're starting with for you fields. We can't provide jQuery code that operates on your HTML without seeing your HTML. Do you not even yet have HTML?

http://stackoverflow.com/q/25453339
score: 1
accepted answer: http://stackoverflow.com/a/25454713
upvote count: 1
type: Question
tagged with: c#
linked to: http://stackoverflow.com/q/14463759
has body: We have a form with a dropdownlist and a mix of Telerik Kendo UI controls on it (as well as a Telerik Grid). When the user makes a selection from the dropdown, an ajax call is made to an MVC controller action which sends back more data that will partially fill out the form. One of these fields is represented with a Kendo UI NumericTextBox. The requirement is to set input focus on this NumericTextbox when the data returns. However, this doesn't appear to be working in any scenario I try. Here is how the numeric textbox is defined on the page: @Html.Kendo().NumericTextBoxFor(model =&gt; model.ApplyFromPOA).Name("ApplyFromPOA").Step(0.01m).Min(0.00m).HtmlAttributes(new { @style = "width: 100%", @id = "ApplyFromPOA", @class = "defaultfocus" }) Here is the definition of the dropdownlist: @Html.Kendo().DropDownList().Name("AddPaymentCustomer").BindTo(@Model.CustomerList).DataTextField("Name").DataValueField("ID").HtmlAttributes(new { style = "width: 100%; max-width: 300px;" }).Events(e =&gt; { e.Change("changeCustomerInAddPaymentWindow"); }) The changeCustomerInAddPaymentWindow function looks like this: function changeCustomerInAddPaymentWindow (e) { var dataItem = getSelectedDataItemFromDropdown(e); var datagrid = $('#MyCustomerInvoiceResults').data('kendoGrid'); var dataSource = datagrid.dataSource; if (null != dataItem) { if (dataItem.ID == 0) { // Clear out the form clearOutForm(); } else { $.ajax({ url: "/Home/GetCustomerAndInvoices", type: 'POST', data: { customerId: dataItem.ID }, success: function (updatedModel) { $("#ApplyFromPOA").val(updatedModel.ApplyFromPOA); $("#poaAvailable").val(updatedModel.POAStringNoCommas); $("#POAString").html(updatedModel.POAString); $("#amount-left").html(updatedModel.POAString); $.each(updatedModel.Invoices, function (index, item) { dataSource.add(item); }); dataSource.sync(); setTimeout(function () { $("#ApplyFromPOA").select(); $("#ApplyFromPOA").focus(); $("#ApplyFromPOA").find("input").focus(0, function () { }); }, 200); }, err…
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25454713
tagged with: javascript
downvote count: 0
answer count: 1
favorite count: 0
tagged with: kendo-ui
tagged with: telerik-mvc
has title: Kendo UI input focus - After selection and Ajax call, DropdownList retains focus
type: AnsweredQuestion

http://stackoverflow.com/q/25449572
has comment: http://stackoverflow.com/comment/39710118
type: UnansweredQuestion
tagged with: wordpress
has comment: http://stackoverflow.com/comment/39710086
has answer: http://stackoverflow.com/a/25696737
type: Question
has title: tinyMCE in tinyMCePopup
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39708674
tagged with: jquery
has body: I created a plugin which open a tinyMCEPopup. The tinyMCEPopup is a html file with a form and i need to have a tinyMCE textarea in it. here is the structure of the popup: I tried to use: tinyMCEPopup.execCommand('mceAddControl',false,'mceEditor'); or tinyMCE.execCommand('mceAddControl',false,'mceEditor'); and the tinyMCE.init() function but it doesn't work. Thanks in advance.
tagged with: tinymce
score: 0

http://stackoverflow.com/comment/39831878
type: Comment
type: QuestionComment
has text: And [this blog post](http://blog.chromium.org/2014/06/migrate-your-legacy-packaged-apps-to.html) basically says that legacy packaged apps are no longer accepted.
comment on: http://stackoverflow.com/q/25514493
score: 0

http://stackoverflow.com/comment/39639680
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25411884
type: QuestionComment
has text: Have you checked the console for errors?

http://stackoverflow.com/comment/39706902
score: 1
comment on: http://stackoverflow.com/q/25447924
has text: If you always have a number at the beginning followed by text you can also just parseInt and it will pull the number out for you. var n = parseInt("10 item a");console.log(n);
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25538133
has comment: http://stackoverflow.com/comment/39874585
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25535712
has comment: http://stackoverflow.com/comment/39933810
answers question: http://stackoverflow.com/q/25535712
type: Answer
has body: You have several syntax issues. For example the lines below: $(".errors").append("&lt;div class="alert alert-danger alert-dismissible" role="alert"&gt;&lt;button type="button" class="close" data-dismiss="alert"&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;strong&gt;Oh snap!&lt;\/strong&gt; Local Storage doesn't work on your browser. Saving won't work, so you might want to keep this open if you want to keep your notes.&lt;\/div&gt;"); and $(".errors").append("&lt;div class=alert alert-info alert-dismissible&gt; role="alert"&gt;&lt;button type="button" class="close" data-dismiss="alert"&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;strong&gt;Heads up!&lt;\/strong&gt; No save was detected. Did you save before?&lt;\/div&gt;"); You need to escape the " character or use a single quote. That might not solve your issue, but it's a start. Your code is failing when execution reaches that line, and it can't continue, which might explain why you aren't getting the expected result. Try using your browser developer tools to find any errors in your code. This page has some information on finding and using the dev tools in your browser. The error in the JSFiddle is shown as: Uncaught SyntaxError: Unexpected identifier If you fix the quotation issues, you then get the error: Uncaught ReferenceError: mixpanel is not defined Keep going through the errors in your console and see if you can narrow down the issue that way.
has comment: http://stackoverflow.com/comment/39933861
score: 0

http://stackoverflow.com/comment/39722245
type: Comment
has text: For one thing, you could do document.body.appendChild(button) instead, but I don't think that's your problem. Can you not use jQuery?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25456336

http://stackoverflow.com/a/25536494
type: Answer
answers question: http://stackoverflow.com/q/25535449
has body: The reason it seems to stick to the white after hover ends is that in your code you've set the marker line color to lineColor:''. This is not a valid color. Remove it and your hover line effect should work correctly. To adjust the width of the stroke just change lineWidth. For example your finished plotOptions.bubble.marker-options could look like this: marker: { states:{ hover:{ lineWidth: 3, lineColor: 'white' } } } See this JSFiddle demonstration.
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25535449
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39848005
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25523654
has text: yes, i am really sorry for misunderstanding, i am just tired to search everywhere.
score: 0

http://stackoverflow.com/comment/39856698
type: QuestionComment
type: Comment
has text: Including two different (very different, in this case) versions of jQuery is always a recipe for disaster. If the contact form code really relies on such an ancient version of the library, it probably should not be used anyway.
score: 1
comment on: http://stackoverflow.com/q/25529109

http://stackoverflow.com/q/25476633
has title: Mobile compatabile website, not going.. Mobile width....?
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/25476709
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25476709
has body: I'm trying to get mobile comparability to work on my website and all my container &lt;div&gt;'s have a max-width: 1000px; and a width:100%; so my website should be able to reach 1000px, then have that &lt;div&gt; go 100%, but that's not happening. Well on a computer it is, but on mobile the website is showing up as 1000px wide so I'm terribly confused. Here's a link, hopefully you guys have an idea. I'll post all my code here, just because I think I have to.. HTML &lt;html&gt; &lt;head&gt; &lt;link href="css/reset.css" rel="stylesheet"&gt; &lt;link href="styles.css" rel="stylesheet"&gt; &lt;link href='http://fonts.googleapis.com/css?family=Raleway:400,700,100' rel='stylesheet' type='text/css'&gt; &lt;link href='http://fonts.googleapis.com/css?family=Lato:300,400' rel='stylesheet' type='text/css'&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="section1"&gt; &lt;div id="section1content"&gt; &lt;div id="logoimg"&gt; &lt;svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="300" height="300" viewBox="0 0 1898.000000 1898.000000" preserveAspectRatio="xMidYMid meet"&gt; &lt;metadata&gt; Darryl Huffman's logo &lt;/metadata&gt; &lt;g id="ttt" transform="translate(0.000000,1898.000000) scale(0.100000,-0.100000)" stroke="none"&gt; &lt;path d="M9120 18974 c-529 -29 -891 -69 -1315 -145 -2509 -455 -4719 -1889 -6156 -3994 -886 -1299 -1437 -2805 -1598 -4375 -39 -372 -45 -519 -45 -970 0 -451 6 -598 45 -970 135 -1319 547 -2601 1204 -3745 718 -1252 1699 -2313 2890 -3126 967 -660 2065 -1141 3203 -1403 494 -114 929 -180 1462 -223 303 -24 1057 -24 1360 0 533 43 968 109 1462 223 2169 500 4108 1762 5445 3545 1040 1387 1675 3010 1852 4729 39 372 45 519 45 970 0 451 -6 598 -45 970 -161 1570 -712 3076 -1598 4375 -813 1190 -1875 2173 -3125 2890 -1228 704 -2583 1118 -4026 1231 -182 14 -907 26 -1060 18z m1180 -307 c365 -39 851 -113 1105 -168 349 -76 832 -204 925 -246 25 -11 90 -35 145 -53 198 -65 572 -210 800 -311 209 -92 901 -455 975 -511 14 -11 129 -85 255 -166 297 -191 329 -213 601 -424 280…
type: Question
tagged with: mobile
tagged with: javascript

http://stackoverflow.com/q/25467261
has answer: http://stackoverflow.com/a/25467374
tagged with: javascript
tagged with: jquery
has body: I want to add a class to dynamically added content on success of $(ajax). I have the following function in an external Javascript file which is included at the beginning of the page. However, all code is executed within document.ready(). The follwing function fetches items via AJAX and adds them to a list. function GetCategories() { var url = './ajax/training_management_data.php'; $('#training_management_categories_items').html(' '); $('#training_management_categories_items_ul').append(' \ \ Alle \ \ '); $.ajax({ url: url, type: "POST", data: { action: 'get_categories', }, dataType: 'JSON', success: function (data) { var subid; var cssid; $.each(data, function(index, data) { subid = data.id; cssid = "training_management_categories_list_a_"+subid.toString(); $('#training_management_categories_items_ul').append(' \ \ '+data.name+' \ \ '); }); } }); } I have buttons to add, edit and delete items. All of these functions work fine. However, after creating a new item I want to automatically "select" it (meaning I switch variables to the id of the selected item and apply the class categories_selected to it. Selecting an item with clicking works: $('#training_management_categories_items').on('click', '.training_management_categories_list_a', function (e) { e.preventDefault(); categoryid = $(this).attr('id'); selectedcategoryid = $(this).attr('data-id'); selectedcategoryname = $(this).text(); $("#training_management_categories_items>ul>li>a").removeClass('categories_selected'); $(this).addClass('categories_selected'); }); But if I call the function selectEditedCategory, it doesn't select the corresponding item. These are the two functions that are called when you click the "new"-button: function startCategoryNewDialog() { $('#new_category_dialog').dialog({ width: 250, height: "auto", show: { effect: "fade", duration: 300, }, hide: { effect: "fade", duration: 300 }, draggable: false, open: function() { popupbg(true); $('#new_category_dialog_error').hide(); }, close: function(…
has comment: http://stackoverflow.com/comment/39742484
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has title: jQuery cannot reference dynamically added element
has comment: http://stackoverflow.com/comment/39742423
has comment: http://stackoverflow.com/comment/39742472
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/39742410

http://stackoverflow.com/q/25392488
type: AnsweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25752030
tagged with: javascript
has title: jquery event argument within div css
score: -1
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25752030
tagged with: zooming
has comment: http://stackoverflow.com/comment/39603442
has body: My target goal is to enlarge a picture within a div and shrink a background-picture of a div. I have a first javascript that alters the IMG element within the .pixbox DIV. This works. I have a second javascript that alters the background-image from .pixbox DIV. Question: How do i select the control the element through .on() event argument I tried with .css('background-image') but that doesnt seem to work. http://jsfiddle.net/q9jHu/347/ CSS .pixbox { background:url() javascript $('.pixbox').css('background-image').on({ mouseover: function(){ var $scale = 0.7; if ($(this).data('w')) { var $w = $(this).data('w'); var $h = $(this).data('h'); } else { var $w = $(this).width(); var $h = $(this).height(); $(this).data('w', $w).data('h', $h); } &lt;rest of code&gt; html &lt;div class="pixbox"&gt; &lt;img class="zoom" src=""&gt; &lt;/div&gt;
tagged with: css

http://stackoverflow.com/comment/39759146
type: QuestionComment
score: 0
has text: I mean the string on the end of a URL containing the ID of the element that the page should scroll to when loaded.
comment on: http://stackoverflow.com/q/25476321
type: Comment

http://stackoverflow.com/comment/39860250
has text: Where is the explanation? How is this supposed to be helpful for others trying to learn something?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25530921

http://stackoverflow.com/comment/39722026
has text: Thanks @GonzaloGallotti. About the images yes, I'm sure they are inside the folder (in edit). I tried the execute F5 after deleted 'gxlastransfer.zip', and I did it twice, but without success, I still have the errors. What should I do?
score: 0
comment on: http://stackoverflow.com/q/25452134
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25409420
accepted answer of: http://stackoverflow.com/q/25408008
score: 0
type: AcceptedAnswer
has body: In the comments serakfalcon and cookie monster both gave me the right answer: event delegation. Here is a short article about it. In my example, the solution was changing $('#location').change(function() {...} ) to $('#table_content').on('change', '#location', function(){}), because the ajax loaded elements are in #table_content, so this event handler will check everything what happens inside it, so I don't need to load my event handlers, but one time. Thank you everyone for commenting.
answers question: http://stackoverflow.com/q/25408008
type: Answer

http://stackoverflow.com/q/25500371
duplicate of: http://stackoverflow.com/q/22202569
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39803833
accepted answer: http://stackoverflow.com/a/25503109
has comment: http://stackoverflow.com/comment/39803741
has answer: http://stackoverflow.com/a/25500968
answer count: 2
has comment: http://stackoverflow.com/comment/39803782
has comment: http://stackoverflow.com/comment/39804091
possible better answer: http://stackoverflow.com/a/25500968
tagged with: javascript
has title: gmap marker with label
tagged with: google-maps-api-3
score: 0
linked to: http://stackoverflow.com/q/22202569
has answer: http://stackoverflow.com/a/25503109
type: Question
has body: I have a google map which was working well until a few days ago. My problem is that now, all the label markers appears in the right place but only the last image appears. I see in the generated html code that all images are here but all of them have the same position (that's why i can just see the last one). here i am using gmap version 3.3 actually it was working before, i'm sure! Maybe google has changed something (i'm calling the src="http://maps.google.com/maps/api/js?sensor=false&amp;v=3.3). because when i removed markerwith label and used simple markers without label then all markers are seen. function addMarker(location,vehno,vehid,drvId,drvName,phoneNo,content,gId,a,marker_img){ var pinIcon = new google.maps.MarkerImage( marker_img, null, null, null, new google.maps.Size(32, 32) ); //if(cursel==-1) var labelcontent = "&lt;b&gt;"+vehno+"/"+vehid+"&lt;/b&gt;"; var mflag = 0; var marker = new MarkerWithLabel({ position: location, icon:pinIcon, map: map, title:vehno, labelContent: labelcontent, labelAnchor: new google.maps.Point(50, 0), labelClass: "labels", labelPosition:location, });

http://stackoverflow.com/q/25479871
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39804279
type: UnansweredQuestion
tagged with: printing
tagged with: javascript
has comment: http://stackoverflow.com/comment/39771961
has body: In my app, I am loading search result. while the user click on the print button I would like to create a pop-up. ( this is ok ) But when I create a pop-up, I would like to load my Iframe in the pop-up. Again I need to call a Iframe function with the parameter which i receiving from parent page, Because I am using underscore template. I would like to call couple of ajax request with api url - (which i getting from parent page as parameter ) and need to create and append the html in to the Iframe - to print (once the template generated html ) I am sorry for big summary, Even if any one gives good approach even apart from this as well appreciated or could any one show me the correct approach. simply : html page to popup + load iframe + call iframe function with html page params + create html and append in Iframe + print... - please help me in this.. Thanks In advance!
tagged with: popupwindow
type: Question
has answer: http://stackoverflow.com/a/25479925
has comment: http://stackoverflow.com/comment/39784597
score: 0
has title: How to call a function with params in Iframe after loading the iframe in the pop-up dynamically created?
answer count: 1

http://stackoverflow.com/q/25403497
tagged with: jquery
has body: My HEADER element has a background image and I need to swap it to another image after a 3 second delay, I have looked all over the internet and I cannot find a solution! I have tried CSS3 and Jquery and I just cant get it to work. Because of the way the website is built, it has to be the background image of the element that changes and not a nested Div within the HEADER element. --- SOLVED / SOLUTION --- JS $(document).ready(function() { $("header").delay(5000).queue(function() { $(this).css({ "background-image": "url(&lt;?php bloginfo('template_url') ?&gt;/img/header-boy-hover.jpg)" }); }); }); CSS header { -webkit-transition:all 1s ease-in; -moz-transition:all 1s ease-in; -o-transition:all 1s ease-in; -ms-transition:all 1s ease-in; transition:all 1s ease-in; }
has comment: http://stackoverflow.com/comment/39623183
has comment: http://stackoverflow.com/comment/39623120
type: Question
has comment: http://stackoverflow.com/comment/39623124
tagged with: css
has comment: http://stackoverflow.com/comment/39623968
score: 0
has answer: http://stackoverflow.com/a/25403560
answer count: 1
linked to: http://stackoverflow.com/q/2983957
linked to: http://stackoverflow.com/q/9378360
tagged with: javascript
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/2983957
has title: Animate background image to another - CSS/JQuery
has comment: http://stackoverflow.com/comment/39623126

http://stackoverflow.com/comment/39646921
type: AnswerComment
comment on: http://stackoverflow.com/a/25415766
type: Comment
score: 2
has text: I would also add that you could leave it inside but do an `.off('click').on('click'`, though I would not recommend it.

http://stackoverflow.com/q/25477111
accepted answer: http://stackoverflow.com/a/25477212
downvote count: 3
upvote count: 1
type: AnsweredQuestion
has title: disable 'font-style: italic' if element contains non-latin characters
has body: Using JavaScript, how to find every element that have font-style: italic (in addition to &lt;i&gt; and &lt;em&gt;), and switch it to font-style: normal if the element contains one of more characters that are not Latin characters ([a-zA-Z])?
score: -2
has answer: http://stackoverflow.com/a/25477807
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25477212
possible better answer: http://stackoverflow.com/a/25477807
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: css

http://stackoverflow.com/q/25427733
score: 0
answer count: 1
has body: So i've got a main page where there's 3 buttons - login, register and recover account. I want to disable all those buttons and display a message when geolocation is unavaliable or the user has not allowed the browser to share it's location. $scope.btnDisabled = false; $scope.errorMsg = null; $scope.checkBrowser = function () { if (navigator.geolocation.getCurrentPosition) { // let's find out where you are! console.log("Got your location"); $scope.btnDisabled = false; } else { $scope.errorMsg = "Warning. Could not locate your position. Please enable your GPS device."; //disable the buttons $scope.btnDisabled = true; //Show errorMessage return true } //errorMessage visibility is set false return false; } So far i haven't managed to disable the buttons or show errorMessage(except for an alert message). This is how i got the alert message: function getPosition() { console.group("geoloc getPosition"); if (window.navigator) { console.log("api supported"); navigator.geolocation.getCurrentPosition(success, error); } else { console.log("api fallback"); } console.groupEnd(); } function success(pos) { console.log("geoloc pos ", pos); } function error(err) { alert("Geolocation identification failed."); $scope.btnDisabled = true; } Why doesn't the $scope.btnDisable work in error() function?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25428183
tagged with: javascript
tagged with: angularjs
type: Question
has title: Disable button if geolocation is unavaliable
accepted answer: http://stackoverflow.com/a/25428183

http://stackoverflow.com/a/25467990
score: 0
has body: Here's the code that works for you. Add css for your div's as: #leftfixop909{ position: absolute; } #otherdiv{ position: relative; } That's it.
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25467908
answers question: http://stackoverflow.com/q/25467908

http://stackoverflow.com/comment/39854222
score: 0
type: Comment
type: QuestionComment
has text: So what *do* you have access to? Just CSS, or JavaScript as well? What sample representative HTML can you show us? Incidentally, what do you think we gain from being shown that ` ` tag?
comment on: http://stackoverflow.com/q/25527720

http://stackoverflow.com/q/25466745
has body: I am attempting to write a program that can detect if you inserted a JavaScript keyword, and if you have, it will change the color of it so it will stand out(It will eventually submit the code and I will use it for offline debugging on a chromebook). However, it seems that I cannot change the color of the text within the textfield when it matches a keyword. jsFiddle Example Here is the code: CSS: #JScodeinputbox{font-family:Arial;} #JScodeoutputbox{} .JSfunctions{color:blue;} HTML: &lt;body&gt; &lt;textarea id="JScodeinputbox" wrap="logical" rows="30" cols="70" onkeyup="checkHighlight();"&gt;&lt;/textarea&gt; &lt;canvas&gt; &lt;/canvas&gt; &lt;/body&gt; &lt;/html&gt; JavaScript: var codeInput = document.getElementsByTagName("textarea"); var keywords = new Array("var", "if"); function checkHighlight(){ var codeInput1 = codeInput[0].value; if(codeInput1 === keywords[0]){ keywords[0].indexOf(codeInput1).className = "JSfunctions"; } } If anyone know how to resolve this issue or simpler alternatives(preferrably not involving JQuery, PHP, etc.) it would be much appreciated. PS: I know it is not about it being onkeyup, I have that for a reason. It also works when I run other methods, so I don't think it's formatting, either(but it could be).
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39741530
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39741563
downvote count: 0
score: 1
has title: Unable to change color of keywords within a text area
favorite count: 0
type: Question
tagged with: css
has answer: http://stackoverflow.com/a/25466791

http://stackoverflow.com/a/25531083
answers question: http://stackoverflow.com/q/25530985
has body: You can save cookies in JavaScript by using the window.localStorage method. Take a look at https://developer.mozilla.org/en/docs/Web/Guide/API/DOM/Storage for more information.
has comment: http://stackoverflow.com/comment/39860491
score: 0
type: Answer

modx-evolution
tag name: modx-evolution
type: Tag
tags question: http://stackoverflow.com/q/25536044

http://stackoverflow.com/a/25485634
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39834751
has comment: http://stackoverflow.com/comment/39816686
has comment: http://stackoverflow.com/comment/39812326
accepted answer of: http://stackoverflow.com/q/25485415
answers question: http://stackoverflow.com/q/25485415
has comment: http://stackoverflow.com/comment/39815540
upvote count: 2
has comment: http://stackoverflow.com/comment/39835600
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39798833
has body: Here is a easy and fast solution: Jquery: $('.outer').click(function(e) { $('.box').toggleClass('show'); }); CSS: .show { margin: 0; } and exlcude this part of your css: .outer:active &gt; .box { margin: 0; } See JSFiddle HERE Hope it helps... Sorry if my english is bad...

http://stackoverflow.com/q/25524170
score: -1
has comment: http://stackoverflow.com/comment/39847786
has answer: http://stackoverflow.com/a/25524813
has body: Please see the JavaScript below: function LoadAjax(){ $.when(Possibles()) //Display Possibles first .done(function () { //alert('Possibles complete); GetSQLTable(); LinkedUSNs(); }) } I expect Possibles to complete and all the information to appear on the webpage before GetSQLTable and LinkedUSNs start. However, this does not happen. The information from GetSQLTable appears first. However, if I add an alert box (currently commented out in the code above), then it works. Why is this? Possibles(), GetSQLTable() and LinkedUSNs() return HTML tables to the webpage via AJAX (JQuery).
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39848033
has title: $.when not working as I would expect
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/39847821
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39605201
has text: It seems that IE11 respects `:checked` pseudo-class for `option`: http://jsfiddle.net/rzL6o3g4/2/
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25392412
type: Comment

http://stackoverflow.com/comment/40206422
type: AnswerComment
comment on: http://stackoverflow.com/a/25487236
type: Comment
has text: You can add a class to the link view container and then reference it in CSS specifically for that link: `V(paper.findViewByModel(ln).el).addClass('special-link')` and then in CSS: `.special-link .link-tools { display: none }`
score: 0

http://stackoverflow.com/q/25546268
has answer: http://stackoverflow.com/a/25577982
tagged with: tampermonkey
downvote count: 2
upvote count: 1
has body: In the page I have time and right of it some pictures. I wanna to create a button to jump to current time using Tampermonkey. Current time is a text in &lt;h1&gt;. You can see a screenshot below. How to jump to some position. For example 07:39. If you want to suggest external library, please show me how to use it in Tampermonkey.
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25577982
score: -1
has title: Scroll to element with specific text contents
linked to: http://stackoverflow.com/q/10596417
answer count: 2
linked to: http://stackoverflow.com/q/1267283
tagged with: greasemonkey
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25577942
has answer: http://stackoverflow.com/a/25577942

http://stackoverflow.com/a/25525265
type: Answer
has body: You will have to learn javascript to be able to do that, there is an event fired called onselect, when you bind to that event with javascript using addEventListener you will be able to read the .value of the &lt;select&gt; field and then create a button using the createElement method.
upvote count: 2
answers question: http://stackoverflow.com/q/25525100
score: 2
downvote count: 0

http://stackoverflow.com/comment/39807240
score: 0
has text: Looks good as far as I can tell, except that you're not `send()`ing the XHR?
type: Comment
comment on: http://stackoverflow.com/a/25502134
type: AnswerComment

http://stackoverflow.com/comment/39612340
has text: Perhaps try http://stackoverflow.com/questions/3162399/gwt-confirmation-dialog-box - http://www.java2s.com/Code/Java/GWT/CreateCustomDialog.htm
comment on: http://stackoverflow.com/q/25397298
type: Comment
type: QuestionComment
score: 1

charts
tags question: http://stackoverflow.com/q/25449639
tags question: http://stackoverflow.com/q/25518380
tags question: http://stackoverflow.com/q/25409184
tags question: http://stackoverflow.com/q/25493002
tags question: http://stackoverflow.com/q/25549016
tags question: http://stackoverflow.com/q/25428436
tags question: http://stackoverflow.com/q/25398657
tags question: http://stackoverflow.com/q/25420870
tags question: http://stackoverflow.com/q/25509567
tags question: http://stackoverflow.com/q/25404241
tags question: http://stackoverflow.com/q/25533587
type: Tag
tags question: http://stackoverflow.com/q/25422859
tags question: http://stackoverflow.com/q/25400925
tags question: http://stackoverflow.com/q/25452186
tags question: http://stackoverflow.com/q/25455613
tags question: http://stackoverflow.com/q/25514802
tags question: http://stackoverflow.com/q/25504285
tag name: charts
tags question: http://stackoverflow.com/q/25411462
tags question: http://stackoverflow.com/q/25546028
tags question: http://stackoverflow.com/q/25418878
tags question: http://stackoverflow.com/q/25538846
tags question: http://stackoverflow.com/q/25511680
tags question: http://stackoverflow.com/q/25451483
tags question: http://stackoverflow.com/q/25511148

http://stackoverflow.com/q/25510234
has answer: http://stackoverflow.com/a/25510253
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/8897289
answer count: 1
has body: Basically i have a notification in the slide bar which is by default not visible(toggled).When any notification comes , it gets populated in the slidebar and on click of a toggle button slide bar opens from right to left.How can i make sure whether user has viewed a particular notification in slideBar. something similar to this link i have done. On click of the toggle on top right the slide bar will open and the notification will be visible .how to know that state ??
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/123999
tagged with: css
has title: How to check if div is visible to user or not?

http://stackoverflow.com/q/25508853
type: Question
possible better answer: http://stackoverflow.com/a/25509058
linked to: http://stackoverflow.com/q/1451009
has answer: http://stackoverflow.com/a/25509058
tagged with: runtime
tagged with: javascript
linked to: http://stackoverflow.com/q/2037203
tagged with: scope
has comment: http://stackoverflow.com/comment/39820008
answer count: 2
has body: i was a reading book named async javascript , one of the example of this book tried to show that events in javascript will trigger when processor has no instruction to do in the same process . for the proof of his word he brought an example : for (var i = 1; i &lt;= 3; i++) { setTimeout(function(){ console.log(i); }, 0); }; the output is : 4 4 4 4 everyhting is ok and i expected the result . but when i put the "console.log(i)" out of function the result will change . for (var i = 1; i &lt;= 3; i++) { setTimeout(console.log(i), 0); }; the output is : 1 2 3 i don't know why the output is different in those examples . i know its about variable scopes , but don't know exactly the reason . i hope if someone can help.
upvote count: 1
has comment: http://stackoverflow.com/comment/39819920
favorite count: 0
has comment: http://stackoverflow.com/comment/39820143
has comment: http://stackoverflow.com/comment/39820046
has answer: http://stackoverflow.com/a/25509037
accepted answer: http://stackoverflow.com/a/25509037
has comment: http://stackoverflow.com/comment/39820414
type: AnsweredQuestion
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/3800512
has comment: http://stackoverflow.com/comment/39820202
has title: weird behavior in javascript execution timing

http://stackoverflow.com/comment/42459432
has text: Same here, but between the two of us that makes +2!
type: Comment
comment on: http://stackoverflow.com/a/25559575
score: 0
type: AnswerComment

http://stackoverflow.com/q/25506444
tagged with: transform
has title: how to learn and change javascript transform scale
has answer: http://stackoverflow.com/a/25506589
tagged with: if-statement
score: -2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25506589
upvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/7974761
favorite count: 0
type: AnsweredQuestion
downvote count: 2
has body: $('#scroller').css('transform'); This div is a default value. Transform scale(1) i want to change value. if #scroller transform scale(3) give me alert? Thanks
type: Question

http://stackoverflow.com/q/25479512
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39765205
has comment: http://stackoverflow.com/comment/39765202
score: 0
has comment: http://stackoverflow.com/comment/39765207
has comment: http://stackoverflow.com/comment/39765215
has answer: http://stackoverflow.com/a/25479611
possible better answer: http://stackoverflow.com/a/25479613
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25479613
has title: trying to do calculation of 2 input fields update in real-time
has body: I am trying to calculate 2 input fields and display the result in real-time in div totalPrice no matter what I've tried can't get it to work thx &lt;script src="jquery-1.11.1.min.js"&gt; jQuery('#field2').on('input propertychange paste', function() { var op1 = document.getElementById('field1'); var op2 = document.getElementById('field2'); var result = document.getElementById('totalPrice'); if (op1.value == "" || op1.value != parseFloat(op1.value)) op1.value = 0; if (op2.value == "" || op2.value != parseFloat(op2.value)) op2.value = 0; result.value = 0; result.value = parseInt(result.value); result.value = parseInt(result.value) + parseInt(op1.value) + parseInt(op2.value); } var divobj = document.getElementById('totalPrice'); divobj.style.display = 'block'; divobj.innerHTML = "Total $" + result.value; }); &lt;/script&gt; &lt;form action="" id="cakeform" onsubmit="return false;"&gt; &lt;input type="text" value="" size="20" name="field1" id="field1" class="rsform-input-box"&gt; &lt;input type="text" value="" size="20" name="field2" id="field2" class="rsform-input-box"&gt; &lt;div id="totalPrice"&gt;&lt;/div&gt; &lt;/form&gt;
has comment: http://stackoverflow.com/comment/39765220
type: Question
accepted answer: http://stackoverflow.com/a/25479611

http://stackoverflow.com/q/25489902
favorite count: 0
type: Question
downvote count: 2
answer count: 3
score: -2
has comment: http://stackoverflow.com/comment/39784570
has answer: http://stackoverflow.com/a/25490429
upvote count: 0
has body: I have a radio button list in ASP.Net, and a textbox underneath that. I want to be able to change the maxLength of the textbox according to whats selected in the radio button list. I have tried everything, but im missing something obviously. Here is my JS:- function ValidateCCN() { var x = document.getElementById('RadioButtonListPayment'); var y = document.getElementById('TextBoxCCN'); if (x.selectedIndex = "Visa") { y.maxLength = '5'; } else { y.maxLength = '2';} } Here is my HTML/ASP &lt;asp:Label ID="LabelCard" CssClass="labels" runat="server" Text="Select a payment option: "&gt;&lt;/asp:Label&gt;&lt;br /&gt; &lt;asp:RadioButtonList ID="RadioButtonListPayment" runat="server" onchange="ValidateCCN();"&gt; &lt;asp:ListItem Value="Visa"&gt;Visa&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="MasterCard"&gt;MasterCard&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="Discover"&gt;Discover&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="American Express"&gt;American Express&lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; &lt;asp:Label ID="LabelCCN" CssClass="labels" runat="server" Text="Credit Card Number: "&gt;&lt;/asp:Label&gt;&lt;br /&gt; &lt;asp:TextBox ID="TextBoxCCN" CssClass="textbox" runat="server"&gt;&lt;/asp:TextBox&gt; Error:- "the else statement doesnt work"
tagged with: javascript
type: UnansweredQuestion
has title: How can i set maxLength of textbox according to radio button list in JS
has answer: http://stackoverflow.com/a/49295606
has answer: http://stackoverflow.com/a/25490586
has comment: http://stackoverflow.com/comment/39784384
tagged with: asp.net

slider
tags question: http://stackoverflow.com/q/25486695
tags question: http://stackoverflow.com/q/25499237
tags question: http://stackoverflow.com/q/25546797
tags question: http://stackoverflow.com/q/25441259
tag name: slider
tags question: http://stackoverflow.com/q/25464673
tags question: http://stackoverflow.com/q/25544532
tags question: http://stackoverflow.com/q/25471691
tags question: http://stackoverflow.com/q/25482471
tags question: http://stackoverflow.com/q/25454670
type: Tag
tags question: http://stackoverflow.com/q/25521481
tags question: http://stackoverflow.com/q/25443490

http://stackoverflow.com/comment/39895520
type: Comment
comment on: http://stackoverflow.com/a/25548670
has text: I like the step-by-step build-up approach. Much easier to follow than trying to grok it left-to-right.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39742928
type: Comment
has text: Well GetCategories() is also called when the page first loads and after an item is deleted so I'll have to write a new function passing over that parameter. I get what you mean and I'm pretty sure it would work. However, I would really like to know why it doesn't work this way. It's not that this functionality is very important but I would really like to know what causes this. I hate using workarounds if I don't understand the source of the problem. No offence meant, I'm just trying to get a deeper understanding of the problem here.
type: AnswerComment
comment on: http://stackoverflow.com/a/25467374
score: 0

http://stackoverflow.com/a/25535490
score: 0
has body: index and input are not part of the array indexes, they are properties. Simple test would show this console.log(result[3]); //undefined console.log(result.index); //1 If you coded the result manually, it would be like var result = ["dbBd", "bB", "d"]; result.index = 1; result.input = "cdbBdbsbz"; console.log(result); console.log(result.toString()); If you want to get all the values, you will have to use a for in loop and build a new array adding the properties as objects. var re = /d(b+)(d)/ig; var result = re.exec("cdbBdbsbz"); var updatedResult = []; //An empty array we will push our findings into for (propName in result) { //loop through the array which gives use the indexes and the properties if (!result.hasOwnProperty(propName)) { continue; } var val = result[propName]; if(isNaN(propName)){ //check to see if it is a number [sketchy check, but works here] var obj = {}; //create a new object and set the name/value obj[propName] = val; val = obj; } updatedResult.push(val); //push the number/object to the array } console.log(JSON.stringify(updatedResult)); //TADA You get what you expect
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25535225
answers question: http://stackoverflow.com/q/25535225
type: Answer

http://stackoverflow.com/a/70510077
upvote count: 1
has body: Append a new option with id and text let $newOption = $(" ").val(1).text('New Text goes here'); $("#selector").append($newOption).trigger('change');
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25395427

http://stackoverflow.com/q/25532023
has answer: http://stackoverflow.com/a/25532439
favorite count: 0
tagged with: click
has body: So my title may be confusing, but it has the right details. I have a table with clickable rows. When clicking the row, the row highlights. The table also has a checkbox column. Clicking the checkbox should NOT highlight or remove highlight from the row. How can I properly use .not() or :not in the .on('click', 'tr', function(){ ... }) ? http://jsfiddle.net/vmu0p2oe/ $('table').on('click', 'tr', function () { if ($(this).hasClass('selected')) { $(this).removeClass('selected'); //$(this).find(":checkbox").prop("checked", false); } else { $('tr.selected').removeClass('selected'); $(this).addClass('selected'); //$(this).find(":checkbox").prop("checked", true); } });
possible better answer: http://stackoverflow.com/a/25532101
tagged with: checkbox
has answer: http://stackoverflow.com/a/25532078
accepted answer: http://stackoverflow.com/a/25532078
type: AnsweredQuestion
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/71410316
tagged with: live
type: Question
has answer: http://stackoverflow.com/a/25532101
has title: jQuery .on() tr click event using .not() on tr checkbox click?
tagged with: javascript
answer count: 3
upvote count: 7
tagged with: jquery

http://stackoverflow.com/q/25443354
linked to: http://stackoverflow.com/q/8545376
answer count: 1
has comment: http://stackoverflow.com/comment/39697819
tagged with: javascript
tagged with: jquery
has body: I have successfully come out with this code after searching through Google and stackoverflow however, there is only one problem. Let's say the amount_available is 125. By right, I should only be able to input numbers with total sum of &lt; 125 but I can put in numbers one-digit more like 1111 or 3 digit number bigger than 125 like 999. How do I correct this? Other than that, it works fine. Below are my codes : JQuery var amount_available = $('input[name=amount_available]').val(); $(".multiple_spec").on('keydown','input[name*=quantity]',function(e){ var total_quantity=0; $(this).parents('[class*=multiple]').find('input[name*=quantity]').each(function(){ var val = parseFloat($(this).val()); if(isNaN(val))val = 0; total_quantity=(val+total_quantity); }); if(total_quantity&gt;amount_available){ // Allow: backspace, delete, tab, escape, and enter if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110]) !== -1 || // Allow: Ctrl+A (e.keyCode == 65 &amp;&amp; e.ctrlKey === true) || // Allow: home, end, left, right (e.keyCode &gt;= 35 &amp;&amp; e.keyCode &lt;= 39)) { // let it happen, don't do anything return; } e.preventDefault(); } }); HTML &lt;input type="text" name="amount_available"/&gt; &lt;div class="multiple_spec"&gt; &lt;div class="some_class"&gt; &lt;input type="text" name="quantity1"/&gt; &lt;input type="text" name="quantity2"/&gt; &lt;input type="text" name="quantity3"/&gt; &lt;/div&gt; &lt;/div &lt;div class="multiple_price"&gt; &lt;div class="random_class"&gt; &lt;input type="text" name="quantity4"/&gt; &lt;input type="text" name="quantity5"/&gt; &lt;input type="text" name="quantity6"/&gt; &lt;/div&gt; &lt;/div
score: 0
has title: jQuery : How to prevent insertion into input field after sum of multiple input fields has been reached?
has answer: http://stackoverflow.com/a/25443704
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39697392
has comment: http://stackoverflow.com/comment/39697612
type: Question

http://stackoverflow.com/comment/39841107
type: Comment
type: QuestionComment
has text: Can you also post an example of the json response object?
comment on: http://stackoverflow.com/q/25520419
score: 0

http://stackoverflow.com/q/25546137
has body: I am getting a row using one of many its data attribute and putting it into a variable now since I got the row in a variable i don't want to query dom again (if I am right ?). Then I want to get value of another data attribute from the variable but not sure how or what to search on Google ? var aRow = $("#fruittable tr[data-id=" + fruitID + "]"); Now I need data-status value, which is already added in tr Can I do something like, var status = aRow. // not sure
type: Question
tagged with: javascript
tagged with: jquery
has title: Getting second data attribute value from a variable
score: 0
has answer: http://stackoverflow.com/a/25546182
has answer: http://stackoverflow.com/a/25546159
possible better answer: http://stackoverflow.com/a/25546176
has answer: http://stackoverflow.com/a/25546256
answer count: 4
has answer: http://stackoverflow.com/a/25546176
accepted answer: http://stackoverflow.com/a/25546159
type: AnsweredQuestion
tagged with: internet-explorer-8

http://stackoverflow.com/comment/39858164
comment on: http://stackoverflow.com/q/25529835
type: Comment
type: QuestionComment
has text: Your code works fine in [this fiddle](http://jsfiddle.net/epfk5ya6/). However, if you change the version of jQuery to a older one, it won't work. Older versions of jQuery don't trigger the browser events. Is your jQuery up to date?
score: 0

http://stackoverflow.com/a/25418411
downvote count: 1
has body: To draw a line we need TWO points, in a graph if we want to refer any point we use co-ordinates, (x1,y1) is the start point of a line (x2,y2) is the end point of a line, these two points are connected. To draw a grid in graph refer this link http://www.d3noob.org/2013/01/adding-grid-lines-to-d3js-graph.html If you are not understanding, then ask.Okay
score: 1
has comment: http://stackoverflow.com/comment/39651633
answers question: http://stackoverflow.com/q/25418333
type: Answer
has comment: http://stackoverflow.com/comment/48385686
upvote count: 2

http://stackoverflow.com/a/25405601
has body: You should add the other code you need to execute after the response to another function and call that function inside the handler: xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { if(xmlhttp.responseText != "valid"){ window.mailerror = "true"; //CALL HERE THE FUNCTION YOU WANT TO EXECUTE AFTER THE RESPONSE IS RECEIVED } else { window.mailerror="false"; } } } Hopte that helps!
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25405268
downvote count: 0
has comment: http://stackoverflow.com/comment/39630821
type: Answer

http://stackoverflow.com/comment/57906662
type: Comment
has text: To add, you can implement `@last` with `(eq item array.lastObject)`
comment on: http://stackoverflow.com/a/33681099
score: 0
type: AnswerComment

http://stackoverflow.com/q/25549866
has body: I have a web page where there is a cascaded dropdown.(See screenshot:) The second one's data look like getting generated via ajax depending on selection of the first one. Here are the codes of the first select: -- Sales And For the second select, here is the code: <select class="form-control input-sm" name="aff_campaign_id" id="aff_campaign_id" onchange="load_text_ad_id(this.value); if($('#landing_page_style_type')){load_landing_page( $('#aff_campaign_id option:selected').val(), 0, $('input:radio[name=landing_page_type]:checked').val()?$('input:radio[name=landing_page_type]:checked').val():'landingpage');} if($('#unsecure_pixel').length != 0) { change_pixel_data();}"> -- iPhone on Amazon · $100.00 Now using web driver, when I do this: WebDriver driver=new FirefoxDriver(); JavascriptExecutor js=null; if (driver instanceof JavascriptExecutor) { js = (JavascriptExecutor)driver; } js.executeScript("document.getElementById('aff_campaign_id').value='1';" + "return document.getElementById('aff_campaign_id').value;") This does not change the value of the second cascaded select. It always returns "--",i.e. the default value. What can be done here to change the value of the select?
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25571039
tagged with: selenium
upvote count: 1
downvote count: 1
tagged with: selenium-webdriver
has comment: http://stackoverflow.com/comment/39898721
tagged with: java
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25550411
has title: Unable to set select value Using Javascript in selenium web driver
tagged with: javascript
has answer: http://stackoverflow.com/a/25571039
favorite count: 0
possible better answer: http://stackoverflow.com/a/25550411
type: Question
tagged with: html-select

http://stackoverflow.com/a/25511140
has comment: http://stackoverflow.com/comment/39827110
type: Answer
has comment: http://stackoverflow.com/comment/39824774
answers question: http://stackoverflow.com/q/25511008
has comment: http://stackoverflow.com/comment/39824678
has body: $("#txt_name").val() should return a string which you can store in a variable of pass to a function. if you want it to return something usefull "#txt_name" must be an input element or an element with a value attribute. lets say you have a test inpu tag with the id="txt_name" if a user writes something that elements value attribue will be that text, even if you dont see it on the tag itself. so $("#txt_name").val() will return the value of the value attribute of the htmlElement.
score: 0
has comment: http://stackoverflow.com/comment/39851301
has comment: http://stackoverflow.com/comment/39824343

http://stackoverflow.com/q/25550616
has comment: http://stackoverflow.com/comment/39896362
type: Question
score: 1
tagged with: java
has title: Displaying Jsoup elements
has comment: http://stackoverflow.com/comment/39898380
tagged with: jsoup
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: android
has comment: http://stackoverflow.com/comment/39896955
has answer: http://stackoverflow.com/a/26532891
type: UnansweredQuestion
has body: // I have this AsynchTask gets the body of a website blog. However, it doesn't show anything when method is initiated. protected Void doInBackground(Void... params) { try { Document document = Jsoup.connect(url).get(); Elements elements = document.select("div.pst-content safety clearfix entry-content p"); for(Element elements123 : elements){ title+=elements123.text(); System.out.println(elements123.text()); } } catch (IOException e) { e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void result) { // Set title into TextView TextView txttitle = (TextView) findViewById(R.id.titletxt); txttitle.setText(title); // System.out.println(title); mProgressDialog.dismiss(); }
upvote count: 1

http://stackoverflow.com/comment/39830383
score: 0
type: Comment
type: QuestionComment
has text: @Barmar Thank you but actually I am getting the selected user :) problem I'm trying to solve is getting all of the data in all of the (date & time) objects for the sel user. Thanks for the tip to use break.
comment on: http://stackoverflow.com/q/25514359

http://stackoverflow.com/q/25407926
favorite count: 0
has comment: http://stackoverflow.com/comment/39631924
has comment: http://stackoverflow.com/comment/39632327
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25409043
type: AnsweredQuestion
upvote count: 3
has title: spawn random images in canvas in javascript
type: Question
has body: Good day all, I'm trying to make a javascript game using canvas. I want to spawn random enemy objects. So far I found this as a spawning example: JSFiddle Demo How can I load image(s) instead of balls? Any help would be great. Tnx. // get a refrence to the canvas and its context var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); // newly spawned objects start at Y=25 var spawnLineY = 25; // spawn a new object every 1500ms var spawnRate = 1500; // set how fast the objects will fall var spawnRateOfDescent = 0.50; // when was the last object spawned var lastSpawn = -1; // this array holds all spawned object var objects = []; // save the starting time (used to calc elapsed time) var startTime = Date.now(); // start animating animate(); function spawnRandomObject() { // select a random type for this new object var t; // About Math.random() // Math.random() generates a semi-random number // between 0-1. So to randomly decide if the next object // will be A or B, we say if the random# is 0-.49 we // create A and if the random# is .50-1.00 we create B if (Math.random() &lt; 0.50) { t = "red"; } else { t = "blue"; } // create the new object var object = { // set this objects type type: t, // set x randomly but at least 15px off the canvas edges x: Math.random() * (canvas.width - 30) + 15, // set y to start on the line where objects are spawned y: spawnLineY, } // add the new object to the objects[] array objects.push(object); } function animate() { // get the elapsed time var time = Date.now(); // see if its time to spawn a new object if (time &gt; (lastSpawn + spawnRate)) { lastSpawn = time; spawnRandomObject(); } // request another animation frame requestAnimationFrame(animate); // clear the canvas so all objects can be // redrawn in new positions ctx.clearRect(0, 0, canvas.width, canvas.height); // draw the line where new objects are spawned ctx.beginPath(); ctx.moveTo(0, spawnLineY); ctx.lineTo(canvas.width, spawnLineY); ctx.stroke(); // m…
score: 3
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/25409043
tagged with: canvas
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/39652213
score: 0
type: QuestionComment
type: Comment
has text: If you click the anchor, you'll get it ?
comment on: http://stackoverflow.com/q/25418739

http://stackoverflow.com/q/25496920
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
upvote count: 1
tagged with: php
answer count: 1
has answer: http://stackoverflow.com/a/25497121
has body: The problem i'm having is Im trying to get the contact.php to validate a contact form that is now in the bottom of every page in my site. It worked great with just validating one page and having a hard URL to take them back to. the troubleing code is this. /* In case of no valid input go back */ if ($p1==""||$p2==""||$p3==""||$p5==""||$n0!=0||$f0&lt;7||$NL==0||$p7=="") { header($_SERVER['HTTP_REFERER'].$report); }else{$report='noerror';} Ive also tryed this: /* In case of no valid input go back */ if ($p1==""||$p2==""||$p3==""||$p5==""||$n0!=0||$f0&lt;7||$NL==0||$p7=="") { header($_SERVER['PHP_SELF'].$report); }else{$report='noerror';} This is the original code that worked for one page: /* In case of no valid input go back */ if ($p1==""||$p2==""||$p3==""||$p5==""||$n0!=0||$f0&lt;7||$NL==0||$p7=="") { header('Location:estimate_page.php?'.$report); }else{$report='noerror';} I could just make a new "contact.php" page for every page that has the form in the footer, but thats stupid if i can just make this work. Any ideas
has title: How to validate a php form with java script, that is on everypage of my site
tagged with: validation
downvote count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/39714448
type: QuestionComment
comment on: http://stackoverflow.com/q/25452449
score: 0
has text: Have you tried debugging the server-side code?
type: Comment

http://stackoverflow.com/comment/39669576
type: Comment
type: QuestionComment
has text: i think you can do it by css. Use background and opacity if you just use for visualization
comment on: http://stackoverflow.com/q/25428260
score: 0

http://stackoverflow.com/comment/39910178
comment on: http://stackoverflow.com/a/25478057
type: Comment
has text: Hey Cory, I figured it out, my file was a .PHP and i had a .htaccess and i gues the JQUERY and that file did not sit well in other browsers. Am Not sure how to make it work without changing the file to an HTML file. It works for nw, but i will need PHP in my website, which will be a problem down the road because the ".htaccess" file is not working with the JQUERY. if you know of any solution to that, your help will be appreciated
score: 0
type: AnswerComment

node.js
tags question: http://stackoverflow.com/q/25452340
tags question: http://stackoverflow.com/q/25427546
tags question: http://stackoverflow.com/q/25454470
tags question: http://stackoverflow.com/q/25507182
tags question: http://stackoverflow.com/q/25415296
tags question: http://stackoverflow.com/q/25529290
tags question: http://stackoverflow.com/q/25510410
tags question: http://stackoverflow.com/q/25537808
tags question: http://stackoverflow.com/q/25504848
tags question: http://stackoverflow.com/q/25525077
tags question: http://stackoverflow.com/q/25393794
tags question: http://stackoverflow.com/q/25518870
tags question: http://stackoverflow.com/q/25407282
tags question: http://stackoverflow.com/q/25390392
tags question: http://stackoverflow.com/q/25532778
tags question: http://stackoverflow.com/q/25441928
tags question: http://stackoverflow.com/q/25532382
tags question: http://stackoverflow.com/q/25544823
tags question: http://stackoverflow.com/q/25479452
tags question: http://stackoverflow.com/q/25418611
tags question: http://stackoverflow.com/q/25489178
tags question: http://stackoverflow.com/q/25512235
tags question: http://stackoverflow.com/q/25421337
tags question: http://stackoverflow.com/q/25412544
tags question: http://stackoverflow.com/q/25493324
tags question: http://stackoverflow.com/q/25434506
tags question: http://stackoverflow.com/q/25463320
tags question: http://stackoverflow.com/q/25419846
tags question: http://stackoverflow.com/q/25517398
tags question: http://stackoverflow.com/q/25514996
tags question: http://stackoverflow.com/q/25472689
tags question: http://stackoverflow.com/q/25500675
tags question: http://stackoverflow.com/q/25506326
tags question: http://stackoverflow.com/q/25455776
tags question: http://stackoverflow.com/q/25489211
tags question: http://stackoverflow.com/q/25390668
tags question: http://stackoverflow.com/q/25410819
tags question: http://stackoverflow.com/q/25399048
tags question: http://stackoverflow.com/q/25428686
tags question: http://stackoverflow.com/q/25441507
tags question: http://stackoverflow.com/q/25443883
tags question: http://stackoverflow.com/q/25503536
tags question: http://stackoverflow.com/q/25530992
tags question: http://stackoverflow.com/q/25472284
tags question: http://stackoverflow.com/q/25525467
tags question: http://stackoverflow.com/q/25540180
tags question: http://stackoverflow.com/q/25403164
tags question: http://stackoverflow.com/q/25443956
tags question: http://stackoverflow.com/q/25463612
tags question: http://stackoverflow.com/q/25505077
tags question: http://stackoverflow.com/q/25506525
tags question: http://stackoverflow.com/q/25509977
tags question: http://stackoverflow.com/q/25466754
tags question: http://stackoverflow.com/q/25416170
tags question: http://stackoverflow.com/q/25471789
tags question: http://stackoverflow.com/q/25448269
tags question: http://stackoverflow.com/q/25488917
tags question: http://stackoverflow.com/q/25483078
tags question: http://stackoverflow.com/q/25506807
tags question: http://stackoverflow.com/q/25430052
tags question: http://stackoverflow.com/q/25548834
tags question: http://stackoverflow.com/q/25444582
tags question: http://stackoverflow.com/q/25425921
tags question: http://stackoverflow.com/q/25513693
tags question: http://stackoverflow.com/q/25422899
tags question: http://stackoverflow.com/q/25438048
tags question: http://stackoverflow.com/q/25463020
tags question: http://stackoverflow.com/q/25522538
tags question: http://stackoverflow.com/q/25400722
tags question: http://stackoverflow.com/q/25470459
tags question: http://stackoverflow.com/q/25487837
tags question: http://stackoverflow.com/q/25473213
tags question: http://stackoverflow.com/q/25475033
tags question: http://stackoverflow.com/q/25416554
tags question: http://stackoverflow.com/q/25414169
tags question: http://stackoverflow.com/q/25436056
tags question: http://stackoverflow.com/q/25412741
tags question: http://stackoverflow.com/q/25393930
tags question: http://stackoverflow.com/q/25523350
tags question: http://stackoverflow.com/q/25490273

http://stackoverflow.com/a/25531869
upvote count: 2
answers question: http://stackoverflow.com/q/25531718
downvote count: 0
has comment: http://stackoverflow.com/comment/39897535
type: Answer
has body: Create a 'parent' function that calls subroutines. &lt;input ... onblur="myparent();"&gt; function myparent(){ dothis(); dothat(); } A better solution is to create a listener to the event, instead of sticking a handler inline, such as jQuery method: &lt;input id="myel"&gt; $(function(){ $("#myel").blur(function() { dothis(); dothat(); }); }); Or, the non-jQuery required way with pure JS: &lt;input id="myel"&gt; var myel = document.getElementById("myel"); myel.onblur = function() { dothis(); dothat(); }
has comment: http://stackoverflow.com/comment/39862392
score: 2

http://stackoverflow.com/a/25546582
answers question: http://stackoverflow.com/q/25546472
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Here is how you can do it: selectedDateTime = "2009-08-12 14:30:00 AM" //This is what you currently have var splitarray = new Array(); splitarray= selectedDateTime.split(" "); var date = splitarray[0]; var time = splitarray[1] + splitarray[2]; alert("Date: "+ date + " Time: " + time) DEMO

http://stackoverflow.com/comment/39915488
type: AnswerComment
score: 0
type: Comment
has text: Still doesn't work, I actually have the key and placed it in the right place I just didn't want to show it here, I was only missing the script and the div but for some reason it still doesn't work. I updated how my code looks like.
comment on: http://stackoverflow.com/a/25541824

http://stackoverflow.com/comment/39847086
has text: No, you should be using POST and the pulling values from the $_POST vars. But you need to be doing that over SSL. Authentication is nothing to to take lightly. There is a great little book called "Building Secure PHP Apps" by @ben-edmunds that is great for this kind of info: https://leanpub.com/buildingsecurephpapps
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25522895
type: Comment

http://stackoverflow.com/q/25496178
downvote count: 0
has title: Bootstrap accordion elements won't close
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I am trying to make an accordion menu in Bootstrap. Here's a minimal example of what I'm trying to do: http://jsfiddle.net/ra2crej1/ While the elements do open, for some reason they do not close on click. How do I fix this? I'm using the code from the documentation here, but for some reason in JSFiddle it does not behave as it does in the docs. Here is the HTML code: Collapsible Group Item #1 Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. Collapsible Group Item #2 Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. Collapsible Group Item #3 Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helveti…
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25496232
upvote count: 3
tagged with: twitter-bootstrap
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/25496232
type: Question
answer count: 1

http://stackoverflow.com/comment/39740922
has text: Do you mean to use `document.getElementById('test').style="css-property:value";` ?
comment on: http://stackoverflow.com/q/25466425
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25490124
has comment: http://stackoverflow.com/comment/39784945
type: Answer
has body: The in operator returns true if the object has a property with that name, not with that value. An array is basically an object with numeric properties. I.e. the indexes are the property names of the object. It basically looks like this: var letters = { 0: 'a', 1: 'b', ... length: ... }; So in your case the condition will only be true if str.charAt(i).toLowerCase() returns a number between 0 and letter.length (and since charAt only returns one character, it can only be 0-9). Example: &gt; var letters = ['a', 'b', 'c']; &gt; 'a' in letters // array doesn't have a property 'a' false &gt; 0 in letters // array has a property 0 (it's the first element) true So since, "Argument goes here" doesn't contain any digits, the in condition will always be false and that's why you get XXXXXX... as result. See the question "How do I check if an array includes an object in JavaScript?" for testing the existence of an element in an array. FWIW, to make the in operator work, you would have to create an object of the form: var letters = { 'a': true, 'b': true, // ... }; but that's a bit cumbersome to write.
has comment: http://stackoverflow.com/comment/39785971
has comment: http://stackoverflow.com/comment/39784974
answers question: http://stackoverflow.com/q/25490030
has comment: http://stackoverflow.com/comment/39784898
has comment: http://stackoverflow.com/comment/39785249
has comment: http://stackoverflow.com/comment/39785935
upvote count: 4
has comment: http://stackoverflow.com/comment/39785070
has comment: http://stackoverflow.com/comment/39784920
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/39786025

http://stackoverflow.com/comment/39755081
type: QuestionComment
comment on: http://stackoverflow.com/q/25473270
has text: @Lynx so you want to trigger a click on page load? How do you populate your items?
score: 0
type: Comment

http://stackoverflow.com/comment/47675288
type: AnswerComment
score: 0
has text: This happens if your javascript code has some error. It prevents ioinc from setting up the view-title and in turn adding the "has-header" automatically.
type: Comment
comment on: http://stackoverflow.com/a/25408382

http://stackoverflow.com/q/25463451
type: Question
has title: js:scope of this inside an object on keypress event
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25463554
accepted answer: http://stackoverflow.com/a/25463563
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25463554
has answer: http://stackoverflow.com/a/25463676
has body: Here is my JS simple script: var Chat = function() { console.log("init"); this.debug = function (txt) { console.log(txt); } document.getElementById('shoutBoxInput').addEventListener("keypress", keyPressedFunction, false); this.keyPressedFunction = function(e){ console.log("keyPressed"); } this.sendText = function() { var texte = document.getElementById('shoutBoxInput').value; if (texte=="") return; document.getElementById('shoutBoxInput').value ="" this.debug("sendTexte:"+texte); } this.receiveText = function(username, texte) { } } var chat = new Chat(); My problem comes from: document.getElementById('shoutBoxInput').addEventListener("keypress", keyPressedFunction, false); this.keyPressedFunction = function(e){ Error Uncaught ReferenceError: keyPressedFunction is not defined If I use: document.getElementById('shoutBoxInput').addEventListener("keydown", this.keyPressedFunction, true); then keyPressedFunction is never called. Fiddle: http://jsfiddle.net/ghLfhb6z/
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25463563

http://stackoverflow.com/q/25500261
score: -1
upvote count: 2
downvote count: 3
answer count: 1
favorite count: 0
has body: I want to call below mention javascript on paging i.e PageListPager which is on my view page &lt;script type="text/javascript"&gt; (document).on('click', 'a', function someFunction() { alert("ok") document.getElementById('page').value = cnt; $("#testStartedForm").submit(); }); &lt;/script&gt; &lt;div class="pagedList"&gt; @Html.PagedListPager(Model, page =&gt; Url.Action("TestStarted", "Student", new { page,TestId = ViewBag.TestId,onclick="someFunction(" + page + ")" }), PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(new AjaxOptions { UpdateTargetId="results",HttpMethod="POST"})) &lt;/div&gt;
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25500979
accepted answer: http://stackoverflow.com/a/25500979
has title: Calling Javascript On PageListPager MVC
type: Question
tagged with: asp.net-mvc
tagged with: pagination
tagged with: javascript

http://stackoverflow.com/a/25418753
has body: throttle(foo(5), 2000) Will not work because when you call a function with the parenthesis, you are invoking the function. You would need to wrap foo in an anonymous function when passing it to throttle. throttle(function(){ foo(5) }, 2000) If you wanted to keep track of the original value of x. wrap foo in a function and return foo. trapping the value in closure scope. function foo(x) { return function(){ var newTime = new Date().getTime(); var gap = newTime - lastTime; // Travels up scope chain to use parents lastTime. Function has access to variables declared in the same scope console.log('foo called, gap:' + gap); lastTime = newTime; // Updates lastTime console.log(x); x++; } } Then you actually can us throttle(foo(5), 2000) because it does not execute the intended function on the first call. Example here: http://repl.it/XOj/5 (fixed example) A solution that takes in any number of args, modifies throttle: function throttle(func, wait, args){ //do throttle stuff func.apply(null, args); } Then throttle(foo(5), 2000) becomes throttle(foo, 2000, [5])
score: 14
has comment: http://stackoverflow.com/comment/39684392
has comment: http://stackoverflow.com/comment/39679983
has comment: http://stackoverflow.com/comment/110134856
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25418170
type: Answer
accepted answer of: http://stackoverflow.com/q/25418170
upvote count: 14

http://stackoverflow.com/q/25463411
tagged with: angularjs
linked to: http://stackoverflow.com/q/23803743
possible better answer: http://stackoverflow.com/a/25463482
upvote count: 6
accepted answer: http://stackoverflow.com/a/25463462
type: AnsweredQuestion
downvote count: 1
type: Question
has body: I had some problems with $q.defer(); When I used callbacks instead, my code was working(the view was updated), but with $q.defer(); it's not. This is my code: The service: eventsApp.factory('eventData', function($http, $q) { return { getEvent: function(callback) { var deferred = $q.defer(); $http({method: 'GET', url: '/node/nodejsserver/server.js'}). success(function(data, status, headers, config){ //callback(data.event); deferred.resolve(data.event); console.log('status: ', status, ' data: ', data); }). error(function(data, status, headers, config){ deferred.reject(status); console.log('status: ', status); }); return deferred.promise; } }; }); The controller: eventsApp.controller('EventController', function EventController($scope, eventData) { $scope.event = eventData.getEvent(); } ); But it doesn't work. Then I found this answer and I updated my controller like this: eventsApp.controller('EventController', function EventController($scope, eventData) { eventData.getEvent().then(function(result) { $scope.event = result; }); } ); and it works. What is the difference between the nonworking and the working code?
tagged with: javascript
has title: AngularJs $q.defer() not working
has answer: http://stackoverflow.com/a/25463462
answer count: 2
score: 5
has answer: http://stackoverflow.com/a/25463482
linked to: http://stackoverflow.com/q/14080095
favorite count: 0
tagged with: promise

http://stackoverflow.com/a/25496014
type: Answer
answers question: http://stackoverflow.com/q/25495730
upvote count: 1
score: 1
has body: Carlos, You may have a race condition with the AJAX calls. Try chaining them together using promises: $scope.getInfo = function(){ $scope.refreshing=true; //cities $http.get(baseUrl+'cities/GET_INFO/ALL').then(function(data) { $scope.cities = data[0]; $scope.cities.signal = $scope.getSignal(data[0].status); $scope.refreshing=false; alert('city'); return $http.get(baseUrl+'countries/GET_INFO/ALL'); }).then(function(data) { // countries $scope.countries = data[0]; $scope.countries.signal = $scope.getSignal(data[0].status); $scope.refreshing=false; // alert('countries'); }); }; To learn more, watch the screencast: https://egghead.io/lessons/angularjs-chained-promises You can also learn more about promises here: https://docs.angularjs.org/api/ng/service/$q NOTE: It is a best practice to move your data preparation, business logic and calculations out of the controller and into a service. Consider revising your code to encapsulate your AJAX request (using the $http service) into a service and then inject that service into the controller that is being used to present the data to the view.
downvote count: 0

http://stackoverflow.com/a/25391486
upvote count: 2
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/39604302
answers question: http://stackoverflow.com/q/25391407
score: 1
has body: You could try; $('#form_id').on("submit", function() { location.reload(); }); This shouldn't prevent the default action of the form being submitted, but should capture the event and reload the page. You will need to specify an ID on the form.

http://stackoverflow.com/a/25468102
answers question: http://stackoverflow.com/q/25468060
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39743945
has body: It's about your #header having a negative z-index. It's "hidden" behind the body which results in you not being able to actually click the .menuButton. Longer explaination: Giving the menu button a higher z-index than one of its parent elements (in this case, the #header) doesn't have any effect - it will still compete successfully with other descendants of the #header but it will not be displayed on top of the #headers parents or siblings. The #header's z-index will be the "dominant" one. See also: stacking context as referred by @ajp15243 in the comments.
has comment: http://stackoverflow.com/comment/39743999
downvote count: 0

http://stackoverflow.com/q/25499558
favorite count: 0
has title: Set custom legend item symbol (or icon) in HIghcharts
has body: I'm trying to change the default highcharts legend symbol to my own custom one. I wish to have a font-awesome icon next to the legend label. for that, Iv'e thought about labelformatter: labelFormatter: function () { var on = '&lt;g&gt;&lt;text x="0" y="0" style="color:'+this.color+';font-family:FontAwesome"&gt;&amp;#xf14a;&lt;/text&gt;&lt;/g&gt; ' + this.name; var off = '&lt;g&gt;&lt;text x="0" y="0" style="color:'+this.color+';font-family:FontAwesome"&gt;&amp;#xf0c8;&lt;/text&gt;&lt;/g&gt; ' + this.name; return this.iconState ? on : off; } that actually let me add the icon as I wanted, but now my probelm is the following: when clicking on the legend items, the icons remain in the original color and do not become gray like the labels. Iv'e thought about re-rendering the legend when a click event is fired (using legendItemClicked), but I havnn't found anything that works out. Does anyone know how can I manage re-rendering the legend? OR How Its even possible to set the symbol to my own? Thanks!
possible better answer: http://stackoverflow.com/a/33293925
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/77180068
has answer: http://stackoverflow.com/a/33293925
type: Question
has answer: http://stackoverflow.com/a/25502716
accepted answer: http://stackoverflow.com/a/25502716
tagged with: javascript
upvote count: 2
answer count: 3
tagged with: highcharts
tagged with: jquery

http://stackoverflow.com/comment/39655009
type: Comment
has text: Thanks @Gamemorize! Can I make a button where when I clicked "start", it will start moving, then when I cicked "Stop", it will then stop.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25420392

http://stackoverflow.com/comment/39682930
type: Comment
comment on: http://stackoverflow.com/q/25429907
type: QuestionComment
score: 0
has text: Hi again Thank you for all your help. You guided me in the right direction. It turns out i had to go for the 'inner' DIV. Thank you so much again.

http://stackoverflow.com/q/25428193
type: Question
score: 0
tagged with: coldfusion-10
answer count: 1
tagged with: coldfusion
has answer: http://stackoverflow.com/a/25431328
has title: Dynamic CFTab onClose event
has body: I simply can't find any real documentation on ColdFusion Layout Tabs. For the most part I've got them working, but I'd like to tie some logic to a close event. I was wondering if anyone had a working example they could show me? The catch is that I will need to trigger these events in JavaScript. But if you have a working version in plain ColdFusion, I'd still love to see it! var tab = ColdFusion.Layout.getTabLayout("innerTabLayout").activeTab._cf_body; $('#' + tab).on('close', blah); // doesn't work tab.on('close', blah) // doesn't work ColdFusion.Layout.getTabLayout("innerTabLayout").activeTab._cf_body.onTabClose( function(), blah ); //doesn't work I have also tried setting the event on tab creation: var tab = ColdFusion.Layout.createTab(); tab.onTabClose() tab.on('close'); However, none of these work either. I've tried looking at EXT.JS which is what CFtabs were created from, but I don't seem to have any luck there either. The Coldfusion.Layout object has a function for tab closing, so there must be a way to trigger it! (I would think, haha).
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25431328
type: AnsweredQuestion

http://stackoverflow.com/q/25440794
tagged with: http://stackoverflow.com/tag/html
has body: First things first, I'm building my website on Bootstrap 3, which has it's own image gallery element in it. What I basically want to achieve, is that when I have a couple of buttons and the gallery element on the same page, pressing some of the buttons changes the images in the gallery element. Tried to Google it but couldn't find any solutions that would satisfy my needs. Here are a couple of screenshots. JSFiddle is a bit difficult thing to be offered here, since I can't really include the image gallery element from Bootstrap, and including just the buttons would be a waste. This is what I got right now: This requires some sort of a knowledge about Bootstrap and JS/jQuery, since I'm not able to provide any demo-site or fiddle for this. All working solutions deserve my thanks! UPDATE: Here is the source code for the image-gallery, what it looks like in the firebug inspector. This should be of use for someone, since this still goes unsolved.
has answer: http://stackoverflow.com/a/25506598
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
has title: Changing image gallery by button
accepted answer: http://stackoverflow.com/a/25506598
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25446034
has answer: http://stackoverflow.com/a/25446034
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/25520576
answers question: http://stackoverflow.com/q/25520419
type: AcceptedAnswer
has body: You can wrap you data html code with another HTML element (for example, with div) and search in it. Example. $(function() { var data = ' feed content '; var wrap = $(' '); wrap.html(data); alert(wrap.find('.one_feed').length); });
has comment: http://stackoverflow.com/comment/39841538
type: Answer
has comment: http://stackoverflow.com/comment/39841716
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25520419
downvote count: 0

http://stackoverflow.com/comment/39875576
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25538681
has text: you could try to calculate the length from one point of the triangle to the center of the circle, keep rotating the triangle until you find the shortest distance. And to position the triangle, simply search for a location on the circumfrence
score: 0

http://stackoverflow.com/q/25445615
has answer: http://stackoverflow.com/a/25445874
has answer: http://stackoverflow.com/a/25445644
has comment: http://stackoverflow.com/comment/39702688
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25445874
score: 0
linked to: http://stackoverflow.com/q/777523
accepted answer: http://stackoverflow.com/a/25445644
has comment: http://stackoverflow.com/comment/39703553
tagged with: razor
has title: Is there a "standard MVC" way of mixing Javascript and Razor?
linked to: http://stackoverflow.com/q/3840967
type: AnsweredQuestion
tagged with: asp.net-mvc
type: Question
tagged with: c#
has body: I really dislike page loads, I think they detract from the user experience, so I'm trying to make my web application heavily AJAX-ified. When the user clicks on "Add new", Javascript generates a form based on a model using Razor, with the following code: The code works great, Razor is able to generate the form within the string, so I dont have any issues with making this work. However, for code readability and ease of development, it's not that great. I'm still quite new to MVC and razor, so I'm just wondering, is there a better or "MVC/Razor standard" way of doing this, that I don't know about? Edit: In case anyone is interested, I've used both bits of Exception's answers: In the partial view: @model Secure_Password_Repository.Models.Category \ @using (Ajax.BeginForm("AddCategory", "Password", new AjaxOptions { HttpMethod="post", OnFailure="" }, new { @class="newcategoryform", role = "form", id="[1]" })) { @: \ @Html.AntiForgeryToken() @: \ @Html.HiddenFor(m => m.Category_ParentID, new { value = "0" }) @: \ @Html.TextBoxFor(m => m.CategoryName) @: \ @: Save \ } In the main view: The "\" at the end of each line in the partial view tell JavaScript that each line is continuation of a string value.
answer count: 2
linked to: http://stackoverflow.com/q/498680

http://stackoverflow.com/q/25437246
has answer: http://stackoverflow.com/a/25437328
accepted answer: http://stackoverflow.com/a/25437328
has answer: http://stackoverflow.com/a/25437287
type: Question
has comment: http://stackoverflow.com/comment/39686713
possible better answer: http://stackoverflow.com/a/25437276
has answer: http://stackoverflow.com/a/25437276
tagged with: javascript
tagged with: jquery
tagged with: ajax
upvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/39686647
has title: .hasClass() on dynamically added class doesn't work
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I'm currently writing a simple script using jQuery which check if all the files (sent via AJAX) are properly uploaded before submitting the complete form. So the deal is: when the user drop an image into the browser (drag'n'drop), it's sent to the server using AJAX and when the upload is finished, it simply add a class "done" to some div tag. So whenever the user drops an image, it adds this kind of div: &lt;div class="preview"&gt;/* blablabla other div and span classes */&lt;/div&gt; And when the upload is complete, it simply looks like this: &lt;div class="preview done"&gt;/* blablabla other div and span classes */&lt;/div&gt; Everything works like a charm, so here's the interesting part from the form: &lt;form action="target.php" method="post" enctype="multipart/form-data" onsubmit="return checkUploadFiles();"&gt; It calls this JS function in order to prevent submitting if one files is not fully uploaded yet: function checkUploadFiles(){ $(".preview").each(function(i, val) { if(!val.hasClass('done')){ alert("Something is not fully uploaded yet, please wait"); return false; }; }); return true; }; But... The form is sent anyway, even if there's 15 images uploading right now and 15 div tags having the .preview class but not the .done class. I'm sure Iv'e done some stupid mistakes or that's just something I don't know about .each() or .hasClass(), can someone help please? Thanks in advance! EDIT: Here's the corrected script, considering the two mistakes I've made: function checkUploadFiles(){ var ret = true; $(".preview").each(function() { var $this = $(this); if(!$this.hasClass('done')){ alert("Something is not fully uploaded yet, please wait"); ret = false; }; }); return ret; };
type: AnsweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/q/25460010
possible better answer: http://stackoverflow.com/a/25460406
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25460048
has title: breaking json for stacked highcharts
tagged with: http://stackoverflow.com/tag/json
type: AnsweredQuestion
tagged with: highcharts
tagged with: javascript
has body: I am passing a Json to highcharts json: {"0":[{"name":"normal","data":["1647","270905","412080","13609","17062","20889","16","765097","13424","14","2044","630686","104019","3097","733","1462"]},{"name":"rft","data":[1300177,4599692,957739,4177103,3436151,3752121,1978772,1850918,2538336,521542,2951953,4108915,1516107,3329831,661657,3447965]}]} and used this code to breakdown and passing to highcharts: series: [{ data: (function() { var chart_data =[]; $.each(obj[0], function (index, value) { var arra=[]; // alert(value['name']) arra['name']=value['name']; arra['data']=[]; //alert(value['data'].length); $.each(value['data'],function(ind,val){ arra['data'].push(parseInt(val)); }); //console.log(arra); chart_data.push(arra); }); return chart_data ; })() }] but not working....
has answer: http://stackoverflow.com/a/25460048
type: Question
has answer: http://stackoverflow.com/a/25460406

http://stackoverflow.com/comment/39635941
score: 6
type: Comment
comment on: http://stackoverflow.com/q/25410016
type: QuestionComment
has text: This question appears to be off-topic because it belongs on http://codereview.stackexchange.com/

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/25461205
tags question: http://stackoverflow.com/q/25437007
tag name: google-oauth

http://stackoverflow.com/comment/39754556
comment on: http://stackoverflow.com/q/25473732
type: Comment
type: QuestionComment
has text: seems working fine for me, what do you mean by nav bouncing?
score: 0

http://stackoverflow.com/comment/39919183
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25550380
has text: So I can control the order of the jquery plugins that load within the render method? as Eugene Glova suggested?
score: 0

http://stackoverflow.com/q/25463466
has body: I have downloaded a full width image slider from http://dandywebsolution.com/skdslider/ and I modified the slider page for my requirements as follows, where now it has only the slider with two images, slider.html SKDSlider - Full Width Jquery Slider - Jquery Responsive Full Width Slider - Full Screen Slider- Simple Jquery Slider When running it alone it works great, But when I included it my Web Page as follows, it doesn't show anything but the space of the slider, please can anyone suggest me a solution index.php DoIT <?php include 'header.php'; ?> Who We Are Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eleifend vitae tellus non egestas. Suspendisse potenti. Praesent facilisis tincidunt scelerisque. Aliquam sed elementum neque. In sed imperdiet quam, ut blandit erat. Sed quis commodo mi. Curabitur at ultricies quam. Nullam malesuada mauris massa. Courses Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eleifend vitae tellus non egestas. Suspendisse potenti. Praesent facilisis tincidunt scelerisque. Aliquam sed elementum neque. In sed imperdiet quam, ut blandit erat. Sed quis commodo mi. Curabitur at ultricies quam. Nullam malesuada mauris massa. Solutions Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eleifend vitae tellus non egestas. Suspendisse potenti. Praesent facilisis tincidunt scelerisque. Aliquam sed elementum neque. In sed imperdiet quam, ut blandit erat. Sed quis commodo mi. Curabitur at ultricies quam. Nullam malesuada mauris massa. Latest DoIT Gaming Challange 2014 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eleifend vitae tellus non egestas. Suspendisse potenti. Praesent facilisis tincidunt scelerisque. Aliquam sed elementum neque. In sed imperdiet quam, ut blandit erat. Sed quis commodo mi. Curabitur at ultricies quam. Nullam malesuada mauris massa. Ut fringilla risus sit amet arcu iaculis, sed egestas neque egestas. Aenean scelerisque tellus sed volutpat consequat. Donec volu…
has comment: http://stackoverflow.com/comment/39735456
type: Question
has title: Image Slider not working when included it in php page
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25463661
answer count: 2
has comment: http://stackoverflow.com/comment/39735326
tagged with: jquery
has comment: http://stackoverflow.com/comment/39735365
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25463525
has comment: http://stackoverflow.com/comment/39735263
tagged with: css
has comment: http://stackoverflow.com/comment/39736073
has comment: http://stackoverflow.com/comment/39735462
has comment: http://stackoverflow.com/comment/39735310
has comment: http://stackoverflow.com/comment/39735448
has comment: http://stackoverflow.com/comment/39735512

http://stackoverflow.com/q/25508017
score: 0
answer count: 1
tagged with: console
has title: Tracking javascript functions in console
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25508131
type: Question
has body: how can i track down a function in the console? example: a function is set to display 30 seconds after page load, or on an element click event. or in the following example (live link below), how would i use the console to learn that my SayHi function is responsible for the console output "hi!"?: function SayHi() { console.log("hi!"); } var trigger = document.getElementById("hi_trigger"); trigger.onclick = function () { SayHi() }; http://jsfiddle.net/hartogsmith/pmhsjf1a/
tagged with: javascript

http://stackoverflow.com/a/25437144
has body: Ok, I have found a solution, not ideal, but it works. Once I fill in the suburb and postcode fields from the google autocomplete feature, I need to make another request using this url: https://maps.googleapis.com/maps/api/geocode/json?address=SUBURB,%20POSTCODE%20AND%20COUNTRY%20HERE&amp;components=administrative_area:SUBURB%7Ccountry:COUNTRY with this, I can get the longitude and latitude of the suburb too.
accepted answer of: http://stackoverflow.com/q/25424986
answers question: http://stackoverflow.com/q/25424986
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25424279
has comment: http://stackoverflow.com/comment/39662151
tagged with: dom
has comment: http://stackoverflow.com/comment/39662213
has answer: http://stackoverflow.com/a/25424758
has comment: http://stackoverflow.com/comment/39662199
answer count: 3
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25424869
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/39662259
has body: i have problem with preventing section jumping on button click. My code is: Script: $('.read-more').on('click', function (e) { e.preventDefault(); $(".active").each(function () { $(this).removeClass("active"); }); var target = $(this).attr('data-toggle'); $("#" + target).show().siblings("div").hide(); $(this).closest("article").find(".read-more").each(function () { $(this).toggleClass('active'); }); $(this).closest("article").find(".arrow-marker").each(function () { $(this).toggleClass('active'); }); return false }); HTML: Read More Read More Read More Read More The basic thing about this script is toggling 4 tabs and related classes. I need and to do the same thing. I must say, it works fine, only first click of any tab jumps to top of page, and every click after that works fine. Can you find what is wrong with the code? I know there's probably better solution to this. Thanks in advance!
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39663413
has comment: http://stackoverflow.com/comment/39661949
has comment: http://stackoverflow.com/comment/39663730
linked to: http://stackoverflow.com/q/18971284
has comment: http://stackoverflow.com/comment/39662190
has comment: http://stackoverflow.com/comment/39664274
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25425552
upvote count: 1
has comment: http://stackoverflow.com/comment/39662256
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39662695
has title: jQuery e.preventDefault not working only on first click
has comment: http://stackoverflow.com/comment/39662231

http://stackoverflow.com/a/25537278
answers question: http://stackoverflow.com/q/25536921
score: 0
type: Answer
has body: You could also get the html of the .slide_nav and then mess with it as a string. var x = $('.slide_nav').html(); var arr=x.split('&lt;/li&gt;'); var mystr = ''; for (var r=0, len=arr.length; r&lt;len; r++) { mystr += arr[r]; if (r===0) { //your code to add additional LI's } } $('.slide_nav').html(mystr) It's far from the most elegant solution but it should work.

http://stackoverflow.com/comment/39668100
has text: @shennan, I think we agree.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25426784
type: AnswerComment

http://stackoverflow.com/a/25446124
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39704459
has comment: http://stackoverflow.com/comment/39704164
answers question: http://stackoverflow.com/q/25445958
has comment: http://stackoverflow.com/comment/39702537
downvote count: 0
has comment: http://stackoverflow.com/comment/39702508
has body: Two options for you: You can do that on modern browsers by using the capturing phase of an event rather than the bubbling phase. This diagram from the DOM events specification helps with understanding the various phases of an event: IE doesn't support event capture until IE9 in standards mode (IE8 and earlier simply do not have it). jQuery doesn't provide an API for using event capture, so you'd have to use addEventListener instead: document.querySelector("selector for the control").addEventListener("click", function(e) { // Control code here }, true); document.addEventListener("click", function(e) { // Document code here }, true); The true at the end means you want to use the capturing phase, rather than the bubbling phase. Don't handle clicks on controls directly, use event delegation, handling clicks on the document and, if the click came through a control, calling your control-specific handling from the document click handler: $(document).on("click", handleDocumentClick); function handleDocumentClick(e) { // On the next line, use whatever selector matches your controls var input = $(e.target).closest("input")[0]; display("document click received"); if (input) { handleControlClick.call(input, e); } } function handleControlClick(e) { display("control click received"); } Live Example
upvote count: 2

http://stackoverflow.com/q/25391357
has title: How to find travelling distance between two latitude and longitude points by car
score: 1
linked to: http://stackoverflow.com/q/14131708
tagged with: distance
has answer: http://stackoverflow.com/a/25391403
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39602362
answer count: 1
tagged with: javascript
duplicate of: http://stackoverflow.com/q/14131708
favorite count: 0
has body: Is there a way/method/service/api to calculate the travelling distance between two latitude and longitude points by car? I need to show the client the distance of his location/zipcode to near most restaurants based on the travel distance chosen by him. For example, if he selects 25 miles then only the restaurants within 25 miles should be displayed. The latitude and longitude of the restaurants are available. Also the latitude and longitude of the user is available through his pincode based on his acceptance of whether he wants to share his location using the browser he is using. Is there any available Google service available for it I could use in my JavaScript application?
upvote count: 2
type: UnansweredQuestion
downvote count: 1
type: Question

http://stackoverflow.com/q/25479835
tagged with: metalsmith
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40541215
has title: Metalsmith.js: How to build to same directory as build script?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25903167
has body: I am completely new to metalsmith. I've been following this tutorial: http://www.robinthrift.com/post/metalsmith-part-1-setting-up-the-forge/ I want to build my site to the root directory of my project (the same dir as the build script). I want to do this because I want github pages to play nicely with it. But when I try to build, I get this error: Error: EBUSY, resource busy or locked Here is my dir structure: project_folder/ _site-src/ index.html node_modules build.js package.json Here is my build.js source: var Metalsmith = require("metalsmith"); Metalsmith(__dirname) .source("_site_src") .destination(".") .build(); What I want my project dir to look like: project_folder/ _site-src/ index.html node_modules build.js package.json index.html I don't know what I'm doing wrong. I appreciate any help.
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40532897
has comment: http://stackoverflow.com/comment/40126366
has answer: http://stackoverflow.com/a/25903167
tagged with: node.js
has comment: http://stackoverflow.com/comment/40053551
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/40128569

http://stackoverflow.com/a/25431391
score: 0
has comment: http://stackoverflow.com/comment/39677695
type: Answer
has comment: http://stackoverflow.com/comment/39693937
answers question: http://stackoverflow.com/q/25430286
has body: I did something similar for also pdf. It worked in android, ios and windows phone 7/8. Here is my code: I have it inside a data-role content div, so it takes width from webbrowser. I had no luck determining height of pdf, so just put a big value and it will resize. In my case, there is no more white space after pdf. Also you could use google reader:

http://stackoverflow.com/comment/39672432
has text: @BenjaminGruenbaum the most recent version of angular is fine. What about the `.catch()` method? Does that have to be overridden too or is it guaranteed to simply call `.then(undefined, reject)`?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25429386

http://stackoverflow.com/q/25419991
accepted answer: http://stackoverflow.com/a/25663640
answer count: 2
upvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25663640
possible better answer: http://stackoverflow.com/a/25664715
has comment: http://stackoverflow.com/comment/40084346
has answer: http://stackoverflow.com/a/25664715
tagged with: requirejs
has title: $.mustache() is defined, but Mustache isn't defined when mustache() is invoked
linked to: http://stackoverflow.com/q/6439935
tagged with: mustache
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40084218
has comment: http://stackoverflow.com/comment/40084264
type: Question
has body: I am trying to use Mustache along with requireJS and jQuery, and it seems that it is being loaded into the browser since Chrome's console outputs correctly: &gt;$.mustache &lt;function (template, view, partials) { return Mustache.render(template, view, partials); } But when I try to use the mustache function it gives the error ReferenceError: Mustache is not defined and points to line 588 in the mustache.js file itself: $.mustache = function (template, view, partials) { return Mustache.render(template, view, partials); }; Here is how I'm invoking it in the main.js file: require(['mustache'], function(Mustache){ var view = {test:'TEST'}; var temp = '{{test}}!!!'; $.mustache(temp,view); });
tagged with: javascript

http://stackoverflow.com/a/59798528
upvote count: 2
answers question: http://stackoverflow.com/q/25512771
score: 2
has body: The Array constructor , when passed with a single numeric value (Let's say n) , creates a sparse Array of length n and has zero elements in it... so .map() wont work on it as explained by Dan Tao... let ar = Array(5); // Array(5) [ &lt;5 empty slots&gt; ] So , you can use .fill() method , that changes all elements in an array to given value, from a start index (default 0) to an end index (default array.length). It returns the modified array... So we can fill the empty (sparse) array with "undefined" value... It won't be sparse anymore...And finally, you can use .map() on returned array... let ar = Array(5).fill(undefined) ; // [undefined,undefined,undefined,undefined,undefined] let resultArray = ar.map( el =&gt; Array(5).fill(undefined) ); this resultArray will be a 5*5 array with every value of undefined... /* [ [ undefined, undefined, undefined, undefined, undefined ], [ undefined, undefined, undefined, undefined, undefined ], [ undefined, undefined, undefined, undefined, undefined ], [ undefined, undefined, undefined, undefined, undefined ], [ undefined, undefined, undefined, undefined, undefined ] ] */ :)
downvote count: 0
type: Answer

http://stackoverflow.com/a/25415915
has comment: http://stackoverflow.com/comment/39647227
has comment: http://stackoverflow.com/comment/39647262
has comment: http://stackoverflow.com/comment/39647196
has comment: http://stackoverflow.com/comment/39647424
score: 0
has comment: http://stackoverflow.com/comment/39647295
has comment: http://stackoverflow.com/comment/39647157
has comment: http://stackoverflow.com/comment/39647444
has body: In the chrome extension you are not allowed to insert inline script in html, if I remember correctly. remove: &lt;body onload="startRequest()"&gt; sample &lt;/body&gt; and see this js: (function() { var updateBadge = function() { chrome.browserAction.setIcon({path:"red.png"}); } var stopRequest = function() { window.clearTimeout(timerId); } var pollInterval = 1000 * 60; // 1 minute, in milliseconds var timerId; updateBadge(); timerId = window.setTimeout(startRequest, pollInterval); })()
has comment: http://stackoverflow.com/comment/39647276
type: Answer
has comment: http://stackoverflow.com/comment/39647361
answers question: http://stackoverflow.com/q/25415760

http://stackoverflow.com/q/25452448
has title: Issues with setInterval
has answer: http://stackoverflow.com/a/25452582
tagged with: jquery
has comment: http://stackoverflow.com/comment/39714481
has comment: http://stackoverflow.com/comment/39716846
tagged with: http://stackoverflow.com/tag/html
has body: I'm creating a simple slideshow using jQuery and some javascript, but I'm running into issues using the setInterval functions. JSFiddle of the Project $(document).ready(function () { slidePos = 1; autoScrollInterval = setInterval(function () { slidePos = SlideRight(slidePos) }, 7000); $(".ss-indicator-arrow").css("width", $(".ss-slideshow").width() / $(".ss-slide").length); $(".ss-right-arrow").click(function () { window.clearInterval(autoScrollInterval); slidePos = SlideRight(slidePos); setTimeout(function () { autoScrollInterval = setInterval(function () { slidePos = SlideRight(slidePos) }, 7000); }, 10000); }); $(".ss-left-arrow").click(function () { window.clearInterval($.autoScrollInterval); slidePos = SlideLeft(slidePos); setTimeout(function () { autoScrollInterval = setInterval(function () { slidePos = SlideRight(slidePos) }, 7000); }, 10000); }) }); $(window).resize(function () { $(".ss-indicator-arrow").css("width", $(".ss-slideshow").width() / $(".ss-slide").length); Reset(); }); function SlideRight(slidePos) { slidePos++; if (slidePos &lt;= $(".ss-slide").length) { $(".ss-container").css("margin-left", -((slidePos - 1) * $(".ss-slideshow").width()) + "px"); $(".ss-indicator-arrow").css("left", ($(".ss-indicator-arrow").width() * (slidePos - 1) + "px")); } else Reset(); return slidePos } function SlideLeft(slidePos) { slidePos--; if (slidePos &gt; 0) { $(".ss-container").css("margin-left", -((slidePos - 1) * $(".ss-slideshow").width()) + "px"); $(".ss-indicator-arrow").css("left", ($(".ss-indicator-arrow").width() * (slidePos - 1) + "px")); } else { slidePos = $(".ss-slide").length; $(".ss-container").css("margin-left", -((slidePos - 1) * $(".ss-slideshow").width()) + "px"); $(".ss-indicator-arrow").css("left", ($(".ss-indicator-arrow").width() * (slidePos - 1) + "px")); } return slidePos; } function Reset() { slidePos = 1; $(".ss-container").css("margin-left", "0px"); $(".ss-indicator-arrow").css("left", "0px"); } So far I've tried many different methods,…
has comment: http://stackoverflow.com/comment/39714562
has comment: http://stackoverflow.com/comment/39715892
has comment: http://stackoverflow.com/comment/39714528
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25452680
has comment: http://stackoverflow.com/comment/39716199
type: Question
tagged with: javascript
answer count: 2

http://stackoverflow.com/comment/39699969
type: AnswerComment
type: Comment
has text: Thanks for your prompt reply. Sorry I don't quite get you. My screen_layout_large.css responsibility is to hide the menu from all screen sizes. The only code found in the screen_layout_large.css is : /*hide mobile menu from all screen sizes*/ a.mobile_menu{ display:none; } Even though I have commented that out, the problem still persists that the menu disappears between the range of 484px to 500px. Strange.
comment on: http://stackoverflow.com/a/25423395
score: 0

http://stackoverflow.com/a/25489934
answers question: http://stackoverflow.com/q/25489236
score: 0
accepted answer of: http://stackoverflow.com/q/25489236
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39785343
has body: It seems that IE does not allow empty expires property. According to documentation, if the property is not set, cookie will last till the end of session. So I think this should work as expected: document.cookie = "CategoriesSelectedEvents=" + newCookieString + "; path=/"; Also I would suggest using jQuery.cookie plugin for cross-browser work with cookies.

http://stackoverflow.com/a/25434248
has comment: http://stackoverflow.com/comment/39681503
has body: You may try this var timezone = new Date().getTimezoneOffset(); From MDN The time-zone offset is the difference, in minutes, between UTC and local time. Note that this means that the offset is positive if the local timezone is behind UTC and negative if it is ahead. For example, if your time zone is UTC+10 (Australian Eastern Standard Time), -600 will be returned. Daylight savings time prevents this value from being a constant even for a given locale Also here is an interesting article which may help you:- Auto detect a time zone with JavaScript EDIT: var d = new Date(myYear, myMonth, myDate); d.setTime( d.getTime() + d.getTimezoneOffset()*60*1000 );
downvote count: 0
has comment: http://stackoverflow.com/comment/39681705
has comment: http://stackoverflow.com/comment/39681401
score: 6
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/25434159

http://stackoverflow.com/comment/43788476
score: 4
has text: Isn't it caused by `console.log`?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25452214

http://stackoverflow.com/q/25550450
has comment: http://stackoverflow.com/comment/39896140
has comment: http://stackoverflow.com/comment/39896234
has title: click function is not working and if i comment $('#tablenew').dataTable( {}); its working but i want datatable too
has comment: http://stackoverflow.com/comment/39896484
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39896091
downvote count: 1
has comment: http://stackoverflow.com/comment/39896221
type: Question
has body: Click function is not working and if I comment $('#tablenew').dataTable({}); out, it's working, but I want this to work with datatable $( document ).ready(function() { $('#tablenew').dataTable( { 'bProcessing': false, 'bServerSide': false, 'sort': 'position', 'sAjaxSource': 'springPaginationDataTables.web', 'aoColumns': [ { "mData": "UserId" }, { "mData": "UserName" }, { "mData": "UserStatus" }, { "mData": "UserType" }, { "mData": "AddedBy" }, { "mData": "AddedDateTime" }, { "mData": "UpdatedBy" }, { "mData": "UpdatedDateTime" }, ] }); $('#tablenew').find('tr').live('click', function(){ var row = $(this).find('td:first').text(); alert('You clicked ' + row); /* $("#userId").value(row); */ var url = '/paymentGateway/userInfoPage/'+row; $(location).attr('href',url); }); });
has comment: http://stackoverflow.com/comment/39895873
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39896380
tagged with: jquery
has answer: http://stackoverflow.com/a/25551339
favorite count: 0
score: 0

http://stackoverflow.com/a/25416242
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25416198
has body: Since the element has an id, you can simply get it directly : var myVideo = document.getElementById("element"); If it didn't have an id for some reasons, you could do that : var myVideo = document.querySelector("#player video"); That's very basic JS so you can find help on that anywhere. And specifically on querySelector here, for example.

http://stackoverflow.com/comment/39865588
score: 0
type: QuestionComment
has text: evaluating + "" gives you zero
comment on: http://stackoverflow.com/q/25533941
type: Comment

http://stackoverflow.com/comment/39687964
comment on: http://stackoverflow.com/a/25437691
score: 0
type: AnswerComment
has text: Are you going through a webserver? You can't use AJAX with `file://` URLs.
type: Comment

http://stackoverflow.com/comment/39873946
comment on: http://stackoverflow.com/a/25537505
has text: Thanks! That works. However, if I'm using localStorage and the user migrates over to the desktop site and exit out the browser, how can I redirect them back to the mobile site when they open up their browser again? I assume that would work if you're using sessionStorage, but I've tried that one and it doesn't even let me migrate over to the desktop site.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25475172
score: -2
has comment: http://stackoverflow.com/comment/39757044
tagged with: javascript
has comment: http://stackoverflow.com/comment/39757004
tagged with: function
upvote count: 0
has title: jquery array[index] returning undefined
tagged with: arrays
answer count: 1
tagged with: undefined
tagged with: jquery
has answer: http://stackoverflow.com/a/25475282
has comment: http://stackoverflow.com/comment/39756939
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39757092
downvote count: 2
accepted answer: http://stackoverflow.com/a/25475282
type: Question
has body: Trying to call .fadeOut() on an array of &lt;li&gt;'s using an index returns the dom Element and not a jQuery object. I've stumble on this issue once before but can't seem to remember why this happens, any help would be appreciated. $(document).ready(function(){ var currentSlide = 0, slides = $('#homeSlider ul li'), slideLength = slides.length; var slideInterval = setInterval(function(){ if(currentSlide &gt;= slideLength-1) { currentSlide = 0; } else { currentSlide++; } slides[currentSlide].fadeOut(); /* &lt;-- undefined is not a function */ }, 2000); // end slide setInterval });// end doc ready

http://stackoverflow.com/comment/39734043
score: 0
type: Comment
has text: Yes but all this problems are may be true, but I would like to know if I have access to the PHP file first..
type: AnswerComment
comment on: http://stackoverflow.com/a/25462496

http://stackoverflow.com/comment/39741469
comment on: http://stackoverflow.com/a/25466523
has text: yes always gets called. the storage api docs also say to use the method above
type: Comment
score: 1
type: AnswerComment

nvd3.js
tags question: http://stackoverflow.com/q/25518380
tags question: http://stackoverflow.com/q/25416456
tags question: http://stackoverflow.com/q/25505779
type: Tag
tags question: http://stackoverflow.com/q/25530853
tags question: http://stackoverflow.com/q/25541637
tag name: nvd3.js

http://stackoverflow.com/a/25436772
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25409406
type: Answer
answers question: http://stackoverflow.com/q/25409406
has body: Thanks to Tobago's suggestion, the final solution is: @business_process_history.map { |bp| [bp.period_day, bp.score.to_f] } 1 - The map method with the block generates the correct array of arrays 2 - The to_f method applied to score field makes sure the data type meets Highcharts expectations. Thanks Tobago ! Fred

http://stackoverflow.com/comment/39752083
has text: I'd like to remove characters :)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25472478
type: Comment

relative-path
type: Tag
tags question: http://stackoverflow.com/q/25548288
tag name: relative-path

http://stackoverflow.com/a/25463801
answers question: http://stackoverflow.com/q/25463728
score: 0
type: Answer
has body: replace .click with .one('click', ... Example: $( ".reply_video" ).one('click',function() { ... }); However, if you also want secondary functionality, use the .is(':visible') function. Example: (Inside click event) $( ".reply_video" ).click(function() { if (!$(".comment_reply_video").is(":visible")) { $(".comment_reply_video").slideToggle( "fast" ); $('html,body').animate({ scrollTop:$('.comment_reply_video').offset().top-90}, 800); $(".comment_reply_video").animate({ backgroundColor: '#CCC' }, 800 ); setTimeout(function() { $(".comment_reply_video").animate({ backgroundColor: '#FFF' }, 1200 ); }, 1500); } $(".r_all").focus(); });

http://stackoverflow.com/comment/39718060
type: Comment
comment on: http://stackoverflow.com/a/25452722
score: 0
type: AnswerComment
has text: Dear Himanshu, can you modify code for dyanamic class being created by other plugin but present in DOM

http://stackoverflow.com/comment/39640452
type: AnswerComment
score: 0
type: Comment
has text: Seems like it, but If you specify what is it that you're trying to achieve maybe a workaround or an idea would come up!
comment on: http://stackoverflow.com/a/25412019

http://stackoverflow.com/a/25399162
answers question: http://stackoverflow.com/q/25399099
has comment: http://stackoverflow.com/comment/39615373
type: Answer
has body: try remove() so assuming I've got the right one: document.getElementById("texts"+i).remove() If not the above... then make sure you give it an id and choose it by that before remove()ing it
has comment: http://stackoverflow.com/comment/39615440
score: 0

http://stackoverflow.com/q/25439019
answer count: 0
tagged with: oauth
type: UnansweredQuestion
tagged with: twitter-oauth
upvote count: 4
has body: I have an express.js server which is interfacing with passport for Twitter login. Everything works when I test the route from a page served by the express app, but I'm trying to use this server to interface with a phonegap application. When I call the server's login route (http://localhost:3000/auth/twitter) from a completely separate client side app, I keep getting this error: XMLHttpRequest cannot load https://api.twitter.com/oauth/authenticate?oauth_token=***************************. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. I believe I'm implementing a correct CORs middleware, since I can call other server routes no problem: app.use(function(req, res, next) { res.header('Access-Control-Allow-Credentials', true); res.header('Access-Control-Allow-Origin', req.headers.origin); res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); res.header('Access-Control-Allow-Headers', 'X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept'); next(); }); Any ideas? Does this have something to do with a Twitter specific issue?
tagged with: cors
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/45798152
has comment: http://stackoverflow.com/comment/39689891
tagged with: node.js
score: 4
has title: Passport OAuth, Twitter Login and CORs

http://stackoverflow.com/comment/39652144
comment on: http://stackoverflow.com/q/25418334
type: Comment
type: QuestionComment
has text: @Barmar that's basically a naming I made myself. the location.href will throw an error and pass the xpostback string to a method to process. this method will determine which C# method to handle the event
score: 0

http://stackoverflow.com/comment/78098848
type: Comment
comment on: http://stackoverflow.com/a/25454713
has text: And, yes, it is VERY obnoixious
type: AnswerComment
score: 0

http://stackoverflow.com/q/25453040
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25453271
has answer: http://stackoverflow.com/a/25453271
linked to: http://stackoverflow.com/q/1728284
has answer: http://stackoverflow.com/a/25453359
has body: I have a few tables like this &lt;table id="table_1"&gt; &lt;tr&gt; &lt;td&gt;&lt;input type="text" name="date[]"&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; the number of the &lt;td&gt;'s is very variable. Currently I'm using a function like this: function addRow(){ var table = document.getElementById('table_1'); var row = table.insertRow(-1); var cell1 = row.insertCell(0) .... cell1.innerHTML="&lt;input type='text' name='date[]' /&gt; } using this method, it would require a custom function for every type of table. Is there a way, to add a Line to a table, which is exactly the same as the last row? In a table with 7 cells, 7 cells would be added, with the right content. Is this possible in pure JS?
has title: Javascript add Row, one function for different tables
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39715716
has comment: http://stackoverflow.com/comment/39716189
has comment: http://stackoverflow.com/comment/39716020
tagged with: html-table
score: 0
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39715667
downvote count: 1
has comment: http://stackoverflow.com/comment/39715806
favorite count: 0
has comment: http://stackoverflow.com/comment/39715768
accepted answer: http://stackoverflow.com/a/25453359
has comment: http://stackoverflow.com/comment/39715896
has comment: http://stackoverflow.com/comment/39715724

http://stackoverflow.com/comment/39891513
type: AnswerComment
score: 0
type: Comment
has text: node = editor.dom.select('p')[0]; alert(tinymce.activeEditor.dom.getStyle(node, "text-align", true)) because the alignment is stored in the first p-tag
comment on: http://stackoverflow.com/a/25544340

http://stackoverflow.com/q/25500849
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/25500941
type: AnsweredQuestion
tagged with: asp.net
tagged with: http://stackoverflow.com/tag/xml
type: Question
has body: I am trying to implement a solution to display XML data on a web page. I'm making use of an ASP.NET MVC Razor view. Testing the application out I used the following: &lt;script type="text/javascript"&gt; LoadXMLString('XMLHolder', '&lt;Rfq&gt;&lt;IsAbove30k&gt;true&lt;/IsAbove30k&gt;&lt;ReferenceNumber&gt;ReferenceNumber1&lt;/ReferenceNumber&gt;&lt;ContactPersonName&gt;ContactPersonName1&lt;/ContactPersonName&gt;&lt;ContactPersonTelephoneNumber&gt;ContactPersonTe1&lt;/ContactPersonTelephoneNumber&gt;&lt;ContactPersonCellPhone&gt;ContactPersonCe1&lt;/ContactPersonCellPhone&gt;&lt;BuyerName&gt;BuyerName1&lt;/BuyerName&gt;&lt;BuyerTelephoneNumber&gt;BuyerTelephoneN1&lt;/BuyerTelephoneNumber&gt;&lt;BuyerEmailAddress&gt;BuyerEmailAddress1&lt;/BuyerEmailAddress&gt;&lt;ProcurementItem&gt;&lt;Title&gt;Title1&lt;/Title&gt;&lt;ClosingDate&gt;1900-01-01T01:01:01+02:00&lt;/ClosingDate&gt;&lt;Description&gt;Description1&lt;/Description&gt;&lt;CaptureDate&gt;1900-01-01T01:01:01+02:00&lt;/CaptureDate&gt;&lt;/ProcurementItem&gt;&lt;RfqGood&gt;&lt;DeliveryTo&gt;DeliveryTo1&lt;/DeliveryTo&gt;&lt;DeliveryAddress&gt;DeliveryAddress1&lt;/DeliveryAddress&gt;&lt;DeliverySuburb&gt;DeliverySuburb1&lt;/DeliverySuburb&gt;&lt;DeliveryPostalCode&gt;1&lt;/DeliveryPostalCode&gt;&lt;SubmissionFax&gt;SubmissionFax1&lt;/SubmissionFax&gt;&lt;Specification&gt;Specification1&lt;/Specification&gt;&lt;SubmissionFax2&gt;SubmissionFax21&lt;/SubmissionFax2&gt;&lt;DeliveryDate&gt;1900-01-01T01:01:01+02:00&lt;/DeliveryDate&gt;&lt;Good&gt;Tools &amp;amp; Machinery&lt;/Good&gt;&lt;/RfqGood&gt;&lt;/Rfq&gt;') This worked fine. The XML data I'm trying to display is saved as XML in my application database. It is passed to the view in the model. Hence, I tried the following: &lt;script type="text/javascript"&gt; LoadXMLString('RfqXmlData', @Html.Raw(Model.RfqXmlData)) At this stage I received the error: Uncaught SyntaxError: Unexpected token &lt; I did notice when view the source of the web page that the XML data ha…
tagged with: razor
has title: Javascript unexpected token '<' when loading XML from model
accepted answer: http://stackoverflow.com/a/25500941
answer count: 1
score: 0

http://stackoverflow.com/comment/39869983
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25536169
has text: "... it does need to have both classes or just .more-options" - this is basically the same as saying "Hide everything has .more-options" regardless of whether it has another class.

http://stackoverflow.com/a/25539736
score: 0
has comment: http://stackoverflow.com/comment/39879433
type: Answer
has body: "in" means its an input variable and not modified by the code, there is also an "out" that marks objects that will be modified i.e. void getImageData(in double sx, in double sy, in double sw, in double sh, out UInt8ClampedArray data); Note: This is not real documentation just an example to illustrate the case.
answers question: http://stackoverflow.com/q/25539715
accepted answer of: http://stackoverflow.com/q/25539715
type: AcceptedAnswer

http://stackoverflow.com/comment/62861128
comment on: http://stackoverflow.com/q/25399978
has text: @kryger I had the same problem and solved it with your solution. Thank you!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25424295
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39662054
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25421683
has body: It's important to understanding scope and context in javascript. I suppose your template is something like this : &lt;script id="template_id" type="text/template"&gt; &lt;div&gt; &lt;% _.each(images, function(image){ %&gt; &lt;div class="row"&gt; &lt;img src="&lt;%= image.src %&gt;" /&gt; &lt;div class="form-group"&gt; &lt;input class="select-picture" name="image[&lt;%= image.uid %&gt;]['is_checked']" type="checkbox" /&gt; &lt;input name="image[&lt;%= image.uid %&gt;]['quantity']" type="text" /&gt; &lt;/div&gt; &lt;div&gt; &lt;% }); %&gt; &lt;/div&gt; &lt;/script&gt; In you Backbone View you can do something like that : Backbone.View.extend({ el : $('#template_id'), function onChecked(){ /* * this.$el refer to #template_id element. */ this.$el.find('.select-picture:checked').each(function(index){ /* * Now this referer to the current context. */ var source = $(this).parent().prev().attr('src'); document.cookie = "imagePath=" + source; var myCookie = document.cookie.replace(/(?:(?:^|.*;\s*)imagePath\s*\=\s*([^;]*).*$)|^.*$/, "$1"); console.log(myCookie); }) }, }); Take a look at : http://ryanmorr.com/understanding-scope-and-context-in-javascript http://backbonetutorials.com/what-is-a-view http://underscorejs.org/#bind
accepted answer of: http://stackoverflow.com/q/25421683

workflow
tags question: http://stackoverflow.com/q/25405363
tag name: workflow
type: Tag

http://stackoverflow.com/q/25511630
has comment: http://stackoverflow.com/comment/39836053
has comment: http://stackoverflow.com/comment/39839014
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: I'm actually having issues writing a loop in the correct location. I've been testing for a few days, but I can't figure out why it won't loop where I want it. I'm taking the exported XML from MSDN and trying to organize it properly. My XML Looks like this: <Data> <Product_Key Name="Access 2010 "> Code1 Code2 Code3 </Product_Key> <Product_Key Name="Office Professional Plus 2007"> Code1 Code2 Code3 Code4 Code5 </Product_Key> My .js script looks like so: function loadXMLDoc(dname) { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET",dname,false); xhttp.send(); return xhttp.responseXML; } and lastly, my HTML looks like so: I'm sure all I need is another loop for the tagname "Key" and I've tried lots of ways for that, but nothing ends up looking correctly. Maybe I need an if/then statement instead so it tests if the next line is another "Product_Key" or another "Key"??? Currently my output looks like this: Access 2010 Code1 Office Professional Plus 2007 Code1 I'm wanting all the codes displayed like so (but in a table. stackoverflow doesn't support tables in posts, so i had to make due with a modified example): Access 2010 Code1 Code2 Code3 Office Professional Plus 2007 Code1 Code2 Code3 Code4 Code5
tagged with: http://stackoverflow.com/tag/html
has title: Pull specific XML Data using HTML/JS
has comment: http://stackoverflow.com/comment/39838017
has comment: http://stackoverflow.com/comment/39825616
favorite count: 0
has answer: http://stackoverflow.com/a/25549971
tagged with: http://stackoverflow.com/tag/xml
accepted answer: http://stackoverflow.com/a/25549971
upvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/25406568
has body: I was updating my personnel website and after installing adBlock under Chrome i noticed some disfunctionning. I found that adBlock blocked some resources from my website like twitter-timeline script and linkedin.pnp image. I disable adBlock everything come back normal. Is there some Javascript code to know when a browser has a blocking extension and ask the user to disable it ? Thanks
downvote count: 2
upvote count: 1
answer count: 1
tagged with: adblock
favorite count: 0
has comment: http://stackoverflow.com/comment/39629249
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4869154
has answer: http://stackoverflow.com/a/25406693
duplicate of: http://stackoverflow.com/q/4869154
type: Question
tagged with: javascript
score: -1
has title: My Website content blocked by AdBlock twitter and

http://stackoverflow.com/comment/39649395
type: Comment
score: 1
has text: what data you want to pass
comment on: http://stackoverflow.com/q/25417069
type: QuestionComment

http://stackoverflow.com/a/68405895
score: 0
answers question: http://stackoverflow.com/q/25412212
type: Answer
has body: You can add a span with a class to the button when it was clicked if ($(this).is(".btn, .page-link, .df-link")) { // disable button $(".btn").prop("disabled", true); // add spinner to button $(this).html( ` ` + $(this).text() ); } and then in Ajax complete remove that element: complete: function(response) { $(".btn").prop("disabled", false); $(".spinner-border").remove(); }

http://stackoverflow.com/comment/39721220
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25455791
has text: Maybe you try to open this file right from you disk (I mean not from server). In this case Chrome trying to find including script as file://ajax.googleapis.com...

http://stackoverflow.com/q/25543835
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25543945
has body: When i performing following operation it shows Uncaught TypeError: Cannot read property 'length' of undefined. Can any one please help me. var events = [ { "EventsCalendarID": 21, "AdminUserName": "ManjitSingh", "StartDate": "2014-08-27 12:00 AM", "EndDate": "8/28/2014 12:00:00 AM", "Timezone": "Europe/London", "Message": "mabkja", "IsApproved": true, "UserID": "70348398-9b8e-48a2-bbfc-c2474146d5d5", "User": null }, { "EventsCalendarID": 22, "AdminUserName": "ManjitSingh", "StartDate": "2014-08-29 12:00 AM", "EndDate": "8/29/2014 1:00:00 AM", "Timezone": "Europe/London", "Message": "ffd", "IsApproved": true, "UserID": "70348398-9b8e-48a2-bbfc-c2474146d5d5", "User": null }, { "EventsCalendarID": 23, "AdminUserName": "ManjitSingh", "StartDate": "2014-08-29 12:00 AM", "EndDate": "8/29/2014 1:00:00 AM", "Timezone": "Europe/London", "Message": "fndmms", "IsApproved": true, "UserID": "70348398-9b8e-48a2-bbfc-c2474146d5d5", "User": null } ]; function success(events) { var ev = []; $.each(events.items, function (i, v) { ev.push({ title: v.Message, start:v.StartDate, end:v.EndDate, id: v.EventsCalendarID }); }); }
has answer: http://stackoverflow.com/a/25543945
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39883534
answer count: 2
has title: cannot read property 'length' error occured when i performing following operation
has answer: http://stackoverflow.com/a/25544130
tagged with: javascript
score: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25544130
upvote count: 1

http://stackoverflow.com/a/25531748
downvote count: 0
has comment: http://stackoverflow.com/comment/39924378
type: Answer
answers question: http://stackoverflow.com/q/25529936
score: 3
has comment: http://stackoverflow.com/comment/39933741
upvote count: 3
has body: Maybe you want to use elementFromPoint(). It's really simple to use, you need to pass the coordinates and this function will return an element under the point. For your particular case, every word must be in an independent element span, div or whatever. See the working example: jsfiddle Maybe you want to make some more robust solution, and add a condition if in the given coordinates there is not an element (elementFromPoint() return its ancestor or the body element or NULL if coordinates are not in visible part)

http://stackoverflow.com/a/25529651
answers question: http://stackoverflow.com/q/25529466
upvote count: 1
type: Answer
has body: http://jsfiddle.net/oxLtk8Ls/ look it, try border-top-width $(".image").stop().animate({"border-top-width": '1px' ,"padding-top": '5px' ,height: '10px' ,width: '200px' ,opacity: 1}, 100);
downvote count: 0
score: 1

http://stackoverflow.com/q/25436770
tagged with: javascript
has title: 2-way data binding not working in select tag in modal of Angular UI with Bootstrap
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25437888
tagged with: angularjs
tagged with: twitter-bootstrap
type: AnsweredQuestion
tagged with: select
accepted answer: http://stackoverflow.com/a/25437888
has body: Here is Plunker. http://plnkr.co/edit/CKcKLm?p=preview After clicking "Open me" button, I am expecting it to do whatever I selected. It should always switch back to "white" option because ng-change="refreshAmount()" sets it back to: $scope.myColor = $scope.colors[0]; As you can see in the logs, the $scope.myColor value is updated correctly (always outputs "white").
type: Question
answer count: 1

http://stackoverflow.com/a/25548459
score: 0
has body: well you cannot pass the value directly, you need to assign it to a "key" like this data: {'arr':JSON.stringify(orderDetailsArray)}, and access the same at php side like this $orderDetailsArray = json_decode($_POST['arr']); Reference: http://api.jquery.com/jQuery.ajax/ Happy Coding :)
type: Answer
answers question: http://stackoverflow.com/q/25548358

http://stackoverflow.com/q/25517570
has title: Creating javascript object without fieldname
has comment: http://stackoverflow.com/comment/39836788
tagged with: http://stackoverflow.com/tag/json
score: -1
type: Question
has body: Hi I'm trying to create an object in JS which is like this {'0':{1,2,3,4},'1':{1,2,3,4}, '2':{1,2,3,4}} but I don't know how to create the {1,2,3,4} part. These objects have to be created from something this : [{'value': '{1,2,3,4,5}', 'id': 0, 'type':'node'}] here is how I do it for the fieldname: var domain={}; nodes.forEach(function(node){ if(node.type == "node") domain[node.id]= node.value; }); but node.value gives me String I don't want it to be string. I want to be in the form of {1,3,4.5}. I appreciate any help
has comment: http://stackoverflow.com/comment/39836486
upvote count: 0
has comment: http://stackoverflow.com/comment/39836510
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39836611
favorite count: 0
has comment: http://stackoverflow.com/comment/39836482
has answer: http://stackoverflow.com/a/25517603
has comment: http://stackoverflow.com/comment/39836464
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/39836459
tagged with: object
has comment: http://stackoverflow.com/comment/39836447

http://stackoverflow.com/comment/39602583
has text: By the way I didn't down vote you, your answer appeared in the SO low quality post queue, one of the options was the stock comment I left, you will find that most down voters don't leave a comment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25391653
type: AnswerComment

http://stackoverflow.com/q/25430589
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39676012
tagged with: http://stackoverflow.com/tag/mp4
has comment: http://stackoverflow.com/comment/101395917
has comment: http://stackoverflow.com/comment/39674815
tagged with: video
score: 3
has answer: http://stackoverflow.com/a/25430671
has comment: http://stackoverflow.com/comment/39678522
upvote count: 3
type: Question
has title: MP4 in HTML5 Video Tag Not Playing in Internet Explorer
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/39674890
tagged with: javascript
linked to: http://stackoverflow.com/q/21124885
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has body: Can anybody tell me why this is working for Firefox and Chrome, but not for IE9, 10, or 11? It's giving me the typical black screen with a small white square containing a red X. HTML5 Video Player Test Things I have already tried: - Adding the MIME type to .htaccess - Re-encoding to make sure the MP4 are properly H264. - video.js didn't help at all. I have also tried just using 'File' > 'Open' and opened the MP4 locally on my machine using IE, and it plays just fine like that, so I think the video should be properly encoded and everything for IE.
favorite count: 0

http://stackoverflow.com/comment/39701705
comment on: http://stackoverflow.com/q/25445866
score: 0
type: Comment
type: QuestionComment
has text: If you're following general jQuery writing rules you might had have put your code into DOM ready (i.E. `$(function(){});`). This will make onLoad never used as the binding happens after all work is finished.

http://stackoverflow.com/comment/39880424
score: 1
has text: wrap your last two lines in `window.onload`.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25542022

http://stackoverflow.com/a/25481790
answers question: http://stackoverflow.com/q/25481588
type: Answer
has body: You can get the result you want with iterating over your data, I've taken your data like so as an example: var data = { "data": [{ "tags": [ "design", "development", "code", "foo", "bar"], "views": [ "81"] }, { "tags": [ "design", "foo", "photoshop", "alice", "bob"], "views": [ "28"] }] }; Then we can iterate over it like so: var countArray = []; $.each(data.data, function(dataKey, dataValue) { $.each(dataValue.tags, function(tagKey, tagValue) { if( !(tagValue in countArray) ) { countArray[tagValue] = 1; } else { countArray[tagValue]++; } }); }); Console log would output console.log(countArray); [design: 2, development: 1, code: 1, foo: 2, bar: 1…] jsFiddle: http://jsfiddle.net/602puhja/
has comment: http://stackoverflow.com/comment/39770295
has comment: http://stackoverflow.com/comment/39771420
score: 0
has comment: http://stackoverflow.com/comment/39770096

http://stackoverflow.com/q/25514664
favorite count: 0
accepted answer: http://stackoverflow.com/a/25515718
tagged with: http://stackoverflow.com/tag/svg
linked to: http://stackoverflow.com/q/11978995
has body: Using this Stackoverflow question and the first answer, I was able to convert an SVG image to inline svg on document ready. I can also reference its path' elements from CSS to add a hover stroke. The next thing I am trying to accomplish is add onclick to each path without having to add it to the svg file itself. I assumed since the CSS can identify each path's class, I should also be able to identify each path's ID in javascript as well, but I am having trouble figuring out how. Here's my code: &lt;body&gt; &lt;div id="mapSideBar" class="left"&gt; &lt;/div&gt; &lt;div id="mapMain" class="left"&gt; &lt;img id = "mapImg" src="canada2.svg" class="logo" /&gt; &lt;/div&gt; &lt;/body&gt; I have the function mentioned in the link above to convert it to inline SVG and my paths have ids - path1, path2, path3 and path4. I tried to add the following to the jQuery(document).ready() function: var $paths = jQuery(document).find('path'); $paths.each(function() { (this).click(onImgClick((this).id)); }); just to see if I could get a handle on each path, and I cannot. Is there something I am missing, or is there even a way to assign onclick event handlers to each path? Thank you, Rishi
has answer: http://stackoverflow.com/a/25515336
score: 6
tagged with: css
has comment: http://stackoverflow.com/comment/39831939
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25515336
has title: Add onclick to svg path by id
has comment: http://stackoverflow.com/comment/39831052
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39831313
has answer: http://stackoverflow.com/a/25515718
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39831927
tagged with: http://stackoverflow.com/tag/html
upvote count: 6

http://stackoverflow.com/q/25478654
tagged with: append
has answer: http://stackoverflow.com/a/25478812
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25478812
has body: This is my HTML that creates a board, each cell calls my JavaScript Function on click creates an Image. Currently the image is created in the body and is visible under the table. I would like it so that when you click on a cell the Image is created in that Cell. Infinite Tic-Tac-Toe! Here is my JavaScript with the function that is currently creating the images in the body and not the table. function show_image(src, width, height, alt) { var img = document.createElement("img"); img.src = src; img.width = width; img.height = height; img.alt = alt; // This next line will just add it to the tag this.appendChild(img); }; function add_X(){ var src = "http://bookriotcom.c.presscdn.com/wp-content/uploads/2013/07/x.png"; show_image('http://bookriotcom.c.presscdn.com/wp-content/uploads/2013/07/x.png', 60, 60, "X") }; function add_O(){ var src = "http://store.hamiltonmarine.com/prodimg/BER-O.JPG"; show_image('http://store.hamiltonmarine.com/prodimg/BER-O.JPG', 50, 50, "x") } I'm trying to create my own tic Tac Toe game with out copying someone else and am currently struggling with getting the X to go inside the clicked square. You can check out what I have managed so far here. http://terribilis.github.io/Infinite-Tic-Tac-Toe/
type: Question
has comment: http://stackoverflow.com/comment/39763655
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39763734
has comment: http://stackoverflow.com/comment/39763704
has title: Trying to append a img to different parts of a table

http://stackoverflow.com/comment/39640388
comment on: http://stackoverflow.com/a/25412163
score: 0
type: Comment
has text: if you click on the 3rd star icon, value will be set as "Ok". After you hover on any icon for example at 4th star icon, that's value("Good") will be set replacing previous "Ok". This is okay but after leaving mouse pointer that "Ok" should be returned. Because, you just hover on the 4th icon, but still 3rd icon is selected. So, "ok" shouldn't be replaced permanently until another icon is clicked.
type: AnswerComment

http://stackoverflow.com/comment/39672532
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25429706
has text: Better shipped than perfect :)
score: 0

http://stackoverflow.com/comment/39618123
type: Comment
has text: Thanks, I didn't know the RegisterStartupScript method. All my .aspx pages actually inherit from an already existing page, so this solves my problem.
comment on: http://stackoverflow.com/a/25399816
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39656884
type: Comment
comment on: http://stackoverflow.com/a/25421488
score: 0
type: AnswerComment
has text: Exactly ! i saw it but didn't tested it yet... Thank you.

http://stackoverflow.com/q/25535797
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25535830
linked to: http://stackoverflow.com/q/4755546
possible better answer: http://stackoverflow.com/a/25535871
has answer: http://stackoverflow.com/a/25535871
duplicate of: http://stackoverflow.com/q/4755546
type: AnsweredQuestion
has title: how to remove a div using javascript
has body: so I'm trying to remove a div using javascript, the div I'm trying to remove: The code I am using to try to remove it: Close Am I doing anything wrong?
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39869882
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25535830

http://stackoverflow.com/q/25461877
tagged with: css
has comment: http://stackoverflow.com/comment/39734433
score: 1
has comment: http://stackoverflow.com/comment/39733207
upvote count: 1
type: Question
tagged with: javascript
has body: i am trying to make my main content div 100% height base on browser windows size but i want it will start after header. i am getting 100% height but it is start from top but i want it will leave header are then it will 100% height. bellow is code. mainly i want to make my contentarea div will cover 100% width and height but minus will be header height sdf Home Space Available Parking / Amenities adasdasdasdas adsada dasdasdas copy right demo http://jsfiddle.net/o0Lcrv3w/ i already search some in here and got many solution, many post i tried with those but not really work any yet. like height: -o-calc(100% - 100px); /* opera */ height: -webkit-calc(100% - 100px); /* google, safari */ height: -moz-calc(100% - 100px); /* firefox */
answer count: 2
has comment: http://stackoverflow.com/comment/39735066
downvote count: 0
has title: 100% height minus nPx via css or jquery
tagged with: jquery
tagged with: height
has answer: http://stackoverflow.com/a/25462891
has answer: http://stackoverflow.com/a/25462766
favorite count: 0
has comment: http://stackoverflow.com/comment/39734504
type: UnansweredQuestion

http://stackoverflow.com/q/25503633
type: AnsweredQuestion
has body: Im rewriting an angularjs directive ,moving all the markup from angular to reactiveJS, due to the poor dom performance of angularjs. i have a simple a question about reactiveJS templating. Template {{#each dataTable:i}} &lt;li {{#options.keysDisplayName:j}} &lt;span&gt;{{dataTable[i][this]}}&lt;/span&gt; {{/each}} &lt;/li&gt; {{/each}} JS var ractive = new Ractive({ el: 'details-table', template: '#details-table-tmplt', data: { options: { keysDisplayName : [ 'name', 'age'] }, dataTable : [ {name : 'dog', age:15, gender: 'f'}, {name : 'cat', age:15, gender: 'f'} ] } }); Im printing a table/list , I want to iterate on the each row in the dataTable , but only on the keys that present in options.keysDisplayName . ( so in this example , gender property wont be shown) I guess im missing somthing basic in framework. Thanks , much appreciated
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25503900
score: 0
has title: ReactiveJS templates : Iterating Over an Object , using array iteration
has answer: http://stackoverflow.com/a/25503900
type: Question

http://stackoverflow.com/comment/39786294
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25457109
has text: I had the html included and despite trying to keep it concise it was a bit long and confusing. Per klenwell's recommendation to include a fiddle I edited the question to include a link to http://jsfiddle.net/6y18mho8/2/ which will have the html. Thank you!

http://stackoverflow.com/comment/39780235
has text: It actually alerts "5 ... 5 ... 5 ... 5 ..."
type: QuestionComment
type: Comment
score: 3
comment on: http://stackoverflow.com/q/25487817

http://stackoverflow.com/comment/39713450
type: QuestionComment
type: Comment
score: 2
has text: A good explanation of `this` vs. `$scope`: http://stackoverflow.com/questions/11605917/this-vs-scope-in-angularjs-controllers . A great example is that when you use directives and pass it one of your controller methods, the `this` won't be what you expect if the directive calls the method. That's just a simple example, and can definitely cause confusion, just like this post
comment on: http://stackoverflow.com/q/25451861

http://stackoverflow.com/comment/39751336
comment on: http://stackoverflow.com/q/25472054
type: Comment
has text: Possible duplicate http://stackoverflow.com/questions/12895152/equivalent-of-innerhtml-for-text
score: 0
type: QuestionComment

http://stackoverflow.com/q/25507847
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25508445
linked to: http://stackoverflow.com/q/21478950
has answer: http://stackoverflow.com/a/25507961
tagged with: css
accepted answer: http://stackoverflow.com/a/25507961
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25507960
has comment: http://stackoverflow.com/comment/39818193
downvote count: 1
type: Question
tagged with: javascript
has body: I'm trying to replace all instances of a font tag that has a color attribute like this: Some text with this: Some text I did some hunting on StackOverflow and found this link, and modeled my code after it: Javascript JQuery replace tags I've created a little jQuery loop below that is supposed to do the following: Go through the string(contents of a div) Get the font color attribute Replace the tags with a Set a CSS style attribute with the appropriate color. Right now, it doesn't work. I just get an error stating that 'replaceWith' is not a function. $('font').each(function () { var color; this.$('font').replaceWith(function () { color = this.attr("color"); return $('').append($(this).contents()); }); this.$("span").attr("style", "color=" + color); }); Any help would be greatly appreciated!
has comment: http://stackoverflow.com/comment/39817991
upvote count: 3
has answer: http://stackoverflow.com/a/25507960
answer count: 3
has title: How to replace font tags with span?

http://stackoverflow.com/a/25479073
upvote count: 1
score: 0
downvote count: 1
type: Answer
has body: If your two sites share the same domain say intranet.yoursite.com and wiki.yoursite.com, you can use the same authorization cookie on both of them. Just make sure the cookie set by one site is understood by the other site. If both sites use ASP.NET, make sure they share the same machine key. If these two sites are completely two different domains, OpenID is an option. There is another way if you don't want to use OpenId: after the user log on site A, site A can redirect the user to site B with an authentication token in URL that can only be understood by site B. Site B can decrypt the token and then log the user on.
answers question: http://stackoverflow.com/q/25478620

http://stackoverflow.com/a/25419353
has body: You'll need to use AJAX for that. PHP is all code found and run on the server, JavaScript code is all code that runs on the client of the person viewing the page. An AJAX call will send a request back the server so it can call some PHP function for you and give you the result.
has comment: http://stackoverflow.com/comment/39653194
answers question: http://stackoverflow.com/q/25419324
score: 0
type: Answer

http://stackoverflow.com/comment/39675650
type: AnswerComment
score: 0
type: Comment
has text: But how can i compare the date converted to milliseconds with the user selected date from dropdown?eg) in javascript function ,var timeTextO = document.getElementById("time").value ; //if user selects 01:30PM, it displays 13:30 as its 24hour clock
comment on: http://stackoverflow.com/a/25431322

http://stackoverflow.com/q/25491256
tagged with: javascript
answer count: 1
has body: I am building a yeoman generator, and need to assign an additional value/answer when a prompt is answered. I have found a way to prompt user with another question, but what I need is to assign a predefined answer automatically in the background - so user wont see it happening, not ask the user another question. Here's an example below. Also need to do this for a list of 12+ values so the 'when' command below isn't ideal as I would have to have the when statement 12+ times this.prompt([{ type: 'list', name: 'redWhite', message: 'what colour', choices: ['red', 'white', 'blue', 'black', 'green', 'yellow', 'purple', 'cyan', 'magenta', 'brown'] }, { when: 'redWhite.red', type: 'confirm', name: 'blue', message: 'Red is nice, but how about blue instead?' }, /*So instead of prompting user again, just need to assign a predefined value here , { when: 'redWhite.red', answer: redFooBar }, */ { when: 'redWhite.white', type: 'confirm', name: 'green', message: 'White is nice, but how about green instead?' }, { name: 'otherColors', message: 'What other colors do you like?' }], function (answer) { // answer = { // redWhite: 'red', // blue: false, // green: false, // otherColors: 'pink, purple-ish' // }; });
tagged with: yeoman-generator
favorite count: 0
has answer: http://stackoverflow.com/a/25530535
type: AnsweredQuestion
has title: Yeoman Generator Prompts
type: Question
score: 5
accepted answer: http://stackoverflow.com/a/25530535
upvote count: 5
tagged with: arrays
downvote count: 0

http://stackoverflow.com/q/25426251
tagged with: http://stackoverflow.com/tag/html
has title: Hover not right when element moves
tagged with: css
has comment: http://stackoverflow.com/comment/39665969
has comment: http://stackoverflow.com/comment/39665992
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39665649
has body: I have a dynamic div, and I want to know when the mouse is hover this div. I tryed with .is( ':hover' ) but doesn't work. jsFiddle demo In the demo I have made a moving div and if I doesn't move the mouse the log is never called, but if I put manually the mouse hover the box it write always the logs. Never writes the log in the console. Always writes the log in the console, even the box is gone. It's a bug or I have made a mistake? How can I detect the hover properly?
type: Question
tagged with: hover
has comment: http://stackoverflow.com/comment/39666606
has comment: http://stackoverflow.com/comment/39666121
has comment: http://stackoverflow.com/comment/39665557
has comment: http://stackoverflow.com/comment/39666093
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39666916
has comment: http://stackoverflow.com/comment/39666949
score: 0
has comment: http://stackoverflow.com/comment/39666231
has answer: http://stackoverflow.com/a/25426903

http://stackoverflow.com/comment/39804246
score: 0
comment on: http://stackoverflow.com/q/25499334
has text: @Dipaks It was early morning I didn't notice that. :)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39614328
score: 0
comment on: http://stackoverflow.com/a/25398475
type: AnswerComment
has text: So, you take matters into your own hands and just remove the line. You could just have posted a comment about it. I'll just leave out the comment that that's what the other answer suggests, @Marty.
type: Comment

http://stackoverflow.com/comment/39750580
comment on: http://stackoverflow.com/a/25425575
type: Comment
has text: But the eval is not executed in strict mode, is it?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39833487
type: Comment
type: QuestionComment
has text: Have a look [here](http://stackoverflow.com/questions/5035547/pass-javascript-array-php). And `AJAX` is your friend! You cannot `regex` with `PHP` content that is output.
score: 0
comment on: http://stackoverflow.com/q/25515839

http://stackoverflow.com/a/25529812
upvote count: 1
has comment: http://stackoverflow.com/comment/39930928
has comment: http://stackoverflow.com/comment/39931103
answers question: http://stackoverflow.com/q/25529743
downvote count: 0
has comment: http://stackoverflow.com/comment/39926832
has body: You need either place your jQuery at the end of the page, or wrap it in a document.ready call (e.g. $( document ).ready(function() {...). You're attempting to execute code on elements that don't yet exist. jsFiddle defaults to a window.onload which is why it works there.
type: Answer
score: 1

http://stackoverflow.com/a/25548319
answers question: http://stackoverflow.com/q/25547830
has body: In javascript get the element by its id then replace innerHTML by the the td tags and the values that you want.
type: Answer
score: 0

http://stackoverflow.com/a/42636673
has body: Or this: function animateScroll(container) { var img = $(container).find('.sequence img'); $(container).find('.sequence img').eq(0).hide() .next('img').show() .end().appendTo($(container).find('.sequence')); } $(window).bind('scroll', function() { animateScroll('#main'); }
answers question: http://stackoverflow.com/q/25508698
score: 0
type: Answer

http://stackoverflow.com/q/25438358
has body: I am using waypoints.js and animate.css to animate elements on my page as you scroll down. I am wondering how to incorporate the built in opacity properties in the animate.css framework. In my fiddle you can see how apon entering the screen from top or bottom my image will animate but how could I make it fade in as well. notice how on the second image it fades in but flash first kinda of looks glitchy. Here is my javascript: //Animate from top $('.animated').waypoint(function() { $(this).toggleClass($(this).data('animated')); }, { offset: 'bottom-in-view' }); //Animate from bottom $('.animated').waypoint(function() { $(this).toggleClass($(this).data('animated')); }); or http://jsfiddle.net/3qy0hs3L/1/
score: 1
accepted answer: http://stackoverflow.com/a/25452682
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25452682
tagged with: css
upvote count: 1
type: AnsweredQuestion
has title: waypoints, animate.css and opacity on scroll issue

http://stackoverflow.com/comment/39832905
score: 0
type: Comment
type: QuestionComment
has text: It's not clear what you're trying to do. Do you want a REPL (Read-Eval-Print-Loop) environment where you can execute arbitrary JS commands to be interpreted by Node, or do you want a build system to run a `.js` program with Node?
comment on: http://stackoverflow.com/q/25515319

http://stackoverflow.com/comment/39704153
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25447158
score: 0
has text: The difference between `npm` and `bower` is mostly in the available repositories. `npm` is normally used for fetching backend modules (as nodejs normally runs as backend), while `bower` has repositories for frontend javascript libraries. Only getting the minified version isn't directly possible with `npm` AFAIK. For bower, there is a [feature request](https://github.com/bower/bower/issues/368) for the described behavior. Or you could try with `ignore` all other file extensions than `.min.js` inside your `bower.json`.

http://stackoverflow.com/q/25487556
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/25488585
has title: How to write content in child window using chrome packaged app?
type: Question
tagged with: gwt
has answer: http://stackoverflow.com/a/25488585
tagged with: javascript
upvote count: 2
answer count: 1
favorite count: 0
tagged with: google-chrome-app
tagged with: http://stackoverflow.com/tag/html
has body: I have created the new child window using chrome.app.window.create API in order to print the content of window using window.print().but my question is how can i pass the content in that html.please could anyone help me in this.
score: 2

http://stackoverflow.com/q/25499651
tagged with: css
score: 0
has body: I've been toying around with knockoutjs trying to create html tables that can be filtered and paged so far i've been able to create the filtering and paging separately but it seems like i can't find a way to combine the two together down i put two example of what i've achieved any help would be great thanks in advance :) Knockout Filtering Example: Filtering Example HTML: ID Name Javascript: var model = function () { var self = this; self.Item = ko.observableArray([]); self.FilteredItem = ko.observableArray([]); self.Filter = new Filter(); self.FilterItems = function (object, event) { var currentFilter = event.currentTarget.id; var currentValue = $("#" + currentFilter).val(); if (currentValue != "") { if (self.Filter.ActiveList().indexOf(currentFilter) < 0) { self.Filter[currentFilter](true); self.Filter.ActiveList.push(currentFilter); } self.ApplyFilters(); } else { self.Filter[currentFilter](false); self.Filter.ActiveList.remove(currentFilter); if (self.Filter.ActiveList().length == 0) { self.FilteredItem(self.Item()); } else { self.ApplyFilters(); } } }; self.ApplyFilters = function () { var tempArray = self.Item(); self.Filter.ActiveList().forEach(function (item) { var value = $("#" + item).val(); var FilterResult = []; if (isNaN(value)) { value = value.toLowerCase(); FilterResult = ko.utils.arrayFilter(tempArray, function (obj) { return obj[item]().toLowerCase().indexOf(value) > -1; }); } else { FilterResult = ko.utils.arrayFilter(tempArray, function (obj) { if (isNaN(obj[item]())) { return obj[item]().toLowerCase().indexOf(value) > -1; } else { return obj[item]() == value; } }); } tempArray = FilterResult; self.FilteredItem(FilterResult); }); }; }; var Item = function () { var self = this; self.ID = ko.observable(); self.Name = ko.observable(); }; var Filter = function () { var self = this; self.ActiveList = ko.observableArray([]); self.ID = ko.observable(false); self.Name = ko.observable(false); }; var modelInstance = new model(); for (i = 0; i < 10; i++) { v…
has answer: http://stackoverflow.com/a/25500457
answer count: 1
tagged with: knockout.js
has title: How to apply filtering and paging at the same time using knockout?
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25410441
has comment: http://stackoverflow.com/comment/39653663
answer count: 1
tagged with: jquery
favorite count: 0
has body: In this code the fish is created randomly with unique id fish1, fish2, etc.. and if I create more than one fish then the fishes are going reverse randomly. I think the problem is with the if condition and I've tried a lot. Can any one suggest a solution? $(document).ready(function(e) { var newfishid = 1; $('.post-button').on("click", function(e) { var row = ""; row = "&lt;div class='large-fish fish' id='fish" + newfishid + "'&gt;"; row += "&lt;input type='button' value='Click me to view the problem' class='fish-hover-box' /&gt;"; row += " &lt;/div&gt;" $('#container').append(row); newfishid++; $('.fish').on("mouseenter", function(e) { $(this).addClass("HoverFish"); $(this).stop(true); }).on("mouseleave", function(){ $(this).removeClass("HoverFish"); AnimateFish(); }); $('#categories-select').hide(); AnimateFish(); }); function AnimateFish() { var Fish3 = $("[id^=fish]").not(".HoverFish"), theContainer = $("#container"), maxLeft = theContainer.width() - Fish3.width() - 50, maxTop = theContainer.height() - Fish3.height(), leftPos = Math.floor(Math.random() * maxLeft), topPos = Math.floor(Math.random() * maxTop) + 100, imgRight = "Assets/fish-glow3-right.gif", imgLeft = "Assets/fish-glow3.gif"; if ($("[id^=fish]").position().left &gt;= leftPos) { $(this).css("background-image", 'url("' + imgRight + '")'); } else { $(this).css("background-image", 'url("' + imgLeft + '")'); } Fish3.animate({ "left": leftPos, "top": topPos }, 1800, AnimateFish); }
has comment: http://stackoverflow.com/comment/39669462
has comment: http://stackoverflow.com/comment/39644009
score: 2
type: AnsweredQuestion
has title: how to prevent stop fish to reverse randomly and it happen at more than one fish
has answer: http://stackoverflow.com/a/25468510
accepted answer: http://stackoverflow.com/a/25468510
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/39744453
tagged with: jquery-ui
tagged with: javascript
upvote count: 2

http://stackoverflow.com/q/25472383
has body: I want to open a jquerymobile popup in an if-statement. If I run that page in my browser I get following error in my console: Uncaught TypeError: undefined is not a function. Here is my code: PopUp On this page a popup should be opened programmatically <?php $simple = "simple"; ?> PopUp erfolgreich What do I have to change in my code, to get the right result as intended?
has comment: http://stackoverflow.com/comment/39751984
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39751935
answer count: 0
type: UnansweredQuestion
tagged with: php
has title: open a jquerymobile popup programmatically in an if-statement
tagged with: popup
tagged with: if-statement

http://stackoverflow.com/q/25524297
upvote count: 2
has comment: http://stackoverflow.com/comment/39848162
has title: How to validate if its a login page using webdriverio
answer count: 1
has answer: http://stackoverflow.com/a/25577148
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25577148
tagged with: callback
favorite count: 0
linked to: http://stackoverflow.com/q/6847697
tagged with: webdriver-io
has body: I am using Javascript, webdriverio (v2.1.2) to perform some data extraction from an internal site. The internal site is SSO enabled, so if I have been authenticated on another application, I need not login for this application (common in enterprise intranet applications). I plan to achieve the below, Create a client with required capabilities Pass the required URL For fun : Print the title of the page Check if an element exist on the page. If yes, then it's a login page. If not, then it's not login page login = function (username, password) { if (!browserClientUtil) { throw "Unable to load browserClientUtil.js"; } browserClientUtil .createClient() .url(_Url) .title(function (err, res) { console.log('Title is: ' + res.value); }) .isExisting('input#login_button.login_button', function (err, isExisting) { browserClientUtil.getCurrentClient() .setValue('input#USER.input', username) .setValue('input#PASSWORD.input', password) //.saveScreenshot('ultimatixLoginDetails.png') .click('input#login_button.login_button') .pause(100); handlePostLogin(); }); }; Is this the best way to do? I tried to separate the code for verifying login page in a separate function, it didn't work as everything in webdriver happens as part of callback and I am not sure if I am doing it in a right way. How do I return from a callback, that will in-turn be the final value returned by that function? login = function (username, password) { if (!browserClientUtil) { throw "Unable to load browserClientUtil.js"; } browserClientUtil .createClient() .url(_Url) .title(function (err, res) { console.log('Title is: ' + res.value); }); if(isThisLoginPage()){ browserClientUtil.getCurrentClient() .setValue('input#USER.input', username) .setValue('input#PASSWORD.input', password) //.saveScreenshot('ultimatixLoginDetails.png') .click('input#login_button.login_button') .pause(100); handlePostLogin(); } }; isThisLoginPage = function() { var client = browserClientUtil.getCurrentClient(); if(!client) { throw "Unable to …
score: 2
downvote count: 0
tagged with: selenium
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/39666277
comment on: http://stackoverflow.com/a/25424253
type: Comment
has text: Hi Physalis, I've updated my answer, and now it should have all the functionality you want. Let me know if you have any more questions. Thanks, Xanco :)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39870806
type: Comment
has text: Ok nice, I would need a combination of the two!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25536537

http://stackoverflow.com/a/25536462
type: Answer
score: 0
has body: You can use &lt;span&gt;. Try this: function color(thecolor, val) { return '&lt;span style="color:' + thecolor + '"' + '&gt;' + val + '&lt;/span&gt;'; } function func() { for (i = 0; i &lt;= 100; i++) { if(i&gt;30 &amp;&amp; i&lt;50) { document.write(color('green',i)); } else { document.write(color('red',i)); } } } Here's the output Screenshot
answers question: http://stackoverflow.com/q/25536162

http://stackoverflow.com/q/25547890
accepted answer: http://stackoverflow.com/a/25548347
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/39913074
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39890895
tagged with: angularjs
has body: Initially I was thinking $scope is automatically injected to controller in Angular JS.But Now I am confused. I wrote a small snippet of code. index.html &lt;html ng-app&gt; &lt;body ng-controller="Controller"&gt; &lt;input type="text" ng-model="fname"&gt; &lt;span ng-bind="fname"&gt;&lt;/span&gt; &lt;body&gt; &lt;/html&gt; script.js angular.module('docsSimpleDirective', []) .controller('Controller', ['$http', function($scope) { $scope.fname = 'Foo Bar'; }]) As you can see I am not injecting $scope here to the controller. When the page loads, it does not show 'Foo Bar' on the textfield or span. But when I start writing some value on the text field , It reflects on the span. This means 'fname' declared in scope.But why its not showing on the page load. Everything works fine when I inject $scope.
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39891914
type: Question
has title: Does $scope is automatically injected to controller in Angular js?
has answer: http://stackoverflow.com/a/25548347

http://stackoverflow.com/q/25410303
accepted answer: http://stackoverflow.com/a/25411226
answer count: 1
has comment: http://stackoverflow.com/comment/39636601
score: 0
has comment: http://stackoverflow.com/comment/39637789
tagged with: google-chrome
has title: Revealing module pattern and chrome
tagged with: javascript
has comment: http://stackoverflow.com/comment/39636696
has body: This is the code that i found here: link var myRevealingModule = (function () { var privateCounter = 0; function privateFunction() { privateCounter++; } function publicFunction() { publicIncrement(); } function publicIncrement() { privateFunction(); } function publicGetCount(){ return privateCounter; } // Reveal public pointers to // private functions and properties return { start: publicFunction, increment: publicIncrement, count: publicGetCount }; })(); myRevealingModule.start(); the code works as exptected, but why if I paste the code on chrome console i get undefined? Thanks
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39636604
has answer: http://stackoverflow.com/a/25411226
type: Question

http://stackoverflow.com/a/25414225
answers question: http://stackoverflow.com/q/25414117
score: 2
accepted answer of: http://stackoverflow.com/q/25414117
downvote count: 0
has comment: http://stackoverflow.com/comment/39645462
type: AcceptedAnswer
has body: You would use a variable that you initialise outside the loop: var y = 0; $("li").each(function(){ $(this).css({ left: y, top: y }); y += $(this).height(); }); I'm not sure if you want to set the left style to the same as the top style though, but I left it there as it is in the original code.
upvote count: 2
type: Answer

http://stackoverflow.com/comment/39717748
comment on: http://stackoverflow.com/q/25453959
has text: @Whisher Not sure what you mean. The model is valid; if I switch the input type to text, I see the value properly populated
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25534406
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/10231868
type: Question
has title: Referencing variables
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25534499
accepted answer: http://stackoverflow.com/a/25534499
score: 0
has body: In many other programming languages, one can get the value of a variable either as a copy or by reference. Example (PHP): $value = 'a value'; $copy = $value; $ref = &amp;$value; $value = 'new value'; echo $copy; // 'a value' echo $ref; // 'new value' Is there a similar feature in JavaScript? Can I reference i.e. an object's property and even if I replace the property with a new string/object, the referring variable will point to the new data? Here is an example code of what I am trying to achieve: var obj = { property: 'a value' } var another = obj.property // save this by reference to this variable obj.property = 'new value' console.log(another) // expected: 'new value' So far I have tried using getters/setters, but this does not help since when I assign the property to a new variable, the getter is called and returns the actual value. I am quite sure this would be easy to implement using Node.js EventEmitter or by using function calls instead of properties, but I am really looking for some kind of language feature that I might have missed or for some obvious, easy way of doing these things. Thanks!
has comment: http://stackoverflow.com/comment/39867443
tagged with: node.js
has comment: http://stackoverflow.com/comment/39867005

http://stackoverflow.com/a/25477785
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39762423
type: Answer
answers question: http://stackoverflow.com/q/25477706
has body: evaluate() is a predefined method available, so change the name of your method name if you see a conflict. Now as mentioned by mwilson, you are using variable x without declaring it with some value. I guess you have already defined stopEvent() in your code or else you will get an error there also.

http://stackoverflow.com/comment/39686676
has text: could you please share your views html and controllers? Maybe one of them breaks depending on the route. Also try to replace `purchase-token/token/:token` by `/purchase-token/:token`, maybe the routes with the same ending break somehow.
type: Comment
comment on: http://stackoverflow.com/q/25437101
score: 0
type: QuestionComment

http://stackoverflow.com/a/25491725
accepted answer of: http://stackoverflow.com/q/25491495
type: Answer
answers question: http://stackoverflow.com/q/25491495
downvote count: 0
score: 3
upvote count: 3
has body: An HTML class has no relation to the actual state of the checkbox, you want to use .prop() to actually toggle the checked state: var $act = $('#act'), $notact = $('#notact'); if ($act.is(':checked')) { $act.prop('checked', false); $act.parent('span').removeClass('checked'); } if ($notact.is(':checked')) { $notact.prop('checked', false); $notact.parent('span').removeClass('checked'); }
type: AcceptedAnswer

http://stackoverflow.com/q/25498921
tagged with: javascript
score: 4
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25499306
favorite count: 0
type: AnsweredQuestion
tagged with: cookies
has body: My JavaScript code: function CookieSetting(name, value) { var today = new Date(); today.setTime( today.getTime() ); var expires = 28; expires = expires * 1000 * 60 * 60 * 24; var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name+"="+escape( value ) + ( ( expires ) ?"; domain="+window.location.hostname+";path=/;expires="+expires_date.toGMTString() : "" ) } It's working fine, but when I run the Fortify tool, it is showing this error: The method CookieSetting() includes unvalidated data in an HTTP response header. This enables attacks such as cache-poisoning cross-site scripting cross-user defacement page hijacking cookie manipulation or open redirect. Including unvalidated data in an HTTP response header can enable cache-poisoning cross-site scripting, cross-user defacement, page hijacking, cookie manipulation or open redirect. How can I fix this?
accepted answer: http://stackoverflow.com/a/25499306
type: Question
upvote count: 4
has title: How to fix header manipulation cookies using JavaScript?
tagged with: fortify

http://stackoverflow.com/a/25542161
answers question: http://stackoverflow.com/q/25542002
downvote count: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39880651
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25542002
has body: Just remove your if condition like bellow. Your selector is just for selected checkboxes, So you don't need that if anyway. $('#checkboxes input:checked').each(function() { selected.push($(this).attr('statusid')); }); DEMO

http://stackoverflow.com/comment/39639841
score: 0
comment on: http://stackoverflow.com/q/25409979
has text: How are you sending your pageview and timing hits? You haven't shown that code.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39828794
comment on: http://stackoverflow.com/q/25513596
has text: Did you remember document.ready, including jQuery etc. as what you've got should work fine -> http://jsfiddle.net/uv20hkry/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39829374
type: QuestionComment
comment on: http://stackoverflow.com/q/25512038
has text: Thanks for your help guys but still confused. How do we get the php file to retain the values?
score: 0
type: Comment

http://stackoverflow.com/a/25417061
accepted answer of: http://stackoverflow.com/q/25417037
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39687759
has body: Use \D to match any non-numeric character, or \D+ to match one or more such characters together: var split = list.split(/\D+/); You said: I try to split it using the regex below but it keeps stopping on the second number... var split= list.split(/[\s\t.,;:]+/); I don't see how it could stop on the second number: that regex would produce the output ["123", "456", "789", "1234", "5678//999", "123aaa456"], because your pattern doesn't include forward slashes or letters.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25417037

http://stackoverflow.com/q/25540791
has comment: http://stackoverflow.com/comment/39880119
has comment: http://stackoverflow.com/comment/39880330
downvote count: 0
has title: How can I disable UglifyJS chaining declarations with commas. I cannot use Breakpoints
has answer: http://stackoverflow.com/a/68842412
favorite count: 0
has answer: http://stackoverflow.com/a/25542243
has comment: http://stackoverflow.com/comment/39880574
type: AnsweredQuestion
tagged with: uglifyjs
score: 7
has body: UglifyJS uses commas to chain function, object and variable declarations. This is fine for productions and when the file is being minified however it makes it extremely hard to walk through the javascript with breakpoints when debugging js. I need to know how to turn this feature off in the UglifyJS Grunt Plugin. Below is what the output looks like. var boom = function(a) { ... }, bing = function(b){ ... }, bam = function(c) { ... };
has comment: http://stackoverflow.com/comment/39880153
upvote count: 7
type: Question
possible better answer: http://stackoverflow.com/a/29521020
accepted answer: http://stackoverflow.com/a/25542243
has answer: http://stackoverflow.com/a/29521020
has comment: http://stackoverflow.com/comment/39892060
tagged with: javascript
tagged with: gruntjs
answer count: 3

http://stackoverflow.com/comment/39764490
has text: have you tried checking the values of `$(this).outerWidth()` and `$(".table-responsive").outerWidth()`? do they return the expected results?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25478937
score: 1

http://stackoverflow.com/comment/39888950
type: Comment
comment on: http://stackoverflow.com/a/25544011
score: 0
has text: i explain most of time when there is same rows then there should be row span.simple.!
type: AnswerComment

http://stackoverflow.com/comment/39740574
score: 0
has text: Pretty simple once you figure it out. I would use jquery. Should be something like This should get you started, look at jquery and append. Try some stuff and good luck.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25466173

http://stackoverflow.com/q/25443682
upvote count: 9
accepted answer: http://stackoverflow.com/a/25444474
has answer: http://stackoverflow.com/a/25443780
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
downvote count: 0
possible better answer: http://stackoverflow.com/a/25443780
has answer: http://stackoverflow.com/a/25444474
score: 9
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has title: JS how right replace `&quot` on quotes
tagged with: bootstrap-select
has body: &lt;input type="text" autocomplete="off" class="Autocomlete1" name="test"&gt; $('.Autocomlete1').typeahead({ ajax: { url: './test.php?log=test', triggerLength: 1 }, updater: function(item) { return item; }, onSelect: function(item) { return item; } }); After autocomplate in input we get nextvalue - Text &amp;quot; TextTextText &amp;quot; (database row have it value) but need output Text " TextTextText " For replace &amp;quot; on " i want make: onSelect: function(item) { var text = item.text; var text = text.replace(/&amp;quot;/g, '"'); $('.Autocomlete1').val(text); return item; } But this is not working... Tell me please how right replace &amp;quot on quotes ?
favorite count: 0

http://stackoverflow.com/comment/39677041
score: 0
comment on: http://stackoverflow.com/q/25430640
has text: Your update explains exactly why this question SHOULD be marked as a duplicate. For people that aren't aware of the terminology. This is a book keeping measure and not meant as a slight against you.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39884802
comment on: http://stackoverflow.com/q/25544609
type: Comment
type: QuestionComment
score: 0
has text: have you wrapped your code inside document.ready..???

http://stackoverflow.com/q/25496291
has comment: http://stackoverflow.com/comment/39796956
has answer: http://stackoverflow.com/a/25496762
has comment: http://stackoverflow.com/comment/39797199
has body: I've read as many topics as I could, but still I cannot find the resolution... I've built many websites with jCarousel.js but this one is hitting me back so hard ;&lt; So, I'm trying to add jCarousel, easy stuff like that: $(document).ready(function() { $(".anyClass").jCarouselLite({ auto: 3000, speed: 1000, vertical: true, }); }); Above that I did include &lt;script src="//code.jquery.com/jquery-1.11.0.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="&lt;?php echo get_template_directory_uri(); ?&gt;/js/jcarousellite_1.0.1.js" type="text/javascript"&gt;&lt;/script&gt; So I was happy about using It fine on Chrome, but then I turned on FireFox and the happy stuff disappeared. FireBug shows, no errors, Chrome as well but the script doesn't work. After refreshing page It starts working. It seems like FireFox is not loading that part of the code, so there are no errors, as well no working script... What should I do ;> ?
type: Question
has title: Jquery and firefox not loading
has comment: http://stackoverflow.com/comment/39797111
has comment: http://stackoverflow.com/comment/39797295
has comment: http://stackoverflow.com/comment/39797007
tagged with: firefox
has comment: http://stackoverflow.com/comment/39797091
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39797130
has comment: http://stackoverflow.com/comment/39797057
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39797036
has comment: http://stackoverflow.com/comment/39796985
has comment: http://stackoverflow.com/comment/39797330
type: UnansweredQuestion

http://stackoverflow.com/q/25497541
upvote count: 2
type: Question
tagged with: javascript
has title: Cannot add to scene after rendering THREE.js
has answer: http://stackoverflow.com/a/25497681
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/25497681
favorite count: 0
has body: See example: http://jsfiddle.net/pehrlich/nm1tzLLm/2/ In newer versions of THREE.js, if I call render before adding additional objects to the scene, they will never be visible, even with additional calls to render. Is this expected behavior? See full code: var cube, cube2, geometry, light, material, renderer; window.scene = new THREE.Scene(); window.camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 10000); renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); geometry = new THREE.CubeGeometry(75, 75, 16); material = new THREE.MeshPhongMaterial({ color: 0x0000ff }); cube = new THREE.Mesh(geometry, material); cube.position.set(80, 0, -400); scene.add(cube); camera.position.fromArray([0, 160, 400]); camera.lookAt(new THREE.Vector3(0, 0, 0)); light = new THREE.PointLight(0xffffff, 8, 1000); // comment out this line ot bring back second cube: renderer.render(scene, camera); scene.add(light); geometry = new THREE.CubeGeometry(75, 75, 16); material = new THREE.MeshPhongMaterial({ color: 0x0000ff }); cube2 = new THREE.Mesh(geometry, material); cube2.position.set(-80, 0, -400); cube2.castShadow = true; scene.add(cube2); renderer.render(scene, camera);
tagged with: three.js
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/39729073
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25447488
has text: At the time of page load radio-button is in disable state, according to my requirement it should not be disable state.

http://stackoverflow.com/q/25453031
has title: Splitting words in a variety of ways with Regex
tagged with: regex
has answer: http://stackoverflow.com/a/25453774
accepted answer: http://stackoverflow.com/a/25453774
type: AnsweredQuestion
score: 1
tagged with: plpgsql
has comment: http://stackoverflow.com/comment/39715776
type: Question
has comment: http://stackoverflow.com/comment/39715908
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25453927
has comment: http://stackoverflow.com/comment/39715770
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/39716004
downvote count: 1
has answer: http://stackoverflow.com/a/25453927
favorite count: 0
has comment: http://stackoverflow.com/comment/39716037
tagged with: plv8
has body: Working on something similar to Solr's WordDelimiterFilter, but not in Java. Want to split words into tokens like this: P90X = P, 90, X (split on word/number boundary) TotallyCromulentWord = Totally, Cromulent, Word (split on lowercase/uppercase boundary) TransAM = Trans, AM Looking for a general solution, not specific to the above examples. Preferably in a regex flavour that doesn't support lookbehind, but I can use PL/perl if necessary, which can do lookbehind. Found a few answers on SO, but they all seemed to use lookbehind. Things to split on: Transition from lowercase letter to upper case letter Transition from letter to number or number to letter (Optional) split on a few other characters (- _) My main concern is 1 and 2.

socket.io
tags question: http://stackoverflow.com/q/25469122
tags question: http://stackoverflow.com/q/25412789
tags question: http://stackoverflow.com/q/25474060
tags question: http://stackoverflow.com/q/25525177
type: Tag
tags question: http://stackoverflow.com/q/25495800
tags question: http://stackoverflow.com/q/25402512
tag name: socket.io
tags question: http://stackoverflow.com/q/25517398
tags question: http://stackoverflow.com/q/25514996
tags question: http://stackoverflow.com/q/25487837
tags question: http://stackoverflow.com/q/25414734
tags question: http://stackoverflow.com/q/25405493
tags question: http://stackoverflow.com/q/25522694
tags question: http://stackoverflow.com/q/25468734
tags question: http://stackoverflow.com/q/25471789
tags question: http://stackoverflow.com/q/25452214
tags question: http://stackoverflow.com/q/25424254

http://stackoverflow.com/comment/39600825
comment on: http://stackoverflow.com/q/25390329
has text: The fade does not work with jQuery and jQuery ui 1.11.1: http://jsfiddle.net/41fp6sea/ but does work with earlier versions like 1.9.1 and 1.9.2: http://jsfiddle.net/41fp6sea/1/
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/39828466
has text: You could have a factory that returns a constructor for your model. Then in each service you just create a model that would contain all the properties. Then you only have one place to add to the model.
type: Comment
comment on: http://stackoverflow.com/q/25513306
score: 0
type: QuestionComment

http://stackoverflow.com/q/25477866
has comment: http://stackoverflow.com/comment/39762091
has body: This example is from http://eloquentjavascript.net/code/#5.1. My question is the first bullet-pointed detail; others may be helpful details, but are additional; also see the first short program to see my question in context. - Why is arrays.reduce() used instead of reduce(arrays()). I know that their's works with the arrays.reduce, but why? This is an answer to a comment that is useful, but additional to the original question. My question is with this first program. Since it uses arrays.reduce, reduce would be a method of arrays, I am not sure why reduce is a method of arrays. The reason might be in the design decisions of JavaScript? Thanks, @cookie monster, for that comment! This is the program with the context of my question- var arrays = [[1, 2, 3], [4, 5], [6]]; console.log(arrays.reduce(function(flat, current) { return flat.concat(current); }, [])); // → [1, 2, 3, 4, 5, 6] These next details are additional, but may(or may not) be of use: I know that the [] at the end is used because it is the start parameter in the function reduce so that the other arrays are added to that empty array. I know the .concat is putting together the two arrays like + with strings, but for arrays. Here is what the reduce function, even though it is standard, looks like: function reduce(array, combine, start){ var current = start; for(var i = 0; i &lt; array.length; i++) current = combine(current, array[i]); return current; } One of their other examples showed my way with a single array, if that helps. It looked like: console.log(reduce([1, 2, 3, 4], function(a, b){ return a + b; }, 0)); // 10 Thanks! :)
has comment: http://stackoverflow.com/comment/39785200
has comment: http://stackoverflow.com/comment/39762041
tagged with: flatten
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39762011
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39762735
type: Question
possible better answer: http://stackoverflow.com/a/25478119
has comment: http://stackoverflow.com/comment/39786054
has answer: http://stackoverflow.com/a/25478119
tagged with: javascript
has answer: http://stackoverflow.com/a/25492075
has comment: http://stackoverflow.com/comment/39762022
has comment: http://stackoverflow.com/comment/39784619
answer count: 2
has comment: http://stackoverflow.com/comment/39761998
has comment: http://stackoverflow.com/comment/39785614
tagged with: arrays
has title: Why is .reduce used instead of reduce()? In flattening an array of arrays with JavaScript
downvote count: 0
accepted answer: http://stackoverflow.com/a/25492075
has comment: http://stackoverflow.com/comment/39762003
favorite count: 0

http://stackoverflow.com/comment/39625634
has text: The above code is not considering the key. It just takes obj & the value you want to find. Let me see if i can modify the code to make use of the key.
comment on: http://stackoverflow.com/a/25404548
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/39897562
comment on: http://stackoverflow.com/a/25543482
score: 0
type: AnswerComment
type: Comment
has text: So you have a problem with your code that you don't show. Maybe a conflict with another library ?

http://stackoverflow.com/comment/39944337
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25559400
has text: I fail to understand how this satisfies my need. Can you give me an example which prints to the console "the back button was pressed" or alternatively "the forward button was pressed".
type: AnswerComment

http://stackoverflow.com/q/25431518
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25432119
upvote count: 3
has comment: http://stackoverflow.com/comment/39676506
type: Question
score: 3
tagged with: javascript
tagged with: express
has title: 'Write after end' error with Express, csvtojson and node-walk
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/15581978
favorite count: 0
has body: I'm having issues sending JSON data from csv files with Express. It takes a folder of CSV files, loops through, converts it all to JSON and then spits it out at the end, but I'm getting the error Error: write after end as well as (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. after the first load. The error is only for when I try and hit the /get path, not the main index page. I know it has something to do with read streams being closed or not closed, but I don't have enough knowledge to work out exactly what to do. Here's my code; any advice would be lovely. Ta! Ps, technologies used are Express, Node-walk and CSVtoJSON. init.js var _ = require('underscore')._; var express = require('express'); var server = express(); server.use(express.static(__dirname + '/frontend/public/')); server.listen(1234); var getData = require('./src/getData.js'); server.get('/get', function (req, res) { getData.get(function (data) { res.send(data); }) }); server.get('/', function (req, res) { res.sendFile('./index.html'); }); getData.js var walk = require('walk'); var fs = require('fs'); var _ = require('underscore')._; var csvtojson = require('csvtojson').core.Converter; var files = []; var csvConverter = new csvtojson({constructResult: true}); exports.get = function (callback) { var csvWalker = walk.walk('./place-csvs-here', {followLinks: false}); csvWalker.on('file', function (root, stat, next) { if (stat.name.match(/[A-Z]+?\-\d+?\.csv/gi)) { var filename = root + '/' + stat.name; files.push(fs.createReadStream(filename)); } next(); }); csvWalker.on('end', function () { files.forEach(function (file) { file.pipe(csvConverter); }); }); csvConverter.on('end_parsed', function (data) { if (callback) { // Ensure rows are unique. data = _.uniq(data, function (x) { return JSON.stringify(x); }); // Required fields. data = _.filter(data, function (x) { return ( x['Date'] !== undefined &amp;&amp; x['Balance'] !== u…
has comment: http://stackoverflow.com/comment/39676333
has answer: http://stackoverflow.com/a/25432119
tagged with: node.js

http://stackoverflow.com/a/25409475
has comment: http://stackoverflow.com/comment/39635053
type: Answer
answers question: http://stackoverflow.com/q/25408766
has comment: http://stackoverflow.com/comment/48500884
has comment: http://stackoverflow.com/comment/48500989
upvote count: 4
has comment: http://stackoverflow.com/comment/48518252
downvote count: 0
score: 4
has body: You can do this by modifying the compile function of your directive: app.directive('showBox', function() { return { compile: function(iElem) { // append whatever html you want here iElem.after(' derp '); // return the linking function from the compile function return function(scope, element, attr) { scope.boxVisible = false; element.on('click', function() { scope.$apply(function() { scope.boxVisible = !scope.boxVisible; }); }); }; } }; }); I'm not sure if you'll need to $compile the content as well - if directives inside the iElem.after() template don't work then have a look into that. Here's a plunker to demonstrate it working.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25408766

http://stackoverflow.com/comment/130211308
type: Comment
comment on: http://stackoverflow.com/a/25532819
has text: I mean, log vs info may be ambiguous but I'm pretty sure the concept of warnings vs errors is a thing in software development. Chrome dev console will log a stack trace for both warn and error but they're colored differently. Similar with running tests in Jest with Node
type: AnswerComment
score: 2

http://stackoverflow.com/comment/39626613
type: AnswerComment
type: Comment
has text: JSON.parse("{\"Message\":\"Valid Timestamp\",\"Reference\":\"CheckTimestamp:Completed\",\"Outcome\":true,\"Data\":null,\"MessageCount\":0,\"MessageGUID\":null}")
comment on: http://stackoverflow.com/a/25402945
score: 0

http://stackoverflow.com/a/25454771
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/39719235
score: 2
has body: You probably want to use the location.hash property and navigate around that using cached numbers, so assuming you have two buttons: "next" and "prev": var marker = 0; $('#next').click(function(){ marker++; location.hash = "div" + marker; }); $('#prev').click(function(){ marker--; location.hash = "div" + marker; }); Obviously this needs expanded on, but you have the basic premise.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39863663
has comment: http://stackoverflow.com/comment/39719136
answers question: http://stackoverflow.com/q/25454682
has comment: http://stackoverflow.com/comment/39719064
accepted answer of: http://stackoverflow.com/q/25454682

http://stackoverflow.com/comment/39872940
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25537377
has text: How can I strip the javascript from my string then?
score: 0

http://stackoverflow.com/q/25511760
answer count: 1
tagged with: button
tagged with: javascript
tagged with: jquery
has title: Buttons and checkboxed in Javascript
tagged with: asp.net
tagged with: checkbox
has answer: http://stackoverflow.com/a/25512089
type: UnansweredQuestion
has body: I am trying to have a checkbox ("remember") that is used for selecting if I want to print all of the objects or just the ones that reached their sell price (auction site). So basically if the box is checked we only write the ones where the price is reached. If it's not checked we write all of them. When I try to run it the program complains about the OnClick="checkValidated(); that I have on my button and refuses to run completely. The error I get tells me nothing: Compiler Error Message: CS1026: ) expected, since I can't see a need for another ")". ViewAuctionsButtonUnchecked_Click and ViewAuctionsButtonChecked_Click are in filename.aspx.cs and both work. Any ideas on what I should change? &lt;input id="remember" name="remember" type="checkbox" onclick="validate()" /&gt; &lt;asp:Button ID="ViewAuctionsButton" OnClick="checkValidated();" Text="Visa" CssClass="" runat="server" /&gt; function validate() { if (document.getElementById('remember').checked) { alert("checked"); } else { alert("You didn't check it! Let me check it for you."); } } function checkValidated() { if (document.getElementById('remember').checked) { ViewAuctionsButtonUnchecked_Click; } else { ViewAuctionsButtonChecked_Click; } } Before I had to put in the checkbox, the code looked like this (and worked): &lt;asp:Button ID="ViewAuctionsButton" OnClick="ViewAuctionsButtonUnchecked_Click;" Text="Visa" CssClass="" runat="server" /&gt; Thanks in advance!
type: Question
score: 0

http://stackoverflow.com/comment/39725708
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25458114
type: AnswerComment
has text: There is a `===` in CoffeeScript, they just call it `==` or `is`.

http://stackoverflow.com/q/25390665
answer count: 1
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
tagged with: drupal-theming
has answer: http://stackoverflow.com/a/25411824
downvote count: 1
type: Question
has title: Modal window with an image on Drupal page load?
has body: I've just started with Drupal about a month ago, and I only know the basics of Javascript. I'd like to know an easy way for me to display a modal window with an image on my Drupal 7 site, when it loads. I've already tried doing it with the Lightbox2 module and the Colorbox module but I haven't got any success. Thanks
tagged with: drupal-7
score: -1
upvote count: 0
tagged with: lightbox

http://stackoverflow.com/comment/39674801
has text: @Kellowyn well in that case the word "K4E43057" *should* match, right? It starts with a letter followed by a digit.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25430748

http://stackoverflow.com/a/25440017
downvote count: 0
type: Answer
upvote count: 1
has body: You can do it as: console.log($(this).attr('id'));
answers question: http://stackoverflow.com/q/25439545
score: 1

http://stackoverflow.com/a/25403842
accepted answer of: http://stackoverflow.com/q/25393794
answers question: http://stackoverflow.com/q/25393794
type: Answer
has comment: http://stackoverflow.com/comment/39637544
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39641152
downvote count: 0
has body: I hope this code will help you, that's the best I can suggest with what you provided: function handleError(message, error) { //Handle any error here, for example: console.error(message, error); res.send(500, message); } var responseContent = { nav: [], }; getBusiness(); //start fetching data function getBusiness() { var businessQuery = /*query to get element AppUrl=example.com*/; businessQuery.first().then( getNavigation, handleError.bind(null, 'error getting business')); } function getNavigations(business) { var navigationsQuery = /*query to get navigation elements*/; var promises = []; navigationsQuery.each(function (navigation) { promises.push(processNavigation(navigation)); }).then( function () { Parse.Promise.when(promises).then( renderResult, handleError.bind(null, 'error processing navigations')); }, handleError.bind(null, 'error iterating navigations')); } function processNavigation(navigation) { var promise = Parse.Promise(); var nav = { name: /*name*/, url: /*url*/, }; responseContent.nav.push(nav); switch (/*module*/) { case 'Home': getPhotosContent(/*args*/).then( function (source) { nav.source = source; promise.resolve(); }, function (error) { promise.reject(error); } ); break; //can do similar code for 'About Us', 'Menus', ... default: promise.resolve(); } return promise; } function getPhotosContent(/*args*/) { var promise = Parse.Promise(); var results = []; var photosQuery = /*query to get photos*/; photosQuery.each(function (photo) { results.push(photo); }).then( function () { promise.resolve(results); }, function (error) { promise.reject(error); } ); return promise; } function renderResult() { res.render('index', responseContent); }
type: AcceptedAnswer

http://stackoverflow.com/a/25507000
downvote count: 0
has comment: http://stackoverflow.com/comment/39857494
has comment: http://stackoverflow.com/comment/39885983
score: 5
type: Answer
has comment: http://stackoverflow.com/comment/39816606
has comment: http://stackoverflow.com/comment/39840724
upvote count: 5
has body: Numerous problems. 1.) You didn't really integrate the regresssion code into your plot, you just cut/pasted from the example and are over-drawing your plot. You need to add the regression line as a second series to your plot: series: [{ name: 'RNA - CP ( Radio Network Availability - Customer Perceived)', data: sourceData },{ type: 'line', marker: { enabled: false }, /* function returns data for trend-line */ data: (function() { return fitData(sourceData).data; })() }] 2.) This is not valid javascript: var sourceData = [ [18-Jul-14, 99.75], [19-Jul-14, 99.77], [20-Jul-14, 99.78], [21-Jul-14, 99.84], [22-Jul-14, 99.82], [23-Jul-14, 99.82], [24-Jul-14, 99.76], [25-Jul-14, 99.78], [26-Jul-14, 99.8], [27-Jul-14, 99.65], [28-Jul-14, 99.94], [29-Jul-14, 99.8] ]; Those are strings and they aren't quoted. Regardless, strings won't cut it for the regression, it needs numbers. Since your dates are really categories, just use: var sourceData = [ [0, 99.75], [1, 99.77], [2, 99.78], [3, 99.84], [4, 99.82], [5, 99.82], [6, 99.76], [7, 99.78], [8, 99.8], [9, 99.65], [10, 99.94], [11, 99.8] ]; 3.) Your series name is way too long for a right side legend (it squished the plot). In my example I moved it to the bottom. Here's a example putting all this together.
accepted answer of: http://stackoverflow.com/q/25505988
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25505988

http://stackoverflow.com/comment/39606027
type: Comment
has text: I see, thank you. How can I change my code in order to allow me set cookies for 7 days and session cross browsers?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25393780

http://stackoverflow.com/a/25494081
type: Answer
score: 2
downvote count: 0
has body: Only recently (since this pull request) ngTransclude directive supports usage as element. You are probably using angular with version &lt; 1.3 where ngTransclude used as element is not supported - the primary reason for this being IE8 support.
accepted answer of: http://stackoverflow.com/q/25489225
type: AcceptedAnswer
upvote count: 2
answers question: http://stackoverflow.com/q/25489225

http://stackoverflow.com/q/25485933
has answer: http://stackoverflow.com/a/25486186
tagged with: javascript
has body: is there any pattern I can use to compute a variable at call time (like a property in C#) var A = (function() { var self = {}; var a = 0; self.x = function (){ a = a+1; return a; }; return self; }); Normally, the call would be: var bla = A.x(); but I would like to evaluate it and get its value as a property: var bla = A.x; console.log(bla); // prints "1" I don't want the () operator, but I still want to compute/calculate the property value when I access A.x
has title: Calculate property at call time without using function invocation syntax
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/25485948
favorite count: 0
has answer: http://stackoverflow.com/a/25486192
accepted answer: http://stackoverflow.com/a/25486192
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/25485948
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/39792837
score: 3
has text: @mikeandike And what is the error? How do you use your function? What is the output? What is the expected output? Put in a little effort in your question please.
comment on: http://stackoverflow.com/q/25494203
type: QuestionComment
type: Comment

mongodb
tags question: http://stackoverflow.com/q/25419846
tags question: http://stackoverflow.com/q/25544805
tags question: http://stackoverflow.com/q/25489211
tags question: http://stackoverflow.com/q/25390923
tags question: http://stackoverflow.com/q/25493110
tags question: http://stackoverflow.com/q/25416170
tags question: http://stackoverflow.com/q/25393603
tags question: http://stackoverflow.com/q/25529034
tags question: http://stackoverflow.com/q/25456493
tag name: mongodb
tags question: http://stackoverflow.com/q/25410482
tags question: http://stackoverflow.com/q/25477416
tags question: http://stackoverflow.com/q/25548132
tags question: http://stackoverflow.com/q/25496723
type: Tag
tags question: http://stackoverflow.com/q/25422054
tags question: http://stackoverflow.com/q/25438671
tags question: http://stackoverflow.com/q/25417359
tags question: http://stackoverflow.com/q/25417038
tags question: http://stackoverflow.com/q/25452340
tags question: http://stackoverflow.com/q/25414095
tags question: http://stackoverflow.com/q/25467010
tags question: http://stackoverflow.com/q/25479452
tags question: http://stackoverflow.com/q/25471880
tags question: http://stackoverflow.com/q/25493324
tags question: http://stackoverflow.com/q/25443883
tags question: http://stackoverflow.com/q/25408636
tags question: http://stackoverflow.com/q/25430052
tags question: http://stackoverflow.com/q/25543452
tags question: http://stackoverflow.com/q/25450694
tags question: http://stackoverflow.com/q/25454470
tags question: http://stackoverflow.com/q/25515385
tags question: http://stackoverflow.com/q/25418611

http://stackoverflow.com/q/25422656
tagged with: menu
has title: Want to create hover link menu in jquery
has answer: http://stackoverflow.com/a/25422919
downvote count: 1
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39660423
has comment: http://stackoverflow.com/comment/39659090
has body: heyy, i want to create some hover background link when mouseover in jquery !!! when the mouse over on " .nav Menu nav a ", I add addclass " .hover " and when mouse out removeClass " .hover " more info on my fiddle -> demo JS FIDDLE HTML : > > about project story contact CSS : .navMenu nav { width: 100%; height: auto; list-style-type: none; margin: auto auto; text-align: center; } .navMenu a { height: 4em; width: 100%; text-decoration: none; text-transform: uppercase; text-align: center; display: block; line-height: 4em; font-weight: normal; font-size: 1em; color: rgba(238,79,87,1); position: relative; z-index: 100; } .hover{ /* add background, width, height, ect... */ } JS: function hoverLi(){ $(".navMenu a").hover(function(){ $(this).stop(true, true).addClass("hover"); },function(){ $(this).removeClass("hover"); }); } thanks a lot
answer count: 3
upvote count: 0
has answer: http://stackoverflow.com/a/25422828
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25422747
tagged with: onhover
type: UnansweredQuestion

http://stackoverflow.com/comment/39729250
score: 2
has text: because you call the function before your main.js file has loaded, put your main.js include before the script that executes changeTextOnload, or put the call in an onload event like window.onload
comment on: http://stackoverflow.com/q/25460105
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25515642
has body: Depending on incoming client GET request, I return prepared HTML sites based on the res.sendfile instruction. So far everything works fine. But now, I introdced an extended GET route, featuring a URL encoded parameter (verificationcode). app.get('/validateuser/:verificationcode/', function(req, res){ res.sendfile(__dirname+"/public/valiuser.html"); }); Looking at the served HTML site (valiuser.html) in the browser, it appears that all paths to linked external resources (images, css files, javascript files, ...) are lost. Once I change the route to: app.get('/validateuser', function(req, res){ res.sendfile(__dirname+"/public/valiuser.html"); }); Everything works all fine. Why is this additional GET parameter messing up my paths? The code above is located in my server.js file. On the same level, I have a public folder containing the html files and other "external resources". Here is an excerpt from valiuser.html: my page Thanks, Igor
has answer: http://stackoverflow.com/a/25515894
has comment: http://stackoverflow.com/comment/39833097
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0
answer count: 1
tagged with: express
has comment: http://stackoverflow.com/comment/39833332
has comment: http://stackoverflow.com/comment/39833049
accepted answer: http://stackoverflow.com/a/25515894
has title: Node.js: messed up Paths to external resources due to URL encoded GET parameter?
tagged with: node.js

http://stackoverflow.com/comment/39747844
has text: Good point. Changed "JavaScript" to "popular JavaScript runtimes" throughout.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25470071

http://stackoverflow.com/comment/39741248
score: 0
comment on: http://stackoverflow.com/q/25466488
type: Comment
type: QuestionComment
has text: @undefined, it is not just an order. Your duplicate flag in the wrong place...

http://stackoverflow.com/a/25457899
type: Answer
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25457734
answers question: http://stackoverflow.com/q/25457734
has body: The argument to your function is named obj, not this, so you should be using that to get the value. And .value is a DOM property, not a jQuery property, so you shouldn't wrap it with $(). function setMinMax(obj) { var num_tanks = document.getElementById("tanks_num"); var num_dps = document.getElementById("dps_num"); var num_heal = document.getElementById("heal_num"); var max_tanks = document.getElementById("max_tanks"); var max_dps = document.getElementById("max_dps"); var max_heals = document.getElementById("max_heals"); if(obj.value == '8') { num_tanks.setAttribute("value", 2); num_tanks.setAttribute("max", 2); max_tanks.innerHTML = "Maximum: " + (num_tanks.value); num_dps.setAttribute("value", 4); num_dps.setAttribute("max", 4); num_heal.setAttribute("value", 2); num_heal.setAttribute("max", 2); } else if (obj.value == '16') { num_tanks.setAttribute("value", 2); num_tanks.setAttribute("max", 2); max_tanks.innerHTML = "Maximum: " + (num_tanks.value); num_dps.setAttribute("value", 10); num_dps.setAttribute("max", 10); num_heal.setAttribute("value", 4); num_heal.setAttribute("max", 4); } }

http://stackoverflow.com/comment/39866838
type: QuestionComment
comment on: http://stackoverflow.com/q/25503493
has text: Nutshell: Instead of just defining `removeItemFromTable`, define it, and add it to a list of functions `clearData` will run.
score: 0
type: Comment

http://stackoverflow.com/q/25416233
has title: How to upgrade sails js project to version 0.10
possible better answer: http://stackoverflow.com/a/25422090
has answer: http://stackoverflow.com/a/25416666
has answer: http://stackoverflow.com/a/25422090
accepted answer: http://stackoverflow.com/a/25416666
has body: I've been checking out sails js and wanted to try the associations on the new version 0.10. How do I upgrade my project to version 0.10?
type: Question
tagged with: sails.js
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25776889
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/q/25479437
has comment: http://stackoverflow.com/comment/39847232
has comment: http://stackoverflow.com/comment/39815082
tagged with: audio
answer count: 0
has comment: http://stackoverflow.com/comment/39806780
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39813903
tagged with: javascript
has body: I want to develop an application in which we can get the voice of a person and draw a it's amplitude-time chart. my teacher told me to use Highcharts to draw the chart. but I can't understand how to pass audio amplitude to javascript function to draw. I searched for this. One way was sending parameters in URL but I can have the amplitude information of voice in a array of double numbers that it's length will be very big number for example for a audio recorder with fs=8000 which record 8000 sample in a second, so if I have 5 second long it's array length will be 5*8000.I'm not sure I can send array of double with this such length, is it possible? Is there any other way I can use? I can send hole data to the java script and draw chart or divide it in a special size and send it frequently and complete the chart real time if it is possible in Highcharts. consider the following code, and also consider every time byteData [] read data from file it want to draw it's information on on the chart, I mean I should send this array to highcharts (Java script function) to draw it.(skip code that is related to the AudioTrack which I used to play audio) private void PlayAudioFileViaAudioTrack(String filePath) throws IOException { if (filePath==null) return; int intSize = android.media.AudioTrack.getMinBufferSize(RATE, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT); AudioTrack at = new AudioTrack(AudioManager.STREAM_MUSIC, RATE, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, intSize, AudioTrack.MODE_STREAM); if (at==null){ Log.d("TCAudio", "audio track is not initialised "); return; } int count = 512 * 1024; // 512 kb //Reading the file.. byte[] byteData = null; File file = null; file = new File(filePath); byteData = new byte[(int)count]; FileInputStream in = null; try { in = new FileInputStream( file ); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } int bytesread = 0, ret = 0; int size …
has title: draw amplitude_time chart of audio using Highcharts in android
score: 0
tagged with: highcharts
tagged with: android

http://stackoverflow.com/a/25459489
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25459466
score: 0
type: Answer
has body: After adding and removing all files one by one I found that these files needed.
answers question: http://stackoverflow.com/q/25459466

http://stackoverflow.com/comment/39665727
has text: No problem... I hope you can figure it out!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25415096
type: AnswerComment

http://stackoverflow.com/comment/39715667
comment on: http://stackoverflow.com/q/25453040
score: 0
type: Comment
type: QuestionComment
has text: Start with `.querySelectorAll()` or `.getElementsByTagName()`, etc.

http://stackoverflow.com/a/25429727
downvote count: 0
has comment: http://stackoverflow.com/comment/39673667
has comment: http://stackoverflow.com/comment/104855552
has comment: http://stackoverflow.com/comment/39687264
type: Answer
has comment: http://stackoverflow.com/comment/39675314
has body: You will have to create a video element instead of a img one. function img(src) { var el = document.createElement('img'); el.src = src; return el; } function vid() { //Accepts any number of ‘src‘ to a same video ('.mp4', '.ogg' or '.webm') var el = document.createElement('video'); el.onplay = function () { clearInterval(sliding); }; el.onended = function () { sliding = setInterval(rotateimages, 5000); rotateimages(); }; var source = document.createElement('source'); for (var i = 0; i &lt; arguments.length; i++) { source.src = arguments[i]; source.type = "video/" + arguments[i].split('.')[arguments[i].split('.').length - 1]; el.appendChild(source); } return el; } var galleryarray = [img('path/image1.jpg'), img('path/image2.jpg'), img('path/image3.jpg'), vid('path/video.mp4', 'path/video.ogg')]; var curimg = 1; function rotateimages() { $("#slideshow").fadeOut("slow"); setTimeout(function () { curimg = (curimg &lt; galleryarray.length - 1) ? curimg + 1 : 0 document.getElementById('slideshow').innerHTML = ''; galleryarray[curimg].style.width = "100%"; galleryarray[curimg].style.height = "100%"; document.getElementById('slideshow').appendChild(galleryarray[curimg]); if (galleryarray[curimg].tagName === "VIDEO") { galleryarray[curimg].play(); } $("#slideshow").fadeIn("slow"); }, 1000); } var sliding; window.onload = function () { sliding = setInterval(rotateimages, 5000); rotateimages(); //FullScreen won't work in jsFiddle's iframe document.getElementById('slideshow').onclick = function () { if (this.requestFullscreen) { this.requestFullscreen(); } else if (this.msRequestFullscreen) { this.msRequestFullscreen(); } else if (this.mozRequestFullScreen) { this.mozRequestFullScreen(); } else if (this.webkitRequestFullscreen) { this.webkitRequestFullscreen(); } } } Working Fiddle
upvote count: 3
has comment: http://stackoverflow.com/comment/39674110
score: 3
has comment: http://stackoverflow.com/comment/39674886
has comment: http://stackoverflow.com/comment/39676576
has comment: http://stackoverflow.com/comment/39674322
accepted answer of: http://stackoverflow.com/q/25427594
answers question: http://stackoverflow.com/q/25427594
type: AcceptedAnswer

http://stackoverflow.com/comment/39856754
score: 0
type: AnswerComment
has text: I think it's the best you got.
type: Comment
comment on: http://stackoverflow.com/a/25529157

http://stackoverflow.com/comment/39702668
comment on: http://stackoverflow.com/a/25444289
type: Comment
has text: I found that errors like [SCRIPT50xx](http://msdn.microsoft.com/en-us/library/ie/dn423949(v=vs.85).aspx) are |Script error codes (dah). After further investigation there I found the error [5007 as Run-time error](http://msdn.microsoft.com/en-us/library/1dk3k160(v=vs.94).aspx) that says: **Object Expected** You attempted to invoke the Object.prototype.toString or Object.prototype.valueOf method on an object of a type other than Object. The object of this type of invocation must be of type Object.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39888734
comment on: http://stackoverflow.com/q/25545947
has text: Related - http://stackoverflow.com/questions/17581915/how-to-change-the-value-of-an-asptextbox-from-javascript
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25454661
type: AcceptedAnswer
has body: You have issues in both your javascript and your html. I also reworked the code to only change the corner that the slider is referencing. $("#codearea").css("border-radius","tl tr bl br"); This is setting the border-radius property to the string 'tl tr bl br', not the combination of those variables. Your tl, tr, bl, br variables are only set once outside your event handler. So any changes to them will not be recorded. 3.&lt;div id "generator"&gt; is missing the = sign. So, this div does not have an id Your input tags were not closed. The range input fires a change event not a click event. HTML &lt;div id="generator"&gt; &lt;input type="range" class="ranges" id="tl" min="1" max="1000" step="1" value="0" /&gt; &lt;input type="range" class="ranges" id="tr" min="1" max="1000" step="1" value="0" /&gt; &lt;div id="codearea"&gt;&lt;/div&gt; &lt;input type="range" class="ranges" id="bl" min="1" max="1000" step="1" value="0" /&gt; &lt;input type="range" class="ranges" id="br" min="1" max="1000" step="1" value="0" /&gt; &lt;/div&gt; JavaScipt $(document).ready(function () { var $codearea = $("#codearea"); $('.ranges').on('change', function () { var newRad = $(this).val() + "px", corner; switch ($(this).attr('id')) { case 'tl': corner = "border-top-left-radius"; break; case 'tr': corner = "border-top-right-radius"; break; case 'bl': corner = "border-bottom-left-radius"; break; case 'br': corner = "border-bottom-right-radius"; break; } $codearea.css(corner, newRad); }); }); http://jsfiddle.net/9o83vh2p/2/
type: Answer
accepted answer of: http://stackoverflow.com/q/25452211
answers question: http://stackoverflow.com/q/25452211
score: 0

http://stackoverflow.com/comment/39801912
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25499263
has text: from `initialize: function() {... this.listenTo(app.todos, 'add', this.addOne); ...}` app-view.js line 27 , also `'keypress #new-todo': 'createOnEnter'` triggers `createOnEnter` which creates model in collection `app.todos.create(this.newAttributes())`

http://stackoverflow.com/a/25520271
score: 0
answers question: http://stackoverflow.com/q/25497471
type: Answer
has body: Your code has no syntax errors, but it won't produce the desired result. The function onYouTubeIframeAPIReady is executed only oat the time YouTube's API library is loaded, and I'm guessing that you don't have anything in input-field at that time. But there's no provision to have the player watch and load a video dynamically, so you'll have to build one yourself. For example, you could leverage your submit button and utilize YT's loadVideoById method, like this: $messageForm.submit(function(e){ e.preventDefault(); if (typeof player !== "undefined") { player.loadVideoById($(input.val())); } });

http://stackoverflow.com/comment/39798492
comment on: http://stackoverflow.com/q/25497266
score: 0
type: Comment
type: QuestionComment
has text: getters and setters are interfaces to your underlying data

http://stackoverflow.com/q/25503850
has comment: http://stackoverflow.com/comment/39810316
type: AnsweredQuestion
has body: i have an issue i use this code to rotate my image it works but it turns all images down but i want it only to rotate the image of the div selected this is my div/img section MEER INFORMATIE <?php include 'voordelen.php'; foreach ($result as $title) { ?> <?php echo $title['Onderwerp'] ?> <?php echo $title['Omschrijving'] ?> <?php } ?> look this is normal whitout an click As you can see they all turn at once
accepted answer: http://stackoverflow.com/a/25503905
type: Question
has answer: http://stackoverflow.com/a/25504613
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25504613
has comment: http://stackoverflow.com/comment/39810084
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: JQUERY rotating img
has answer: http://stackoverflow.com/a/25503905
has comment: http://stackoverflow.com/comment/39810087
tagged with: php

http://stackoverflow.com/comment/39606399
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25394060
score: 1
has text: I think your fiddle is missing some things, i can't see anything.

http://stackoverflow.com/q/25498405
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39801007
has title: Add javascript typing timer dynamically
tagged with: timer
accepted answer: http://stackoverflow.com/a/25498852
has comment: http://stackoverflow.com/comment/39875757
downvote count: 0
score: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25498852
upvote count: 1
answer count: 1
has body: So I have an input box: HTML &lt;input id="equation1" name="equation1" type="text"/&gt; And I have a timer that performs a function when the user stops typing in the input box: JavaScript var typingTimer; var doneTypingInterval = 300; $('#equation1').keyup(function() { clearTimeout(typingTimer); typingTimer = setTimeout(submitEquation, doneTypingInterval); }); $('#equation1').keydown(function(){ clearTimeout(typingTimer); }); And I have a javascript function to make more input fields JavaScript function addEquation() { counter += 1; var newEquation = document.getElementById("equation1").cloneNode(true); newEquation.id = ("equation" + counter); newdiv = document.createElement('div'); newdiv.id = ("new" + counter); thing = "new" + counter; document.getElementById("new").appendChild(newdiv); newEquation.setAttribute('name', 'equation' + counter); document.getElementById(thing).appendChild(document.createTextNode("Equation" + counter + ": ")); document.getElementById(thing).appendChild(newEquation); } and all this works fine. The question is how do I create a new typing timer to the new input box created?

http://stackoverflow.com/a/25449027
score: 0
has comment: http://stackoverflow.com/comment/39709944
answers question: http://stackoverflow.com/q/25448966
has comment: http://stackoverflow.com/comment/39707816
has body: The object returned from "Store" doesn't have a "set" property. It's got a "save" property, however, whose value is a reference to the "_set" function in the closure. edit and as pointed out in a comment by Patrick Evans, the "_set" method doesn't return a value, so even if you were to correctly call "save", it'd return undefined.
type: Answer

http://stackoverflow.com/a/25506661
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25506165
has comment: http://stackoverflow.com/comment/50651904
accepted answer of: http://stackoverflow.com/q/25506165
has comment: http://stackoverflow.com/comment/43576175
has body: I think I found an answer, looks like you will have to inject in your asp.net pipeline the correct CORS headers, as mentioned here.
type: Answer
upvote count: 7
has comment: http://stackoverflow.com/comment/39816279
has comment: http://stackoverflow.com/comment/50651917
score: 7

http://stackoverflow.com/q/25495241
has title: Is there a way to create a name of a variable and have this change from a loop?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/5117127
duplicate of: http://stackoverflow.com/q/5117127
type: Question
has answer: http://stackoverflow.com/a/25495318
has body: Say that I have a for loop with index i, and I want to have a variable with a name that ends with the character(s) of the index number. Therefore, each time for loops, it will create a variable with a unique name. I want this variable to be a global variable, too. And then, I would want to use each of those variables later by calling var name(i) name of index. It would be okay if they were called some other way, too. It could maybe be done with an array, but with this case, I end up with an array of arrays again, and I need a single array. I need to start with an array of arrays, too. var arrays = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; var array = []; for(i = 0; i &lt; arrays.length; i ++) array[i] = arrays[i]; And I cannot simply use the reduce function because I want each of the arrays in my array of arrays to be a separate array. var arrays = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; arrays.reduce(function(a, b){ return a.concat(b); }, []); Note that the input array of arrays will be different each time the program runs and sometimes be jagged.
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25495290
has answer: http://stackoverflow.com/a/25495290
score: 0
answer count: 2
tagged with: arrays
tagged with: variables
accepted answer: http://stackoverflow.com/a/25495318
has comment: http://stackoverflow.com/comment/39794866

http://stackoverflow.com/q/25535170
answer count: 2
possible better answer: http://stackoverflow.com/a/25535464
has answer: http://stackoverflow.com/a/25535464
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25535491
score: 0
has body: I've been trying to update results based off of how many checkboxes a user has checked on a page. If the user has checked 5 or more then it should fade 2 divs. If the user has checked 10 or more it should fade another two divs. If the user chooses 10 or more it should fade another set. I can get the first function to run but I believe since the first if statement has been completed, it's not looking for updates/value changes? The others do not fade back to 100% opacity either. $('input:checkbox').change(function() { var boxChecked = $('input:checkbox:checked').length; if (boxChecked &gt; 5) { $('.div-1, .div-2').fadeTo(500, 0.4) } else if (boxChecked &gt; 10) { $('.div-1, .div-3').fadeTo(500, 0.4) } else if (boxChecked &gt; 11) { $('.div-1, .div-2').fadeTo(500, 0.4) } });
has comment: http://stackoverflow.com/comment/39868371
has title: Run Functions on Checkbox values?
has comment: http://stackoverflow.com/comment/39867945
has comment: http://stackoverflow.com/comment/39867939
has comment: http://stackoverflow.com/comment/39867986
type: Question
has answer: http://stackoverflow.com/a/25535491
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39868271
has comment: http://stackoverflow.com/comment/39868117
has comment: http://stackoverflow.com/comment/39868011

http://stackoverflow.com/comment/39814221
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25503836
has text: it doesn't work. no matter which button I click, both will execute the code-behind.

http://stackoverflow.com/comment/39819379
type: QuestionComment
has text: The authentication dialog which appears: is it an HTTP-Auth window (i.e. a pop-up modal) or is it a standard authentication form for the remote serve (i.e. the request is being redirected to the login page)?
comment on: http://stackoverflow.com/q/25508565
score: 0
type: Comment

http://stackoverflow.com/q/25418403
has comment: http://stackoverflow.com/comment/39651804
tagged with: angularjs-scope
has title: Named view in angular ui-router not updating, despite being watched
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/25420254
has answer: http://stackoverflow.com/a/25419115
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
linked to: http://stackoverflow.com/q/23568908
tagged with: angularjs
tagged with: angularjs-ng-repeat
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25419115
has body: I have a scoped variable $scope.foo that I am keeping a watch on. It could be updated through a text field in a form. I have two named views A and B on a page that I am rendering using angular ui-router. The named view A has the text form field that is being watched for changes in a controller through ng-model="foo". When the value of foo is changed by a user it changes the value of another scoped variable $scope.bar, which is an array, in the controller that is being used in the ng-repeat directive on the named view B. The changes in the $scope.bar is made using $scope.$watch method in the controller. The issue that I am facing is that the when the foo is changed I could see the changes in bar on the named view A but not on the named view B. Could somebody help me resolve this issue? Edit: Here is the plunker for this issue.
linked to: http://stackoverflow.com/q/23486687
type: Question
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/39654263
accepted answer: http://stackoverflow.com/a/25420254

http://stackoverflow.com/a/25419302
score: 1
type: Answer
upvote count: 1
has body: try this $(document).ready(function(){ var new_text = ""; $("a").each(function(){ var str = $(this).attr("onclick"); var newtext = str.substring(str.lastIndexOf("(")+1,str.lastIndexOf(")")); if(new_text=="") new_text += newtext; else new_text += ","+newtext; }); alert(new_text); console.log("New Text : "+new_text); }); FIDDLE DEMO
answers question: http://stackoverflow.com/q/25418739
downvote count: 0

http://stackoverflow.com/q/25472966
downvote count: 0
tagged with: java
has answer: http://stackoverflow.com/a/25473007
accepted answer: http://stackoverflow.com/a/25473007
type: Question
linked to: http://stackoverflow.com/q/9610921
has body: I am writing a JavaScript Client Application that needs to communicate with Server. I tried to implement the API, but i stuck on one method and I need help. Infect i don't know how to translate this from Java to JavaScript (I don't know where to find analog libraries written in javascript that are used in this method): import java.security.SignatureException; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; /** * This class defines common routines for generating * authentication signatures for AWS requests. */ public class Signature { private static final String HMAC_SHA1_ALGORITHM = "HmacSHA1"; /** * Computes RFC 2104-compliant HMAC signature. * * @param data * The data to be signed. * @param key * The signing key. * @return * The Base64-encoded RFC 2104-compliant HMAC signature. * @throws * java.security.SignatureException when signature generation fails */ public static String calculateRFC2104HMAC(String data, String key) throws java.security.SignatureException { String result; try { // get an hmac_sha1 key from the raw key bytes SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(), HMAC_SHA1_ALGORITHM); // get an hmac_sha1 Mac instance and initialize with the signing key Mac mac = Mac.getInstance(HMAC_SHA1_ALGORITHM); mac.init(signingKey); // compute the hmac on input data bytes byte[] rawHmac = mac.doFinal(data.getBytes()); // base64-encode the hmac result = Encoding.EncodeBase64(rawHmac); } catch (Exception e) { throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); } return result; } } This method is from AWS Documentations: Java Sample Code for Calculating HMAC-SHA1 Signatures I am asking if someone can give me some references (websites) where I can find solution or analog libraries, written in javascript. I searched AWS Documentation and SDK for JavaScript and I couldn't find translation in JS. Thanks very much in advance.
tagged with: javascript
has title: Calculate HMAC-SHA1 Signature using JavaScript
tagged with: amazon-web-services
score: 4
tagged with: hmacsha1
answer count: 1
favorite count: 0
duplicate of: http://stackoverflow.com/q/9610921
upvote count: 4
type: AnsweredQuestion

http://stackoverflow.com/a/25494022
has comment: http://stackoverflow.com/comment/39792838
has comment: http://stackoverflow.com/comment/42298703
has comment: http://stackoverflow.com/comment/42299067
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/25493786
score: 2
has body: rowHeights returns an array containing the height of each row of the table. For each row, it gets its height by getting the maximum height of each cell in the row. To understand it, work from the inside out: function(max, cell) { return Math.max(max, cell.minHeight()); } Given a cell and a previous maximum height, this computes the new height as the maximum of this cell's minHeight() and the previous maximum. return row.reduce(ABOVE FUNCTION, 0); This reduces a row (an array of cells), using the above function, to get the maximum height of all the cells in the row. Then: return rows.map(PREVIOUS FUNCTION); runs the reduction function over every row, returning an array of all the maximum heights. colWidths does the same thing by column, getting the width of each column by getting the maximum with of each cell in that column.
accepted answer of: http://stackoverflow.com/q/25493786
has comment: http://stackoverflow.com/comment/39793407
has comment: http://stackoverflow.com/comment/39793448
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25528282
has title: finding an array in another Multidimensional array in javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39884625
has answer: http://stackoverflow.com/a/25544522
has comment: http://stackoverflow.com/comment/39856645
accepted answer: http://stackoverflow.com/a/25544522
has comment: http://stackoverflow.com/comment/39855380
has comment: http://stackoverflow.com/comment/39855194
has body: I'm writing a simple snakes game using JavaScript and HTML5 canvas. I have a Multidimensional array that hold snake block like this: snake=[[1,1],[1,2]]; and set it on arrayMap using (snake.indexOf([i],[j])!=-1) then draw arrayMap on canvas. for (var i = 0; i &lt; blocksHeightCount; i++) { for (var j = 0; j &lt; blocksWidthCount; j++) { if ((snake.indexOf(i,j)!=-1)|| (walls.indexOf(i,j)!=-1)|| (foods.indexOf(i,j)!=-1)) { arrayMap[i][j]=1; } else { arrayMap[i][j]=0; } } } for (var i = 0; i &lt; blocksHeightCount; i++) { for (var j = 0; j &lt; blocksWidthCount; j++) { Block = arrayMap[i][j]; if (Block!=0){ ctx.fillStyle = (Block != 9) ? colors[Block] : "#bdc3c7"; ctx.fillRect(j * cubeWidth, i * cubeHeight , cubeWidth-.4,cubeHeight-.4); } } } the problem is indexOf isn't working when I set array on it! It works fine when I set indexOf("i,j") but i need it to be array. please help, thx
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/39855416
score: 0
tagged with: multidimensional-array
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39855674
has comment: http://stackoverflow.com/comment/39855217

http://stackoverflow.com/q/25498580
has body: I'm trying to combine two separate regex queries into one default one in a small script I have. The first query is /\[(.*?)\]/g Which matches shortcodes like this [gallery] The second query is /\[([^\]]+)]([^\[]+)\[\/([^\]]+)]/g Which matches shortcodes like this [gallery]data[/gallery] When I try to combine the queries, like this /\[(.*?)\]|\[([^\]]+)]([^\[]+)\[\/([^\]]+)]/g Everything is matched except the "data" inside an extended shortcode, like this. [gallery] [gallery][/gallery] The result I am expecting / wanting to see is this [gallery] [gallery]data[/gallery]
score: 0
has answer: http://stackoverflow.com/a/25498636
has comment: http://stackoverflow.com/comment/39800510
possible better answer: http://stackoverflow.com/a/25498636
answer count: 5
accepted answer: http://stackoverflow.com/a/25498616
has answer: http://stackoverflow.com/a/25498668
tagged with: regex
type: AnsweredQuestion
has title: Javascript regex OR operator
type: Question
has answer: http://stackoverflow.com/a/25498654
has answer: http://stackoverflow.com/a/25498661
has comment: http://stackoverflow.com/comment/39800527
tagged with: javascript
has answer: http://stackoverflow.com/a/25498616

http://stackoverflow.com/a/25416276
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25416174
type: Answer
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/25416174
has body: $('.one, .two') returns a jQuery object containing references to whichever DOM elements have those two classes, it doesn't return an array of strings. So within your $.each(), the v parameter is not a string, it is a DOM element. If you want the HTML text (or just the text) of that element use $(v).html() or $(v).text(): var stringArray = []; $('.one, .two').each(function(i, v) { stringArray.push( $(v).html() ); }); var jsonString = JSON.stringify(stringArray); Demo: http://jsfiddle.net/stL1hz9t/ Note that I've used $('.one, .two').each() rather than the generic iterator $.each() method, because you want to loop over the items in a jQuery object. ($.each() will work, but it adds just that slight bit of extra complexity to your code.) You don't need your stringsToStringify variable (which as I mentioned above doesn't actually contain strings). Or you can use the .map() method to simplify the code somewhat: var stringArray = $('.one, .two').map(function (i, v) { return $(v).html(); }).get(); var jsonString = JSON.stringify(stringArray); Demo: http://jsfiddle.net/stL1hz9t/1/
type: AcceptedAnswer

http://stackoverflow.com/a/25408159
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25407515
has body: As others have noted, you need stopPropagation in addition to preventDefault, and you should be listening for the keydown event rather than keypress. The pure JavaScript way to do this is: document.getElementById('div').onkeydown = function (evt) { if (evt.which === 13) { evt.preventDefault(); evt.stopPropagation(); return false; } }; document.getElementById('div').onclick = function (evt) { // do whatever you want here };
accepted answer of: http://stackoverflow.com/q/25407515
type: AcceptedAnswer

http://stackoverflow.com/a/25466198
has body: I have solution. Problem: delay in db update Solution: function func(){ $('#div1').load('change.php?id=1&amp;change=delete', function (){ $('#div2').load('list.php'); }); It is good solution?
answers question: http://stackoverflow.com/q/25465686
score: 0
type: Answer

http://stackoverflow.com/comment/39874019
has text: Thats the thing @malk it doesnt show any errors
comment on: http://stackoverflow.com/q/25538276
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25390828
tagged with: jquery
has title: Replace a specific tag of a string
has body: I have this JS string: " foo text bar text sol text " And I want to replace only the paragraph id 'bar' and return all the string with the new modifcation. How can I do this? I know I can use a regex, however if I can avoid it, it would be better I think... I have tried to convert the string to a DOM object like this: var str = " foo text bar text sol text " and then, var dom_str = $(str); however I don't know how to select the bar id and return all the string. The output I want to get is the following for this example: var result = " foo text new text here sol text " Any help will be greatly appreciated.
has comment: http://stackoverflow.com/comment/39600072
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
has answer: http://stackoverflow.com/a/25390868
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25390906
accepted answer: http://stackoverflow.com/a/25390868
has answer: http://stackoverflow.com/a/25390906
type: Question
score: 0
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/39662615
score: 0
has text: In what range should that number be? If it's relatively small: populate an array with all numbers in that range, shuffle it, take the first two.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25424602

http://stackoverflow.com/comment/39674699
comment on: http://stackoverflow.com/q/25430830
score: 0
type: Comment
type: QuestionComment
has text: what file do you actually want to load? `dynamicContent.html` or `new-contnet.html`?

marker
tag name: marker
tags question: http://stackoverflow.com/q/25446082
type: Tag

http://stackoverflow.com/comment/39609945
has text: those words don't work together that way. An ` ` lets a user make data available to on-page JavaScript, provided you wrote actual JavaScript to do that. That runs client-side: why would they want to download a file that they already have, because they just selected it with the file input element?
score: 2
type: QuestionComment
comment on: http://stackoverflow.com/q/25395727
type: Comment

http://stackoverflow.com/comment/39862361
has text: @Bergi guess you have the privilge to edit my code , go ahead and fix it if you want , you are welcome.
comment on: http://stackoverflow.com/q/25529693
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25422919
type: Answer
answers question: http://stackoverflow.com/q/25422656
score: 0
has body: I guess you need to add a background color to your hover class like so: .hover{ background-color:#eee; } and then call document.ready function, passing your HoverLi function to it.

http://stackoverflow.com/comment/39762625
type: Comment
has text: Thanks for the explanation. What would I need to change so that it does not fail?
comment on: http://stackoverflow.com/q/25478129
score: 0
type: QuestionComment

http://stackoverflow.com/q/25535368
tagged with: touch
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39868426
tagged with: angularjs
type: UnansweredQuestion
has body: Is there a simple mousedown/mouseup event that I can use with an Angular-based mobile app? I'm already using ngTouch for some swiping, but it does not seem to support a 'while-pressed' type of event. ngMousedown does not work on touch screens, and I would like to avoid jquery if possible. I would like something that I could just stick into a directive and apply to a bunch of different elements.
has title: Mousedown event for mobile without jquery?
type: Question
has answer: http://stackoverflow.com/a/25536963
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25487252
has title: obj.attr('id') return undefined but obj.getAttribute('id') works. Why?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25487313
has answer: http://stackoverflow.com/a/25487332
tagged with: getattribute
has body: In my JS obj.attr('...') and obj.prop('...') doesn't work but obj.getAttribute('...') works well. Could you guys tell me why? function ShowTips(obj) // show tip in element's attribute { var msg = obj.attr("tip"); // failed. alert(msg); } function startPoint() // start from here. { var obj = document.getElementById("img01"); ShowTips(obj); }
favorite count: 0
tagged with: attr
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39779072
score: 1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
upvote count: 1

http://stackoverflow.com/comment/39601070
score: 0
type: Comment
has text: @RobertRozas For OP not sure but it is doing it for me in the latest Chrome version
type: QuestionComment
comment on: http://stackoverflow.com/q/25390841

http://stackoverflow.com/a/25497822
has body: You need to pass the statement in the while loop: var understand = true; while( understand ){ //while understand == true console.log("I'm learning while loops!"); understand = false; } look more about while statement here
answers question: http://stackoverflow.com/q/25497784
score: 0
type: Answer

ember.js
tags question: http://stackoverflow.com/q/25420758
tags question: http://stackoverflow.com/q/25531780
tags question: http://stackoverflow.com/q/25548348
tags question: http://stackoverflow.com/q/25530576
tags question: http://stackoverflow.com/q/25416075
tags question: http://stackoverflow.com/q/25489057
tags question: http://stackoverflow.com/q/25462042
tags question: http://stackoverflow.com/q/25460988
tags question: http://stackoverflow.com/q/25393287
tags question: http://stackoverflow.com/q/25403164
tags question: http://stackoverflow.com/q/25501870
type: Tag
tags question: http://stackoverflow.com/q/25487989
tag name: ember.js
tags question: http://stackoverflow.com/q/25516472
tags question: http://stackoverflow.com/q/25408384
tags question: http://stackoverflow.com/q/25441563
tags question: http://stackoverflow.com/q/25543654
tags question: http://stackoverflow.com/q/25540313
tags question: http://stackoverflow.com/q/25391112
tags question: http://stackoverflow.com/q/25470470
tags question: http://stackoverflow.com/q/25480264
tags question: http://stackoverflow.com/q/25449683
tags question: http://stackoverflow.com/q/25503626
tags question: http://stackoverflow.com/q/25439105
tags question: http://stackoverflow.com/q/25454685
tags question: http://stackoverflow.com/q/25467985
tags question: http://stackoverflow.com/q/25467327
tags question: http://stackoverflow.com/q/25547091
tags question: http://stackoverflow.com/q/25473613
tags question: http://stackoverflow.com/q/25431378
tags question: http://stackoverflow.com/q/25393965
tags question: http://stackoverflow.com/q/25437252
tags question: http://stackoverflow.com/q/25500595
tags question: http://stackoverflow.com/q/25430096
tags question: http://stackoverflow.com/q/25395355
tags question: http://stackoverflow.com/q/25490556
tags question: http://stackoverflow.com/q/25454975
tags question: http://stackoverflow.com/q/25405739
tags question: http://stackoverflow.com/q/25428113
tags question: http://stackoverflow.com/q/25394693
tags question: http://stackoverflow.com/q/25441967
tags question: http://stackoverflow.com/q/25457745
tags question: http://stackoverflow.com/q/25391561
tags question: http://stackoverflow.com/q/25465503
tags question: http://stackoverflow.com/q/25436210

http://stackoverflow.com/comment/39819447
comment on: http://stackoverflow.com/q/25508565
has text: @pjmorse It is a pop-up modal dialog box - a new, separate window. It reads "A username and password are being requested by http://website.com. The site says: "Login" and has two fields; one for username, the other for password. Thanks :)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25419341
has body: The way I read this if tours is an Array, p will be a boolean as returned by Array.prototype.some and thus this code won't do anything useful. However, if tours.some is a custom-defined method that returns the first matching tour instance, then the snippet might make sense, but we need to understand what tours is to see the whole picture.
has comment: http://stackoverflow.com/comment/39653066
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/25419092
answers question: http://stackoverflow.com/q/25419092
type: Answer

http://stackoverflow.com/q/25514386
type: AnsweredQuestion
tagged with: force-layout
has answer: http://stackoverflow.com/a/25514646
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
has body: I am trying to construct a d3 force layout, and it's mostly working, but the first second or so of the animation is kind of wacky. I start all the nodes in the middle of the window, and they end up more or less where I want them to, but the first thing they do is blast out to the edges of the window or beyond before settling down. The layout is eventually doing more or less what I want it to, but I can't really show it to the client in the current state because of how wacky it is right at first. I've tried fidgeting a lot with the gravity, charge, linkDistance, and friction values, but it seems like I can only get rid of this behavior by changing conditions so that if I like the final result, the path there is wacky. If the path there isn't wacky, the final result is no good. force = d3.layout.force() .nodes(data.nodes) .links(data.edges) .size([w, h]) .charge( -500 ) .gravity( 1 ) .linkDistance([50]) .friction(.9); This is the latest revision of my force declaration. So my question is whether I'm doing something inadvertent to encourage this explosive thing at the start of the animation, or if this is just the way it works and everyone agrees not to notice that little burp at the beginning. Here's a JSFiddle: http://jsfiddle.net/tsgouros/a5u62udv/ and here's the same thing, slowed down so you can see the chaos at the start: http://jsfiddle.net/tsgouros/a5u62udv/1/
tagged with: d3.js
has title: why does my d3 force layout explode
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/25514646
type: Question

http://stackoverflow.com/comment/123263270
comment on: http://stackoverflow.com/a/25433262
score: 0
type: Comment
has text: But how to add headers dynamically from data?
type: AnswerComment

http://stackoverflow.com/a/25406618
answers question: http://stackoverflow.com/q/25405762
has comment: http://stackoverflow.com/comment/39633492
score: 0
has comment: http://stackoverflow.com/comment/39633377
type: Answer
has body: req.param() is for PATH parameters. I'm guessing you are trying to get post data here, so you should be using req.body('key').

http://stackoverflow.com/q/25530182
has answer: http://stackoverflow.com/a/25530769
type: Question
accepted answer: http://stackoverflow.com/a/25531049
tagged with: javascript
has comment: http://stackoverflow.com/comment/39859449
tagged with: highlighting
answer count: 2
has title: Highlight effect for a single line of text in a
score: 3
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39858919
favorite count: 0
has comment: http://stackoverflow.com/comment/39859820
has comment: http://stackoverflow.com/comment/39859137
has comment: http://stackoverflow.com/comment/39858805
has body: I want to recreate the effect shown in this fiddle According to StackOverflow rules I apparently have to present some code if I link to jsfiddle.net, so here's the main function from that link. Although to see the effect you obviously have to follow the link instead. $(document).ready(function() { $(".textWrapper").hover(function() { $(".highlight", this).show(); $(this).mousemove(function(e) { var relativePos = e.pageY - this.offsetTop; var textRow = (Math.ceil(relativePos / 18) * 18) - 18; if (textRow &gt;= 0) { $(".highlight", this).css("top", textRow + "px"); } }); }, function() { $(".highlight", this).hide(); }); }); Rather than highlight the text in yellow I'd prefer to change the color of the text itself. I'd like the text to be light grey, and darken when highlighted, to bring that line into focus. This seems a lot more difficult than simply changing CSS, because the actual text properties do not change. How do I accomplish this?
has answer: http://stackoverflow.com/a/25531049
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39859737
tagged with: css
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25530769
has comment: http://stackoverflow.com/comment/39859625
has comment: http://stackoverflow.com/comment/39859883
upvote count: 3

http://stackoverflow.com/a/25500576
has body: I think you need /assets/js/dependencies/sails.io.js. Take a look here.
score: 0
answers question: http://stackoverflow.com/q/25495800
type: Answer

http://stackoverflow.com/a/25503109
score: -1
accepted answer of: http://stackoverflow.com/q/25500371
answers question: http://stackoverflow.com/q/25500371
type: AcceptedAnswer
downvote count: 1
has body: Setting library link to following fixed problem http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerwithlabel/src/markerwithlabel.js
type: Answer
upvote count: 0

http://stackoverflow.com/q/25450706
has answer: http://stackoverflow.com/a/25455716
accepted answer: http://stackoverflow.com/a/25455716
upvote count: 1
answer count: 1
favorite count: 0
has body: I want to save several files from a site to my Google Drive automatically. I can retrieve links like : http://www.somesitename/download.aspx?Type=DD&amp;ID=4725aea4-675d-45f5-b20d-dc0cb12389ee How can I download this file to my Google Drive using Google Apps Script? Remark : Can I avoid the popupbox asking if I want to open or save the file (other then checking the 'Do this automatically for files like this from now on')
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39718141
score: 1
type: Question
tagged with: google-apps-script
has title: How to save files from a website using Google Apps Script
downvote count: 0
has comment: http://stackoverflow.com/comment/39728155
tagged with: javascript

http://stackoverflow.com/comment/39890056
type: Comment
has text: Hmm it doesn't alert. May be something wrong with the case statement?
score: 0
comment on: http://stackoverflow.com/q/25547333
type: QuestionComment

http://stackoverflow.com/comment/39643415
comment on: http://stackoverflow.com/a/25412886
has text: That makes sense. Cycle 2 initiates all slideshows on document.ready. If you reset your options BEFORE document.ready, then it will initiate the slideshow with the settings you've passed it on. https://github.com/malsup/cycle2/blob/master/src/jquery.cycle2.core.js#L678-L681
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39636667
type: Comment
has text: if you had a restriction that a user can only add a single filter then you could have simply show or hide your select by js but since user can add multiple filters so it'll be better if you use ajax for it
score: 0
comment on: http://stackoverflow.com/q/25409937
type: QuestionComment

http://stackoverflow.com/a/25485359
type: Answer
accepted answer of: http://stackoverflow.com/q/25473908
score: 3
answers question: http://stackoverflow.com/q/25473908
downvote count: 0
has body: The Origin header is only sent for cross-origin requests that require CORS. When you declare the host permissions in the manifest file, as in "permissions": ["http://example.com/*"], then any request to example.com within your extension will not use CORS. If you want to identify requests from your Chrome extension, simply add a custom header: $.ajax({ url: 'http://example.com', crossDomain: false, headers: { 'X-My-Header': 'my header' } }); or in vanilla JS: var x = new XMLHttpRequest(); x.open('GET', 'http://example.com'); x.setRequestHeader('X-My-Header', 'my header'); x.send(); Do NOT forget to check that the request does NOT have a Origin request header. By checking that the Origin header does not exist, you know for sure that the request was made by a page at the same origin, or your extension.
upvote count: 3
type: AcceptedAnswer

ghost.py
tags question: http://stackoverflow.com/q/25545349
type: Tag
tag name: ghost.py

http://stackoverflow.com/q/25508288
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25508449
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 1
has body: This code works well as it shoulds: &lt;script type="text/javascript"&gt; var canvas = document.createElement("canvas"); canvas.id = "myCanvas"; canvas.style.height = "640px"; canvas.style.width = "384px"; canvas.style.position = "absolute"; canvas.style.border = "1px solid black"; document.body.appendChild(canvas); var context = canvas.getContext('2d'); function getMousePos(canvas, evt) { var rect = canvas.getBoundingClientRect(); return { x: evt.clientX - rect.left, y: evt.clientY - rect.top }; } canvas.addEventListener('mousemove', function(evt) { var mousePos = getMousePos(canvas, evt); var message = 'Mouse position: ' + mousePos.x + ',' + mousePos.y; var imgd = context.getImageData(mousePos.x, mousePos.y, 1, 1); var pix = imgd.data; document.getElementById("listener").innerHTML = "&lt;b&gt;&lt;i&gt;" + message + "&lt;br&gt;" + pix[3] + "&lt;/i&gt;&lt;/b&gt;"; }, false); &lt;/script&gt; &lt;div id="listener" &gt; &lt;/div&gt; It basically writes the mouse Position to the "listener" div and the alpha of the current pixel (as long as there is no content, it's - of course - 0) But when i add this code: var img = new Image(); img.src = 'http://www.animefighters.de/images/armor_leatherbelly.png'; context.drawImage(img, 0, 0); There wouldn't happen anything... What am i doing wrong? Where is the mistake? I want to draw some images to the canvas and, after that, get the pixel data (including mouse Position and alpha of the pixel) ... how can i realize that?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25508449
score: 1
has title: Trouble with getting Canvas Data after Drawing image
type: Question
tagged with: canvas
answer count: 1

http://stackoverflow.com/a/25508662
downvote count: 0
has comment: http://stackoverflow.com/comment/39819827
has body: You can also use replaceWith - jsFiddle Example, readable and works with parent / child tags $('p').replaceWith($('p').text())
score: 1
has comment: http://stackoverflow.com/comment/39819764
upvote count: 1
answers question: http://stackoverflow.com/q/25508167
has comment: http://stackoverflow.com/comment/40079832
type: Answer

http://stackoverflow.com/q/25514295
has answer: http://stackoverflow.com/a/25514366
has body: I have this menu. When I click on a dropdown item, I need to do something. Home About Applications app1 app2 app3 app4 app5 when I pick test1 from the dropdown menu, I need to do something, run a function. I have done this: Does not seem to be working, no errors. Any ideas? I'd appreciate any insight.
has answer: http://stackoverflow.com/a/25514369
type: Question
accepted answer: http://stackoverflow.com/a/25514369
has answer: http://stackoverflow.com/a/25514334
tagged with: javascript
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25514334
has comment: http://stackoverflow.com/comment/39830125
has title: How do you execute a function call when clicked on dropdown menu on javascript
type: AnsweredQuestion

http://stackoverflow.com/comment/39894673
comment on: http://stackoverflow.com/a/25549650
type: AnswerComment
type: Comment
has text: Exactly this is in my answer: instead of parent-child, I created siblings (brother and sister). And now we can profit from one controller, but **two different resolvers**... is not it awesome? ;) ;)
score: 1

http://stackoverflow.com/comment/39750967
comment on: http://stackoverflow.com/q/25471789
score: 0
has text: There are any number of ways, including exporting an init function that takes the parameter, exporting *just* a function that takes the parameter, etc.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25443666
type: Answer
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39711995
answers question: http://stackoverflow.com/q/25442497
has body: So where to start, my solution gonna work on new browsers because of html5 data attribute and querySelectorAll so let's start. I modified your html, i moved your css and javascript. It's true that you can not use s between . I've added class="detail" for text-align: left; text-transform: uppercase;, put table styles too and all 'links/trigger' too. So here my modified html. You can see all the code here. Descripción Clic Here to Toggle - MASTER I detail i.1 detail i.2 detail i.3 detail i.4 detail i.5 Clic Here to Toggle - MASTER II detail ii.1 detail ii.2 Click here to toggle This is Working My Css : .hide { display: none; } table { border-spacing: 0; /*cellpadding=0*/ border-collapse: collapse; /*cellspacing="0"*/ border: none; width: 100%; } th, .detail { text-align: left; } .trigger { background-color: #cdcdcd; font-size: 16px; font-weight: bold; } .detail { text-transform: uppercase; } And javascript : var hideTrigger = document.querySelectorAll('.js-hide-siblings'), i,j; for (i = 0; i < hideTrigger.length; i++) { hideTrigger[i].addEventListener('click', function(e) { var siblings = document.querySelectorAll('[data-detail=' +e.target.getAttribute('data-target')+']'); /* siblings target all detail tr's with data-detail attribute that is same as triger data-target attribute*/ e.preventDefault(); /*for links to remove normal click behavior*/ for (j = 0; j < siblings.length; j++) { siblings[j].classList.toggle('hide'); /* if target have hide class i remove it, if not i add */ } }); } Hope it gonna help
accepted answer of: http://stackoverflow.com/q/25442497

http://stackoverflow.com/a/25458589
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25457264
accepted answer of: http://stackoverflow.com/q/25457264
type: Answer
has body: this problem can be solve by using ng-bind . I am facing the same problem answered in this question : AngularJS : Why ng-bind is better than {{}} in angular?
score: 0

http://stackoverflow.com/a/25430025
accepted answer of: http://stackoverflow.com/q/25422685
has body: The biggest problem of this approach is that it does not encode quotes, so if the input is used for an attribute value for example, it may break the html. elem.innerHTML = ' X '; will happily set the element to X and it can run the user's script then.
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25422685

http://stackoverflow.com/q/25447463
answer count: 1
favorite count: 0
tagged with: tinymce
linked to: http://stackoverflow.com/q/15599251
type: AnsweredQuestion
score: 2
downvote count: 0
has body: Hey I have created a plugin that opens a new dialog (an extra HTML-page). With this dialog the user have the opportunity to create his own format pattern. What would I like to have? I need a tinymce editor with a readonly textarea (no problem). But the user must be able to select formats like bold, italic, underline, fontsize, fontfamily, ... There is a sample text in the textarea which displays the formatting. And here is the problem. I can set the formats if the textarea is readonly. Anyone have an idea? I use jquery-ui to create the dialog. Here is the javascript block : And here is the dialog html-page: Formatvorlage: Black my own formatpattern Tastenkombination ( Alt + ): 1 2 3 4 5 6 7 8 9 0 sample text Bitte geben Sie den Namen der neuen Formatvorlage ein. Bitte geben Sie den neuen Namen für die Formatvorlage ein. Wollen sie die Formatvorlage wirklich löschen? Sorry I have not enought reputation to post pictures and it is hard to explane. :/ I hope anyone have a solution for me. :) Thanks Felix EDIT: Yeah I have founded a solution: There are two commands "BeforeExecCommand" and "ExecCommand" http://www.tinymce.com/wiki.php/api4:event.tinymce.Editor.BeforeExecCommand http://www.tinymce.com/wiki.php/api4:event.tinymce.Editor.ExecCommand And here is the code: editor.on('Init', function (ed) { editor.getBody().setAttribute('contenteditable', 'false'); }); editor.on('BeforeExecCommand', function () { editor.getBody().setAttribute('contenteditable', 'true'); }); editor.on('ExecCommand', function () { editor.getBody().setAttribute('contenteditable', 'false'); }); But now I have an other problem. Before I can change the fontstyle I have to select all. But this command doesn`t work: editor.execCommand('selectAll'); editor.on('BeforeExecCommand', function () { editor.getBody().setAttribute('contenteditable', 'true'); editor.execCommand('selectAll'); }); How can I select all to change the fontstyle? Edit2: The command "selectAll" selected wrong. This code is the solution…
type: Question
accepted answer: http://stackoverflow.com/a/25447556
has title: How can I change the styles of content if contentedittable = false?
tagged with: javascript
tagged with: jquery
upvote count: 2
linked to: http://stackoverflow.com/q/9665396
has answer: http://stackoverflow.com/a/25447556

http://stackoverflow.com/q/25408363
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/5627284
has comment: http://stackoverflow.com/comment/39633708
score: 0
linked to: http://stackoverflow.com/q/21376083
has body: I have a custom method that executes async functions which DO NOT return promises. My custom method does return a promise. What is the correct way to implement the functionality - using timeout like in example 1 or checking for equality in the callback function like in example 2? EXAMPLE 1: getAllFiles: function () { var def = $.Deferred(); var files = []; fileEntries.forEach(function(fileEntry){ fileEntry.file(function (file) { var reader = new FileReader(); reader.onload = function (e) { files.push({ name: fileEntry.fullPath, content: e.target.result }); }; reader.readAsArrayBuffer(file); }); }); //this resolves the deffered var interval = setInterval(function(){ if (files.length === fileEntries.length) { def.resolve(files); clearInterval(interval); } }, 1000); return def.promise(); } EXAMPLE 2 getAllFiles: function () { var def = $.Deferred(); var files = []; fileEntries.forEach(function(fileEntry){ fileEntry.file(function (file) { var reader = new FileReader(); reader.onload = function (e) { files.push({ name: fileEntry.fullPath, content: e.target.result }); //this resolves the deffered if (files.length === fileEntries.length) { def.resolve(files); clearInterval(interval); } }; reader.readAsArrayBuffer(file); }); }); return def.promise(); } Response to potential duplicate This question is not about how to pass an array of promises to the when function since neither file method nor onload return promises.
answer count: 1
has title: How to know when several callbacks have been successfully executed with no returned promises
has comment: http://stackoverflow.com/comment/39633003
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6538470
has comment: http://stackoverflow.com/comment/39632915
has answer: http://stackoverflow.com/a/25410783
accepted answer: http://stackoverflow.com/a/25410783
has comment: http://stackoverflow.com/comment/39635642

http://stackoverflow.com/comment/39803741
has text: Without any code it might be hard to help you...
comment on: http://stackoverflow.com/q/25500371
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39752579
score: 0
has text: @Thinkerer thanks for your plunker! great job. as promised, I went through and made very few adjustments. YOU WERE ALMOST THERE ;) see my other answer *(I decided to use another answer because its content is different)*
comment on: http://stackoverflow.com/q/25464306
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39831939
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25514664
type: QuestionComment
has text: @thebjorn, I do not own/create the image. It is retrieved from a data source and I only dictate the IDs of the paths. I would have to change code to account for a slightly modified, albeit identically functioning, image

http://stackoverflow.com/a/25454977
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39719645
answers question: http://stackoverflow.com/q/25454912
has comment: http://stackoverflow.com/comment/39722480
downvote count: 0
has body: @scunlinf's answer is a partial answer, but your question is odd: why would you do CSS in JS instead? You actually still want CSS: var all = Array.prototype.slice.call(document.querySelectorAll("*")); all.forEach(function(e) { e.classList.add("blackly"); }); and a CSS class: .blackly { background: black!important; } Because you don't want hardcoded CSS values in your JS, you want to keep those properly controllable, switchable, etc. etc. etc so you use CSS classes for the styling, and at most you toggle classes on the JavaScript side of things. (If the Array.prototype... part is new to you, document.querySelectorAll returns a NodeList, which is like an array but also very much not. By running it through the slice function, it generates a proper array with all the array functions like .every, .forEach etc)
has comment: http://stackoverflow.com/comment/39720034
type: Answer
has comment: http://stackoverflow.com/comment/39719550

http://stackoverflow.com/a/25482454
accepted answer of: http://stackoverflow.com/q/25469434
has body: This amended Fiddle does linear interpolation in JS and shows why basis interpolation might not be doing what you expect. I've moved some of the styling to the CSS and also added in circles for your observations with mouseover text so that we can see the details of each observation. Run this with line 475 both commented out and not: // .interpolate("basis") Towards the end of your dataset, the observations at 5 Mar 05:00 and 23:00 both spike up and then down sharply. The basis interpolated line doesn't cross the threshold, but the observations do. If you solve for the interpolated line, you wouldn't identify those intersections. This might be what you wanted, but it wasn't clear from your question. The intersects array at the end is where we get the intersect times. It loops through each data pair, checking if they're on different sides of the threshold. If they are, there's a simple linear interpolation calculation to identify the time it crossed, assuming the temperature rose linearly between the observations.
has comment: http://stackoverflow.com/comment/123823091
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25469434
type: Answer

http://stackoverflow.com/a/25524752
has comment: http://stackoverflow.com/comment/39868816
has comment: http://stackoverflow.com/comment/39872307
has comment: http://stackoverflow.com/comment/39872355
has comment: http://stackoverflow.com/comment/39855033
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39872432
has comment: http://stackoverflow.com/comment/39857889
accepted answer of: http://stackoverflow.com/q/25524705
answers question: http://stackoverflow.com/q/25524705
type: Answer
has body: How about using a jQuery plugin in order to make the countdown after you have got the data from the field? Have a look at http://keith-wood.name/countdown.html. EDIT: I used the following JS code to make http://jsfiddle.net/oxnmvhLc/2/: function startCountdown(nowObj, timeObj) { setInterval(function() { var nowObj = new Date(); if(nowObj &gt; timeObj) { timeObj.setDate(timeObj.getDate() + 1); } var difference = (timeObj - nowObj) / 1000; var seconds = Math.floor(difference % 60); var minutes = Math.floor((difference/60) % 60); var hours = Math.floor((difference/3600) % 24); $('#countdown').html('There are ' + hours + ' hours, ' + minutes + ' minutes and ' + seconds + ' seconds.'); }, 1000); } $('#btn').click(function() { var time = $('#time').val().split(':'); var nowObj = new Date(); var timeObj = new Date(nowObj.getFullYear(), nowObj.getMonth(), nowObj.getDate(), time[0], time[1], 0, 0); $('#countdown').html(''); startCountdown(nowObj, timeObj); });
has comment: http://stackoverflow.com/comment/39934080

youtube
tags question: http://stackoverflow.com/q/25534409
tags question: http://stackoverflow.com/q/25542316
tags question: http://stackoverflow.com/q/25499179
tags question: http://stackoverflow.com/q/25473371
tags question: http://stackoverflow.com/q/25520877
tags question: http://stackoverflow.com/q/25457421
type: Tag
tags question: http://stackoverflow.com/q/25536556
tags question: http://stackoverflow.com/q/25522003
tag name: youtube
tags question: http://stackoverflow.com/q/25497471
tags question: http://stackoverflow.com/q/25475704
tags question: http://stackoverflow.com/q/25521084
tags question: http://stackoverflow.com/q/25474163
tags question: http://stackoverflow.com/q/25432998
tags question: http://stackoverflow.com/q/25395182

http://stackoverflow.com/comment/39872704
type: AnswerComment
has text: $('#abc').change(function() {$(this).val('saab');}); --- this is perfect! but is there a way I can dynamically identify 'saab' instead of using the literal?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25537222

http://stackoverflow.com/q/25514761
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/39831359
tagged with: jquery
has comment: http://stackoverflow.com/comment/39831497
linked to: http://stackoverflow.com/q/170986
accepted answer: http://stackoverflow.com/a/25514846
type: Question
score: 0
has title: populate dropdown with json response data for currency
has answer: http://stackoverflow.com/a/25514835
has answer: http://stackoverflow.com/a/25514882
has answer: http://stackoverflow.com/a/25514867
has body: i have json data, i want to populate this values into select-box.. I tried(FIDDLE) below code but its NOT populating drop-down, please help me. var obj= { "AED": "United Arab Emirates Dirham", "AFN": "Afghan Afghani", "ALL": "Albanian Lek", "AMD": "Armenian Dram", "XOF": "CFA Franc BCEAO", "XPF": "CFP Franc", "YER": "Yemeni Rial", "ZAR": "South African Rand", "ZMK": "Zambian Kwacha (pre-2013)", "ZMW": "Zambian Kwacha", "ZWL": "Zimbabwean Dollar" }; for(var i=0;i&lt;obj.length;i++) { var option=$('&lt;option&gt;&lt;/option&gt;').text(obj.[i]); $('select').append(option); } html &lt;select&gt;&lt;/select&gt;
has answer: http://stackoverflow.com/a/25514846
possible better answer: http://stackoverflow.com/a/25514835
tagged with: http://stackoverflow.com/tag/json
answer count: 4
has comment: http://stackoverflow.com/comment/39831305

http://stackoverflow.com/a/25435952
accepted answer of: http://stackoverflow.com/q/25435844
type: Answer
answers question: http://stackoverflow.com/q/25435844
score: 1
upvote count: 1
has body: It's much easier to make PHP do this instead of JavaScript. $map = array( "2014" =&gt; "", "2015" =&gt; "", "2016" =&gt; "", "-" =&gt; " ", "ú" =&gt; "u" ); $data = '2014-08-28'; $data = str_replace(array_keys($map), array_values($map), $data);
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25482705
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25486383
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25486383
tagged with: cordova
has title: How to store preference in HTML5/Jquery and Cordova/PhoneGap?
type: Question
type: AnsweredQuestion
has body: We develop mobile app utilising HTML5/JQuery and Cordova/PhoneGap. We have an HTML page for handling "site preference" ie Australia, India, Pakistan etc etc. We would like to store that (per device basis). What is the best way to store this? We know that HTML5 has "localstorage" but doesn't mean the life of this data is only stored when the webkit application running. So if the application is off means that the device will lost the information that being stored. Is that right? We want to have a simple like Cookies concept in the browser that we can just drop and read from there. But obviosually won't work if we ported to Cordova/PhoneGap. Any ideas how to store this? Thanks
has comment: http://stackoverflow.com/comment/39771207

http://stackoverflow.com/q/25488939
has comment: http://stackoverflow.com/comment/39782679
has comment: http://stackoverflow.com/comment/39782484
has comment: http://stackoverflow.com/comment/39783339
has title: Pre-load images before DOM
has comment: http://stackoverflow.com/comment/39783563
tagged with: image
has comment: http://stackoverflow.com/comment/39783944
has comment: http://stackoverflow.com/comment/39783001
type: Question
tagged with: javascript
has body: I'm having some difficulties making a "pre-load" script/css ecc... to load a background image before anything else. I need this trick, because the background image is a gradient starting from white and the background color is a grey one. Anybody can help me ? I tryed few methods ( css background, javascript onload ecc... ) CODE: in head &lt;script type="text/javascript"&gt; function preloadMyImages() { var imageList = [ "IMAGE.jpg" ]; for(var i = 0; i &lt; imageList.length; i++ ) { var imageObject = new Image(); imageObject.src = imageList[i]; } }&lt;/script&gt; body &lt;body onload="preloadMyImages();"&gt; css #(id of element) { background:url("IMAGE.jpg") repeat-x top #c5c5c5;}
score: 0
linked to: http://stackoverflow.com/q/13138593
has comment: http://stackoverflow.com/comment/39782456
tagged with: preload
has comment: http://stackoverflow.com/comment/39783036
linked to: http://stackoverflow.com/q/819336
duplicate of: http://stackoverflow.com/q/13138593
answer count: 0
type: UnansweredQuestion
tagged with: css

http://stackoverflow.com/q/25494016
linked to: http://stackoverflow.com/q/6476360
has comment: http://stackoverflow.com/comment/39793372
has comment: http://stackoverflow.com/comment/39792547
tagged with: css
has comment: http://stackoverflow.com/comment/39792523
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39793395
has comment: http://stackoverflow.com/comment/39792444
has answer: http://stackoverflow.com/a/25495524
tagged with: javascript
tagged with: jquery
tagged with: z-index
has comment: http://stackoverflow.com/comment/39793809
has comment: http://stackoverflow.com/comment/39793181
has comment: http://stackoverflow.com/comment/39792610
has comment: http://stackoverflow.com/comment/39793559
has comment: http://stackoverflow.com/comment/39794133
score: 0
has comment: http://stackoverflow.com/comment/39793029
has title: What is wrong with this statement?
has comment: http://stackoverflow.com/comment/39792551
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39793131
has comment: http://stackoverflow.com/comment/39793517
has comment: http://stackoverflow.com/comment/39793254
has comment: http://stackoverflow.com/comment/39792583
has comment: http://stackoverflow.com/comment/39793644
has comment: http://stackoverflow.com/comment/39793308
has comment: http://stackoverflow.com/comment/39792472
accepted answer: http://stackoverflow.com/a/25495524
has body: I have several images I am manipulating in an animation with CSS via jQuery. All but one of the basic manipulations is having obvious effect; however, jQuery('#' + sites[index].replace('.', '') + 'raw').css('z-index', size); does not seem to have ever set the z-index on them; Chrome's Inspect Element pulls CSS, including absolute positioning and top and left placements, but besides objects with a higher size sometimes appearing behind objects with a lower size, Chrome does not see a z-index on that object, ever. I've run into a couple of subtleties; some positioning is needed, for which absolute positioning looks sufficient. If I examine: jQuery('#' + sites[index].replace('.', '') + 'raw').length then that has length 1, as would be expected. What else do I need to do to get a z-index CSS assignment via jQuery? Thanks,
has comment: http://stackoverflow.com/comment/39793182

http://stackoverflow.com/comment/39876259
type: QuestionComment
has text: @PrabowoMurti - If you please read both the questions you will understand that the code is same but the question is different.
type: Comment
comment on: http://stackoverflow.com/q/25539437
score: 0

http://stackoverflow.com/q/25473509
type: Question
answer count: 2
has title: Splitting text and wrapping each of the words in elements in jQuery
tagged with: javascript
tagged with: jquery
has body: PS: Updated Fiddle Here's a fiddle that wraps text in elements Here's a fiddle trying to split text using commas as delimiters and wrap each of the words in . Would anyone please tell me why it gives me Uncaught TypeError: undefined is not a function in the foreach loop? I want the output to be Text that needs to be wrapped. not this Wrap Code: $('button').click(function(){ var wrap_it = $(this).closest('td').contents().eq(0).text(); wrap_it = wrap_it.split(','); console.log(wrap_it); $.each(wrap_it,function(i,k){ k.wrap(''); }) }); HTML: 1 Text,that, needs, to, be, wrapped.not this Wrap 2 Text, that, needs, to, be, wrapped.not this Wrap
has answer: http://stackoverflow.com/a/25473861
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25473950
has answer: http://stackoverflow.com/a/25473950
accepted answer: http://stackoverflow.com/a/25473861
type: AnsweredQuestion

http://stackoverflow.com/comment/57976218
comment on: http://stackoverflow.com/a/25501177
has text: @DavidBožjak what is isBlank referring to?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39651126
type: QuestionComment
type: Comment
has text: Actually `$(document).ready()` will be called automatically on body load event. You do not need to setup `$newfunc()`. I think you need to study jQuery/javascript basics a little more.
comment on: http://stackoverflow.com/q/25417998
score: 0

http://stackoverflow.com/q/25502298
accepted answer: http://stackoverflow.com/a/25625427
answer count: 1
tagged with: mapbox
has title: place markers on a map mapbox
type: AnsweredQuestion
has body: What's the best why to fill "myStringArray" from a database? the backend is written in ruby, but I only need the javascript code. $(document).ready(function() { L.mapbox.accessToken = 'pk.eyJ1Ijoiam9zZWYiLCJhIjoib0txbTZwayJ9._0pgdWasmRTVGHE6jY5bvg'; var map = L.mapbox.map('map', 'josef.japp8062') .setView([59.3329, 18.0513], 5); var markers = L.layerGroup().addTo(map); function test(){ if(markers){ markers.clearLayers(); } var myStringArray = [{lon:59.3329, lat: 18.0513},{lon:59.3329, lat: 18.113}]; var arrayLength = myStringArray.length; for (var i = 0; i &lt; arrayLength; i++) { var lon = myStringArray[i].lon; var lat = myStringArray[i].lat; var latlng = L.latLng(lon,lat); var marker = L.marker(latlng, { icon: L.mapbox.marker.icon({ 'marker-color': '#ffffff', 'marker-size': 'large' }) }) .bindPopup('coffe &lt;br&gt;&lt;img src="../josef.jpg" alt="josef" width="96" height="48" /&gt;') .addTo(markers); } } });
has answer: http://stackoverflow.com/a/25625427
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39684381
has text: What happens when you do `sources: function(SourceService) {`
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25435794

http://stackoverflow.com/comment/39878426
type: Comment
type: AnswerComment
has text: Can you help me with one more? Im trying to strip all html tags except those that are any word, any suggestions?
score: 0
comment on: http://stackoverflow.com/a/25540269

http://stackoverflow.com/comment/39765908
comment on: http://stackoverflow.com/a/25479692
type: AnswerComment
type: Comment
score: 0
has text: @Ravi As I said, it is different. This is covered by the "filter" condition in the command. See the linked manual page for all of the details.

http://stackoverflow.com/comment/39840742
score: 0
has text: you need to create a small javascript function which will update your array in the session and will add the id of checked box and once the page is loading you need to check in the loop whether the loop checkbox id is there in session or not if its there you can show it checked.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25520116

http://stackoverflow.com/comment/39780410
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25487482
type: Comment
has text: id="datetimepicker" this is you ID... So hopefully your code must work. Have you added this inside $(document).ready(function(){});

http://stackoverflow.com/comment/39632516
type: Comment
comment on: http://stackoverflow.com/q/25407487
score: 0
type: QuestionComment
has text: The problem is in IE11.

http://stackoverflow.com/q/25506285
has comment: http://stackoverflow.com/comment/39860787
has comment: http://stackoverflow.com/comment/45165624
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39874875
has comment: http://stackoverflow.com/comment/39826004
has comment: http://stackoverflow.com/comment/39825856
type: Question
tagged with: javascript
tagged with: google-apps-script
score: 0
has comment: http://stackoverflow.com/comment/39826145
has title: Error when returning an array from google script to a function in website
has comment: http://stackoverflow.com/comment/39929830
answer count: 1
has body: When update is called it runs a script called update as you can see here in the following code snipits: within the HTML: function updDate(date){ console.log("update called"); google.script.run.withSuccessHandler(myReturnFunction).updDate(date); //Crossover.libTest(); console.log("crossover should have been called"); } function myReturnFunction(garbage){ console.log("Returned: "+ garbage); /*for (var i = 0; i &lt; whatGotReturned.length; i++) { document.getElementById("field_"+[i]).innerHTML = whatGotReturned[i]; }*/ } Within the Google Script: function updDate(date){ var searchString = date; var s2 = SpreadsheetApp.openById("0AnDrS3YbyWoLdC15aktnMTluUkQ3dWhNTFlyQXBPOFE"); var data = s2.getActiveSheet().getDataRange().getValues(); var k; for (var i in data) { for (var j in data[i]) { if (i !=0){ if(data[i][j] != ""){ if(j == 4){ var ssDate = Utilities.formatDate(data[i][j], "GMT", "MM/dd/yyyy"); if(date == ssDate){ k= i var p = data[i].length }//conclude if }//conclude if (j==4) }//conclude if(data[i][j] != "") }//conclude if (data[i][j] != "") } //conclude for (var j in data[i]) }//conclude for (var i in data) //Logger.log("K is: "+k) var valuesToSnd = new Array(); var q = 1 while (q &lt;= p){ //if(data[k][q] !=""){ valuesToSnd[q] = data[k][q]; //document.getElementById("field_"+[q]).innerHTML = data[k][q]; //} q++ } Logger.log("Values to Send: "+valuesToSnd); return valuesToSnd; } The google script will log the array like it should: [14-08-26 08:47:03:950 EDT] Values to Send: ,BABS only at AFM,,BABS,Fri Aug 08 2014 00:00:00 GMT-0400 (EDT),No Unload Necissary,https://docs.google.com/forms/d/1yBiXtjTpXs85BNs5Lsj0zGQtDtxghm6-e2lRebB4saw/viewform?edit=ChM1NzYwNDkwNTY0Nzg2NjY5MTI4EJKj-OTR3ejNhwE,,https://docs.google.com/document/d/15f2HjJjNTxjlLZOkB2BOe8nY9ZlImmaAaSSnhViAa4I/edit,,Thu Aug 07 2014 15:30:00 GMT-0400 (EDT),Sat Dec 30 1899 14:30:00 GMT-0500 (EST),Sat Dec 30 1899 15:00:00 GMT-0500 (EST),Sat Dec 30 1899 18:45:00 GMT-0500 (EST),5 Ton 35 ,No,No,,,,,All Singers,…
has comment: http://stackoverflow.com/comment/39855657
has answer: http://stackoverflow.com/a/35413147
has comment: http://stackoverflow.com/comment/39863667

http://stackoverflow.com/comment/39636604
has text: Works fine for me: http://codepen.io/BrianGenisio/pen/LaeyB
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25410303
score: 0

http://stackoverflow.com/q/25491274
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/25491316
tagged with: javascript
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
downvote count: 0
has body: I'm trying to create a curtain Opening &amp; Closing effect. But for some reason I can't make my curtains close once they're opened. Here's what I have so far: http://jsfiddle.net/ssc3z1tf/ I've tried quite a few different ways, adding and removing classes, toggling classes and here I've used rels. $(document).ready(function () { $('.curtain').click(function(){ if ($('.curtain').attr('rel', 'open')){ $('.curtainLeft').animate({"left":"-400px"}, "slow"); $('.curtainRight').animate({"right":"-400px"}, "slow"); $('.curtain').attr('rel', 'closed'); } else if ($('.curtain').attr('rel', 'closed')){ $('.curtainLeft').animate({"left":"-0px"}, "slow"); $('.curtainRight').animate({"right":"-0px"}, "slow"); $('.curtain').attr('rel', 'open'); } }); }); Any help would be great! I'm lost! Thanks!!
has comment: http://stackoverflow.com/comment/39787106
type: Question
has title: jQuery - Different function on second click
score: 1
accepted answer: http://stackoverflow.com/a/25491316

http://stackoverflow.com/a/25392894
accepted answer of: http://stackoverflow.com/q/25392608
answers question: http://stackoverflow.com/q/25392608
score: 0
has body: I don't see the issue on my computer (chrome &amp; mac) but I have a likely guess. My guess is that this is caused by something similar to layout thrashing. It is super gross to be adding / removing the class even if it isn't changing state. Since you are reading the offset from the DOM, and then setting a class / removing a class on every scroll tick (tons of times a second), this would be a likely cause of flicker.
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25433288
has answer: http://stackoverflow.com/a/25433589
score: 0
answer count: 1
has body: I am making a web app that connects to clusters, so 99% of the time, my URLs will be something like: /cluster/cluster_name/something/else. Since the routes are dynamic, I need to generate ng-href dynamically in my navigation bar. Right now, I have a service that parses the URL and pass that to the index template: app.factory('GetCluster',function($location) { return { cluster: {name: $location.path().split('/')[2]} }; }); Then in the navigation controller I have this: function NavigationController($scope, $location, GetCluster) { $scope.cluster = GetCluster.cluster.name; $scope.isActive = function (viewLocation) { return viewLocation === $location.path() } and finally in the template: Home Cluster Nodes Namespaces Views Tasks Home This works, but if I switch to another cluster, the ng-href still point to the old ones. I have to refresh the page in my browser for the right links to appear. I have tried wrapping the service's return into a $rootScope.$apply() but that didn't work. It error'd with something like $digest already in progress. How can I resolve this? Thank you,
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39679226
type: Question
has title: Template is not updating, do I need to use $rootScope.$apply or something else?
tagged with: javascript

http://stackoverflow.com/q/25418818
tagged with: javascript
has comment: http://stackoverflow.com/comment/39652343
tagged with: jquery
has title: What is the use of "jsonValidateReturn"?
downvote count: 1
has body: I have tried to search for this inside jQuery and it's official websites but cant seem to get a tangible reasoning on this thingi... Am using validationEngine.js and while browsing though codes, I came accross this line: errorNumber = data.jsonValidateReturn.length under success in the else close: success: function(data){ if(data == "true"){ // EVERYTING IS FINE, SHOW SUCCESS MESSAGE $(caller).css("opacity",1) $(caller).animate({opacity: 0, height: 0}, function(){ $(caller).css("display","none") $(caller).before("&lt;div class='ajaxSubmit'&gt;"+$.validationEngine.settings.ajaxSubmitMessage+"&lt;/div&gt;") $.validationEngine.closePrompt(".formError",true) $(".ajaxSubmit").show("slow") if ($.validationEngine.settings.success){ // AJAX SUCCESS, STOP THE LOCATION UPDATE $.validationEngine.settings.success &amp;&amp; $.validationEngine.settings.success(); return false; } }) }else{ // HOUSTON WE GOT A PROBLEM (SOMETING IS NOT VALIDATING) data = eval( "("+data+")"); ////////////////////////////////////////////////////////////////////////////////////// errorNumber = data.jsonValidateReturn.length //THIS IS THE WHAT AM TALKING ABOUT ////////////////////////////////////////////////////////////////////////////////////// for(index=0; index&lt;errorNumber; index++){ fieldId = data.jsonValidateReturn[index][0]; promptError = data.jsonValidateReturn[index][1]; type = data.jsonValidateReturn[index][2]; $.validationEngine.buildPrompt(fieldId,promptError,type); } I tried to google though and found the line repeated in several other different types of scripts.... It might be use full in my new projects but I would like to know what is it's exact use... is it part of Query Ajax or is it just a form of validation? Thank you
favorite count: 0
type: UnansweredQuestion
answer count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 2
tagged with: jquery-validation-engine

http://stackoverflow.com/a/25439179
answers question: http://stackoverflow.com/q/25438678
type: Answer
has body: I don't know how jQuery assigns onerror, but I'm successfully getting / handling an error when the MIME type doesn't match. JSFiddle example. If you still can't get it to work, my next suggestion is to send an AJAX request and attempt to retrieve the MIME type. I'm pretty sure it won't work if you are hotlinking, though. You could do something like: var url = document.getElementsByTagName('img')[0].src var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.send(null); console.log(xhr.getAllResponseHeaders()); //or console.log(xhr.getResponseHeader("content-type"));
accepted answer of: http://stackoverflow.com/q/25438678
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39859921
comment on: http://stackoverflow.com/q/25529678
score: 0
has text: Sorry I'm very new to this... I run the file locally which opens in my browser. It displays the table but isn't working correctly.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39612924
comment on: http://stackoverflow.com/q/25390467
score: 0
type: QuestionComment
type: Comment
has text: So what is the alternative? and why is the one with jQuery opening properly??

http://stackoverflow.com/comment/39626863
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25405214
has text: yes. If I put content of script into html in script tag, it works fine. But for separate js file it fails.
score: 0

http://stackoverflow.com/q/25410335
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39636543
type: Question
answer count: 2
has body: I've tried many different algorithms, but can't find on that works. So basically I'll have a matrix 1 0 1 | 4 7 0 1 | 9 1 1 3 | 3 And I'll want to get sort it so that it most resembles the identity matrix 1 0 0 0 1 0 0 0 1 So, for the previous matrix, it would return 1 0 1 | 4 1 1 3 | 3 7 0 1 | 9 Can anyone tell me a sorting function that will do this, preferably in javascript? This is what I have so far matrix.sort(function(a,b) { if (b.indexOf(1)!=-1) { var index = a.indexOf(1)-b.indexOf(1) if (index!==0) return index else { return b.indexOf(0) - a.indexOf(0) } } else { return 0 } }) A few more examples 3 1 -2 | 2 1 -2 1 | 3 2 -1 -3 | 3 would turn into 1 -2 1 | 3 3 1 -2 | 2 2 -1 -3 | 3 and 3 1 -2 | -7 2 2 1 | 9 -1 -1 3 | 6 would turn into -1 -1 3 | 6 3 1 -2 | -7 2 2 1 | 9
tagged with: matrix
tagged with: arrays
downvote count: 0
tagged with: sorting
has comment: http://stackoverflow.com/comment/39637538
favorite count: 0
has comment: http://stackoverflow.com/comment/39637243
has answer: http://stackoverflow.com/a/25410708
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25412751
has title: How do I sort an array of arrays to make it the most like an identity matrix?

http://stackoverflow.com/comment/39837936
has text: It will overlaps see the DEMO given
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25507465
type: Comment

http://stackoverflow.com/q/25435998
favorite count: 0
has body: I am integrating SimpleCart.js (http://simplecartjs.org/) into a small project. I wanted to see if it is possible to actually add the shipping information to the SimpleCart Object. I get the shipping information from an existing user account, and it contains: shipId, ship_first, ship_last, ship_street, ship_city, ship_state, ship_zip, ship_phone I have seen in the documentation that I can extend the SimpleCart.js object (http://simplecartjs.org/documentation/simplecart-extend). So currently I am doing it like this: In my HTML markup : &lt;a href="#" onclick="setShipping(&lt;?php echo $address['id'] . ", '" . $address['ship_first'] [...] ?&gt;Set Address&lt;/a&gt; My javascript looks like this: &lt;script&gt; function setShipping(shipId, ship_first [...]) { var shippingInfo = { shipId: shipId, ship_first: ship_first, [...] }; simpleCart.extend(simpleCart, shippingInfo); // do some more stuff like updating the checkout button and tax rate } &lt;/script&gt; This code works on this page, however when I browse to another page the shipping properties appear to have gotten lost. I basically check on every page if the shipping has been set or not, and if it hasn't, I display the link to set the shipping address. How would I extend the object "permanently" ?
has comment: http://stackoverflow.com/comment/40044334
tagged with: simplecart
has comment: http://stackoverflow.com/comment/40048679
has answer: http://stackoverflow.com/a/25641100
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40031334
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40046001
has title: SimpleCart.js - add shipping information to object
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery

http://stackoverflow.com/comment/39881241
has text: I think you can arrange data in your backend. tell me your listTransactions type
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25541907

http://stackoverflow.com/comment/101937980
comment on: http://stackoverflow.com/a/57239082
type: AnswerComment
type: Comment
has text: Is there some way to avoid being prompted before each save?
score: 1

http://stackoverflow.com/comment/39742957
has text: Then I guess I'll make it official.
type: Comment
comment on: http://stackoverflow.com/q/25403164
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39861100
comment on: http://stackoverflow.com/q/25531276
type: QuestionComment
type: Comment
score: 2
has text: Calling the constructor function of the RegExp object, as follows: var re = new RegExp("\\d"); new RegExp(re); Using the constructor function provides runtime compilation of the regular expression. Use the constructor function when you know the regular expression pattern will be changing, or you don't know the pattern and are getting it from another source, such as user input. Read more here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions?redirectlocale=en-US&redirectslug=Core_JavaScript_1.5_Guide%2FRegular_Expressions#Advanced_Searching_With_Flags

http://stackoverflow.com/comment/39671540
has text: I have updated the code in the question with yours now. There is no other call to that jquery function and there is no other function of the same name anywhere else in my code. The page still refreshing on submit with nothing else happening
comment on: http://stackoverflow.com/a/25428745
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25447314
answers question: http://stackoverflow.com/q/25447046
type: Answer
score: 0
has body: Array Chunking //Copyright 2009 Nicholas C. Zakas. All rights reserved. //MIT Licensed function timedChunk(items, process, context, callback){ var todo = items.concat(); //create a clone of the original setTimeout(function(){ var start = +new Date(); do { process.call(context, todo.shift()); } while (todo.length &gt; 0 &amp;&amp; (+new Date() - start &lt; 50)); if (todo.length &gt; 0){ setTimeout(arguments.callee, 25); } else { callback(items); } }, 25); } This is the reference site link(http://www.nczonline.net/blog/2009/08/11/timed-array-processing-in-javascript/) where this js method is available. Also refer this link http://snipplr.com/view/46331/process-large-array/ for timed array processing

http://stackoverflow.com/comment/39715724
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25453040
has text: Yes it is possible to have a common function, but please define "_with the right content_". Where is this content taken from? The previous row?
score: 0

http://stackoverflow.com/a/25484381
type: Answer
has comment: http://stackoverflow.com/comment/39773594
has comment: http://stackoverflow.com/comment/39773851
has comment: http://stackoverflow.com/comment/39773593
answers question: http://stackoverflow.com/q/25484310
has body: To check if the attribute exists, just use find on your object called "t" and look for any div. If you find something, attribute length will be > 0: if(t.find("div").length &gt; 0) { //do something } If you want to trigger your code before the selection is over you need to use an event that triggers before like mousedown. $(document).on("mouseup", function() { var t = window.getSelection(); if(t.length &gt; 0) { //This should catch the problem when there is nothing selected var obj = t.find("div[class=xy]"); if(obj.length &gt; 0) { //my div with class xy was found! //do something } } });
score: 0

http://stackoverflow.com/comment/128753568
score: 0
comment on: http://stackoverflow.com/a/25452722
type: Comment
type: AnswerComment
has text: How can you set this to pure JS?

http://stackoverflow.com/a/25513275
score: 1
answers question: http://stackoverflow.com/q/25512555
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25512555
has comment: http://stackoverflow.com/comment/39861935
has body: Assuming that you are using this datetimepicker, try specifying the min and max dates as string: // assuming default value for // formatDate which is Y/m/d minDate: '2014/11/01' maxDate: '2014/12/31'
has comment: http://stackoverflow.com/comment/39861928
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25394144
has answer: http://stackoverflow.com/a/25394462
has comment: http://stackoverflow.com/comment/39606631
tagged with: loops
type: Question
has comment: http://stackoverflow.com/comment/39606767
tagged with: for-loop
has comment: http://stackoverflow.com/comment/39606696
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39606593
has body: I am trying to run eval functions within nested for loops. For example, in the code below, to get item2.length, item2[x].create() must be run with the eval. The create is a custom functionality that I have written in. It works when I test in console. I know that there is alot of stigma associated with using eval. But please disregard that for this case. I just want to know why the evals are not working within nested for loops. When I run the code, it throws me an error that it cannot get the length of item2[x]. But when I test out the length of item2[x] in console, it gives me the correct length. Why is my code not running properly? It seems that the nested loops are run before the first eval is finished. Please advise. for (var x = 0; x &lt; item1.length; x++) { eval("item2[x].create()"); for (var y = 0; y &lt; item2[x].length; y++) { eval("item3[x][y].create()"); for (var z = 0; z &lt; item3[x][y].length; z++) { eval("item4[x][y][z].create()"); } } }
score: 0
has comment: http://stackoverflow.com/comment/39606671
tagged with: eval
has comment: http://stackoverflow.com/comment/39606555
has comment: http://stackoverflow.com/comment/39606759
has title: Running Eval within Nested For Loops
type: UnansweredQuestion

http://stackoverflow.com/q/25527380
tagged with: mobile
has comment: http://stackoverflow.com/comment/39855174
tagged with: jquery-mobile
answer count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39855038
type: Question
has title: how to prevent window.loacation.reload() to execute before $.mobile.back() in Jquery Mobile
has comment: http://stackoverflow.com/comment/39855224
score: 0
has body: I was using following code to go back to previous page in using javascript . Script var posting = $.post(url, { im_user: user, im_password:password }).done(function (data) { $.mobile.back(); //window.history.back(); window.location.reload(true); }); So if I get positive response from the $_post method then I was first closing Mobile Jquery page using $.mobile.back() or window.history.back() and then reloading the page using window.loacation.reload(). The problem I am facing is window.location.reload(true) executes before $mobile.back() or window.history.back(). How can I serialize this so that first the page goes back and then the page loads . Note:I do not want to user delay because Its a login page delay will not look good :). To clarify it better If I use following code with the delay it works fine UPDATE var posting = $.post(url, { im_user: user, im_password:password }).done(function (data) { // alert(data); $.mobile.back(); //window.history.back(); setTimeout( function(){ window.location.reload(true); },1000); });
has comment: http://stackoverflow.com/comment/39854954
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39854542
linked to: http://stackoverflow.com/q/25209407

utc
tags question: http://stackoverflow.com/q/25491105
tags question: http://stackoverflow.com/q/25415176
tag name: utc
type: Tag

http://stackoverflow.com/comment/39827246
has text: This is correct and when I can get this to work as a banner correctly. However, I can't get it to work with my javascript (see jsfiddle in question).
type: Comment
comment on: http://stackoverflow.com/a/25512292
type: AnswerComment
score: 0

http://stackoverflow.com/a/25439108
answers question: http://stackoverflow.com/q/25439045
type: Answer
score: 0
has body: substitude ([^,]+),([^,]+,) to \1:\2 apply it once, globally. it has to be applied once. otherwise every but the last one , will becomes :.
has comment: http://stackoverflow.com/comment/39694999

http://stackoverflow.com/q/25412423
upvote count: 1
type: Question
has body: I have existing code that uses the new gapi javascript library. From there, I can get the access token with gapi.auth.getToken() . Is it possible to use that access token when making calls with the older Google Data JS library? Specifically, I need to access the Google contacts list of the user using the older Google Data JS library (the new gapi library doesn't support the Contacts API).
tagged with: gdata
tagged with: javascript
tagged with: google-api-js-client
has title: using the access_token from gapi with older google data js library
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: google-contacts-api
answer count: 0
score: 1

http://stackoverflow.com/comment/39613602
comment on: http://stackoverflow.com/q/25398005
score: 0
type: Comment
type: QuestionComment
has text: did u added **`Jquery library`**??

http://stackoverflow.com/comment/39598673
type: QuestionComment
type: Comment
has text: @Diodeus but media queries for what? the phone could report a huge device width which would result in a desktop or tablet design showing on a phone
score: 0
comment on: http://stackoverflow.com/q/25390022

http://stackoverflow.com/comment/39850590
comment on: http://stackoverflow.com/q/25423440
has text: Hi i have solved this. I have changed document.getElementById('divisor').style.width = tempX this to jQuery("#divisor").css('width', tempX); and now it is working fine.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39701641
has text: @V31 I working in a server on Openshift. Wildfly 8.1-Final
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25438418

http://stackoverflow.com/comment/39703448
has text: Please try to explain a little better what you want. i.E. "move out of the whole area." - what do you mean by 'whole area'?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25442869
score: 0

http://stackoverflow.com/comment/39617416
score: 0
type: QuestionComment
type: Comment
has text: You want to do this via AJAX I guess? What have you tried?
comment on: http://stackoverflow.com/q/25400212

http://stackoverflow.com/comment/39611757
has text: I generally avoid mucking around with `this` in html stuff in angular, as most angular expressions end up getting attached to $scope at some point or another (so `item = this` may well end up interpreted as `scope.item = scope.this`, which isn't really what you want). Personally, I would tend toward setting up the mySize and other variables in a controller; it looks like you're getting the data in async anyway, so $http.get(/* data */).then(function(data){ $scope.mySizes = stuff; $scope.items = parseThatData(data);}) and so on.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25396764

http://stackoverflow.com/q/25517398
has title: Turn based input from clients using Socket.io
tagged with: socket.io
has body: Hi guys I have a small problem here. I am using Socket.io for a turn based card game. I have an array of player objects, I can access each player's socket and use to send or receive events. I need to go through every player(socket), send them an event to tell them it is their turn, wait for them to take the turn (let's say press a button on the screen) and then on to the next player and so on. I made a couple of attempts but I know that socket.io is asynchronous and basically the loop continues to execute without actually waiting for any players to take turns. Any idea on how I could manage it? To make it more clear of what I am trying to achieve I will demonstrate my last attempts. Thank you! for(i = 0; i &lt; players.length; i++) { players[i].getSocket().emit('yourTurn'); players[i].getSocket().on('turnTaken', function(data) { //do something with the data } //the loop then goes to the next player }
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/25517439
answer count: 2
has answer: http://stackoverflow.com/a/37083585
tagged with: sockets
tagged with: asynchronous
tagged with: node.js
type: UnansweredQuestion
score: 0

http://stackoverflow.com/a/59309829
type: Answer
has body: Solution 1 - use icons with click event Use icons instead of buttons and attaching the click event to the icons. This bypasses the disabled fieldset and works like a charm. &lt;fieldset disabled='disabled'&gt; &lt;img src='/images/trash-can.png' ng-click='openModal()'/&gt; &lt;/fieldset&gt; and the javascript (using angularjs) $scope.openModal = ()=&gt;{ // do stuff }; Solution 2 - use a Bootstrap-styled span with click event Bootstrap can style a span to look exactly like a button. Spans do not use, or inherit, the disabled attribute. &lt;fieldset disabled='disabled'&gt; &lt;span class="btn btn-default" ng-click='openModal()'&gt; Button Text &lt;/span&gt; &lt;/fieldset&gt; and the javascript (using angularjs) $scope.openModal = ()=&gt;{ // do stuff };
score: 2
answers question: http://stackoverflow.com/q/25446225
downvote count: 0
upvote count: 2

http://stackoverflow.com/a/25435692
type: Answer
has body: try doing something like this with the target of the event. $('.pagination a').on('click', function(event) { event.preventDefault(); var newAmount= $(event.target).data('id'); var selectedAmount =$( ".pagination .active" ).data( "id" ); //You should be able to use replacewith or Append to figure out the rest });
score: 0
answers question: http://stackoverflow.com/q/25435528

http://stackoverflow.com/comment/39717480
type: QuestionComment
comment on: http://stackoverflow.com/q/25453798
has text: I tried putting what I have into "$('.modal').on('shown.bs.modal', function () {" but that broke the centering.
score: 0
type: Comment

http://stackoverflow.com/a/25482129
upvote count: 2
has comment: http://stackoverflow.com/comment/39770497
answers question: http://stackoverflow.com/q/25481908
has comment: http://stackoverflow.com/comment/39770574
has body: The issue is caused because the dynamicDropdown code iterates over an array with this type of syntax: for (prop in array) which includes all iterable properties of the array, not just array elements. In your case, that will include the associate method that you added to the array because it is iterable and that will cause a problem. For a reference on iterating arrays, see Right and Wrong Ways to Iterate an Array. This is a classic example for why arrays should never be iterated with the for (prop in array) syntax, but rather this for (var i = 0; i &lt; array.length; i++) or this: array.forEach() or the more modern: for (item of array) and it's also a classic example of the risk you take when you add things directly to the Array.prototype as you've done. You can work-around it as you have done by not extending the prototype of the Array object at all (the option you've already discovered). Or, you could make your new method be non-iterable by using Object.defineProperty() rather than direct assignment to the prototype (as long as you're OK with only IE9+ support) so the bad code in the dynamicDropdown library won't see your new method in its array iteration. You could use Object.defineProperty() like this to make the method be non-iterable: Object.defineProperty(Array.prototype, "associate", { writable: false, configurable: false, enumerable: false, value: function(keys) { var result = {}; this.forEach(function (el, i) { result[keys[i]] = el; }); return result; } });
score: 2
downvote count: 0
type: Answer

http://stackoverflow.com/q/25512038
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
tagged with: php
has title: Transfer of js var to php file using AJAX
has body: I have HTML5 table with each row consisting of name, address and reference number. Each row also has a button at the end that when the user clicks I need to capture the reference number as a javascript variable and send it to a php file to enable me to search my database using this unique reference. The code fragments below show what happens when the button is clicked, the process() function that sends the data, and the function that creates the xmlHttp object. The problem is that even though it captures the reference number variable successfully, it doesnt transfer it to the php file. I know the connection is ok as I have set up alerts at ready states 1,2,3,4 and 200 - all these are ok. I know also that the variable in the php file is never set by testing it with isset(). Confused and wasting lots and lots of time :( Thanks for looking. var referenceNumber; jQuery('.getrowdata').on('click', function() // called when button in html table is clicked { 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; 6) { selectedRowArray.push(value); // adds each element of the table to the array } referenceNumber = selectedRowArray[5]; // the unique ref that i need to query the dbase } ); createXmlHttpRequestObject(); // function given below process(); // function given below window.open("myphpfile.php"); /* file that will use the newly set ref number to query the dbase and display the query results */ }); function process() { xmlHttp.open("GET","myphpfile.php?phpref="+referenceNumber,true); /*transfer the js var to php var*/ xmlHttp.send(null); } function createXmlHttpRequestObject() { var xmlHttp; if(window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } else { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");// the user is using IE } return xmlHttp; } /*php code below as requested*/ echo '&lt;?xml version="1.0" encoding = "UTF-8" standalone = "yes" ?&gt;'; $phpref; $ph…
answer count: 0
has comment: http://stackoverflow.com/comment/39829374
score: 0
has comment: http://stackoverflow.com/comment/39828546
type: Question
has comment: http://stackoverflow.com/comment/39825895
has comment: http://stackoverflow.com/comment/39825969
tagged with: javascript

http://stackoverflow.com/comment/39886975
has text: *Obligatory comment about premature optimization*
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/25545883
type: Comment

http://stackoverflow.com/q/25504374
upvote count: 0
has answer: http://stackoverflow.com/a/25504444
tagged with: javascript
tagged with: web
tagged with: effects
favorite count: 0
has body: Im interested to make a loading page like the one on this site: http://www.weinbau-trummer.at Maybe the solution is to slide another image over it with some opacity?
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: -1
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39810931
accepted answer: http://stackoverflow.com/a/25504444
has title: How to use an image/logo as loader
type: AnsweredQuestion

http://stackoverflow.com/a/25460738
has comment: http://stackoverflow.com/comment/39731473
answers question: http://stackoverflow.com/q/25460655
score: 0
has body: $xy changes each time through the loop, but validateForm() isn't inside the loop, so it doesn't get the values. You should pass it as an argument. Also, since you have multiple forms with the same name, you need to pass the current form as an argument as well. Finally, a validation function should return false if the validation fails, and the onsubmit needs to return that, so that the submission will be cancelled. echo '&lt;form method="post" action="cart_update.php" name="single_block" onsubmit="return validateForm(this, \'$xy\');"&gt;'; and change the JS to: function validateForm(form, MyJSStringVar) { var x = form.product_qty.value; if (x &gt; MyJSStringVar) { alert(MyJSStringVar); return false; } }
has comment: http://stackoverflow.com/comment/39731923
type: Answer

http://stackoverflow.com/q/25392654
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39604143
linked to: http://stackoverflow.com/q/15471736
has answer: http://stackoverflow.com/a/25392898
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25392898
downvote count: 2
has title: How can I use ng-pluralize within a loop and reference the count?
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39604382
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39604198
has body: When using ng-pluralize within a loop how can I access the iterator in the count attribute? {{ i }} star This outputs: 1 star 2 star 3 star ... Instead i want: 1 star 2 stars 3 stars ...
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39604790

http://stackoverflow.com/comment/39815109
type: Comment
comment on: http://stackoverflow.com/a/25501877
has text: @AnzhariPurnomo Yes - it automatically passes the model that was just added to the collection
type: AnswerComment
score: 0

http://stackoverflow.com/a/60100832
type: Answer
score: 1
upvote count: 1
has body: The best way is replace &lt;script&gt; with other string.For example in C#use: str.replace("&lt;script&gt;","O_o"); Other options has a lot of disadvantage. 1.Block javascript: It cause some validation disabled too.those validation that done in frontend.Also after retrive from database it works again.I mean attacker can inject script as input in forms and it saved in database.after you return records from database in another page it render as script!!!! 2.render as text. In some technologies it needs third-party packages that it is risk in itself.Maybe these packages has backdoor!!!
downvote count: 0
answers question: http://stackoverflow.com/q/25397070

http://stackoverflow.com/comment/39813588
type: QuestionComment
comment on: http://stackoverflow.com/q/25505611
type: Comment
has text: Thanks, but that's not it.
score: 0

http://stackoverflow.com/a/25505394
has body: try following code, $(window).on("ready resize", function () { if (window.innerWidth &gt; 1024) { var pageTop = $("#header.header-fixed .content").outerHeight() + "px"; $("#page .topSection").css({"margin-top": "-" + pageTop, "padding-top" : pageTop}); } else { var pageTop = $("#secondHeader").outerHeight() + "px"; $("#page .topSection").css({"margin-top": "-" + pageTop, "padding-top" : pageTop}); } });
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/25505309
type: Answer
score: 2

http://stackoverflow.com/comment/39746015
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25469222
score: 0
has text: so then how should i redirect to desired page. pl post a solution

http://stackoverflow.com/a/25574660
upvote count: 1
answers question: http://stackoverflow.com/q/25475033
type: AcceptedAnswer
downvote count: 0
has body: I posted the last article you mentioned. If you need to debug async stuff, I'll be going over things like long stack traces (modules such longjohn), the try-catch module, and things like zones/domains. Hopefully those links will be of some help (might be a week before I write part 2). However, for your particular issue, have you tried setting a breakpoint at some known location and stepping through the process? This way you can just watch how the app is executed, and maybe find where some function is returning nothing when it should be returning the req/res object. If it isn't very reproducible, maybe some simple logging would be helpful.
accepted answer of: http://stackoverflow.com/q/25475033
type: Answer
score: 1

http://stackoverflow.com/a/25493787
downvote count: 0
score: 4
type: AcceptedAnswer
has body: You can use the in operator. The in operator returns true for properties in the prototype chain. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in Like: if ('join' in myArray) { ... }
accepted answer of: http://stackoverflow.com/q/25493715
type: Answer
has comment: http://stackoverflow.com/comment/39791978
answers question: http://stackoverflow.com/q/25493715
upvote count: 4

http://stackoverflow.com/comment/39654263
has text: @TechMa9iac: Hello Tech here http://plnkr.co/edit/y7BMdyRhj2WvFXq0UUud?p=preview is the plunker of the issue I have been facing.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25418403

http://stackoverflow.com/q/25457680
score: 2
tagged with: audio
has body: So I am using recorder.js to generate a blob for a wav file, an example blob looks something like this "blob:b99aada2-955c-4fcf-a0ad-da5bb377f4b2". I'm sending it to a server running django. I need some way to take this blob data, and store it on my server as a wav file. My code is based on this example here: http://webaudiodemos.appspot.com/AudioRecorder/index.html Where instead of downloading the file, I'd like to submit that file in a HTML form somehow. The download anchor looks something like this: &lt;a id="save" href="blob:14444ab4-61c1-4fa9-9b6a-83db4ea73e7e" download="myRecording02.wav"&gt; I'm very new to this side of JS, so any help would be very much appreciated. I've spent hours trying to find something that works. What I'm trying to achieve overall is have visitors to my site record a message, which is sent to my server.
has title: Have a blob for a wav file on client side, how do I send it as a wav file to the server?
type: Question
has comment: http://stackoverflow.com/comment/77471958
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: python
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: django

http://stackoverflow.com/comment/39808285
comment on: http://stackoverflow.com/q/25502521
has text: Search for "humanizing" libraries. There are a few good ones.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25465381
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25466065
score: 1
upvote count: 1
type: Question
has body: I've created a service to pass a boolean flag between controllers. Service looks like this : angular.module('MyApp') .service('sharedProperties', function () { var flag = false; return { getProperty: function () { return flag; }, setProperty: function(value) { flag = value; } }; }); First controller where flag is set is this angular.module('MyApp') .controller('test1', function($scope, $location, $http, $window, sharedProperties) { $scope.flag1 = function () { if ($location.path() == '/') { sharedProperties.setProperty(false); return false; }else { sharedProperties.setProperty(true); return true; }; }; }); And controller receiving argument is this angular.module('MyApp') .controller('test2', function($scope, $location, $http, $window, sharedProperties) { $scope.flag2 = sharedProperties.getProperty(); }); flag1 in test1 takes a correct value, but test2 is always false. If I initialize flag at service as true - it's always true at test2. If I don't initialize it - it's undefined at test2.
possible better answer: http://stackoverflow.com/a/25465953
has answer: http://stackoverflow.com/a/25465953
tagged with: javascript
tagged with: express
answer count: 2
linked to: http://stackoverflow.com/q/518000
has answer: http://stackoverflow.com/a/25466065
has title: angularjs .service doesn't work to pass variables between controllers
downvote count: 0
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/25452267
upvote count: 1
answers question: http://stackoverflow.com/q/25452119
type: Answer
has body: I think what you are looking for is the page.len() API call that will allow you at anytime to see the page length. http://datatables.net/reference/api/page.len() I believe, but am not certain, that the page event is fired when the page length is changed. http://datatables.net/reference/event/page You can write a method that listens for the page event and then finds out how many records are shown, then send that data off via AJAX to the server to be stored, or handled. Simple example: var table = $('#data-table').DataTable(); $('#data-table').on( 'page.dt', function(){ var len = table.page.len(); alert(len); //Sample Post //$.post('server.php',{len:len},function(){...}); }); EDIT I feel I should mention that the dataTables version you are using is probably not current based on the option names you included. The options changed to a more readable format fairly recently, but I believe the naming convention is still technically supported for the current version. I would update the options though to the new names in case future releases of dataTables does not support the backwards compatability.
downvote count: 0
score: 1

http://stackoverflow.com/comment/39838212
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25518690
has text: thats why i asked the question i want to find out how many vowels are in what ever a person enter into the box but i dont know where i have gone wrong
score: 0

http://stackoverflow.com/comment/39858701
comment on: http://stackoverflow.com/q/25522080
score: 0
type: Comment
type: QuestionComment
has text: I solved it with $timeout.

http://stackoverflow.com/comment/39862355
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25531868
has text: Good man! We look forward to your attempt! (also, for "easy" questions, feel free to ask the chat. No worry of downvotes there, but some of them can be impatient to people who don't listen lol)

http://stackoverflow.com/q/25541073
upvote count: 0
has body: one div and i check to the div width in jquery and same width i define in next div but width not apear in my div please help me my code is this $(document).ready(function(){ var widthRP = $('.jsPanelWidth').width(); $(window).load(function(){ $('.jsRgtPnl').css("width":"widthRP"+"px"); }) });
score: -5
has answer: http://stackoverflow.com/a/25541141
possible better answer: http://stackoverflow.com/a/25541084
has answer: http://stackoverflow.com/a/25541086
has title: My div not take the width of parents in jquery
has answer: http://stackoverflow.com/a/25541084
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25541110
has comment: http://stackoverflow.com/comment/39878795
favorite count: 0
answer count: 5
downvote count: 5
has answer: http://stackoverflow.com/a/25541127
accepted answer: http://stackoverflow.com/a/25541127
type: AnsweredQuestion

http://stackoverflow.com/comment/39670819
comment on: http://stackoverflow.com/q/25428754
has text: It doesnt care about "with $scope" or without it. But thank for try!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25472428
has comment: http://stackoverflow.com/comment/39755839
answer count: 0
has comment: http://stackoverflow.com/comment/39755118
type: Question
tagged with: backbone-routing
tagged with: javascript
score: 0
has body: I'm trying to change default root through backbone.history.start So, i'm starting with: router.js router = Backbone.Router.extend({ routes: { '' : 'home' }, home:function(){ console.log("home"); } }); app.js var app = Backbone.View.extend({ initialize: function(options) { var AppRouter = new router(); Backbone.history.start({pushState: true,root: "/home"}); } }); So, after this example, if i trigger mydomain.com/ will fire up "home" My main page is entirely served by server side. ie: mydomain.com/ after successful login, user is redirected to mydomain.com/home which should be prepared and render by client side. So, i just want set my root to mydomain/home and not mydomain/ which is default to backbone.history.start am i missing something? Backbone.history.start({pushState: true,root: "/home"}) fired up always in this two cases
has title: Backbone.history.start issue? root param produce no effect
tagged with: backbone.js
type: UnansweredQuestion

http://stackoverflow.com/a/25454636
answers question: http://stackoverflow.com/q/25454516
score: 3
upvote count: 3
downvote count: 0
has body: It looks like the live function was deprecated in 1.7, and removed in 1.9. You should use on instead. See the jQuery docs for .live() and .on()
has comment: http://stackoverflow.com/comment/39719100
has comment: http://stackoverflow.com/comment/39732274
type: Answer

http://stackoverflow.com/comment/39771017
has text: Try with `ajaxupload.js` script.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25482819
type: AnswerComment

http://stackoverflow.com/comment/39617494
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25400069
has text: _"Although when retrieve this data, the JSON-data is no longer valid(below a minor extract of json:"_ how are you retrieving the data, and are you JSON encoding it first? For instance in PHP you `echo json_encode($someData);` not sure of the asp equivalent is
score: 0

http://stackoverflow.com/a/25460852
answers question: http://stackoverflow.com/q/25460671
score: 0
type: Answer
has body: Let's write under your html this script &lt;script&gt; document.getElementById('abc2').onchange = function () { alert( 'First value: ' + document.getElementById('abc1').value + '\n' + 'Second value: ' + this.value ); } &lt;/script&gt;

http://stackoverflow.com/a/27315435
answers question: http://stackoverflow.com/q/25472254
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: As mentioned any method of file upload that uses FormData and File API stuff won't work in IE9 as they aren't available until IE10. However, two angular modules that have a fallback method that will work with IE9 for uploading files that I know of are: nervgh/angular-file-upload danielfarid/angular-file-upload: however, it requires Flash to be installed for IE9 uploads I am using nervgh/angular-file-upload as it does not require Flash.

http://stackoverflow.com/a/25491742
has comment: http://stackoverflow.com/comment/39796255
has comment: http://stackoverflow.com/comment/39790400
answers question: http://stackoverflow.com/q/25491500
has comment: http://stackoverflow.com/comment/39796608
type: Answer
has comment: http://stackoverflow.com/comment/39790514
accepted answer of: http://stackoverflow.com/q/25491500
has body: I am not sure but I think this is what you are asking for. If you give the anchor an href of the image, you can target it like this: Lightview.show($(this).attr("href")); Fiddle
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25412171
has body: I'm having two directives with same functionality like below. angular.module('ui.directives', []) .directive('uiFoo', function() { return { restrict: 'EAC', link: function($scope, element, attrs) { //to do functionality element.append("test content"); } }; }) .directive('uiFoo1', function() { return { restrict: 'EAC', link: function($scope, element, attrs) { //to do functionality element.append("test content"); } }; }); They both contain the same working like here it is appending "test content" as text to that element. Is there any chance that instead making this two directive. Can i write two names for one directive/ I can use same functionality in with optimize code. Here I'm writing same code for without any meaning. Instead of writing directive two times, is there any optimize way. I'm new in AngularJS kindly help me. Thanks in advance!
has comment: http://stackoverflow.com/comment/39640356
type: Question
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/25412284
score: 5
has comment: http://stackoverflow.com/comment/39640429
upvote count: 5
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39668391
has title: Can one directive have different names in angularjs?
has comment: http://stackoverflow.com/comment/39640335
answer count: 1
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25412284
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39640488
has comment: http://stackoverflow.com/comment/39640617

http://stackoverflow.com/comment/39703758
comment on: http://stackoverflow.com/q/25447054
score: 0
type: Comment
type: QuestionComment
has text: `$('#button').attr('title') = 'title2';` or `$('#button').prop('title', 'title2');`

http://stackoverflow.com/q/25452672
has comment: http://stackoverflow.com/comment/39714991
has answer: http://stackoverflow.com/a/25454979
tagged with: regex
has comment: http://stackoverflow.com/comment/39714948
tagged with: node.js
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/25454979
upvote count: 3
type: Question
has title: Node.js Express, router, optimal param as extension
has answer: http://stackoverflow.com/a/25452877
tagged with: javascript
tagged with: express
tagged with: routes
possible better answer: http://stackoverflow.com/a/25452877
answer count: 2
downvote count: 0
favorite count: 0
has body: My first Node.js Express app. In the routes, I'm having a route called /info, which renders an info page template. app.js: app.use('/info', info); info.js: // routes to /info, and should also handle /info.json router.get('/', function(req, res) { //... }); I also want to be able to use the same function above, to use an optimal parameter .json, to render json content instead - /info.json. I've been trying with regex but I can't get it to work. I can only manage to do: /info/.json Is it possible to do this using the same function?

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/25437372
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/25513283
tags question: http://stackoverflow.com/q/25508933

http://stackoverflow.com/comment/39810858
comment on: http://stackoverflow.com/q/25504285
has text: you will have to do something with the div chart is rendering on, like a background image or something..
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39889081
type: Comment
has text: I appreciate your answer really much!, would it be possible to access this context (I guess $(function() {}) from another function which I need to be available globally?. It's because I need to call that function from a C++ backend... =/
comment on: http://stackoverflow.com/a/25546599
type: AnswerComment
score: 0

http://stackoverflow.com/q/25471789
possible better answer: http://stackoverflow.com/a/25472010
score: 0
has title: Expressjs 4 route separation
has answer: http://stackoverflow.com/a/25472062
has body: I'm messing around with socketIO and currently I have a separate route file: //api.js var express = require('express'); var router = express.Router(); router.get('/test', function (req, res) { io.sockets.emit("change", {message: "this is a test"}); //io is NOT referenced!!! response.send(200); }); module.exports = router; where io is referenced in my server.js like so var express = require('express'); var io = require('socket.io'); var app = express(), server = require('http').createServer(app).listen(8080), io = io.listen(server); Before using socketIO I included the api routes file and prefixed all routes with /api like this: var api = require('./server/routes/api'); app.use('/api', api); Question: How can I pass the reference to socketIO io to the routes file?
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39750979
has comment: http://stackoverflow.com/comment/39750967
accepted answer: http://stackoverflow.com/a/25472062
tagged with: socket.io
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25472010
tagged with: javascript
tagged with: express

http://stackoverflow.com/q/25517803
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/25517906
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25518026
score: -1
type: Question
has body: I am trying to make a form to collect information and add it to an existing object. Any feed back would be helpful. Here is what I have so far. Thank you for taking the time to review this post. Here is the relevant information below: data = [ { name: "Mark-Paul Gosselaar", photo_url: "" }, { name: "Delta Burke", photo_url: "img/avatars/delta.png" }, { name: "Alf", photo_url: "img/avatars/alf.png" }, { name: "Jaleel White", photo_url: "img/avatars/jaleel.png" }, { name: "Ralph Macchio", photo_url: "img/avatars/ralph.png" }, { name: "Candace Cameron", photo_url: "img/avatars/candace.png" }, { name: "Patrick Duffy", photo_url: "img/avatars/pduff.png" }, { name: "Arnold Schwartzengger", photo_url: "img/avatars/arnold.png" } ]; my index page Full Name Photo URL Create
answer count: 2
has answer: http://stackoverflow.com/a/25518026
upvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25517906
has title: javaScript Collecting information from a Form
has comment: http://stackoverflow.com/comment/39837026
linked to: http://stackoverflow.com/q/3015335

dom
tags question: http://stackoverflow.com/q/25480596
type: Tag
tags question: http://stackoverflow.com/q/25516392
tags question: http://stackoverflow.com/q/25488322
tags question: http://stackoverflow.com/q/25435973
tags question: http://stackoverflow.com/q/25543221
tags question: http://stackoverflow.com/q/25404694
tags question: http://stackoverflow.com/q/25542227
tags question: http://stackoverflow.com/q/25402949
tags question: http://stackoverflow.com/q/25526982
tags question: http://stackoverflow.com/q/25443346
tags question: http://stackoverflow.com/q/25403774
tags question: http://stackoverflow.com/q/25436031
tags question: http://stackoverflow.com/q/25411617
tags question: http://stackoverflow.com/q/25522080
tags question: http://stackoverflow.com/q/25437321
tags question: http://stackoverflow.com/q/25413573
tags question: http://stackoverflow.com/q/25416075
tags question: http://stackoverflow.com/q/25472355
tags question: http://stackoverflow.com/q/25410315
tags question: http://stackoverflow.com/q/25416583
tags question: http://stackoverflow.com/q/25423854
tags question: http://stackoverflow.com/q/25460161
tags question: http://stackoverflow.com/q/25404439
tags question: http://stackoverflow.com/q/25466425
tags question: http://stackoverflow.com/q/25528226
tags question: http://stackoverflow.com/q/25477171
tags question: http://stackoverflow.com/q/25426261
tags question: http://stackoverflow.com/q/25542578
tags question: http://stackoverflow.com/q/25530520
tags question: http://stackoverflow.com/q/25455344
tags question: http://stackoverflow.com/q/25487343
tags question: http://stackoverflow.com/q/25451549
tags question: http://stackoverflow.com/q/25418379
tags question: http://stackoverflow.com/q/25496986
tags question: http://stackoverflow.com/q/25472054
tags question: http://stackoverflow.com/q/25505261
tags question: http://stackoverflow.com/q/25530659
tags question: http://stackoverflow.com/q/25448008
tags question: http://stackoverflow.com/q/25548665
tags question: http://stackoverflow.com/q/25540430
tags question: http://stackoverflow.com/q/25413838
tags question: http://stackoverflow.com/q/25421744
tags question: http://stackoverflow.com/q/25487550
tags question: http://stackoverflow.com/q/25493631
tags question: http://stackoverflow.com/q/25489887
tags question: http://stackoverflow.com/q/25424491
tags question: http://stackoverflow.com/q/25449947
tags question: http://stackoverflow.com/q/25516236
tags question: http://stackoverflow.com/q/25401391
tags question: http://stackoverflow.com/q/25407247
tags question: http://stackoverflow.com/q/25531623
tags question: http://stackoverflow.com/q/25499721
tags question: http://stackoverflow.com/q/25441401
tags question: http://stackoverflow.com/q/25468703
tags question: http://stackoverflow.com/q/25548303
tags question: http://stackoverflow.com/q/25409227
tags question: http://stackoverflow.com/q/25531668
tags question: http://stackoverflow.com/q/25422139
tag name: dom
tags question: http://stackoverflow.com/q/25412320
tags question: http://stackoverflow.com/q/25467261
tags question: http://stackoverflow.com/q/25424848
tags question: http://stackoverflow.com/q/25450237
tags question: http://stackoverflow.com/q/25424279
tags question: http://stackoverflow.com/q/25464258
tags question: http://stackoverflow.com/q/25455567
tags question: http://stackoverflow.com/q/25472324
tags question: http://stackoverflow.com/q/25500187
tags question: http://stackoverflow.com/q/25542071
tags question: http://stackoverflow.com/q/25540065
tags question: http://stackoverflow.com/q/25447675

http://stackoverflow.com/comment/39736160
score: 0
comment on: http://stackoverflow.com/q/25463653
type: Comment
type: QuestionComment
has text: @FelixKling I added full code. Could you take a look?

http://stackoverflow.com/a/25421812
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25421715
accepted answer of: http://stackoverflow.com/q/25421715
type: Answer
has body: It's not equal, "this" is different in the two circumstances. Int the first, "flip" is called as a method of "cardFrame", so in the function "this" is the object "cardFrame". In the 2nd, "this" which is passed by jQuery is the element which you attached click event to. You can read the reference about this
upvote count: 3
score: 3

http://stackoverflow.com/q/25529966
downvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/25534438
has title: Google Maps API: Bézier curve polyline wrap
favorite count: 0
tagged with: drawing
has comment: http://stackoverflow.com/comment/39864555
type: AnsweredQuestion
score: 1
tagged with: maps
type: Question
has comment: http://stackoverflow.com/comment/39859161
linked to: http://stackoverflow.com/q/5347984
has body: By using the Bezier curve polyline draw function provided by nicoabie I was able to draw a curved line from one point on the map to another. The problem is that this function does not take in to account the fact that when a point is past the maximum coordinate mark it is not necessarily on the other side of the map, since it wraps around. For example, drawing a curved line from Seattle to Tokyo. A regular polyline would go across the Pacific ocean, but the the curved line draws east across the whole globe. geodesic: true does not work in this case since the line must have a consistent curvature. My question is: can a consistently curved line be drawn that takes in to account map wrapping?
accepted answer: http://stackoverflow.com/a/25534438
tagged with: javascript
tagged with: google-maps-api-3
upvote count: 2
tagged with: google-maps

http://stackoverflow.com/a/25409511
downvote count: 0
type: AcceptedAnswer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25409431
type: Answer
answers question: http://stackoverflow.com/q/25409431
has body: Take a look at Function.prototype.apply Uinput = [5,3,2,...,7]; // the last number in the array is in position 'n' addon.myaddon.apply(null, Uinput); This is equivalent to calling: addon.myaddon(Uinput[0], Uinput[1], Uinput[2], ... , Uinput[n]); Real example using Math.max: // Basic example Math.max(1,6,3,8,4,7,3); // returns 8 // Example with any amount of arguments in an array var mySet = [1,6,3,8,4,7,3]; Math.max.apply(null, mySet); // returns 8
has comment: http://stackoverflow.com/comment/39634991
score: 3

http://stackoverflow.com/q/25549265
type: UnansweredQuestion
tagged with: android
score: -3
has body: I have this javascript code: &lt;html&gt; &lt;head&gt; &lt;script&gt; for(i=0;i&lt;6;i++) { document.write("my number is "+ i ); } &lt;/script&gt; &lt;/head&gt; &lt;/html&gt; I want to take the output of this javascript code and save in String in android. like this: my number is 0my number is 1my number is 2my number is 3my number is 4my number is 5 How can i do this in android?
upvote count: 0
tagged with: java
type: Question
has answer: http://stackoverflow.com/a/25549387
linked to: http://stackoverflow.com/q/10472839
linked to: http://stackoverflow.com/q/4325639
tagged with: javascript
has title: get output of javascript on android
downvote count: 3
answer count: 1
favorite count: 0

http://stackoverflow.com/q/25550041
has comment: http://stackoverflow.com/comment/39895528
accepted answer: http://stackoverflow.com/a/25550327
has comment: http://stackoverflow.com/comment/39895171
has comment: http://stackoverflow.com/comment/39895155
type: Question
has body: So, I've got a nice array like so: ["Mexico", "Belize", "Canada", "US"] I want to sort it north-to-south. I want: ["Canada", "US", "Mexico", "Belize"] How to do this in javascript? I have a preset of countries. I can tell Javascript "Hey, that array of countries I just gave you? Sort it Canada, US, Mexico, Belize." This is for a static graphic, won't have to be dynamic, hard-coding OK. I've got: my_array.sort() But I have no idea what to do next. Everything online seems to sort by number or alphabet. And FWIW, list of countries is just an example. In real life, I'm trying to sort sources of government funding: state, federal, trust fund, tobacco settlement. But that's a pretty abstract question. Better to use something concrete like countries, no?
linked to: http://stackoverflow.com/q/979256
tagged with: javascript
tagged with: sorting
has comment: http://stackoverflow.com/comment/39904164
score: 0
linked to: http://stackoverflow.com/q/1129216
answer count: 1
has comment: http://stackoverflow.com/comment/39895254
has comment: http://stackoverflow.com/comment/39895621
has answer: http://stackoverflow.com/a/25550327
favorite count: 0
has title: How to sort javascript array by custom criteria? Not alphabetical or numerical
has comment: http://stackoverflow.com/comment/39895162
upvote count: 2
linked to: http://stackoverflow.com/q/10906337
downvote count: 2
has comment: http://stackoverflow.com/comment/39895228
type: AnsweredQuestion

http://stackoverflow.com/q/25526308
accepted answer: http://stackoverflow.com/a/25527178
tagged with: knockout.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39851574
linked to: http://stackoverflow.com/q/10039297
tagged with: javascript
tagged with: date
has body: I have a ko.observable handling a JS Date object like so: vm.date = ko.observable(new Date()); I need a simple function that can increase or decrease the date by x days. Like so: vm.changeDay = function(x) { // I want this function to increase or decrease date by x days each time it is called. }; The problem with my current implementations have been that the vm.date observable would not update in my View. This is probably because a JS Date object is more than a simple string, and need to be broken apart and put together in a specific way in order to be observable. I tried using ko.computed to do this, but did not succeed. See jsfiddle for a simple overview of the problem: http://jsfiddle.net/tp6jb4x1/
type: Question
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25527178
possible better answer: http://stackoverflow.com/a/25526685
score: 2
has title: Knockout.js - How to modify an observable JS Date object?
has answer: http://stackoverflow.com/a/25526685
upvote count: 2
has comment: http://stackoverflow.com/comment/39862529

http://stackoverflow.com/q/25431648
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25431742
downvote count: 0
has answer: http://stackoverflow.com/a/25431915
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/25431742
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/25431915
tagged with: http://stackoverflow.com/tag/html
has title: Why innerHTML doesnt work correctly in for loop?
tagged with: asynchronous
tagged with: innerhtml
answer count: 2
upvote count: 1
has body: What is the difference of this var content= ""; for (i = 1; i <= 3; i++) { content = content + ' ' + ' Grup ' + i + ' '; for (j = 1; j <= 5; j++) { content = content + ' item ' + i + ',' + j + ' '; } content = content + ' '; } div.innerHTML = content; and this for (i = 1; i <= 3; i++) { div.innerHTML = div.innerHTML + ' ' + ' Grup ' + i + ' '; for (j = 1; j <= 5; j++) { div.innerHTML = div.innerHTML + ' item ' + i + ',' + j + ' '; } div.innerHTML = div.innerHTML + ' '; } I tried all the two ways. But the second one doesnt work as i expected. When i use div.innerHTML in for loop, the inner loop works after < /fieldset > and output is like : Grup x item 1,1 item 1,2 .... You can test the issue at http://mutlakyazilim.com/test.html. Why are they different, anybody has idea ?
has comment: http://stackoverflow.com/comment/39676413
tagged with: for-loop

http://stackoverflow.com/a/62305585
answers question: http://stackoverflow.com/q/25394677
has body: The answers above are old. Since the beginning of 2017 Chrome and Firefox both shipped WebGL2. In order to support WebGL2 they had to use the OpenGL 3.3 "core" profile or higher. The "core" profile says this E.2.1 Deprecated ... Features Wide lines - LineWidth values greater than 1.0 will generate an INVALID_VALUE error. It does matter if you only use WebGL1, the browser still still use the same system underneath. In other words, for the most part, thick lines are rarely supported on desktop at all since 2017. The OpenGL ES spec doesn't have that line so it's possible you can get thick lines on Android and iOS and similar devices but basically you should assume you can't To get thick lines you'll need to generate them from triangles
score: 0
type: Answer

http://stackoverflow.com/comment/39833059
comment on: http://stackoverflow.com/a/25515509
type: AnswerComment
score: 0
type: Comment
has text: @MadsterMaddness I just was reading that part; I'll drop you a note in a couple of minutes; just to figure out the format of output.

http://stackoverflow.com/comment/39702128
comment on: http://stackoverflow.com/a/25445644
score: 0
type: AnswerComment
type: Comment
has text: @binks...plz see updated answer..and moreover below code will create problem with dynamic data..

http://stackoverflow.com/comment/39738602
type: AnswerComment
comment on: http://stackoverflow.com/a/25462472
type: Comment
has text: Unfortunately this didn't work. The two click events makes perfect since. If I remove the custom data-confirm, a similar event takes place, the message doesn't close automatically, but if I cancel, it goes to the view as dictated by the 2nd click event vs just close out the confirmation message.
score: 0

http://stackoverflow.com/a/25504525
answers question: http://stackoverflow.com/q/25504492
has comment: http://stackoverflow.com/comment/39811656
type: Answer
score: 3
has body: Simply do like this. $('#select-all').click(function(event) { $(':checkbox').prop("checked", this.checked); }); You do not need to loop through each checkbox to check all. Demo Wrap the code in dom ready if your script is in head tag $(document).ready(function() { $('#select-all').click(function(event) { $(':checkbox').prop("checked", this.checked); }); });
has comment: http://stackoverflow.com/comment/39816568
upvote count: 3
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25504492

http://stackoverflow.com/comment/39673264
comment on: http://stackoverflow.com/q/25429115
type: Comment
type: QuestionComment
score: 1
has text: I think all dates are near each other, give or take a couple thousand years. Here's my code: `function group(dates) { return dates; }`.

http://stackoverflow.com/comment/39835838
score: 0
type: Comment
has text: is there an easy way to convert the coords before I import them? like a program to convert geojson in one type of coordinates to another type?
comment on: http://stackoverflow.com/a/25500944
type: AnswerComment

http://stackoverflow.com/comment/39878074
has text: @user2357112 it only fails when using the new keyword. Without the new keyword, no error is thrown. new keyword should return a function, after all only functions have a prototype property and a costructor pointing to the function itself.
score: 0
comment on: http://stackoverflow.com/q/25540528
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25485740
type: Answer
answers question: http://stackoverflow.com/q/25484793
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/39776282
upvote count: 0
has comment: http://stackoverflow.com/comment/39777377
has body: Simply create chart inside callback for $.ajax(), like this: $.ajax({ url: "threeG.php", cache:false, type: 'json' }).success(function(data) { $('#container').highcharts({ // some options.. series: [{ data: data }] }); }).error(function(){ alert('Error retrieving information'); });

http://stackoverflow.com/q/25516615
tagged with: popup
type: Question
has body: I'm using bpop for a nice pop up window that pops up when I click a checkbox. But I can't figure out how to also check the checkbox. I've got a fiddle here: http://jsfiddle.net/zqk3eeeo/ I figure it's code something like: if($(this).is(':checked')) but I can't figure out where to put it to get it to work. Thanks for any ideas.
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: checkbox
has title: how to click a checkbox that pops up a window AND checks the checkbox
has answer: http://stackoverflow.com/a/25516697
accepted answer: http://stackoverflow.com/a/25516697
type: AnsweredQuestion

http://stackoverflow.com/q/25425029
tagged with: javascript
has body: I have a simple entityframework poco object public partial class Location: Entity { [Key] public int Id { get; set; } public string Description { get; set; } } The baseClass Entity looks as follow public abstract class Entity : IObjectState { [NotMapped] public ObjectState ObjectState { get; set; } } I expose this object via a Odata service using the ODataConventionModelBuilder var server = GlobalConfiguration.DefaultServer; ODataModelBuilder builder = new ODataConventionModelBuilder(); builder.Namespace = "MyNameSpace.Models"; builder.EntitySet&lt;Location&gt;(typeof(Location).Name); var model = builder.GetEdmModel(); config.Routes.MapODataServiceRoute("odata", "odata", model, new DefaultODataBatchHandler(server)); config.AddODataQueryFilter(); When i consume this service with Breeze js i get an error from breeze when i try to create an entity with manager.CreateEntity(). Cannot attach an object to an EntityManager without first setting its key or setting its entityType 'AutoGeneratedKeyType' property to something other than 'None' When i query an entity and edit the data and save it. All is ok. I am using angular in combination with breeze on the client and Asp.net webapi 2 in combination with an odatacontroller on the server with EntityFramework 6 as ORM. Can someone tell me what i am doing wrong!!!
accepted answer: http://stackoverflow.com/a/25432652
answer count: 1
downvote count: 0
tagged with: odata
favorite count: 0
tagged with: angularjs
has title: Breeze js AutoGeneratedKeyType is always 'none' with ODataConventionModelBuilder
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25432652
tagged with: breeze
tagged with: entity-framework
upvote count: 3
type: Question
score: 3

history.js
tags question: http://stackoverflow.com/q/25531838
tag name: history.js
type: Tag

http://stackoverflow.com/comment/39639797
type: QuestionComment
comment on: http://stackoverflow.com/q/25408384
score: 0
type: Comment
has text: This is an excellent opportunity to take advantage of a mixin! Check out the documentation, but effectively all you need to do is take that code and make a mixin for it, and then anywhere you want to use this code, you cna import it by passing it in as a property for the extends. Give this a shot and let me know if you need a JSBIN to demonstrate it.

http://stackoverflow.com/q/25455804
downvote count: 0
score: 1
type: Question
has body: so I'm trying to insert 2 digits before the users saved info gets filled in I'm using the following code: $("#billingExpirationYear").val(userInfo.exp_year); I'd like to add "20"" before ".val(userInfo.exp_year);", any help would be appreciated. Thanks
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25455868
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/25455868
has comment: http://stackoverflow.com/comment/39721534
favorite count: 0
tagged with: google-chrome
has title: Insert value before user info
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39721375

http://stackoverflow.com/a/25390775
type: Answer
answers question: http://stackoverflow.com/q/25390488
upvote count: 1
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25390488
has body: I misread the issue, so am just starting the answer over so isn't really long. Based off of your JSFiddle, this is what I came up with: function syllCount(p) { var sylls = []; for (var i = 0; i &lt; p.length; i++) { sylls.push(p[i].match(/\d/g)); syllArray.push(sylls[i].length); count++; } } I made an example JSFiddle that is roughly based off of how yours looked. Let me know if I missed the mark again.
has comment: http://stackoverflow.com/comment/39601714
has comment: http://stackoverflow.com/comment/39601011
score: 0
has comment: http://stackoverflow.com/comment/39602204
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39600605
has comment: http://stackoverflow.com/comment/39607096

http://stackoverflow.com/a/25465994
upvote count: 1
downvote count: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25465943
has body: Something like this should do that var a = ['12.00','13.00','14.00','15.00','16.00','17.00']; var b = ['12.00','1.00pm','2.00pm','3.00pm','4.00pm','5.00pm']; function populate(e) { var val = $('#time1').find('option:selected').index(), sel = $('#time1').empty(); $.each(e.target.checked ? b : a, function(i, time) { $('&lt;option /&gt;', { value : time, text : time, prop : { selected : i === val } }).appendTo(sel); }); } $('#isCheckedFormat').on('change', populate).trigger('change') FIDDLE You're getting the values of the options, trying to reset the option etc. but you change the value when you change the option text, so that never matches. I've decided to use the index instead, which is consistent.
score: 1
answers question: http://stackoverflow.com/q/25465943

http://stackoverflow.com/q/25524954
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I have an issue with a jquery mobile 1.4.2 webapp. I have a page with 2 tables that both use the column toggle button. I want to move each of these buttons to their own placeholder to allow for horizontal scrolling. I have this working when there is one table, but I can't figure out how to specify the table id for the column toggle button, to move the button for the correct table. &lt;div id="colUnit"&gt;&lt;/div&gt; $(document).on("pageinit", "#contractDetails", function () { $(".ui-table-columntoggle-btn").appendTo("#colUnit"); }); Is there a way to specify the table id within the jquery so that the correct button is moved to &lt;div id="colUnit"&gt;&lt;/div&gt; It currently places BOTH buttons (one from each table), into &lt;div id="colUnit"&gt;&lt;/div&gt;
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25525625
accepted answer: http://stackoverflow.com/a/25525625
downvote count: 0
has title: Jquery Mobile Column Toggle append button when have multiple tables on one page
type: Question
upvote count: 2
tagged with: jquery-mobile-table
tagged with: jquery-mobile
answer count: 1

http://stackoverflow.com/comment/39836721
type: QuestionComment
comment on: http://stackoverflow.com/q/25517700
score: 0
has text: I mean to say, Php doesn't work in `.js` files
type: Comment

http://stackoverflow.com/comment/39661398
has text: @Fishbowl, no I haven't done anything yet, I'm even just trying to include the library, but it already fails there. See also my addition about Browserify above.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25423065
type: AnswerComment

http://stackoverflow.com/comment/39768482
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25481248
has text: Also related: http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-ajax-call
score: 1

http://stackoverflow.com/q/25441541
accepted answer: http://stackoverflow.com/a/25441542
tagged with: internet-explorer-11
score: 0
answer count: 1
tagged with: internet-explorer
tagged with: javascript
has answer: http://stackoverflow.com/a/25441542
type: AnsweredQuestion
tagged with: dom-events
has body: I have an old application that contains the following JavaScript code to handle a key-down event: if (event.keyCode == 13) { event.cancel = true; document.getElementById(btnId).click(); return false; } return true; What it should do is to check if the user pressed the enter key, and if so simulate a click on a button and do not execute the default action of the key-down event. This works fine in Google Chrome, Firefox and IE8. However, it does not work in IE11. How can I make this code work in IE11?
type: Question
has title: event.cancel usage in IE11

http://stackoverflow.com/comment/39602493
comment on: http://stackoverflow.com/q/25391694
type: Comment
type: QuestionComment
has text: If you just want to convert `arguments` to an array, do `this.books = Array.prototype.slice.call(arguments, 0);`.
score: 0

http://stackoverflow.com/a/25474456
upvote count: 1
score: 1
has body: The first A in AJAX stand for asynchronous, which means nothing waits on it, including window.load or document.ready. The lazy method is to make your ajax synchronous using the "async" setting in $.ajax(), but this will pause all code execution and file loading while it waits on each reply. Not good. The proper way to do this would be to use $.when(). Here is the relevant example from that page. $.when( $.ajax( "/page1.php" ), $.ajax( "/page2.php" ) ).done(function( a1, a2 ) { // a1 and a2 are arguments resolved for the page1 and page2 ajax requests, respectively. // Each argument is an array with the following structure: [ data, statusText, jqXHR ] var data = a1[ 0 ] + a2[ 0 ]; // a1[ 0 ] = "Whip", a2[ 0 ] = " It" if ( /Whip It/.test( data ) ) { alert( "We got what we came for!" ); } }); EDIT: Is this not what you're trying to do? Fire a function after all of your ajax calls have completed? $(document).ready(function () { GetCountry(); }); function GetCountry() { $("#Country").disable(); $("#ORG_ID").disable(); $.when( $.ajax({ // box 1 type: 'POST', url: '@Url.Action("GetCountry/" + ViewBag.Id.ToString(), "RequestList")', data: { Direct: isDirect }, success: function (data, textStatus, jqXHR) { if (textStatus != "success") { alert("There was an error processing your request."); return; } $.each(data, function (i, item) { $('#Country').append($('&lt;option&gt;').val(item.Id).text(item.Text)); }); }, error: function (jqXHR, textStatus, errorThrown) { alert("There was an error processing your request."); }, complete: function () { $("#Country").enable(); $("#ORG_ID").enable(); $('#Country option[value="@TempData["Country"]"]').prop('selected', true).change(); } }), $.ajax({ // box 2 type: 'POST', url: '@Url.Action("GetCountry/" + ViewBag.Id.ToString(), "RequestList")', data: { Direct: isDirect }, success: function (data, textStatus, jqXHR) { if (textStatus != "success") { alert("There was an error processing your request."); return; } $.each(data, function (i, item) …
downvote count: 0
has comment: http://stackoverflow.com/comment/39791448
answers question: http://stackoverflow.com/q/25474196
has comment: http://stackoverflow.com/comment/39759251
type: Answer
has comment: http://stackoverflow.com/comment/39793382

http://stackoverflow.com/q/25531668
has comment: http://stackoverflow.com/comment/39861902
tagged with: javascript
has comment: http://stackoverflow.com/comment/39863330
has answer: http://stackoverflow.com/a/25533223
accepted answer: http://stackoverflow.com/a/25533223
favorite count: 0
possible better answer: http://stackoverflow.com/a/27283061
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/27283061
has title: Chrome extension: content script not finding dom elements
has comment: http://stackoverflow.com/comment/39864012
downvote count: 0
has comment: http://stackoverflow.com/comment/39863683
has comment: http://stackoverflow.com/comment/39862025
type: AnsweredQuestion
has body: I'm writing a chrome extension and have the following code popup.html: &lt;script type='text/javascript' src='content.js'&gt;&lt;/script&gt; content.js: var container = document.getElementById('viewer') container.style['white-space'] = 'nowrap' var node_list = document.getElementsByClassName('page') Array.prototype.forEach.call(node_list, function(page) { page.style['display'] = 'inline-block' }) manifest.json: { "name": "horizontal_pdf", "version": "0.0.1", "manifest_version": 2, "browser_action": { "default_title": "My Title", "default_popup": "popup.html", "default_icon": { "16": "icons/16x16.jpg", "32": "icons/32x32.jpg" } } } But when I click on the icon, and look at the console, I see the error message: Uncaught TypeError: Cannot read property 'style' of null at line 2 of content.js. So, it's not able to find the div with id viewer. But when I look at the page's dom, it's there. What am I doing wrong? PS: I don't have content scripts specified in the manifest since I don't want it to get triggered automatically, but only when the user clicks on the icon.
score: 1
tagged with: dom
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39863798
upvote count: 1

http://stackoverflow.com/q/25441449
score: 0
has comment: http://stackoverflow.com/comment/39693820
has answer: http://stackoverflow.com/a/25441630
favorite count: 0
upvote count: 2
downvote count: 2
has body: here is my problem :) i try to add "Apprise-v2" plugin to my website, i include both files, css and js, this way : ........... my firebug warns me with this : TypeError: $Apprise is null if($Apprise.is(':visible')) { Thanks for help! :) EDIT : Here is the apprise-v2.js file contents : // Global Apprise variables var $Apprise = null, $overlay = null, $body = null, $window = null, $cA = null, AppriseQueue = []; // Add overlay and set opacity for cross-browser compatibility $(function() { $Apprise = $(' '); $overlay = $(' '); $body = $('body'); $window = $(window); $body.append( $overlay.css('opacity', '.94') ).append($Apprise); }); function Apprise(text, options) { // Restrict blank modals if(text===undefined || !text) { return false; } // Necessary variables var $me = this, $_inner = $(' '), $_buttons = $(' '), $_input = $(' '); // Default settings (edit these to your liking) var settings = { animation: 700, // Animation speed buttons: { confirm: { action: function() { $me.dissapear(); }, // Callback function className: null, // Custom class name(s) id: 'confirm', // Element ID text: 'Ok' // Button text } }, input: false, // input dialog override: true // Override browser navigation while Apprise is visible }; // Merge settings with options $.extend(settings, options); // Close current Apprise, exit if(text=='close') { $cA.dissapear(); return; } // If an Apprise is already open, push it to the queue if($Apprise.is(':visible')) { AppriseQueue.push({text: text, options: settings}); return; } // Width adjusting function this.adjustWidth = function() { var window_width = $window.width(), w = "20%", l = "40%"; if(window_width<=800) { w = "90%", l = "5%"; } else if(window_width <= 1400 && window_width > 800) { w = "70%", l = "15%"; } else if(window_width <= 1800 && window_width > 1400) { w = "50%", l = "25%"; } else if(window_width <= 2200 && window_width > 1800) { w = "30%", l = "35%"; } $Apprise.css('width', w).css('left', l); }; // Close function this.dissapear = functi…
tagged with: plugins
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/71135588
tagged with: ready
has comment: http://stackoverflow.com/comment/39693785
accepted answer: http://stackoverflow.com/a/25441630
has answer: http://stackoverflow.com/a/71135588
type: Question
answer count: 2
has title: Jquery Apprise Plugin not working properly
has comment: http://stackoverflow.com/comment/39693984
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39679194
has text: @MikeSmithDev `minify it on the fly` I mean putting a breakpoint and coding into Immediate window. When not minifying order is fine.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25428952

http://stackoverflow.com/q/25457871
type: Question
tagged with: jquery-masonry
has body: I've got a ton of problems surrounding the combination of Masonry and infinite scrolling in Wordpress, namely on this page. I gather getting Masonry to work with infinite scrolling requires a callback within the infinite scroll jQuery code - this seems to be well-established. However, I can only seem to get infinite scrolling working on my Wordpress site under very specific circumstances, and given those circumstances I'm not sure how to integrate Masonry. This code is borrowed from the Masonry.js website's infinite scroll demonstration and is in the footer right now: &lt;script&gt; $(function(){ var $container = $('.et_pb_blog_grid_wrapper'); $container.imagesLoaded(function(){ $container.masonry({ itemSelector: '.post', columnWidth: 100 }); }); $container.infinitescroll({ navSelector : '#nextposts', // selector for the paged navigation nextSelector : '#nextposts a', // selector for the NEXT link (to page 2) itemSelector : '.post', // selector for all items you'll retrieve loading: { finishedMsg: 'No more pages to load.', img: 'http://dearjackalope.com/juliaproblems/wp-content/themes/juliamariani/images/ajax-loader.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 ); }); } ); }); &lt;/script&gt; The problem is, even though it works in static HTML, on this page it doesn't have any effect and I have no idea why! What does work is this: &lt;script&gt; var infinite_scroll = { loading: { img: "&lt;?php echo get_stylesheet_directory_uri(); ?&gt;/images/ajax-loader.gif", msgText: "&lt;?php _e( 'Loading the next set of posts...', 'custom' ); ?&gt;", finishedMsg: "&lt;?php _e( 'All posts loaded.', 'custom' ); ?&gt;" }, "nextSelector":"#nextposts a", "navSel…
accepted answer: http://stackoverflow.com/a/25474598
tagged with: javascript
score: 0
answer count: 2
tagged with: callback
has title: Masonry callback in jQuery infinite scroll isn't working in Wordpress - and neither are infinite scroll plugins
tagged with: infinite-scroll
has answer: http://stackoverflow.com/a/25474598
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27421729
tagged with: wordpress
has answer: http://stackoverflow.com/a/27421729

http://stackoverflow.com/q/25478620
tagged with: single-sign-on
upvote count: 2
has answer: http://stackoverflow.com/a/25478790
linked to: http://stackoverflow.com/q/1087031
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39765650
score: 2
has title: Logging on to two sites simultaneously
type: Question
has comment: http://stackoverflow.com/comment/39777412
has body: I want to log on to two sites simultaneously to enable a single sign on solution. We have a smallish wiki that is created with Apple wiki and we have an intranet site on a aspx cms system by Elcom. Both use Active Directory for credentials. Currently they are on different domains, but we could enable a rewrite using our load-balancer (Citrix Netscaler) or IIS. These sites are on different servers, one a mysterious Mac system and the other an IIS v6.0 on windows 2003. Now I am almost certain that a reverse proxy set up will solve this but I really just need someone to agree that this solves this issue, and if there are things I should look out for what they might be. I just want to have an invisible log on screen in an iframe and enter clone the user name and password using javascript.
answer count: 2
has answer: http://stackoverflow.com/a/25479073
downvote count: 0
tagged with: javascript
tagged with: reverse-proxy
favorite count: 0

http://stackoverflow.com/a/25422812
downvote count: 0
has comment: http://stackoverflow.com/comment/39660869
answers question: http://stackoverflow.com/q/25422001
type: Answer
has comment: http://stackoverflow.com/comment/39661434
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25422001
has comment: http://stackoverflow.com/comment/39659532
has comment: http://stackoverflow.com/comment/39661382
score: 1
has body: repeated call of ulScrolls should something like setTimeout(function() { ulScrolls() }, 120); to prevent call stack exceeding and to give time for animation to work. checking for .scroller and .scrollerTwo CSS left value should be in ulScrolls. li width set to "45px" for testing. Fiddle So in total code should look like: var scrollerwidth = 0; $(document).ready(function() { $('.scroller ul li').each(function() { scrollerwidth += $(this).width() + 40; }); $(".scrollerTwo").css({left: scrollerwidth}); ulScrolls(); }); function ulScrolls() { var scrollertwoleft = parseInt($(".scrollerTwo").css('left')); if (scrollertwoleft &lt;= -scrollerwidth) { $(".scrollerTwo").css({left: scrollerwidth}); } else { var scrolleroneleft = parseInt($(".scroller").css('left')); if (scrolleroneleft &lt;= -scrollerwidth) { $(".scroller").css({left: scrollerwidth}); } } $(".scroller, .scrollerTwo").animate({'left': '-=10px'}, 100); setTimeout(function() { ulScrolls(); }, 120); }
has comment: http://stackoverflow.com/comment/39661582
has comment: http://stackoverflow.com/comment/39661291
type: AcceptedAnswer

http://stackoverflow.com/comment/39743911
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25452616
type: Comment
has text: The html5 history API also allows you to replace/push/pop an arbitrary JSON object along with the URL, a bit more powerful than encoding it all as a query string. But basically the same technique. It's annoying that crossfilter has basically no "getters" so you have to do all the bookkeeping yourself. dc.js does have `chart.filters` though. https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#filters-1

http://stackoverflow.com/comment/39729547
comment on: http://stackoverflow.com/a/25460116
score: 0
has text: Thanks a lot but there is one problem.. your code is changing all select, but I need to change only selects with same value.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25539755
has comment: http://stackoverflow.com/comment/39877038
score: 0
has comment: http://stackoverflow.com/comment/39876635
answer count: 1
accepted answer: http://stackoverflow.com/a/25540476
has title: page loaded by js function cant load another page using js function js html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39876652
tagged with: javascript
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: take this sample as reference it is a menu bar at top of page when the menu bar is hover it has drop down menu in the dropdown menu when i click on the menu it will load the same menu on the left and the content in the middle of the page the left menu is sort of a marker that there are other pages to see...it is the same as the submenu in the menu page..my question is why is the submenu on the left not clickable i tried alert on the button click of the submenu but it wont show my code goes like this this is the index.php <?php include ('pages/menupages.php'); ?> <?php include ('pages/footer.php'); ?> top menu menu home product computer and other devices desktop laptop mobile phones consoles submenu2 submenu.1 submenu.2 submenu.3 submenu3 submenu.1 submenu.2 submenu4 submenu5 submenu6 submenu.1 submenu.2 submenu.3 submenu7 submenu8 submenu.1 submenu.2 menu3 submenu1 submenu.1 submenu.2 submenu2 computer list desktop laptop mobile phones consoles thi is the js $('#desktop').click(function() { $('#middlecolumncontainer').load('pages/desktopcontent.php'); $('#leftcolumncontainer').load('pages/computerlist.php'); }); $('#leftdesktop').click(function() { alert("desktop"); }); when i click desktop it will load the menu list on the left side and content in the middle content.now in the left list the menu are not clicked because the alert is not showing is this not possible or i am doing it wrong
tagged with: css
tagged with: menu
has answer: http://stackoverflow.com/a/25540476

http://stackoverflow.com/comment/39667712
type: AnswerComment
has text: sorry jsfiddle link was broken
type: Comment
comment on: http://stackoverflow.com/a/25426622
score: 0

http://stackoverflow.com/a/25482116
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25482042
score: 1
has body: Query.each(images, function (k, v) { v = v.split(':'); questionAssetPath = questionAssetPath.concat(v[0]) data.questions.push({source: questionAssetPath, match: v[1], mouse: mouseAssetPath + v[2] + '.png'}); data.answers.push({answer: v[1], match: v[1]}); }); That will get rid of the need of using '+' and will solve the error See the JavaScript String concat() Method

http://stackoverflow.com/comment/39711179
type: QuestionComment
has text: ...to comprehend it, all you need to do is change your graphic to add `x 10` to the `Bar1` object, and that will reflect the entirety of what has taken place.
comment on: http://stackoverflow.com/q/25450687
score: 0
type: Comment

http://stackoverflow.com/q/25428626
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25429064
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25428802
linked to: http://stackoverflow.com/q/3710275
has title: How to define "interface" in js
has answer: http://stackoverflow.com/a/25428802
upvote count: 0
has body: Good day. My question is quite dumb, I guess, but I'm not familiar enough with the termins, to ask it properly (and to get an answer from Google). So - please help... Shortly - I'm trying to create some major class, which will be insanitated by instances, which will describe some methods, and some fields. Major logick will be implemented in parent class. So, lets say I have a parent function CRUD_Grid_model(){ //Settings part this.GridElement = "" ; this.editModeFlagElement = "" ; this.newRowElement = ""; //Save logicks all lies here. this.commit = function (){ alert("PLEASE REDEFINE COMMIT FUNCTION IN YOUR CODE"); } ; //Settings part //Some more code. } And a way I'll use it //Das modell var JobberCRUD = new CRUD_Grid_model(); JobberCRUD.GridElement = $('#jobbers_dg'); JobberCRUD.editModeFlagElement = $('#jobbers_tb_edit'); JobberCRUD.newRowElement = {jobb_name:'Enter new unique name',jobb_status:'Y'}; JobberCRUD.commit = function (){ if (this.endEditing()){ var addrows = this.GridElement.datagrid('getChanges','inserted'); var remrows = this.GridElement.datagrid('getChanges','deleted'); var updrows = this.GridElement.datagrid('getChanges','updated'); console.log(addrows); console.log(remrows); console.log(updrows); //Send changes? alert("Got total of " +addrows.length + remrows.length + updrows.length + " rows changed."); //Commit changes at local level this.GridElement.datagrid('acceptChanges'); } }; And, what I'd like to do, is smoething like this I want a parent.commit function to allow me to do this in child JobberCRUD.commit = function (apdrows,updrows,remrows){ //Send changes? alert("Got total of " +addrows.length + remrows.length + updrows.length + " rows changed."); }; So, I have no ideas what shoudl I do to achieve that. Please advice me with some tags, what it is at least :) Thanks in advance.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39671229
has answer: http://stackoverflow.com/a/25428934
has answer: http://stackoverflow.com/a/25429064
favorite count: 0
score: -1
has answer: http://stackoverflow.com/a/25429106
has comment: http://stackoverflow.com/comment/39681150
has comment: http://stackoverflow.com/comment/39670137
answer count: 4

http://stackoverflow.com/a/25452910
answers question: http://stackoverflow.com/q/25450910
has body: How about this: .introjs-bullets ul li a:after { content: attr(data-stepnumber); color:#fff; position:relative; top:-2px;left:-2px; } See the fiddle http://jsfiddle.net/ee2s3p11/1/
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39718161
upvote count: 2
has comment: http://stackoverflow.com/comment/39717407
has comment: http://stackoverflow.com/comment/42157343
has comment: http://stackoverflow.com/comment/42113311
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42155179
accepted answer of: http://stackoverflow.com/q/25450910
type: Answer

http://stackoverflow.com/q/25425587
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25425865
type: Question
has body: I need to show alert to the user and I want it to be pretty. So I use Bootstrap's alert class, and show to user div like this: Some text This code just shows a div. What I want is to darken everything, except this div (like modals in Bootstrap do). How can I do this?
tagged with: javascript
tagged with: jquery
score: 4
accepted answer: http://stackoverflow.com/a/25425865
upvote count: 4
has comment: http://stackoverflow.com/comment/39664191
has comment: http://stackoverflow.com/comment/39664676
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39664575
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39664557
has comment: http://stackoverflow.com/comment/39664123
has comment: http://stackoverflow.com/comment/39664681
has title: How to darken the div surrounding an alert like a modal?
tagged with: twitter-bootstrap
tagged with: css

http://stackoverflow.com/comment/39809968
comment on: http://stackoverflow.com/q/25503289
score: 0
type: Comment
type: QuestionComment
has text: `ext-all-debug.js` just concatenates all Ext classes hence the error originating from ext-all-debug is no other error than it was from single file.

ezpublish
tag name: ezpublish
type: Tag
tags question: http://stackoverflow.com/q/25521654

http://stackoverflow.com/comment/39834237
comment on: http://stackoverflow.com/q/25516139
score: 0
type: Comment
type: QuestionComment
has text: @Fred-ii- : Thanks for suggestion...I have done so as you said..! but really now main issue is in ajax so more details on that will be great..!

http://stackoverflow.com/comment/39677136
has text: Any example for me? Does this one need new Regex or does it work with .match(...) for you? Ah, OK. With new Regex. Wanted to use match only. Seems I have to rewrite my serverside-part from match to new Regex. In c# I iterate over all rules and handle all the same. Any other way instead of using .test?
comment on: http://stackoverflow.com/q/25432061
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25437280
has body: I assume the code you showed runs in a popup. To access DOM of a page open in an existing tab, you need Content Scripts. See this Architecture Overview as the first step. For a concrete example, given a tab ID, you can inject a script and get a single value back (as a simplest solution) like this: chrome.tabs.executeScript({file: "content.js"}, function(result){ console.log(result); }); And the content script: // Simplest possible DOM operation return document.getElementById('element').value; For more advanced usage, see the documentation link above and Messaging documentation.
has comment: http://stackoverflow.com/comment/39690753
type: Answer
accepted answer of: http://stackoverflow.com/q/25435973
score: 0
answers question: http://stackoverflow.com/q/25435973
type: AcceptedAnswer

http://stackoverflow.com/q/25445306
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25453883
has comment: http://stackoverflow.com/comment/39701031
type: Question
has comment: http://stackoverflow.com/comment/39701156
tagged with: javascript
tagged with: jquery
has title: jQuery waypoints not working on localhost
accepted answer: http://stackoverflow.com/a/25453883
score: 0
has comment: http://stackoverflow.com/comment/39703822
answer count: 1
has body: I'm trying to use jQuery. From jQuery Waypoints I downloaded the example shortcut for infinite scroll. When I checked the web console it gives the following error when it hits the end of the page. XMLHttpRequest cannot load file:///Users/akash.bansal/Downloads/imakewebthings-jquery-waypoints-415eb55/shortcuts/infinite-scroll/. Received an invalid response. Origin 'null' is therefore not allowed access.` Edit Well, that error came because I was accessing a file from a file which got resolved when I allowed the file access in Chrome, but the jQuery-infinite scroll is still not working on localhost!!
linked to: http://stackoverflow.com/q/5396527

http://stackoverflow.com/comment/39737130
has text: this is very specific, it might be usefull to formalize with words what you want : parse array of string paths, build a tree object from the paths but each object will contain an 'includes' child array which contains sub object, is it exact ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25464186

http://stackoverflow.com/comment/39667378
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25427044
has text: Thanks for answer, but this post isn't very helpful for me. I saw it earlier, the person is trying to solve a bit different problem. Still waiting for answers!

http://stackoverflow.com/q/25426500
has comment: http://stackoverflow.com/comment/39666757
has title: Value of the model includes unnecessary text
has answer: http://stackoverflow.com/a/25426622
favorite count: 0
tagged with: angularjs
upvote count: 1
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25547812
score: 1
has answer: http://stackoverflow.com/a/25547812
accepted answer: http://stackoverflow.com/a/25426622
answer count: 2
has body: Why does the itemsPerPage model get assigned the value of 5 per page if I specify {{item}} per page inside the option tag? {{item}} {{item}} per page
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39649432
type: AnswerComment
has text: I just looked at your code and you're missing `DOM READY`. I'll update my code momentarily.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25416670

http://stackoverflow.com/comment/39676413
has text: the first one's preferrable. every time you modify the div's innerhtml, you're forcing the browser to re-render the div. best to build your html as a string (`content`), then stuff it into the DOM all at once.
score: 0
comment on: http://stackoverflow.com/q/25431648
type: QuestionComment
type: Comment

webdriver-io
type: Tag
tag name: webdriver-io
tags question: http://stackoverflow.com/q/25524297

http://stackoverflow.com/a/25494952
score: 1
accepted answer of: http://stackoverflow.com/q/25494522
has comment: http://stackoverflow.com/comment/39794227
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: An input with the image type functions like a submit button. You need to cancel the event. Change your javascript to the following: $('#btnAdd').click(function (e) { //all the other stuff you were doing here... e.preventDefault(); return false; }); Make similar modifications to your delete button click handler.
answers question: http://stackoverflow.com/q/25494522
upvote count: 1
has comment: http://stackoverflow.com/comment/39794363

http://stackoverflow.com/a/25395871
score: 0
has body: $("#MySelect option").each(function(){ if($(this).prop("selected") == true){ //we've found the selected option tag so do stuff with it } });
has comment: http://stackoverflow.com/comment/39610554
type: Answer
answers question: http://stackoverflow.com/q/25395764

http://stackoverflow.com/q/25526162
has comment: http://stackoverflow.com/comment/39851222
has body: I have table like: sort first second third I want click the first row of tbody. I have tried some solutions. What I have tried: //$("#tlist tr").first().css("background-color", "#00f"); $("#tlist").find("tr").eq(1).addClass("highlight"); $("#tlist").find("tr").eq(1).trigger("click"); $(".lrow").click(function() { alert("c"); }); $("#tlist tr").on('click', function() { alert("d"); }); I run these code above on document ready using jquery. It not works. highlight was added to the target row. But the color not changed. I put it on jfiddle. Any one have some adives? Thanks for your time.
tagged with: jquery
has comment: http://stackoverflow.com/comment/39851186
has title: click not trigger on first row of tbody
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39851215
has answer: http://stackoverflow.com/a/25526225
type: Question
has answer: http://stackoverflow.com/a/25526288
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25526304
accepted answer: http://stackoverflow.com/a/25526288
tagged with: click
has answer: http://stackoverflow.com/a/25526304
score: 0
answer count: 3

http://stackoverflow.com/a/25532203
upvote count: 1
answers question: http://stackoverflow.com/q/25532182
downvote count: 0
has comment: http://stackoverflow.com/comment/39862521
has comment: http://stackoverflow.com/comment/39945824
type: Answer
score: 1
has body: Use this: function f1() { alert('hello world'); }; $('a').on('click', f1); Here is your fiddle with the fix: http://jsfiddle.net/o8b5j15k/2/

http://stackoverflow.com/comment/39673920
score: 0
type: Comment
has text: @jnbdz: As Eike mentioned, a lot of companies buy subdomains/mirror domains which would make GA fail. for instance, google.com, gooogle.com (extra o), google.co.uk, google.net, etc.
type: AnswerComment
comment on: http://stackoverflow.com/a/25429845

http://stackoverflow.com/q/25542804
answer count: 1
tagged with: javascript
score: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39892312
has answer: http://stackoverflow.com/a/25548868
accepted answer: http://stackoverflow.com/a/25548868
type: Question
tagged with: gwt
has body: In my gwt application, I need to update the value of some fields in a JavaScriptObject. But it seems my following approach does not work. public class ViewModel extends JavaScriptObject { protected ViewModel() { } public native final int getValue() /*-{ return this.value; }-*/; public native final int setValue(String val) /*-{ this.value = val}-*/; } Could anyone help me out?
has title: How to update value in a JavaScriptObject?

http://stackoverflow.com/comment/39850559
type: QuestionComment
comment on: http://stackoverflow.com/q/25525782
has text: use paddingLeft variable
score: 0
type: Comment

http://stackoverflow.com/comment/39774320
has text: Would be helpful to have it on a fiddle to be sure, but I suspect whats happening is that your original transform is being used to animate away from. So maybe you will need to include the original transform in the animation string, so $aniLoopBack:Raphael.animation({transform:'T50,50r360'},4000).repeat(Infinity) see if that helps, and will put as an answer if it does.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25484086

http://stackoverflow.com/q/25393530
has title: Calling an AngularJS isolated scope function from Javascript
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25394765
has comment: http://stackoverflow.com/comment/39606113
type: Question
has comment: http://stackoverflow.com/comment/39607649
answer count: 1
tagged with: javascript
has body: We are slowly porting an application to use Angular. I have an angular module and a directive that attempts to tie some functionality to an HTML element. angular.module('myApp', [ ]) .controller('myCtrl', function($scope){ $scope.someFunction = function(){return "Not what I want to see.";}; $scope.foo = "BAR"; }) .directive('myDirective', function(){ return { restrict: 'EA', transclude: true, template: ' Here is some template html. ', link:{ post:function(scope, element, attrs){ var elementId = attrs.myId; scope.someFunction = function(){return "I want to see this, elementId: " + elementId;}; scope.foo = "xxxx"; } } }; }); Given some html: ... ... And some javascript: ... var test = angular.element(document.getElementById("e2") ).scope(); alert(test.someFunction()); ... I would expect to see "I want to see this, elementId: e2", but I am not. When I inspect the javascript using Firebug, I see that the test object is referencing the main scope, not the isolated scope as I would expect (hope?). I can tell this because test.foo has the value "BAR", not "xxxx". Additionally, I can see in Firebug that the $$childHead object is the inner scope that I want, so I'm pretty certain there has to be a way to get to it besides something like test.$$childHead. Is there a proper way to do this? The entire team is still relatively new to Angular, forgive me if I've missed something obvious. I realize this might not be the "Angular way" (any comments welcome), but it fits our present migration strategy and needs. Thanks in advance.
has comment: http://stackoverflow.com/comment/39606268
score: 0
has comment: http://stackoverflow.com/comment/39605904

http://stackoverflow.com/a/25488036
score: 1
upvote count: 1
downvote count: 0
has body: I think this is what you want to do: Toggle Hello Good Bye Copy-paste from http://api.jquery.com/toggle/
type: Answer
answers question: http://stackoverflow.com/q/25487865

http://stackoverflow.com/comment/39852244
type: QuestionComment
comment on: http://stackoverflow.com/q/25524471
score: 0
type: Comment
has text: Reinstalling did not help...anyway, thanks for your help everybody! :)

http://stackoverflow.com/comment/49967657
score: 0
type: Comment
has text: Same here. App initialised. has-header added. But just doesn't fix. Only able to fix with additional DIV and "padding" class. That add additional spacing between content and header. Not cool. Still hoping to find the real cause and real fix. But because of rushing for completion, I'll just take the extra DIV wrapper with padding class as temporary fix.
comment on: http://stackoverflow.com/a/25408382
type: AnswerComment

http://stackoverflow.com/a/25459437
accepted answer of: http://stackoverflow.com/q/25456912
has comment: http://stackoverflow.com/comment/39865506
answers question: http://stackoverflow.com/q/25456912
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
has comment: http://stackoverflow.com/comment/39864035
has body: Well, like jfriend and Roamer suggested - you don't have to actually implement recursion since promises already chain. Let's recap: A promise represents an eventual value of an operation. .then represents a semicolon or line drop in your code, it's an abstraction on the notion of flow control and sequencing itself. It's actually very close to a monad bind. Therefore when we translate flow control to promises, we replace semicolons with thens. Let's start with a synchronous version function each(handlers, instance){ // here the function flow control starts handlers.forEach(function(handler){ // iterate all handlers handler(instance); // call the handler }); // in the promises version we'll iterate in advance since it's simpler return; // when the function returns it's done } Now, how do we translate that to promise code? The flow control starting is represented by an empty resolved promise: $q.when The forEach loop is the same, but we'll iterate the array and chain function executions synchronously since it's simpler in this case. The handler() will be "wait for the previous handler to finish and then run this one". The return will return the chained promise so we'll know when we're done. This should look something like: function each(handlers, instance){ var p = $q.when(); handlers.forEach(function(handler){ p = p.then(function(){ return handler(instance); }); }); return p; } The advantage here is that the flow is in a loop rather than recursion which is easier to follow for some people, basically instead of implementing our own 'next' logic we have delegated that responsibility to promises. Here is what jfriend and roamer mean by reduce: function each(handlers, instance){ return handlers.reduce(function(p, next){ return p.then(function(){ return next(instance); }); }, $q.when()); } This sort of thing (aggregating an array into a single value) is exactly what reduce is for which is why it fits so naturally. While the for loop solution arguably is not easier to step …

http://stackoverflow.com/a/25505188
has body: A new version of the API was just pushed. You are asking for version 3.9, as of the recent past you are getting 3.16. Using the "inherits" from MarkerWithLabel works: /** * @param {Function} childCtor Child class. * @param {Function} parentCtor Parent class. * @private */ function inherits(childCtor, parentCtor) { /* @constructor */ function tempCtor() {} tempCtor.prototype = parentCtor.prototype; childCtor.superClass_ = parentCtor.prototype; childCtor.prototype = new tempCtor(); /* @override */ childCtor.prototype.constructor = childCtor; } function MarkerX() { // Call the parent constructor. It calls Marker.setValues to initialize, so all // the new parameters are conveniently saved and can be accessed with get/set. // Marker.set triggers a property changed event (called "propertyname_changed") // that the marker label listens for in order to react to state changes. google.maps.Marker.apply(this, arguments); // this.setOptions(markeroption); var _image = { url: "http://login.avlview.com/images/RouteFenceA.png", origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(17, 34) }; this.setIcon(_image); } inherits(MarkerX,google.maps.Marker); var marker = new MarkerX(); updated fiddle
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25503316
answers question: http://stackoverflow.com/q/25503316
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25423483
has comment: http://stackoverflow.com/comment/39661665
has title: When I turn on html5Mode refresh doesn't work
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25424276
has comment: http://stackoverflow.com/comment/39661642
tagged with: angular-routing
has comment: http://stackoverflow.com/comment/39661979
has body: I have the following problem. I'm using AngularJS and angular-route. When I turn on html5Mode $locationProvider.html5Mode(true); for pretty URL's and if I refresh page I have "Page Not Found" error. This is my HTML code: Page title © 2014 HOME CONTACT And JS code: (function() { angular.module("app", ["ngRoute"]) .config(function($routeProvider,$locationProvider){ $routeProvider .when("/",{ template: "Home!" }) .when("/contact",{ template: "Contact!" }); $locationProvider.html5Mode(true); }) .controller("MainCtrl", function() { }); })(); Any ideas how to solve?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39661133
tagged with: angularjs
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25424276

http://stackoverflow.com/a/25462142
answers question: http://stackoverflow.com/q/25462097
has body: Use This $('#delete').click(function(){ var checkid = $(this).val(); $.ajax({ type: "POST", url: "survey-command.php", data: { checkid: checkid, } }).done(function( msg ) { alert( "Data Saved: " + msg ); }); }); Remove the Click from the $.ajax function as you need to fire the post event on the button click
score: 0
type: Answer

http://stackoverflow.com/q/25409406
possible better answer: http://stackoverflow.com/a/25412976
has body: I need to display a dataset as a Highcharts column chart. I don't know how to pass the data to the Javascript method of Highcharts to display my Business Process score regarding the day. The dataset is built in my BusinessProcess controller: @business_process_history = DmMeasure.where("period_id between ? and ? and ODQ_object_id = ?", first_period_id, current_period_id, "BP-#{@business_process.id}").select("period_day, score").order("period_id") This gives the expected 2 fields, 10 records result and would perfectly display in a HTML table. UPDATE : The suggestion by Tobago gives the expected array of arrays, [["20140820", #&lt;BigDecimal:54655c8,'0.997E2',18(45)&gt;], ...] but the issue is not solved. Here is the function call including suggestion from Tobago: &lt;script&gt; $(function () { $('#measures').highcharts({ chart: {type: 'column'}, title: {text: 'Data quality trend'}, xAxis: { title: {text: 'Time'} }, yAxis: { title: {text: 'Score'} }, series: [{ data: &lt;%= @business_process_history.map { |bp| [bp.period_day, bp.score] } %&gt; }] }); }); &lt;/script&gt; this script produces nothing in the measures DIV, while a hardcoded list of values does generate a graph. I tried several ways to do it, but still I can't manage. Can you help me on this ? Thanks a lot, Best regards, Fred
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25436772
type: Question
answer count: 2
tagged with: highcharts
tagged with: arrays
downvote count: 0
tagged with: javascript
has title: Ruby on Rails: How to generate an array from records to display in Highcharts?
favorite count: 0
has answer: http://stackoverflow.com/a/25436772
has answer: http://stackoverflow.com/a/25412976
tagged with: ruby-on-rails
type: AnsweredQuestion

http://stackoverflow.com/a/25438451
downvote count: 0
type: Answer
score: 3
upvote count: 3
has body: You have to test how far away your mouse coordinates are from the centre of the circle, and stop them if they reach the edge. Something like this should work. function OnMouseMove(evt) { // Get the mouse position relative to the centre of the circle (circleX,circleY) var dx = evt.clientX - circleX; var dy = evt.clientY - circleY; // Calculate distance from centre of circle to mouse (Pythagoras' theorem) var distance = Math.sqrt(dx * dx + dy *dy); // Test against radius if (distance &gt; circleRadius) { // Scale the dx,dy coords back so they are on the circumference dx = dx * circleRadius / distance; dy = dy * circleRadius / distance; } c1.attr({ cx: dx, cy: dy }); } If this doesn't work for you, make a jsfiddle so we can see what you have so far.
answers question: http://stackoverflow.com/q/25429067

http://stackoverflow.com/q/25549373
has answer: http://stackoverflow.com/a/33883241
downvote count: 0
has comment: http://stackoverflow.com/comment/39894973
favorite count: 0
has comment: http://stackoverflow.com/comment/39894930
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39897523
has comment: http://stackoverflow.com/comment/39893919
linked to: http://stackoverflow.com/q/21935215
has comment: http://stackoverflow.com/comment/39896755
tagged with: digest
has comment: http://stackoverflow.com/comment/39895288
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39895996
tagged with: http
type: Question
upvote count: 9
has comment: http://stackoverflow.com/comment/39894209
has comment: http://stackoverflow.com/comment/39895545
has body: Background angular's $http service is triggering a $digest on every get (if no $digest is already running): if (!$rootScope.$$phase) $rootScope.$apply(); Ia addition to fetching objects from our API, our app has many directives with templateUrl - which are fetched by angular using $http. This causes hundreds of $digest loops on cold start. Commenting out the above line, reduces the number of $digest loops to about 3, and the app runs MUCH faster, with no bindings broken (at least due to $http not triggering a $digest). Question Is there a way to disable $http triggering the $digest?
has title: Is there a way to disable triggering of $digest on every $http.get?
has comment: http://stackoverflow.com/comment/39895811
tagged with: javascript
has comment: http://stackoverflow.com/comment/39894433
score: 9
has comment: http://stackoverflow.com/comment/39894310
answer count: 2
has answer: http://stackoverflow.com/a/35110684

http://stackoverflow.com/comment/39674461
type: Comment
type: QuestionComment
score: 2
has text: You can write custom filter `app.filter("myCustomFilter", ....)`
comment on: http://stackoverflow.com/q/25430698

http://stackoverflow.com/comment/39814821
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25488585
type: Comment
has text: Don't use write(). Instead, modify the object structure (called the Document Object Model, or DOM) under the document object. What works for me is to start with a div in the HTML with an id of, say "content" and then set its HTML with something like: createdWindow.contentWindow.document.querySelect('#content').innerHTML = " whatever html you want goes here "; You can also create DOM objects directly and append them to the existing DOM. These DOM techniques aren't specific to Chrome Apps, so there is lots of documentation on them.

http://stackoverflow.com/a/25407807
has comment: http://stackoverflow.com/comment/39635843
has comment: http://stackoverflow.com/comment/39635888
has comment: http://stackoverflow.com/comment/39657061
has comment: http://stackoverflow.com/comment/39668551
has comment: http://stackoverflow.com/comment/39655816
has comment: http://stackoverflow.com/comment/39631884
has comment: http://stackoverflow.com/comment/39668684
has body: You use incorrect terminology in the question, Are Node.js asynchronous tasks handled synchronously does not make much sense. And the test case is not what you think it is. First making clear some terminologies: Synchronous functions are guaranteed to run/complete in the order of their invocation. Asynchronous functions can progress and complete out-of-order w.r.to their calling. Blocking operations are those operations which once started must complete for the execution to progress further. CPU-intensive operations are blocking unless you run them on a separate worker. loops are blocking in nature. Once they start, they will complete all iterations before next function is executed. setTimeout simply calls the passed function at least x ms after current time. Calling it means once x ms pass it queues the passed function on the event loop. It is just delayed execution. So considering above facts, here is why your test is misleading: First your test case (your CPU-intensive function) is not asynchronous, you wrapped it around a setTimeout which is asynchronous. The timeout of 0 simply implies that they will be executed in the same order they are called. All callback functions being synchronous. Second, start and end in the log indicates point where your setTimeout is called. This would be in-order as expected. With timeout 0, the completion will be in-order too. Yes if you keep timeout equal for them they all will be executed in the same order as passed. Then again this is one of many possible cases where outcome is similar to synchronous (what if timeouts were in increasing order?). What you asked may be true for these cases but not always. Third if you wanted to simulate asynchronicity (enough to see out-of-order behaviour on console), might as well loose the while loop and use random timeouts(Math.random()*1000). You will see they complete in arbitrary fashion. This would be asynchronous execution (of setTimeout not the callback).
has comment: http://stackoverflow.com/comment/39663077
downvote count: 0
has comment: http://stackoverflow.com/comment/39644990
has comment: http://stackoverflow.com/comment/39669082
has comment: http://stackoverflow.com/comment/39648585
has comment: http://stackoverflow.com/comment/39667918
has comment: http://stackoverflow.com/comment/39668534
has comment: http://stackoverflow.com/comment/39667713
has comment: http://stackoverflow.com/comment/39665432
upvote count: 3
has comment: http://stackoverflow.com/comment/39668813
type: Answer
answers question: http://stackoverflow.com/q/25397636
has comment: http://stackoverflow.com/comment/39664561
has comment: http://stackoverflow.com/comment/39648439
has comment: http://stackoverflow.com/comment/39665136
has comment: http://stackoverflow.com/comment/39667470
has comment: http://stackoverflow.com/comment/39634959
has comment: http://stackoverflow.com/comment/39656886
has comment: http://stackoverflow.com/comment/39660302
has comment: http://stackoverflow.com/comment/39671155
score: 3

http://stackoverflow.com/comment/39789680
has text: @SizzlingCode, if you're using the jQuery Validate plugin, just call the `.valid()` method to manually trigger validation on the form. **There is no need to trigger the `submit` event at all**.
comment on: http://stackoverflow.com/a/25492545
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39765766
score: 0
has text: use "dataget=JSON.stringify(oData)" without "var" in front and you will be able to use your variable globally
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25479739

http://stackoverflow.com/a/25467950
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39743726
answers question: http://stackoverflow.com/q/25467937
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39743719
has body: The context(this) is the second argument. $('select').each(function(){ if ($('option', this).length == 0) { this.disabled = true; } })

http://stackoverflow.com/comment/39857542
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25528972
has text: euhm. noo... Maybe define 'global'
type: AnswerComment

http://stackoverflow.com/a/25525154
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25454040
has body: Yep - just use the asynchornous version of the tag that does not use globals: https://developers.google.com/adwords-remarketing-tag/asynchronous/ So you need to include the asynchronous script in your like so: &lt;script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion_async.js" charset="utf-8"&gt;&lt;/script&gt; Then when you need to trigger it, just call the new function that is available in the global scope as many times as your need &lt;script type="text/javascript"&gt; /* &lt;![CDATA[ */ window.google_trackConversion({ google_conversion_id: 1234567890, google_conversion_label: 'abcdefghijk01234567890', google_custom_params: window.google_tag_params, google_remarketing_only: true }); //]]&gt; &lt;/script&gt; Make sure you update window.google_tag_params each time you call with fresh information (or just use a separate object or object literal). Hope that helps.
type: Answer
answers question: http://stackoverflow.com/q/25454040
upvote count: 3
score: 3

http://stackoverflow.com/comment/39873024
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25537377
has text: No, I was having issues with some other php code using $_GET that I figured out and deleted.
score: 0

http://stackoverflow.com/a/25496243
answers question: http://stackoverflow.com/q/25496182
has comment: http://stackoverflow.com/comment/39796690
has comment: http://stackoverflow.com/comment/39796659
downvote count: 0
type: Answer
has body: I would use JQuery for this job: $("#foo").find("div").removeClass("removeme"); This will find all children of #foo and remove the class .removeme.
score: 1
has comment: http://stackoverflow.com/comment/39796600
upvote count: 1
has comment: http://stackoverflow.com/comment/39796657
has comment: http://stackoverflow.com/comment/39796627

http://stackoverflow.com/comment/39753144
type: Comment
type: QuestionComment
has text: @ Vch, I changed the Code but the same persists again.
comment on: http://stackoverflow.com/q/25472860
score: 0

http://stackoverflow.com/q/25470522
has comment: http://stackoverflow.com/comment/39748664
has title: Include another HTML file in a HTML file - with script execution
has comment: http://stackoverflow.com/comment/39748837
type: Question
tagged with: javascript
score: 4
upvote count: 4
has answer: http://stackoverflow.com/a/25481855
has comment: http://stackoverflow.com/comment/39749230
has comment: http://stackoverflow.com/comment/39748680
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39748565
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have a part of html code which is repeating on every of my page and i want to reuse it. There is already a very nice link: Include another HTML file in a HTML file I have used jQuery to load the html file (separate html file which i call template). If that html file is static everything is working fine. But if my template file includes the elements which are using class (CSS) which is using java script to load - then it's not being loaded. Even if in original html file i am referencing correct css/java scripts in head section. Any ideas ? Thanks,
linked to: http://stackoverflow.com/q/8988855

http://stackoverflow.com/comment/39645409
has text: your log message will probably always print the last one, since the sendMail callback is called after the loop ends and var i is defined at upper function scope and holds the last iteration index (javascript doesn't have block scope). it is still possible however that the mails were sent to 4 different indivituals
comment on: http://stackoverflow.com/q/25412544
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39710121
score: 0
type: Comment
type: QuestionComment
has text: @b4ux1t3: Still, your question `"does not show any research effort"` so I am at a loss as to why it has 3 upvotes
comment on: http://stackoverflow.com/q/25449947

http://stackoverflow.com/a/25521305
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/61560624
has comment: http://stackoverflow.com/comment/136229675
has body: I found the answer by myself, I've just set the three_state of checkbox plugin to false. $('#tree_groups').jstree({ 'plugins': ["wholerow", "checkbox", "types"], 'core': { 'data': [{ "id": "0-14089749041", "text": "Sport", "state": { "selected": true, }, "children": [{ "id": "14089749041-14089751330", "text": "Pallacanestro",}, {"id": "14089749041-14089751110", "text": "Tennis",}, ]}, "checkbox" : { "three_state" : false, }, "types" : { "default" : { "icon" : "fa fa-group icon-state-warning icon-lg" }, "file" : { "icon" : "fa fa-file icon-state-warning icon-lg" } } });
accepted answer of: http://stackoverflow.com/q/25509501
type: Answer
upvote count: 7
score: 7
answers question: http://stackoverflow.com/q/25509501

http://stackoverflow.com/q/25461997
has answer: http://stackoverflow.com/a/25462742
type: Question
accepted answer: http://stackoverflow.com/a/25462312
has answer: http://stackoverflow.com/a/25462340
has title: Extract alphanumeric words starting with letter, ignore others
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25462014
favorite count: 0
has answer: http://stackoverflow.com/a/25462014
has body: Sounds easy enough, but I am just unable to figure that out. /([a-z][a-z0-9]+)/gi Test case looks like this Correct #123 2baZ #1a2 thisToo $bar andTwo2 I am fighting with those partial matches. Only valid should be: ["Correct", "thisToo", "andTwo2"]. Any others should stay unmatched. Here is link to tester: http://regex101.com/r/qG7lU9/8 Update: Here is JS fiddle that works better than tester itself... http://jsfiddle.net/FredyCr/6hsgef82/
tagged with: regex
answer count: 4
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25462312
upvote count: 2

http://stackoverflow.com/a/25503678
accepted answer of: http://stackoverflow.com/q/25483514
type: Answer
answers question: http://stackoverflow.com/q/25483514
score: 0
has body: Well, I figured it out. The problem was not with the hashbang itself. I am parsing url in the back end to provide config e.t.c One of the params and only one mandatory is Language. Hovewer due to the hashbang redirect it was stripped out and system tryied to force default language in the url.
type: AcceptedAnswer

http://stackoverflow.com/comment/39687605
type: Comment
comment on: http://stackoverflow.com/a/25437691
type: AnswerComment
score: 0
has text: @MichaelF: because you call it too early. Put it wthin `if (xmlhttp.readyState==4) {...}`

http://stackoverflow.com/a/25463230
score: 0
type: AcceptedAnswer
type: Answer
has body: After I stopped trying to see how I could get data passed into the stop method, I realised I had all the information I needed to update the sort_order variable. The sortable was working in so much as it reordered the array, using that information I did: stop: function(e, ui) { for(var i = 0; i &lt; $scope.formData.length; i++){ for(var j = 0; j &lt; $scope.formData[i]['DownloadField'].length; j++){ $scope.formData[i]['DownloadField'][j]['sort_order'] = j; } } } It may not be the lightest approach and I will probably add some checks for updates/new data etc. but it works.
answers question: http://stackoverflow.com/q/25451684
accepted answer of: http://stackoverflow.com/q/25451684

universal-analytics
tag name: universal-analytics
tags question: http://stackoverflow.com/q/25420260
type: Tag
tags question: http://stackoverflow.com/q/25409979
tags question: http://stackoverflow.com/q/25450735

http://stackoverflow.com/a/25391718
type: Answer
score: 3
has body: Well callable is effectively the result of bind.bind(call); The "executive" summary is that the callable function lets you take a function designed to operate as a function on some prototype object and create a new function that accepts a parameter to be used as the value of this. As an example, consider the .slice() method on the Array prototype. It's often used to transform things like a node list or an arguments structure into an array. That's generally done like this: var args = [].slice.call(arguments, 0); Well the callable function lets us create a stand-alone function that'll work similarly: var cslice = callable(Array.prototype.slice); var args = cslice(arguments, 0); Now, whether this is useful or not as a cornerstone of some kind of programming style, I won't say.
upvote count: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25391594
answers question: http://stackoverflow.com/q/25391594

http://stackoverflow.com/a/25460242
downvote count: 0
has comment: http://stackoverflow.com/comment/39729891
answers question: http://stackoverflow.com/q/25459361
type: Answer
has comment: http://stackoverflow.com/comment/39729661
upvote count: 3
has comment: http://stackoverflow.com/comment/39729705
has body: Try ng-class="{addClear: searchRoleOne.length}" This should work, see fiddle http://jsfiddle.net/HB7LU/5613/ what version of angular you using?
score: 3
has comment: http://stackoverflow.com/comment/39729686

http://stackoverflow.com/comment/39742533
comment on: http://stackoverflow.com/q/25464505
has text: No sir Actually it is showing white screen when slide please check fiddle @ezanker
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25502172
has comment: http://stackoverflow.com/comment/39807034
has body: There is several questions about how to rotate an image, but I want an animation-like rotating. By an event (tap) I would like to rotate an image with -5 degree then with 5 degree, but if I write both rotating in the same function (or eventhandler), the first rotate doesn't appear only the second is visible. $("#imgdiv").on('taphold', function(e){ //$("#imageID").addClass("swing animated"); $("#imageID").css({"transition-property":"transform","transition-duration":"2s","transform":"rotate(-5deg)"}); $("#imageID").css({"transition-property":"transform","transition-duration":"2s","transform":"rotate(5deg)"}); //$("#imageID").removeClass("swing animated"); }); I have also tried a swing animation with classes (addClass, then removeClass), but with the same result: @keyframes swing { 25% { transform: rotate(-5deg); } 50% { transform: rotate(0deg); } 75% { transform: rotate(5deg); } 100% { transform: rotate(0deg); } } .swing { transform-origin: top center; animation-name: swing; } .animated { animation-duration: 1s; animation-fill-mode: both; animation-timing-function: linear; }
possible better answer: http://stackoverflow.com/a/25502551
has answer: http://stackoverflow.com/a/25502907
type: Question
upvote count: 4
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/39807037
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25502907
tagged with: css
has title: Rotating image 2 times
has answer: http://stackoverflow.com/a/25502551
type: AnsweredQuestion

http://stackoverflow.com/comment/39767135
type: Comment
type: QuestionComment
has text: Your HTML layout seems a bit messy with two `body` elements nested inside each other.
comment on: http://stackoverflow.com/q/25479813
score: 0

http://stackoverflow.com/a/25411217
score: 1
has comment: http://stackoverflow.com/comment/39639851
has body: It's because you're using an old version of jQuery and jQuery-ui. In this fiddle: http://fiddle.jshell.net/t2jhL9ru/ which uses jQuery 1.7.1 you can see that button() is undefined, while in this fiddle: http://fiddle.jshell.net/t2jhL9ru/1/ which uses jQuery-1.8.3 and jQuery-Ui-1.9.2, things work fine.
upvote count: 1
answers question: http://stackoverflow.com/q/25409305
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25409305
type: Answer
downvote count: 0

http://stackoverflow.com/q/25457104
has answer: http://stackoverflow.com/a/28296074
has title: How can I get this video to play inline?
has body: I'm making a Phonegap app that allows me to paste a video link and embed the video using embed.ly. I would like the video to play inline and not go to fullscreen. I understand that adding a "webkit-playsinline" to a video tag should work however, I'm not sure of how I can make webkit-playsinline work with the iframe that embedly adds the video to. This is what my code looks like. I have tried to add comments and be as clear as possible: &lt;script&gt; $.embedly.defaults.key = 'mykeyhere'; $(document).ready(function() { var url = urlaft; //Contains my url to video var urladd = '&lt;li&gt;&lt;a href="' + url + '"&gt;&lt;/a&gt;&lt;/li&gt;'; //adds url to a &lt;a&gt; element within an li document.getElementById("videobox").innerHTML = urladd; //appends li with video link to ul $('a').embedly({ query: { maxheight: 195 }, 'method': 'after' }); //using embedly to turn the &lt;a&gt; link into an embedded video $('.embedly-embed').attr('webkit-playsinline', ''); //This was my attempt at adding a webkit-playsinline to the iframe that embedly has added the video to. }); &lt;/script&gt; The code above fails to produce the results I'm looking for. I would like to play videos that are embedded inline.
type: UnansweredQuestion
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/25515839
has comment: http://stackoverflow.com/comment/39833469
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/25516483
has comment: http://stackoverflow.com/comment/39833792
has comment: http://stackoverflow.com/comment/39833839
type: Question
has body: From an html content like below, I am trying to get with a php script the content of the javascript array variable "aDataSet". I believe I could use a regular expression but so far I haven't been able to export the data. What would be the best way to do that? The html content is loaded in a php variable. Ideally I would like to get the information in a php array? Any idea? Thank you &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- html code --&gt; &lt;script type="text/javascript"&gt; var imgShowBtn = '&lt;img src="templates/medias/search.png" title="See form" /&gt;'; var imgEditBtn = '&lt;img src="templates/medias/update.png" title="Modify the complaint" /&gt;'; var imgPdfBtn = '&lt;img src="templates/medias/pdf.jpg" title="See report" /&gt;'; jQuery.fn.dataTableExt.oSort['date-case-asc'] = TriDateFrAsc; jQuery.fn.dataTableExt.oSort['date-case-desc'] = TriDateFrDesc; var aDataSet = [ [" ","1202 26a", "02/29/2012", "01/17/2012", "akdslj91", "345910K30", "Berlin 800905", "4" ], [" ","1202 152", "02/29/2012", "01/17/2012", "ahkqos12", "134711223", "qwerty 5493", "4" ], [" ","1202 241", "02/29/2012", "01/13/2012", "ahkqos12", "345910130", "azerty 1020090951", "4" ], [" ","1202 222", "02/29/2012", "01/31/2012", "askj192a", "136411208", "paris 1020090520", "4" ] ]; &lt;/script&gt; &lt;!-- html code --&gt; &lt;/body&gt; &lt;/html&gt;
tagged with: javascript
has title: How to get javascript variable value from html dump/content?
score: 0
has comment: http://stackoverflow.com/comment/39833487
answer count: 1
linked to: http://stackoverflow.com/q/5035547
type: UnansweredQuestion

http://stackoverflow.com/a/25537222
has comment: http://stackoverflow.com/comment/39872766
type: Answer
has comment: http://stackoverflow.com/comment/39873038
score: 2
has comment: http://stackoverflow.com/comment/39872704
answers question: http://stackoverflow.com/q/25537080
has body: There are a number of ways to go about this. From a usability standpoint, it's probably best just to show users the preselected value, rather than trying to represent it as an input. Inputs tell users that they're allowed to choose, whereas you're basically saying you've already chosen for them. Other options include: removing all the options except the one you want from the select. $('#abc option[value="saab"]').siblings().remove(); disabling the select. responding to the change event, and setting the select's value back to its dynamically-calculated value every time the user changes it. $('#abc').change(function() {$(this).val('saab');}); Regardless of how you decide to represent this to the user, though, you mustn't rely on client-side code to enforce their choice. When the form is submitted, your server will need to calculate the desired value based on the other choices the user has made. Otherwise, savvy users will be able to hack the value that gets submitted.
has comment: http://stackoverflow.com/comment/39872306
accepted answer of: http://stackoverflow.com/q/25537080
has comment: http://stackoverflow.com/comment/39874828
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39872785
has comment: http://stackoverflow.com/comment/39872197
has comment: http://stackoverflow.com/comment/39872858
has comment: http://stackoverflow.com/comment/39872823
upvote count: 2

http://stackoverflow.com/comment/44899065
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25506755
type: Comment
has text: @user1471399 The problem in that question was that the same function was used to construct an object and assigned as a method on that object. I find such edge cases to never be useful in practice.

http://stackoverflow.com/q/25442045
answer count: 2
has body: I'm using the fullCalendar jQuery plugin right now and I'm planning to apply the Twitter Modal Bootstrap on eventClick. How do I apply this method for my calendar plugin? Thanks in advance!
has answer: http://stackoverflow.com/a/25446809
has title: How do you apply twitter modal popup on fullcalendar event click
upvote count: 1
tagged with: javascript
tagged with: fullcalendar
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/32168231
downvote count: 0
score: 1
favorite count: 0
type: Question

http://stackoverflow.com/comment/39741921
comment on: http://stackoverflow.com/q/25466560
score: 0
has text: @JamesM.Lay there seems to be a new problem. I changed my code and now It uses application/json as default content type. I can see special chars (just tested + plus sign) being sent in the headers, but it seems the server isn't being reached. I receive a blank response. but if I change back to `application/x-www-form-urlencoded`, it works fine (i receive a JSON string). got any idea of what is happening?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39665701
has text: Ok :) later if you want then sadin :)
comment on: http://stackoverflow.com/a/25425565
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25513329
upvote count: 2
type: UnansweredQuestion
tagged with: iframe
has body: I have a simple iframe which is used to display a vimeo video on my site, as so: &lt;div class="video"&gt; &lt;iframe src="//player.vimeo.com/video/88893424" width="960px" height="540px" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen&gt; &lt;/iframe&gt; &lt;/div&gt; And it works like a charm on all standard computer browsers. Ajax is used throughout the site, and transitioning between pages that have videos and don't work exactly as you would expect - Ajax grabs the new page content, slides it on, deletes the old content, and the video works perfectly. However, on iOS Safari, the video does NOT load. The space for the video is reserved - the other content on the page flows around the area where the video should be, which tells me the div is loading, and the height and width information of the iframe element is being registered by the browser. But no video, nothing. Reload the new page, though, and the video is there and plays just fine. So my question is: Why is the reload required? What could I be doing wrong that is causing the AJAX to fail? I have read several answers across SO that seem to incriminate header information and cross-site drama, but it is danced around and not explained. Can anyone give me a clear understanding of what's going on here?
score: 2
has comment: http://stackoverflow.com/comment/39901419
has title: iFrame fails to load in iOS Safari until reloaded
type: Question
downvote count: 0
tagged with: ios
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0

http://stackoverflow.com/comment/40441375
has text: no, @Nouphal.M bounty has expired, unless you explicitly give it to me I won't get it, so restart the bounty (preferably with double points, because of latency), and give it to me, I spend so much time on it, and I solved it more than a week ago.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25639331

http://stackoverflow.com/q/25531432
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39861584
score: 0
has answer: http://stackoverflow.com/a/25531560
type: UnansweredQuestion
has title: Problems with form in Chrome
tagged with: css
has body: I have this web: http://tecnifarm.com/contacto.php with a contact form that works perfect in Firefox and Safari but doesn't work well on Chrome. 1. The mail box is a few pixels moved to the right. 2. Even I include a reset.css from http://meyerweb.com/ as soon as I complete a imput shield, the background-color turns from #FFF to yellow. 3. If I fill the mail imput shield, the error boxes appears, if I don't completed, it just change the border of the box with a color that I have no idea where is from. This is de Form: This is the FormValidar.js function formValidar(form, definitions) { form.find('input, textarea, select').removeClass('errorMsgBorder'); $('.msgError').remove(); var camposErrorTitle = new Array(); var camposErrorId = new Array(); var definitionsLength = definitions.length; var i = 0; while(i<definitionsLength) { var id = definitions[i].id; var field = $('#'+id); var errorFound = false; switch ( definitions[i].type ) { case 'string': if( field.val() == '' ) { errorFound = true; } if( typeof(definitions[i].minChar) != 'undefined' && field.val() != '' ) { if( field.val().length < definitions[i].minChar ) { errorFound = true; } } break; case 'int': if( field.val() == '' ) { errorFound = true; } if( parseInt( field.val() ) == 'NaN' ) { errorFound = true; } else { if( typeof(definitions[i].minValue) != 'undefined' ) { if( parseInt( field.val() ) < definitions[i].minValue ) { errorFound = true; } } if( typeof(definitions[i].maxValue) != 'undefined' ) { if( parseInt( field.val() ) > definitions[i].maxValue ) { errorFound = true; } } } break; case 'float': if( field.val() == '' ) { errorFound = true; } if( parseFloat( field.val() ) == 'NaN' ) { errorFound = true; } else { if( typeof(definitions[i].minValue) != 'undefined' ) { if( parseFloat( field.val() ) < definitions[i].minValue ) { errorFound = true; } } if( typeof(definitions[i].maxValue) != 'undefined' ) { if( parseFloat( field.val() ) > definitions[i].maxValue ) { errorFound = true; } } } break; case 'em…
has comment: http://stackoverflow.com/comment/39861887
has comment: http://stackoverflow.com/comment/39886029
has answer: http://stackoverflow.com/a/25531523
tagged with: forms
tagged with: google-chrome
type: Question

http://stackoverflow.com/a/25532032
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39862893
type: Answer
accepted answer of: http://stackoverflow.com/q/25531570
has body: The ^ anchor in ^(www | www\.) exclude the lines containing https? at the front. You can use non-capture groups and ? to find those situations optionally: ^(?:https?://|s?ftps?://)?(?!www | www\.)[A-Za-z0-9_-]+\.+[A-Za-z0-9.\/%&amp;=\?_:;-]+$ That will match all but the last two lines of: yahoo.com www.yahoo.com http://www.yahoo.com yahoo.org somesite.org www.somesite.org http://somesite.org https://www.somesite.org somesite.org?case=1 www somesite.org // Space after 'www' www.example.com // Leading space regex101 example
answers question: http://stackoverflow.com/q/25531570
score: 4
upvote count: 4

http://stackoverflow.com/comment/39783301
has text: "routes.php **sends the HTTP get request** to a file called AppController.php" ..but your console says you're making a `POST` request. Can you post your route as well?
comment on: http://stackoverflow.com/q/25489011
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25503558
type: Question
accepted answer: http://stackoverflow.com/a/25504095
tagged with: javascript
has title: Merge array into a single array
tagged with: arrays
answer count: 1
downvote count: 0
favorite count: 0
has body: If this were .NET, I'd ask how to convert List&lt;List&lt;MyClass&gt; to List&lt;MyClass&gt;. However, I'm not very good with javascript and don't know how to ask that as a question using Javascript terminology! My javascript object comes through like And is created as: js_datasets.push({ "DataItem0": { lzabel: "This", data: [[1408710276000, null],[1408710276000, 15]] }, "DataItem1": { lzabel: "That", data: [[1408710276000, null],[1408710276000, 15]] }, }); js_datasets.push({ "DataItem22": { lzabel: "And other", data: [[1408710276000, null],[1408710276000, 5]] }, "DataItem23": { lzabel: "And lastly", data: [[1408710276000, null],[1408710276000, 1]] }, }); Each object is the same "type" (if it matters). I'd like to create a single list but I am failing to do so. My efforts are var myDataSet = []; //this is the results of what I want, ideally as a single list for (var i = 0; i &lt; js_datasets.length; i++) { if (i==0) { myDataSet.push(js_datasets[i]); } else { myDataSet.concat(js_datasets[i]);//does nothing myDataSet.join(js_datasets[i]);//does nothing } ...more logic As you can see with the above, I've tried using push, concat and join. If I update the code to only use push (and never use concat and join) then I get all the values I want, but again, as an array within an array. Using concat and join do not add to the list. So, if we can assume the 12 items in the array (pictured) all contain 10 items, I'd like to have a single list of the 120 items! How can I simply convert this multidimension array (is it multidimension) to a single dimension array.
has answer: http://stackoverflow.com/a/25504095
has comment: http://stackoverflow.com/comment/39809636
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39810151
linked to: http://stackoverflow.com/q/10865025
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39809991

http://stackoverflow.com/q/25488197
upvote count: 1
type: Question
tagged with: javascript
has title: Basic Apache rewrite rules for enabling HTML 5 state links in an AngularJS app with ui-router
tagged with: apache
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
has body: I have my web application structured as follows - http://integration.web-url.com/app1 and http://integration.web-url.com/app2 My application is an angularJS application that has html 5 state links enabled. I've followed the pattern explained here - AngularJS: can&#39;t get html5 mode urls with ui-route $state as follows &lt;IfModule mod_rewrite.c&gt; RewriteEngine on &lt;Directory "${POTD}/htdocs"&gt; # Don't rewrite files or directories RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] # Rewrite everything else to index.html to allow html5 state links RewriteRule ^(.*)app1(.*) app1/index.html [L] RewriteRule ^(.*)app2(.*) app2/index.html [L] &lt;/Directory&gt; &lt;/IfModule&gt; But I get a 404 error when attempting to goto any url other than app1/index.html or app2/index.html
answer count: 0
linked to: http://stackoverflow.com/q/17444072
type: UnansweredQuestion
tagged with: mod-rewrite

http://stackoverflow.com/comment/39885962
has text: @ Arvind Sridharan Yes I just did again, it will not validate email field it will call recaptchaVerify without validation.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25527069
score: 0

http://stackoverflow.com/comment/39690129
has text: [RSA in JavaScript](http://www.ohdave.com/rsa/). At least in theory.
score: 0
comment on: http://stackoverflow.com/q/25439209
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25548017
has body: Another way of doing the same: String.prototype.replaceAll = function(matchStr, replaceStr) { return this.replace(new RegExp(matchStr, 'g'), replaceStr); }; var str = "1/2/3"; result = str.replaceAll('/', '');
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25547567

http://stackoverflow.com/q/25419049
has title: Trying to get JavaScript code completion to work in netbeans with jsdoc
type: UnansweredQuestion
upvote count: 1
type: Question
has body: In my app.js I have the following: angular.module('app').controller('userList', ['appSettings' ,function (/*@type {app.appSettings}*/appSettings) { appSettings.&lt;&lt;== it shows a list here but nothing from autocomplete.js In my autocomplete.js I have the following (generated by JavaScript printing out my services and their members): var app={}; app.appSettings={}; app.appSettings.userFailMessages={}; app.appSettings.userFailMessages.invalidJson ="Invalid request, user sent is not valid json."; NetBeans refuses to code complete appSettings for me and doesn't seem to know it's defined in autocomplete.js. Maybe I'm getting my js doc wrong but tried a mix of combination of @var, @type and @param without success. It code completes when I type app.appSettings. and gives me a list from autocomplete.js but I would like to know how I can tell NetBeans that the passed argument to the function is app.appSettings. Maybe I should have autocomplete contain constructor functions instead of object literals as @type suggests a certain type and not an instance. This is NetBeans 7.3.1
tagged with: javascript
tagged with: code-completion
answer count: 1
downvote count: 0
tagged with: netbeans-7
score: 1
has answer: http://stackoverflow.com/a/25424959
favorite count: 0

http://stackoverflow.com/comment/39823194
type: Comment
comment on: http://stackoverflow.com/a/25498095
score: 0
type: AnswerComment
has text: Accepted this answer but put a formal solution with a few more details below.

http://stackoverflow.com/comment/39742934
score: 0
type: Comment
has text: You want to use the *variable* `svg` when appending your other elements, rather than using `d3.select('svg')` because your variable svg is actually a `<g>` element that has been shifted to sit within your margins. You could either define the variable outside of your init function, or give the `<g>` element inside it a class and select that when appending your other items.
type: QuestionComment
comment on: http://stackoverflow.com/q/25467487

http://stackoverflow.com/q/25418919
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/39653607
tagged with: javascript
has answer: http://stackoverflow.com/a/25421117
score: 0
has title: socket.io connection not heppening
tagged with: sockets
has comment: http://stackoverflow.com/comment/39652542
tagged with: node.js
has comment: http://stackoverflow.com/comment/39652522
has body: This is first time, I am using socket.io.I stuck at initial stage itself.sorry it's may be simple question. server side code : Inside my server.js I written the following code. var express = require('express') ,io=require('socket.io') ,http = require('http') var app = express(); server = http.createServer(app); io = io.listen(server,{ log: false }); Now I trying to make connection inside server.js file,like in the following way. io.sockets.on('connection', function (socket) { console.log("This is testing"); io.to(socket.id).emit('notification', 'for your eyes only'); }); client side code : var socket = io.connect("http://localhost"); socket.on('connect', function () { console.log("connect") }); socket.on('notification', function (data) { console.log(data); }); I open application in browser, as per my code it suppose to console connect statement but it's not happening. my server is running on port no :80Where am I did wrong, can anyone help me. Thanks.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39654215

http://stackoverflow.com/comment/39729848
score: 0
type: AnswerComment
type: Comment
has text: This solves the problem - <All Incorporated>
comment on: http://stackoverflow.com/a/25440647

http://stackoverflow.com/a/25409433
downvote count: 0
has comment: http://stackoverflow.com/comment/39634855
type: Answer
answers question: http://stackoverflow.com/q/25408794
accepted answer of: http://stackoverflow.com/q/25408794
has body: You can set the size of the halo hover effect with plotOptions, for example (JSFiddle demo): plotOptions: { series: { states: { hover: { enabled: true, halo: { size: 0 } } } } } There are some other options to customize the hover effect and the halo itself. See the documentation here. If you don't want the series to show any hover effect either you can just set enabled: false.
score: 15
upvote count: 15
type: AcceptedAnswer

http://stackoverflow.com/comment/39890636
comment on: http://stackoverflow.com/q/25547834
has text: You should start with reading docs, observing the sample/example app and the you will see that this is a task for a multi-view feature. Here you can find some [links](http://stackoverflow.com/a/25499004/1679310) where to start
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/39685500
has text: Note that your desired output is not going to work as the quotes for your onclick attribute aren't nested properly.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25436244

http://stackoverflow.com/comment/39782752
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25489074
has text: Thanks @Rahil, just spotted it!

http://stackoverflow.com/q/25413297
tagged with: angularjs
upvote count: 1
has comment: http://stackoverflow.com/comment/39642706
has body: I'm working to get my head around promises in JavaScript. From my understanding, I can chain them together. However, there is something that I feel I am missing. Currently, I have an AngularJS app that is using the $localForage module. I need to set an item in local storage. Then, I need to remove an item from local storage. Finally, I need to redirect the user to another page. In an attempt to accomplish this, I've written the following code: $localForage.setItem('name', 'John Doe') .then(function() { return $localForage.removeItem('history'); }) .then(function() { console.log('redirecting the user...'); $location.url('/views/page-2'); console.log('should redirect'); }) ; When this code executes, I see the following in the console: redirecting the user... should redirect However, I never get redirected to /views/page-2. Interestingly, if I place the $location.url('/views/page-2'); in the first then(...), I get redirected. For that reason, I feel like there is something that I do not understand about promises. Am I chaining together properly? Or, am I trying something that I cannot do? If I cannot do this, what is the alternative? Thank you!
has title: Chaining Promises Together in JavaScript
type: AnsweredQuestion
score: 1
type: Question
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25415336
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25415336

http://stackoverflow.com/q/25475349
tagged with: javascript
has comment: http://stackoverflow.com/comment/39757428
has body: Realizing that this question has been posted before, I'm looking for a mid-2014 take on this problem. What's the best way to parse a very large JSON object in a browser? For the sake of argument, let's say this object is at least 64 MB (that's text size only, before parsing into data types). Let's assume we aren't dealing with IE as well to save us all a headache. I know of the following solutions: Cut the response at server level into chunks and process them one at a time Cut the response at client level which requires writing one-own JSON parser that does that I can't do: My JSON source is local and is parsed in the browser and then sent processed to the server. For various reasons, I can't do this differently. Number 2 seems pretty tedious. What do you think is the best way to approach this? Are browsers today better equipped to handle very large JSON objects?
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39784816
type: UnansweredQuestion
has title: Parsing a very large JSON object
has comment: http://stackoverflow.com/comment/39757335
answer count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39757382
upvote count: 1
type: Question

http://stackoverflow.com/q/25450036
has comment: http://stackoverflow.com/comment/39709815
type: AnsweredQuestion
tagged with: java
accepted answer: http://stackoverflow.com/a/25520763
type: Question
has title: How to get parameter long html page string from request in java?
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25520763
has comment: http://stackoverflow.com/comment/39709609
has body: I post request in javascript. I send html page in post data. In java, i use String html = request.getParameter("templateHtml"); I see html string in request, when i was debug mode. But "html" variable is null. my javascript code is here: var postData = {}; postData["templateHtml"] = "Html page's string is too long"; $.ajax({ type: 'POST', url: createUrl, data: postData, success: function(data) { onSuccess(data); }, error: function(message) { onFail(message); }, }); Why am I receiving a null "html" variable? How can I fix it?

http://stackoverflow.com/q/25429995
has title: Animation opacity doesn't stay in Polymer
type: Question
answer count: 2
tagged with: javascript
tagged with: css-animations
score: 0
accepted answer: http://stackoverflow.com/a/25450180
has answer: http://stackoverflow.com/a/28124107
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25450180
type: AnsweredQuestion
tagged with: polymer
possible better answer: http://stackoverflow.com/a/28124107
has body: I've made a basic polymer-element that acts as a wrapper for fading things in and out based on the state of the data-binding for it's visibility attribute. The logic is simple. Visibility == true ? fadeIn : fadeOut. The problem is that once the animation completes the elements opacity resets. Why does the elements opacity reset to 1 after the animation? Code below:

http://stackoverflow.com/a/25403820
answers question: http://stackoverflow.com/q/25403774
has comment: http://stackoverflow.com/comment/39623798
has body: Consider the following HTML: Hello Goodbye We can target any element for removal: $( ".hello" ).remove(); This will result in a DOM structure with the element deleted: Goodbye
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/39877697
has text: @mydoubts wait... so this is all done on the same html page, but in different js files?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25532647

http://stackoverflow.com/q/25405325
linked to: http://stackoverflow.com/q/37684
type: Question
has body: Is there a way in pure Javascript to turn links in an HTML document into clickable links? I do not want to use regex to solve this problem. Let's say I have this list in an HTML5 doc: http://www.test.com http://www.example.com http://nicelink.com And I want it to automatically turn into this when the page is loaded: http://www.test.com http://www.example.com http://nicelink.com What would the vanilla JS code look like if I put a script in the header? Something looping through the HTML code and replacing the lines I suppose but I cannot write it in JS. Signy
score: -5
downvote count: 5
has comment: http://stackoverflow.com/comment/39626716
has answer: http://stackoverflow.com/a/25405450
answer count: 1
tagged with: javascript
favorite count: 0
duplicate of: http://stackoverflow.com/q/37684
has title: Is there a way in Javascript to turn links in an HTML document into clickable links?
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/25413244
tagged with: jquery-mobile
linked to: http://stackoverflow.com/q/7663078
type: UnansweredQuestion
has title: jquery mobile page refresh or table refresh
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39643915
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/39642423
has comment: http://stackoverflow.com/comment/39642504
has body: I've got a jquery mobile application with a page that contains a table. This table is database driven and it has some up/down buttons to control the order. Got the buttons to work, but the table doesn't reflect the changes that were made. The suggestion at this other question almost works. It refreshes the list correctly, but the buttons don't work. I see a page gets added to the DOM, and I know the tags in this page probably share the same IDs which could be causing an issue, but I can't think of a way to get around this. ajax call here $.mobile.changePage( window.location.href, { allowSamePageTransition : true, transition : 'none', showLoadMsg : false, reloadPage : true } );
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39644071

http://stackoverflow.com/q/25483851
has answer: http://stackoverflow.com/a/25484124
type: AnsweredQuestion
tagged with: onclicklistener
has body: I'm using window.onclick code to get all (current and future) anchor and apply my custom code, which does work - window.onclick = clickEvent; function clickEvent(e){ e = e || window.event; var t = e.target || e.srcElement console.log(t); if ( t.name || t.href ){ if( typeof t.href == "string" && (t.href.substr(0,4) == 'http' || t.href.substr(0,5) == 'https') ){ if( t.attributes.href.value !== "#" ){ alert('The url is - '+t.href); } e.preventDefault; return false; // no further action for this click } } return true; // process click as normal } But when a tag have a tag inside of it - it doesn't work. The link open as usual. Test Url Here is the JSfiddle to check it out - http://jsfiddle.net/aajahid/3edcfm12/ And the reason is - the t (e.target) variable returns the tag, not the tag. For this reason I don't see any way to prevent the url to open and apply my custom function to it. Question is - how can I prevent those links with span (or any other tag) to open?
has title: How to prevent all link (which have a span tag in it) to open?
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25484124
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/39867884
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25535013
has text: This would not work. The image is defined please look at the HTML does no good in there.
score: 0

http://stackoverflow.com/comment/39830962
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25514467
has text: @Mrchief More less I think I am. The class is declared as a static variable.
score: 0

http://stackoverflow.com/comment/39646391
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25414816
type: QuestionComment
has text: Try this method? http://stackoverflow.com/questions/17370062/posting-json-data-via-jquery-to-asp-net-mvc-4-controller-action

http://stackoverflow.com/comment/39715792
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25451939
has text: The above is what xmlhttp.responseText looks like?
score: 0

http://stackoverflow.com/a/25479732
has body: Try this : $("#FrameProjectQuickView").contents().find("your div id or class").text("You text here"); Hope this helps...
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25479655
upvote count: 1
has comment: http://stackoverflow.com/comment/40208780
has comment: http://stackoverflow.com/comment/42402273
downvote count: 0

http://stackoverflow.com/comment/39861902
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25531668
has text: Is the script perhaps running before that part of the DOM is ready?

http://stackoverflow.com/q/25532679
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27266007
score: 4
has title: AngularJS How to inject dependencies when using controller-as syntax
has answer: http://stackoverflow.com/a/27266007
accepted answer: http://stackoverflow.com/a/25532724
has body: Following along with the controller-as feature mentioned in the docs, I'm reworking one of my controllers to match the syntax they suggested. But I'm not sure how to inject the $http service into my search() function, and in a way that will be safe from minification? customer.RequestCtrl = function () { this.person = {}; this.searching = false; this.selectedInstitute = null; this.query = null; this.institutes = null; }; customer.RequestCtrl.prototype.search = function() { this.searching = true; this.selectedInstitute = null; $http({method: 'GET', url: '/api/institutes', params: {q: this.query, max: 250}}) .success(function(data, status, headers, config) { this.searching = false; this.institutes = data; }) .error(function(data, status, headers, config) { this.searching = false; this.institutes = null; }); };
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25532724
type: Question
upvote count: 4
answer count: 2
downvote count: 0

http://stackoverflow.com/q/25549874
type: Question
tagged with: ng-bind-html
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 3
has title: Binding HTML attribute in angularjs
has body: I have this code: &lt;span data-icon=""&gt;&lt;/span&gt; That span creates an icon like this: However, I want to give the developer using this directive, the possibility to define a new icon. It is working, however, the problem I have is that, supposing I have this: $scope.table.addIcon = "&amp;#xe070;" Instead of creating the element &lt;span data-icon="&amp;#xe070;"&gt;&lt;/span&gt; it will create it &lt;span data-icon="&amp;amp;#xe070;"&gt;&lt;/span&gt; Which will fail to add the icon, so instead of seeing this: What I have is this: Is there a way to avoid angular to convert the &amp; into &amp;amp;? Adding solution Thanks to miensol the solution is this: .directive("changeIcon", function() { var d = document.createElement("div"); return { restrict: "A", link: function($scope, $ele, $attrs) { log($attrs); var originalIcon; $scope.decodedIcon = $attrs.icon; do { originalIcon = $scope.decodedIcon; d.innerHTML = originalIcon; $scope.decodedIcon = d.firstChild.nodeValue; } while (originalIcon != $scope.decodedIcon); $attrs.$set('data-icon', $scope.decodedIcon); } } }) And it is used like this: &lt;span change-icon icon=""&gt;&lt;/span&gt;
downvote count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25558840
linked to: http://stackoverflow.com/q/3700326
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25558840

http://stackoverflow.com/comment/39670609
comment on: http://stackoverflow.com/a/25406327
score: 0
type: AnswerComment
type: Comment
has text: Have you tried using a callback function after loading? `if(editingPage == "Homepagina") { $("#contentEditor").load("http://www.imaginedigital.nl/CMS/Editor/Homepage9.html", function(response, status, xhr){ if ( status == "success" ) { new jscolor.color($line.find('input[name=color]')[0], {}); } });`

http://stackoverflow.com/q/25522307
tagged with: arrays
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25522363
tagged with: multidimensional-array
has title: JavaScript Two-Dimensional array is undefined
has comment: http://stackoverflow.com/comment/39844567
upvote count: 1
has comment: http://stackoverflow.com/comment/39844491
type: AnsweredQuestion
score: 1
has body: I was trying to resolve my error with other answers but just fail. I have this simple example of what I think is two-dimensional array but it keeps returning me undefined error. var city = 'London', country = 'England'; var locate = []; locate['London']['England'] = ['Jhon','Mike']; for (i = 0; i &lt; locate[city][country].length; i++) { console.log(locate[city][country][i]); } jsbin http://jsbin.com/pixeluhojawa/1/ what am I doing wrong in this example, I would appreciate your help.
accepted answer: http://stackoverflow.com/a/25522363
type: Question

http://stackoverflow.com/q/25510439
has answer: http://stackoverflow.com/a/63187935
has answer: http://stackoverflow.com/a/25510483
has answer: http://stackoverflow.com/a/74825850
has answer: http://stackoverflow.com/a/26162463
possible better answer: http://stackoverflow.com/a/31327577
type: AnsweredQuestion
tagged with: google-chrome-devtools
score: 40
has answer: http://stackoverflow.com/a/48389464
type: Question
upvote count: 40
has comment: http://stackoverflow.com/comment/45081449
accepted answer: http://stackoverflow.com/a/26162463
has title: Inspect Javascript Hover in Chrome Developer Tools
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/56011348
has comment: http://stackoverflow.com/comment/39823279
has body: I have some Javascript which displays an element on hover. I want to style this element and therefore need to trigger the hover state in the browser using Chrome Dev Tools. This is easy to do with CSS where you can set the state of an element within Dev Tools. What is the best way to do this with Javascript? Code Example: $('#menu').hover( function() { console.log('test'); $('#dropdown').show(); }, function() { $('#dropdown').hide(); } );
downvote count: 0
has answer: http://stackoverflow.com/a/62383891
favorite count: 0
has answer: http://stackoverflow.com/a/31327577
has answer: http://stackoverflow.com/a/78122891
answer count: 9
linked to: http://stackoverflow.com/q/2228376

http://stackoverflow.com/a/25489245
has body: There is no valid value attribute on &lt;img&gt;. But you can use data-value: var appid = $(this).attr('data-value');
score: 4
answers question: http://stackoverflow.com/q/25489218
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/25461694
tagged with: video.js
type: UnansweredQuestion
has title: Detecting a element's position when and absolute is inside a relative
tagged with: video
downvote count: 1
type: Question
has body: Please don't kill me as I'm sure this has been asked somewhere before but when I've looked around nothing made sense to me. Essentially I'm trying to use the code below to auto play a video on my site when a user scrolls down to view it - http://jsfiddle.net/pjoxqf80/1/ var videos = document.getElementsByTagName("video"), fraction = 0.8; function checkScroll() { for(var i = 0; i &lt; videos.length; i++) { var video = videos[i]; var x = video.offsetLeft, y = video.offsetTop, w = video.offsetWidth, h = video.offsetHeight, r = x + w, //right b = y + h, //bottom visibleX, visibleY, visible; visibleX = Math.max(0, Math.min(w, window.pageXOffset + window.innerWidth - x, r - window.pageXOffset)); visibleY = Math.max(0, Math.min(h, window.pageYOffset + window.innerHeight - y, b - window.pageYOffset)); visible = visibleX * visibleY / (w * h); if (visible &gt; fraction) { video.play(); } else { video.pause(); } } } window.addEventListener('scroll', checkScroll, false); window.addEventListener('resize', checkScroll, false); However, on my page it the video.js player seems to make the videos into 'absolute' positioning so all the videos only play when the user is scrolled at the top of the page, then they pause as the user scrolls down to see them. I would like the code to detect the position of the videos correctly. I've wanted to remove the 'absolute' positing but I'm using the CDN version of video.js CSS file so I can't change that. I think I've read about jquery .offset but not sure how to use it? Here is the site, scroll down to find the videos: http://www.digital-soul.com.au/tcsite/our-journal-is-different/
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/24249426
upvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25461886

http://stackoverflow.com/comment/39620407
type: Comment
type: QuestionComment
has text: @indieblue thank you for comment. It reminded me that I forgot to write that I do not want to use switch (I updated my question)
comment on: http://stackoverflow.com/q/25401872
score: 0

http://stackoverflow.com/q/25444834
tagged with: css
accepted answer: http://stackoverflow.com/a/25444935
possible better answer: http://stackoverflow.com/a/25444942
has answer: http://stackoverflow.com/a/25444942
upvote count: 1
type: AnsweredQuestion
has title: revert back to unhovered css on key down
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25444935
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: onkeydown
has body: I have an element when you hover over it changes the css I have added a onkeydown function that reverts back to the original css. I was just wondering if there was anyway of getting the unhovered css with out writing it all out again? here is my code $(document).keydown(function(e) { if (e.keyCode == 27) { $(NBSmegamenu).css('display', 'none');} // esc $(".dynamic-children").css('border-bottom-width','none'); $(".dynamic-children").css('border-bottom-style','none'); $(".dynamic-children").css('border-bottom-color','none'); $(".HoverImg").remove(); $("span.dynamic-children").css('background-position', 'right'); $("span.dynamic-children").css('background-image', 'url("/Style%20Library/NBSImages/NBS_MegaMenuDownArrowRed.png")'); $("span.dynamic-children").css('background-repeat', 'no-repeat'); $(".NBSDirectoryDivLine").css('border','none'); });

http://stackoverflow.com/q/25394782
duplicate of: http://stackoverflow.com/q/784929
score: 0
tagged with: evaluation
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39607682
has body: enter code hereI have often seen this -- if(!!somevalue) I don't know why do people use !! and instead they could just write this -- if(somevalue) because as far as I know somevalue === !!somevalue I do not have any issue but I am just curious as in what is the reason behind it?
answer count: 0
has title: Why do people use double NOT before evaluating an expression?
type: Question
has comment: http://stackoverflow.com/comment/39607677

http://stackoverflow.com/comment/39786277
score: 4
type: Comment
type: QuestionComment
has text: It is improper to put an ` ` inside of a ` `.
comment on: http://stackoverflow.com/q/25490857

http://stackoverflow.com/q/25421629
has comment: http://stackoverflow.com/comment/39657106
has answer: http://stackoverflow.com/a/25423652
tagged with: screen-scraping
has comment: http://stackoverflow.com/comment/39658375
has body: I have the following code: function getLinks() { var links = document.querySelectorAll('a.row-link'); return Array.prototype.map.call(links, function(e) { return e.getAttribute('href'); }); } casper.start('http://somedomain.com/board/search/search/?p=' + pagee); // Get all the pages here! casper.then(function(){ while(pagenos = nextpagereg.exec(this.getHTML())) {; this.echo(pagenos); pages.push(pagenos); } this.echo(pages.length + ' PAGES FOUND'); return pages; }); casper.then(function() { pagee = 0; links = this.evaluate(getLinks); this.echo(links.length + ' links found:'); this.each(pages, function(self,page){ pagee++; this.echo('WORKING ON PAGE' + pagee); self.thenOpen('http://somedomain.com/board/search/search/?p=' + pagee, function(self){ this.each(links, function(self, link){ self.thenOpen(link, function(self, a){ title = this.getHTML('h2#job-title').trim(); if(casper.exists('p#job-subtitle a')){ company = this.getHTML('p#job-subtitle a'); } else { title = "NA"; } loc = this.getHTML('p#job-subtitle&gt;strong'); email = regex.exec(this.getHTML()); this.echo("Title : " + title); this.echo("Company : " + company); this.echo("Location : " + loc); this.echo("Email : " + email); this.echo("************************************************************************************************************"); }); //this.echo(link); }); }); }); }); casper.run(function() { this.exit(); }); The problems seems to be that it doesn't run through the pages in order, the outside loop just crashes through all the page links! EDIT To clarify this is the output, as you can see the loop shoots through all the page increments before its processed each page: http://somedomain.com/job-board/search/@/?p=2 http://somedomain.com/job-board/search/search/?p=3 http://somedomain.com/job-board/search/search/?p=4 http://somedomain.com/job-board/search/search/?p=5 http://somedomain.com/job-board/search/search/?p=6 5 PAGES FOUND 50 links found in page 1: LOOP START WORKING ON PAGE1 WORKING ON PAGE2 WO…
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39660135
has comment: http://stackoverflow.com/comment/39660246
has comment: http://stackoverflow.com/comment/39659766
tagged with: casperjs
has comment: http://stackoverflow.com/comment/39660407
accepted answer: http://stackoverflow.com/a/25423652
has title: CasperJS loop doesn't evaluate properly, apparently just runs straight through
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/39675570
type: QuestionComment
has text: You can give a default value of 0 to all the cboxs
comment on: http://stackoverflow.com/q/25431334
score: 0
type: Comment

http://stackoverflow.com/q/25412293
tagged with: css
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18269306
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/6794000
favorite count: 0
has title: columns jumping with bootstrap affix
has answer: http://stackoverflow.com/a/25431958
type: Question
tagged with: twitter-bootstrap
has body: I have two bootstrap columns that sit next to each other on large screens, and stack on top of each other on small screens. It is intentionally setup so the column on the right stacks on top of the left column on smaller screen. Problem: When scrolling on large screens, the column affixes properly in the y-axis, but both the left and right columns jump out to the sides and change width. Check out the js fiddle, scroll down and you'll see the problem. http://jsfiddle.net/KKczd/1/ HTML &lt;div class="col-md-3 col-md-push-9" id="right"&gt; Right in wide screens, top on small screens &lt;/div&gt; &lt;div class="col-md-9 col-md-pull-3" id="left"&gt; Left column with a lot of stuff &lt;/div&gt; JS $('#right').affix(); I assume I can fix this with css, but none of my efforts have solved it. Appreciate any suggestions.
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25425057
has comment: http://stackoverflow.com/comment/39663643
accepted answer of: http://stackoverflow.com/q/25424873
answers question: http://stackoverflow.com/q/25424873
type: AcceptedAnswer
downvote count: 0
has body: Include the namespace of your extension class in the web.config file of the Views folder. For example, (Replacing NamespaceOfJavascriptExtension with your namespace): &lt;system.web.webPages.razor&gt; &lt;host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt; &lt;pages pageBaseType="System.Web.Mvc.WebViewPage"&gt; &lt;namespaces&gt; &lt;add namespace="System.Web.Mvc" /&gt; &lt;add namespace="System.Web.Mvc.Ajax" /&gt; &lt;add namespace="System.Web.Mvc.Html" /&gt; &lt;add namespace="System.Web.Routing" /&gt; &lt;add namespace="NamespaceOfJavascriptExtension" /&gt; &lt;/namespaces&gt; &lt;/pages&gt; &lt;/system.web.webPages.razor&gt; Then make sure to clean and build your project (You might need to reopen the solution). You should then be able to use @Html.IncludeVersionedJs("/MyJavascriptFile.js") in your layout file.
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/39663533
upvote count: 1

http://stackoverflow.com/q/25414707
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39645165
has body: Right now I am trying to add a class to images when they are landscape using the following code: $('.gallery img').each(function() { if ($(this).width() &gt; $(this).height()) { $(this).addClass('landscape'); } }); The code is working some times, but sometimes the class is not added, thus the styles I have are not applied. I have tried with and without the $(document).ready function, along with putting it next to the images rather than at the end of the code, but nothing is consistently adding the class to the landscape images. I'm not sure what else to try. Any suggestions?
has comment: http://stackoverflow.com/comment/39645228
has comment: http://stackoverflow.com/comment/39645394
has comment: http://stackoverflow.com/comment/39645267
type: Question
has comment: http://stackoverflow.com/comment/39645092
has comment: http://stackoverflow.com/comment/39645121
has answer: http://stackoverflow.com/a/25414930
has title: Creating Class on Image with JQuery
tagged with: javascript
has comment: http://stackoverflow.com/comment/39645113
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39645114
has comment: http://stackoverflow.com/comment/39645377
has comment: http://stackoverflow.com/comment/39645141
linked to: http://stackoverflow.com/q/7381603
has comment: http://stackoverflow.com/comment/39645087

http://stackoverflow.com/a/25449699
accepted answer of: http://stackoverflow.com/q/25449286
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25449286
type: Answer
score: 6
upvote count: 6
downvote count: 0
has body: Its a tool for development. You use it to create your production js code. You do not need to run browserify on the server hosting the webpage. The js output file does not depend on node.

http://stackoverflow.com/comment/39714131
comment on: http://stackoverflow.com/q/25452261
score: 0
has text: What do you mean by "doesnt work?"
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25411749
upvote count: 2
type: Answer
score: 2
has body: Looks like you've not appended your divWithInfo to the #document so getElementById can't find it in the DOM tree Before you call document.getElementById("selectGroup"), remember to, e.g. document.body.appendChild(divWithInfo). If this is not an option, you may want to consider using divWithInfo.querySelector, i.e. var foo = divWithInfo.querySelector("#selectGroup"); However, I'd try to avoid this and instead if a reference is required before appending, I would create entirely using DOM methods and not using .innerHTML
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25411617
answers question: http://stackoverflow.com/q/25411617

http://stackoverflow.com/comment/39895491
type: AnswerComment
has text: Looks like what i need! One more question, is possible, if you're already on page and some of DIVs is open, how you can close it? Like in first demo (http://jsfiddle.net/kLjrxost/1/)?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25550073

http://stackoverflow.com/comment/39653727
has text: Thanks. I thought that by doing var data1= parseFloat(data.item.test) earlier that it wouldn't be an issue.
comment on: http://stackoverflow.com/a/25418695
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25491263
answers question: http://stackoverflow.com/q/25490978
upvote count: 1
has body: Here's the code: $('input.btn_search').click(function () { // Disable before ajax starts $(this).attr('disabled', true); var xhr = $.ajax({ success: function (data) { // Enable after ajax completes $(this).removeAttr('disabled'); } });
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/25530179
tagged with: jquery
has answer: http://stackoverflow.com/a/25530603
score: 0
answer count: 2
has title: Adding a settings file to a front-end web application in an async manner
tagged with: http://stackoverflow.com/tag/html
tagged with: single-page-application
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25530563
has body: I'm currently trying to resolve some with an SPA being built with a lot of custom components, borrowing a lot from all over the place. The current challenge I have is initializing some settings (Endpoint URLs and the sort) with a settings file to be set on a per-deployment basis. It's Javascript, so it makes sense to relegate this to a JSON file. However, a lot of the logic is still written in this strongly-defined OO methodology, and I am trying to determine the best method to load this settings file within the async methodology. Looking at other topics on Stack Overflow, the jQuery getJSON method is a viable option. But I am not clear if it is still based on synchronous calls. Furthermore, If there is an async option, I want to be sure that the value is loaded before firing any additional logic in the application (instead of having it initialize nothing at the constructor). Is my assumption correct? Is getJSON the best approach here? Code is listed below. var settings = $.getJSON("conf.json"); var SearchObject = new Search(settings); // Remainder is just a bunch of bind() and on() calls
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39743932
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25466754
type: QuestionComment
has text: If it does not depend on asynchronous behaviour, `try`/`catch` does exactly what you're looking for. If it does, wrap it in a promise.

http://stackoverflow.com/a/25526923
has comment: http://stackoverflow.com/comment/39852636
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/25526854
type: Answer
score: 4
has body: I think the main advantage of using &lt;a&gt; tags is that the default behavior (when including an href) is that the browser cursor signifies an link. Although both can be done, using the &lt;a&gt; tag is also more semantic.

http://stackoverflow.com/q/25479204
has comment: http://stackoverflow.com/comment/39764677
type: Question
possible better answer: http://stackoverflow.com/a/25479307
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25479307
has answer: http://stackoverflow.com/a/25479425
has body: I am trying to create multiple textboxes along with a checkbox and a button at runtime based upon the input coming during the runtime. The user will have the option of deleting the textbox along with the checkbox and button by pressing the button. This works fine. If the user deletes one of the textboxes along with the checkbox by pressing the button, then all the remaining IDs should move one value up. This part is not working fine. for(i = 0; i &lt;= k; i++) { if (document.getElementById("cbox" + i).checked == true) { var n = i.toString() var textbox = document.createElement('input'); textbox.type = 'text'; textbox.id = "tbox" + i; textbox.value = document.getElementById("texts" + i).value; document.getElementById('frm').appendChild(textbox); var cb = document.createElement('input'); cb.type = 'checkbox'; cb.checked = true; cb.id = 'cbid' + i; document.getElementById('frm').appendChild(cb); var btn = document.createElement('input'); btn.type = 'button'; btn.value = 'delete'; btn.name = 'delete'; btn.id = i.toString(); btn.onclick = function () { var tbx = "tbox" + this.id; var cbx = "cbid" + this.id; var btndel = this.id; var x; (elem = document.getElementById(tbx)).parentNode.removeChild(elem); (elem = document.getElementById(cbx)).parentNode.removeChild(elem); (elem = document.getElementById(btndel)).parentNode.removeChild(elem); for(x = btndel + 1; x &lt;= 10; x++) { document.getElementById('tbox' + x).id = "tbox" + (x - 1); document.getElementById("cbid" + x).id = "cbid" + (x - 1); document.getElementById(x).id = x - 1; } document.getElementById('frm').appendChild(btn); };
has comment: http://stackoverflow.com/comment/39764619
tagged with: javascript
has comment: http://stackoverflow.com/comment/39764636
has title: How to change ID of textbox
has answer: http://stackoverflow.com/a/25479311
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25479425

http://stackoverflow.com/q/25500084
type: AnsweredQuestion
tagged with: dynamic
tagged with: eventtrigger
type: Question
has comment: http://stackoverflow.com/comment/39803159
tagged with: javascript
tagged with: jquery
has body: I made some 'SPA interface' using jquery, my main function which load pages, looks like that: $('body').on('click', '.go-to', function(event) { event.preventDefault(); var _this = $(this); var main_container = $('#main-container'); main_container.fadeOut('fast'); $('.preloader').delay(400).fadeIn('slow'); $.get(_this.attr('href'), { id : _this.attr('data-id') }, function(result) { main_container.html(result); $('.preloader').fadeOut('fast'); main_container.delay(1000).fadeIn('slow'); }); return false; }); When I load some page multiple times, the event for loaded element is triggered many times. For example when i load page1 5 times, this code will return 'Test' 5 times. $('body').on('click', '#select-all', function(event) { console.log('Test'); }); Anybody knows how to fix it?
score: 0
has title: jQuery SPA Dynamically created elements, trigger events multiple times
answer count: 1
has answer: http://stackoverflow.com/a/25500117
has comment: http://stackoverflow.com/comment/39805162
accepted answer: http://stackoverflow.com/a/25500117

http://stackoverflow.com/comment/39867894
has text: In order for my code to work you need to add a `big` class to all `inputs` ` `. This is more work, but it's the right way to structure your HTML.
comment on: http://stackoverflow.com/a/25535032
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25488599
score: 0
has body: Based on what you've provided, I would guess you're getting something other than JSON in your response (most likely HTML, given the reference to &lt;). I'd suggest debugging and taking a look at what is inside your data variable.
type: Answer
answers question: http://stackoverflow.com/q/25488326
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25488326

http://stackoverflow.com/q/25493706
has answer: http://stackoverflow.com/a/25496793
tagged with: multipart
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/38175115
favorite count: 0
upvote count: 7
possible better answer: http://stackoverflow.com/a/38175115
accepted answer: http://stackoverflow.com/a/25496793
type: AnsweredQuestion
score: 7
has title: Ajax Upload File to GoLang Server with Content Type Multipart
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: I'm trying to upload an audio file to a Golang server using a multipart form. However, Go returns the error: multipart: NextPart: bufio: buffer full I believe this indicates there is something not in the multipart format with my Javascript request. This is my Javascript: function UploadFile(file) { var xhr = new XMLHttpRequest(); if (file.type == "audio/mpeg" &amp;&amp; file.size &lt;= $id("MAX_FILE_SIZE").value) { // start upload var boundary = '---------------------------' + Math.floor(Math.random()*32768) + Math.floor(Math.random()*32768) + Math.floor(Math.random()*32768); xhr.open("POST", $id("upload").action, true); xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + boundary); xhr.setRequestHeader("X_FILENAME", file.name); xhr.send(file); } } And this is my Golang server handler: func FileHandler(w http.ResponseWriter, r *http.Request) { var ( status int err error ) defer func() { if nil != err { http.Error(w, err.Error(), status) } }() // parse request with maximum memory of _24Kilobits const _24K = (1 &lt;&lt; 20) * 24 if err = r.ParseMultipartForm(_24K); nil != err { fmt.Println(err) status = http.StatusInternalServerError return } for _, fheaders := range r.MultipartForm.File { for _, hdr := range fheaders { // open uploaded var infile multipart.File if infile, err = hdr.Open(); nil != err { status = http.StatusInternalServerError return } // open destination var outfile *os.File if outfile, err = os.Create("./uploaded/" + hdr.Filename); nil != err { status = http.StatusInternalServerError return } // 32K buffer copy var written int64 if written, err = io.Copy(outfile, infile); nil != err { status = http.StatusInternalServerError return } w.Write([]byte("uploaded file:" + hdr.Filename + ";length:" + strconv.Itoa(int(written)))) } } } If anyone has any ideas why I'm getting this error, I'd greatly appreciate it.
tagged with: ajax
tagged with: go

http://stackoverflow.com/q/25463352
has title: How do I perform a proper unsigned right shift in PHP?
linked to: http://stackoverflow.com/q/24659911
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25467712
tagged with: unsigned-integer
tagged with: bit-shift
has comment: http://stackoverflow.com/comment/88925672
score: 4
linked to: http://stackoverflow.com/q/41134337
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/25463496
downvote count: 0
tagged with: javascript
favorite count: 0
has body: Is this possible to get the same results in PHP and Javascript? Example: Javascript &lt;script&gt; function urshift(a, b) { return a &gt;&gt;&gt; b; } document.write(urshift(10,3)+"&lt;br /&gt;"); document.write(urshift(-10,3)+"&lt;br /&gt;"); document.write(urshift(33, 33)+"&lt;br /&gt;"); document.write(urshift(-10, -30)+"&lt;br /&gt;"); document.write(urshift(-14, 5)+"&lt;br /&gt;"); &lt;/script&gt; output: 1 536870910 16 1073741821 134217727 PHP function uRShift($a, $b) { if ($a &lt; 0) { $a = ($a &gt;&gt; 1); $a &amp;= 2147483647; $a |= 0x40000000; $a = ($a &gt;&gt; ($b - 1)); } else { $a = ($a &gt;&gt; $b); } return $a; } echo uRShift(10,3)."&lt;br /&gt;"; echo uRShift(-10,3)."&lt;br /&gt;"; echo uRShift(33,33)."&lt;br /&gt;"; echo uRShift(-10,-30)."&lt;br /&gt;"; echo uRShift(-14,5)."&lt;br /&gt;"; output: 1 536870910 0 0 134217727 Is this possible to get the same results? Closest function to what I want is here: Unsigned right shift function not working for negative input Thanks for help.
tagged with: php
accepted answer: http://stackoverflow.com/a/25463496
has answer: http://stackoverflow.com/a/25467712

http://stackoverflow.com/a/25466325
has body: You can't (at least not in a way that would function everywhere). That functionality uses Javascript, and HttpClient doesn't understand Javascript. You could go through the page source and determine if there's a way to fetch more content, but it can be tricky (minified javascript or other similar obstacles).
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25466283
has comment: http://stackoverflow.com/comment/39740704
has comment: http://stackoverflow.com/comment/39741902

http://stackoverflow.com/a/25509404
type: Answer
has body: Do something like this : DEMO $("#stylinglink").click(function(event) { event.preventDefault(); var id = $(this).attr("id"); alert(id); switch(id) { case 'stylinglink': var x = ".stylingspecial"; hide(x); break; } }); function hide(x){alert(x);} REFER http://api.jquery.com/click/
accepted answer of: http://stackoverflow.com/q/25509059
answers question: http://stackoverflow.com/q/25509059
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/25434511
answers question: http://stackoverflow.com/q/25434074
downvote count: 0
score: 1
has body: you use .each() method of jquery and find .active class to remove it, and then add .active class. $(this).parent('a').each(function(){ $(this).removeClass('active'); }); $(this).parent('a').addClass('active');
upvote count: 1
type: Answer

http://stackoverflow.com/q/25493259
favorite count: 0
accepted answer: http://stackoverflow.com/a/25493390
score: -1
downvote count: 2
has title: Marker moves to map center after map is dragged
upvote count: 1
type: AnsweredQuestion
has body: I need Google map with a Marker which will stay always in center (change its position to center) of Map when I drag map. var mapcenter = new google.maps.LatLng(&lt;?= $coordinates ?&gt;); map = new google.maps.Map(document.getElementById('map'),{zoom:12,center:mapcenter}); google.maps.event.addListener(map,'center_changed',function(){...}); var marker = new google.maps.Marker({position:mapcenter,map:map}); This function triggered by map center change should change marker's position to map center!?
has answer: http://stackoverflow.com/a/25493390
tagged with: google-maps-api-3
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25482819
has body: You can use the ajaxupload.js script. It is present here. or You can refer to Zurb which has a JQuery solution.
answers question: http://stackoverflow.com/q/25482746
type: Answer
has comment: http://stackoverflow.com/comment/39771017
has comment: http://stackoverflow.com/comment/39771946
has comment: http://stackoverflow.com/comment/39772331
has comment: http://stackoverflow.com/comment/39770982
score: 0

http://stackoverflow.com/q/25426969
upvote count: 3
has body: I'm working on a little project to learn Javascript that is kind of like any typical browser-based strategy game. It uses php 5.3.x, MySQL, and Javacript/jQuery. I was able to successfully check and update every hour on the hour using MySQL Events the user's kingdom gold from their rate that it increases per hour. For example, if it's 50Gold/Hour and the User has 0, in an hour the user will have 50. The problem with this, is that it updates only once per hour, and I can't wrap my mind around a way to make it so that it updates every time the user should get new gold (ie: 60seconds/hr gold). So if the player is making 60 Gold per hour, then every min, the user's gold should update with +1/min. If they are making 60,000Gold/hr then +16/min (but it would actually be 16.6666...?). This seems like it would be easy to do using a simple Javascript code that assumes how much you're making but if you were to say, refresh, it wouldn't know you had that gold because in the database it would show differently. Also it wouldn't let the user buy anything like a farm upgrade because it would fail validation. Any ideas would be helpful on how to make this work? Scanning / Updating every second doesn't seem like a good idea and it doesn't seem like the right way to go. Thank you! EDIT -- RESOLVED --: Okay so I got it working after spending a good hour or so on it. It was pretty easy. Here's what I did thank to Cereal's idea... Got rid of MySQL event to auto-update Users have "last event" sessions, so if they refresh or go to the map, it's considered an event. Same with opening the buy/upgrade thing. When an event as such is triggered, it checks the last event and current time (local of server). It does the math and returns a decimal if needed and updates last event. So basically if you were playing for 10 minutes since your last "triggered" event, and you're earning 60 Gold per hour, it will calculate that you earned 10 Gold and update the db accordingly. If it's a decimal, it will r…
tagged with: php
type: AnsweredQuestion
score: -1
tagged with: mysql
accepted answer: http://stackoverflow.com/a/25427101
type: Question
downvote count: 4
answer count: 1
has title: How do games go about adding x gold per hour without straining the db?
tagged with: javascript
has answer: http://stackoverflow.com/a/25427101
favorite count: 0

http://stackoverflow.com/q/25416554
type: Question
has answer: http://stackoverflow.com/a/25416576
tagged with: ecmascript-5
tagged with: javascript
has answer: http://stackoverflow.com/a/25416568
possible better answer: http://stackoverflow.com/a/25416576
answer count: 2
has title: Can't .join() function arguments - TypeError: undefined is not a function
downvote count: 0
has body: Minimum example: function test() { console.log(arguments.join(',')); } test(1,2,3); I then get: TypeError: undefined is not a function However, when I do the same for an array: console.log([1,2,3].join(',')); I get "1,2,3" As expected. What's wrong with arugments? It's suppose to be an array: (function () { console.log(typeof [] == typeof arguments) })(); true
favorite count: 0
accepted answer: http://stackoverflow.com/a/25416568
tagged with: node.js
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: v8

http://stackoverflow.com/comment/39634214
has text: unfortunately Javascript doesn't have regex lookbehinds so need to play with this to see if I can make it work in JS
comment on: http://stackoverflow.com/a/25408671
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25527451
score: 0
has comment: http://stackoverflow.com/comment/39853900
tagged with: javascript
has body: I need to click a lesson(button) to go to a page(showcontent.php). As my lesson number is created by using the sql statement: "SELECT DISTINCT lesson FROM table" This is my php file <?php $con=mysqli_connect("localhost", "root", "password","database"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT DISTINCT lesson FROM table"); while($row = mysqli_fetch_array($result)) { //depending on the lesson number in the database //If lesson column only have lesson 2 and 5; it will show 2 buttons, lesson 2 and lesson 5 $lesson = $row['lesson']; echo "LESSON ". $row['lesson'] ."\n"; echo " "; } mysqli_close($con); ?> So what I want is to click the lesson button to link a page(showcontent.php) but the content which I retrieve from the database will be different. Means when I click lesson 2 it will go to (showcontent.php) and when I click lesson 5 it will go to (showcontent.php) but the contents will be different. And the content I have to retrieve from the database. What I have done is only (showcontent.php), it only display for lesson 1. This is the php file. <?php $con=mysqli_connect("localhost","root","password","database"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $x = 7; $sql="select * from sen where id = ".$x." limit 10"; if ($result=mysqli_query($con,$sql)) { while ($row=mysqli_fetch_row($result)) { $output = $row[1]; } mysqli_free_result($result); } mysqli_close($con); ?> So what I need is make the program knows that when I click lesson 1(button) it will go to (showcontent.php) and get the content for lesson 1 from that database. However, when I click lesson 5(button) it will go to (showcontent.php) and get the content for lesson 5 from that database. How can I make that work? Any examples?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
answer count: 0
has comment: http://stackoverflow.com/comment/39853731
type: Question
has comment: http://stackoverflow.com/comment/39875946
has title: Dynamic button link to a page with different content

http://stackoverflow.com/comment/39888193
comment on: http://stackoverflow.com/q/25546559
type: Comment
type: QuestionComment
has text: By "last", you mean the one whose key is the greatest ?
score: 0

http://stackoverflow.com/comment/39671965
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25427856
has text: @JonSamwell - animation-delay is for keyframes. I've tried both keyframe animations and transitions, both have the same issue.

http://stackoverflow.com/q/25428952
has comment: http://stackoverflow.com/comment/39679194
has comment: http://stackoverflow.com/comment/39672834
has body: I am observing a very peculiar behaviour when minifying files with System.Web.Optimization, I am already using IBundleOrderer that works fine in preserving file order when I am not minifying the files public class RespectGivenBundleOrder : IBundleOrderer { public IEnumerable&lt;BundleFile&gt; OrderFiles(BundleContext context, IEnumerable&lt;BundleFile&gt; files) { return files; } } public static void RegisterTestingBundle(BundleCollection bundles) { var bundle = new ScriptBundle("~/OnTheMoveWebFiles/bundles/Testing"); bundle.Orderer = new RespectGivenBundleOrder(); bundle.Include( string.Format("{0}jquery-{{version}}.js", baseJSFolder), string.Format("{0}ua-parser.js", baseJSFolder), string.Format("{0}OnTheMove_Core.js", baseJSFolder), string.Format("{0}OnTheMove_TheApplication.js", baseJSFolder), string.Format("{0}OnTheMove_JQMQueryString.js", baseJSFolder), string.Format("{0}OnTheMove_OfflineAuditing.js", baseJSFolder), string.Format("{0}OnTheMove_DatabaseManager.js", baseJSFolder), string.Format("{0}OnTheMove.js", baseJSFolder), string.Format("{0}OnTheMove_Offline.js", baseJSFolder), string.Format("{0}OnTheMove_DatabaseLoader.js", baseJSFolder), string.Format("{0}OnTheMove_DatabaseTestHelper.js", baseJSFolder), string.Format("{0}OnTheMove_SmartScriptPlayer.js", baseJSFolder), string.Format("{0}jasmine.js", baseJSFolder), string.Format("{0}jasmine-html.js", baseJSFolder), string.Format("{0}jasmine-jquery-{{version}}.js", baseJSFolder), string.Format("{0}jasmine-OnTheMove-GenericMocksAndHelpers.js", baseJSFolder), string.Format("{0}jasmine-OnTheMove-DatabaseManager-SiebelToSQL-Tests.js", baseJSFolder), string.Format("{0}jasmine-OnTheMove-TreeValidator-Tests.js", baseJSFolder), string.Format("{0}jasmine-OnTheMove-GlobalFunction-Tests.js", baseJSFolder), string.Format("{0}jasmine-OnTheMove-OnTheMove_BusinessComponent-Tests.js", baseJSFolder), string.Format("{0}jasmine-OnTheMove_DatabaseTestHelper-Tests.js", baseJSFolder), string.Format("{0}jasmine-OnTheMove_OfflineAu…
has comment: http://stackoverflow.com/comment/39672755
has answer: http://stackoverflow.com/a/29652952
has comment: http://stackoverflow.com/comment/39671514
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39672095
has comment: http://stackoverflow.com/comment/39672391
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/39677321
has comment: http://stackoverflow.com/comment/39672098
tagged with: javascript
has comment: http://stackoverflow.com/comment/39671997
score: 4
accepted answer: http://stackoverflow.com/a/29652952
has title: System.Web.Optimization changes order of js files when minifying javascript
upvote count: 4
has comment: http://stackoverflow.com/comment/39671755
tagged with: bundling-and-minification
downvote count: 0
answer count: 1
tagged with: .net-4.5
has comment: http://stackoverflow.com/comment/39671916
favorite count: 0

http://stackoverflow.com/comment/39715201
comment on: http://stackoverflow.com/a/25452577
type: Comment
has text: @PlantTheIdea - When there's only 6 slides at max the difference in speed is insignificant.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39737614
has text: You have to find the element in relation to `this`.
comment on: http://stackoverflow.com/q/25464679
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25518434
has comment: http://stackoverflow.com/comment/39839469
has comment: http://stackoverflow.com/comment/39838377
has comment: http://stackoverflow.com/comment/39839624
has comment: http://stackoverflow.com/comment/39838415
type: Answer
has comment: http://stackoverflow.com/comment/39839838
answers question: http://stackoverflow.com/q/25517325
has body: You can toggle the input field after the question with this jQuery: $(".DA_radio_holder .radio-btn").change(function() { // get appropriate level parent and toggle the next one at that level // based on the value of the radio $(this).closest(".DA_radio_holder").parent().next() .toggle(this.value === 'yes'); }); You could make the code simpler and more maintainable if you gave the question parent div and the text field parent div each their own unique class. Then, you could also set defaults for visibility on the text fields via CSS. For example, by adding the class "question" to the question parent and the class "textField" to the text field parent as here: &lt;div class="DA_holder question"&gt; &lt;label&gt;Radio Question 1&lt;/label&gt; &lt;div class="DA_holder DA_radio_holder"&gt; &lt;div class="cl"&gt;&amp;nbsp;&lt;/div&gt; &lt;input type="radio" class="radio-btn" name="question1" id="question1" value="yes" /&gt;&lt;label class="fl"&gt;Yes&lt;/label&gt; &lt;div class="cl"&gt;&amp;nbsp;&lt;/div&gt; &lt;input type="radio" class="radio-btn" name="question1" id="question1" value="no" /&gt;&lt;label class="fl"&gt;No&lt;/label&gt; &lt;div class="cl"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; &lt;div class="cl"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; &lt;!--Show on Yes --&gt;&lt;div class="DA_holder textField"&gt; &lt;label&gt;Text field for question 1: Yes&lt;/label&gt; &lt;div class="DA_field_container" &gt; &lt;div class="cl" &gt;&amp;nbsp;&lt;/div&gt; &lt;input type="text" class="field" id="question1" name="question1" placeholder='Range Validation 2000-4000'/&gt; &lt;span&gt;&lt;i class="icon-remove"&gt;&lt;/i&gt;&lt;/span&gt; &lt;div class="cl"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; Then, the code just becomes this: $(document).ready(function() { $(".DA_radio_holder .radio-btn").change(function() { // get appropriate level parent and toggle the next one at that level // based on the value of the radio $(this).closest(".question").next().toggle(this.value =…
has comment: http://stackoverflow.com/comment/39839714
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25517325
has comment: http://stackoverflow.com/comment/39838787
score: 1
has comment: http://stackoverflow.com/comment/39839246
has comment: http://stackoverflow.com/comment/39839692
has comment: http://stackoverflow.com/comment/39839355
has comment: http://stackoverflow.com/comment/39838704
has comment: http://stackoverflow.com/comment/39838540
has comment: http://stackoverflow.com/comment/39838871
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25460533
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25460559
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: So I am trying to input a text area in a onMouseOver description for a HTML list. I decided to try the .createElement('TEXTAREA') yet it returns [object HTMLTextAreaElement]. (Also if you could tell me an easier way to put HTML tags without using text areas that would be swell XD) Here is the code: } else if (a === 'var') { var textarea = document.createElement("TEXTAREA"); var t = document.createTextNode("&lt;code&gt;, &lt;var&gt;, &lt;samp&gt; and &lt;kgb&gt;"); textarea.appendChild(t); desc = "When defining some computer code in HTML there is four options, " + textarea; } else { desc = 'This item needs a description.'; } document.getElementById('desc').innerHTML=desc; } Oh by the way I'm new to this stuff so go easy on meh.
has answer: http://stackoverflow.com/a/25460646
has title: Javascript createElement("TEXTAREA") shows up as [object...]
has answer: http://stackoverflow.com/a/25460586
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39818565
has text: I'll give [MixItUp2](https://mixitup.kunkalabs.com/) a try for a sec. I'm starting to believe that Isotope isn't just worth of out time.
comment on: http://stackoverflow.com/q/25505261
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39754335
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25473334
has text: You also included jQuery twice.
score: 0

polygon
tags question: http://stackoverflow.com/q/25521146
tag name: polygon
type: Tag
tags question: http://stackoverflow.com/q/25408205

http://stackoverflow.com/q/25424939
has comment: http://stackoverflow.com/comment/39665170
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39663474
tagged with: javascript
has body: I'm building a new website and looking for a solution for this problem (PHP, MySQL, using Zurb Foundation). I want to create an image I can zoom in and out from, that'll be made of 1,000,000 pieces. Each piece should be clickable and upon click more information should arrive from the backend. The color of each piece depends on info coming from the DB as well. The pieces are like pixels. So - three dilemmas: How do I structure the data? How do I create an image with clickable pieces without images? How can I shape the page so it won't load slowly? Thanks! Dana
has title: Creating an Image/Grid solution with CSS and Javascript
has answer: http://stackoverflow.com/a/25425117
answer count: 1
has comment: http://stackoverflow.com/comment/39666665
has comment: http://stackoverflow.com/comment/39666092
favorite count: 0
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
downvote count: 0
type: UnansweredQuestion
tagged with: mysql

http://stackoverflow.com/q/25522040
upvote count: 0
answer count: 1
tagged with: arrays
accepted answer: http://stackoverflow.com/a/25522332
favorite count: 0
has title: I want to transform originalArray to finalArray like below
score: -3
type: AnsweredQuestion
downvote count: 3
has body: folks! I want to transform originalArray to finalArray like below. Anyone help, Thanks, in advance. As you can see, I want to sort by "cnt_bought", like "Sam","Alice" var originalArray = [ {"name":"Sam","cnt_bought":0}, {"name":"John","cnt_bought":5}, {"name":"Alice","cnt_bought":0}, {"name":"Bob","cnt_bought":31} ]; var finalArray = [ {"cnt_bought":0, "name" : ["Sam","Alice"]}, {"cnt_bought":5, "name" : ["John"]}, {"cnt_bought":31, "name" : ["Bob"]} ];
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/25522332
tagged with: javascript
has comment: http://stackoverflow.com/comment/39844080
tagged with: transform

http://stackoverflow.com/q/25523161
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39846456
favorite count: 0
has answer: http://stackoverflow.com/a/25533672
type: Question
has body: I have an array of which I would like to remove objects that have specific props. Basically I'm looking for the opposite of _.where. For example: var arr = [{id:1}, {id:2}, {id:3}]; var result = _.oppositeOfWhere(arr, {id:2}); // should be [{id:1}, {id:3}] I know this can be done using _.reject, but I'm curious if there's a simple way that doesn't require defining a function.
has comment: http://stackoverflow.com/comment/39846437
accepted answer: http://stackoverflow.com/a/25533672
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/39848462
has title: Opposite of where in underscore.js
has comment: http://stackoverflow.com/comment/39846070
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/39846623
has comment: http://stackoverflow.com/comment/39846498
score: 2

http://stackoverflow.com/q/25402954
has title: Creating DOM attributes using ng-repeat
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/25403328
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39622248
type: UnansweredQuestion
upvote count: 1
has body: I have a json using which I am creating elements on the fly with angularjs. The json has a array of key value pairs that I would like to be rendered as attributes on the element. The array could consist of custom data- attributes or events such as onclick. Lets say the json has the following structure: var arr = [ { key : "data-id" , value : "10" }, { key : "onclick" , value : "javascript:window.document.location.href='www.google.com'" } ] Could anyone please provide me a solution where I can render the objects from the above array as attributes of the element. NOTE : The above array arr will be a propert of some other object.
has comment: http://stackoverflow.com/comment/39622178
type: Question
tagged with: angularjs-directive
score: 1
has comment: http://stackoverflow.com/comment/39622148
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39622506
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/39696078
type: QuestionComment
comment on: http://stackoverflow.com/q/25438355
type: Comment
has text: Still working on this, I've found this that is related: http://stackoverflow.com/questions/2109555/nesting-kmz-files
score: 0

http://stackoverflow.com/comment/39808991
comment on: http://stackoverflow.com/q/25503251
score: 4
has text: Yes. Set up the next request in the callback of the first.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/88575937
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25513067
has text: @Neil Yes. Array.apply is used because both map and apply are defined for Array but only apply is defined for Function.

http://stackoverflow.com/comment/39847254
has text: @Vishwanath Checked it using developer tools, mentioned that already in question :-)
comment on: http://stackoverflow.com/q/25523498
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39787780
type: QuestionComment
has text: I think i know what you are saying but i dont want to display the link as member number, i want to pass in the member information in the link to the pop up window.
comment on: http://stackoverflow.com/q/25490813
score: 0
type: Comment

http://stackoverflow.com/comment/39712293
type: Comment
comment on: http://stackoverflow.com/a/25434141
has text: No. This approach does not aim to add methods to promises (which is subclassing `Promise`, and is complicated to propagate) - it "adds" methods (OK, they're static functions actually) to the functions that return the promises. This is much more powerful as it allows you to also intercept the `args` - in fact with your method that takes a promise it's impossible to program an autoretry feature: you don't know what the try was, and can't *invoke* it again.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39739327
type: Comment
type: QuestionComment
has text: If you're using `apache` with the `mod_headers` module just add the following to the `.htaccess` file:``` Header set Access-Control-Allow-Origin "*" ```
score: 0
comment on: http://stackoverflow.com/q/25465115

http://stackoverflow.com/a/25541839
has body: Please make all the scope functions to rootScope functions. Please check the below code. $rootScope.a= function() { $location.url('/a'); return; } $rootScope.b= function() { $location.url('/b'); return; } $rootScope.c = function() { $location.url('/c'); return; } $scope.d= function() { $location.url('/d'); return; } $rootScope.e= function() { $location.url('/e'); return; } $rootScope.f= function() { $location.url('/f'); return; }
has comment: http://stackoverflow.com/comment/39880219
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39880110
answers question: http://stackoverflow.com/q/25541769

http://stackoverflow.com/q/25448354
type: UnansweredQuestion
has body: I have this app that works perfectly as a normal web app. But when I try to put it in a Multi-Device-Hybrid-App format it doesn't work normally. Specifically, the portions that do not work correctly will be highlighted on a screenshot of the app. Here is my full code: JS: var app = angular.module('app', []); app.controller('firstCtrl', function($scope, $timeout) { var myLat, myLon, locLat, locLon; navigator.geolocation.watchPosition(GetLocation); $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" } }]; $scope.SSiteLocs = [{ "name": "502 Nelson St, Greenville, MS 38701", "visibility": "0", "description": "502 Nelson St, Greenville, MS 38701", "styleUrl": "#waypoint", "Point": { "coordinates": "-91.05636,33.415485,0" } }, { "name": "242 Blackhawk Trace, Galena, IL 61036", "visibility": "0", "description": "242 Blackhawk Trace, Galena, IL 61036", "styleUrl": "#waypoint", "Point": { "coordinates": "-90.319778,42.390862,0" } }, { "name": "3747 Ocean Dr, Vero Beach, FL 32963", "visibility": "0", "description": "3747 Ocean Dr, Vero Beach, FL 32963", "styleUrl": "#waypoint", "Point": { "coordinates": "-80.358248,27.659094,0" } }]; $scope.SiteLocs = $scope.SSiteLocs.concat($scope.ASiteLocs); $scope.repoSortOrder = "+name"; function GetLocation(location, myLat, myLon) { myLat = location.coords.latitude; myLon = location.coords.longitude; document.getElementById("lat").innerHTML = myLat; document.getElementById("lon").innerHTML = myLon; $timeout(function() { calculate(); }); } $scope.getCoordDistance = function(myLat, myLon, locLat, locLon) { console.log(myLat.toString(), myLon); var lat1 = locLat; //41.887055 var lon1 = locLon; //-88.469233 var lat2 = myLat; //41.88866…
has answer: http://stackoverflow.com/a/25492546
linked to: http://stackoverflow.com/q/25159706
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: visual-studio-cordova
has title: Web app does not work in Multi-Device-Hybrid-Apps format
tagged with: ripple
tagged with: angularjs

http://stackoverflow.com/q/25494060
type: Question
has answer: http://stackoverflow.com/a/25494248
has title: Javascript merge objects to key -> set of values
tagged with: javascript
has answer: http://stackoverflow.com/a/25494614
score: 0
has answer: http://stackoverflow.com/a/25494469
type: UnansweredQuestion
has body: I'm using underscore, and I'm wondering if there's a more efficient way of accomplishing the following - seems like this should be a function in underscore. var obj1 = { test: 'hello' }, obj2 = { test: 'hello2' }; var merged = {}; _.each(_.keys(obj1), function(key) { merged[key] = [obj1[key], obj2[key]]; }); console.log(merged); Also the limitations of this are that any keys in obj2 not present in obj1 will not be counted - it would be nice if I could get something akin to a full outer join, where the value of one side or the other will be null if it doesn't exist. Also, it would be nice if this wasn't limited to two objects.
answer count: 4
tagged with: underscore.js
has answer: http://stackoverflow.com/a/25494256

http://stackoverflow.com/a/25506755
has body: A simpler way to test if the constructor was called without new is this: function TestIt() { if (!(this instanceof TestIt)) { throw "this function must be called with the new operator"; } } As for the static methods, you should perhaps define them on the class (constructor) instead of on the prototype. Properties defined on the prototype are accessible to instances, while static methods should be accessible on the class itself. TestIt.someStaticMethod = function() { console.log('hello'); } var t=new TestIt(); t.someStaticMethod(); // no method here, exception TestIt.someStaticMethod(); // works
has comment: http://stackoverflow.com/comment/39816634
answers question: http://stackoverflow.com/q/25506610
upvote count: 1
has comment: http://stackoverflow.com/comment/44899065
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/48645954
comment on: http://stackoverflow.com/a/25441576
type: Comment
score: 1
type: AnswerComment
has text: Be careful :) If you have it checked "Show Javascript during replay" you'll be able to stop infinite loop by iMacros. If you have it unchecked - you won't be able to stop infinite loop.

http://stackoverflow.com/a/25529173
has body: Highly recommend you consider using something like caolan's async library to accomplish this. You can do something like this: async.each(openFiles, function(file, callback) { // Perform operation on file here. console.log('Processing file ' + file); callback(); }, function(err) { // if any of the file processing produced an error, err would equal that error if (err) { // One of the iterations produced an error. // All processing will now stop. console.log('A file failed to process'); } else { // do your concatenation here } });
has comment: http://stackoverflow.com/comment/39860272
type: Answer
answers question: http://stackoverflow.com/q/25527959
has comment: http://stackoverflow.com/comment/39857531
score: 0

ytplayer
tag name: ytplayer
tags question: http://stackoverflow.com/q/25499179
type: Tag

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/25504181
tags question: http://stackoverflow.com/q/25396302
tags question: http://stackoverflow.com/q/25464521
tags question: http://stackoverflow.com/q/25459451
tags question: http://stackoverflow.com/q/25396137
tags question: http://stackoverflow.com/q/25507916
tags question: http://stackoverflow.com/q/25517583
tags question: http://stackoverflow.com/q/25398086
tags question: http://stackoverflow.com/q/25459147
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/25409937
tags question: http://stackoverflow.com/q/25456565
tags question: http://stackoverflow.com/q/25489289
tags question: http://stackoverflow.com/q/25457009

http://stackoverflow.com/comment/39680386
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25428097
has text: I see this: "Error: Access denied Code 80041003 Source SWbemObjectEx"

http://stackoverflow.com/a/25461927
type: AcceptedAnswer
score: 1
type: Answer
has body: If I understand your question correctly, you should just add another php function and AJAX call, to get the post on click, something like this (I also added nonce to add some secutiry, it's always a good idea to add that to your ajax calls) HTML: &lt;li&gt;&lt;a data-id="&lt;? echo $success_story-&gt;ID; ?&gt;" data-nonce="&lt;?php wp_create_nonce('get_post'.$success_story-&gt;ID); ?&gt;" class="success-extra" href="#" title=""&gt;&lt;? echo $title; ?&gt;&lt;/a&gt;&lt;/li&gt; PHP: add_action( "wp_ajax_sa_get_post", "sa_get_post" ); add_action( "wp_ajax_nopriv_sa_get_post", "sa_get_post" ); function sa_get_post(){ if ( ! wp_verify_nonce( $nonce, 'get_post_'.$POST['id'] ) ) { // This nonce is not valid. $response['status'] = 'fail'; } else { // The nonce was valid. $post = get_post($POST['id']); $response['status'] = 'success'; $response['post'] = $post; } echo json_encode($response); exit(); // this is needed, as otherwise the AJAX returns an extra 0 } JS: $('.success-extra').on('click', function () { jQuery.ajax({ type: "POST", url: "WORDPRESSDIRECTORY/admin-ajax.php", cache: false, data: { action: "sa_get_post", id: $(this).attr('data-id'), nonce: $(this).attr('data-nonce') }, success: function(data) { var result = $.parseJSON(data); if (result.status != 'success') { // display error messago or something } else { // do whatever you want with your result.post } } }) Hope this helps.
upvote count: 1
answers question: http://stackoverflow.com/q/25427933
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25427933

http://stackoverflow.com/comment/39700983
type: Comment
comment on: http://stackoverflow.com/a/25424253
has text: Hey Xanco, oh yeah, it's quite close to what I need, hehe :). There's only one crucial feature: I'd like the sections have headings and make the script find and display it in a dynamic way, like: ` First section Some content Second section Some other content ` and have the scrollerbar show the current position's section heading. Would that be possible, even best without having to stick it to static IDs (since this is gonna be incorporated into WordPress)? Thank you again for helping!!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39745578
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25460990
has text: @Brunis I was unable to set fiddle , due to document.write() and it's not allowed in fiddle .Iframe should contain , so document.write() is required .
score: 0

http://stackoverflow.com/q/25416694
has body: &lt;div id="card0"&gt; &lt;div id="card1"&gt; &lt;div id="card2"&gt; &lt;div id="card3"&gt; &lt;div id="card4"&gt; I have created a card, deck, and hand "class." What I would like to do is create an event handler for an array of cards. for (var i = 0; i &lt; 5; i++) { myHand.cards[i] = myDeck.deal(); } I would like to do also in the loop to create event handlers: $("#card"+i).on("click", cardClicked); function cardClicked() { alert(this); } Is there a way to find out which div was clicked on? I have tried doing an anonymous function passing event. I have tried with this, but I don't know what else to try.
type: Question
has comment: http://stackoverflow.com/comment/39648828
has comment: http://stackoverflow.com/comment/39648729
downvote count: 0
has answer: http://stackoverflow.com/a/25416741
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39648656
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39649116
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25416741
upvote count: 1
has comment: http://stackoverflow.com/comment/39648878
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39648735
score: 1
has title: Getting a value from a click event
has comment: http://stackoverflow.com/comment/39648705

http://stackoverflow.com/a/25520156
answers question: http://stackoverflow.com/q/25520102
has comment: http://stackoverflow.com/comment/39840844
has body: if its possible you need to create a code that will escape apostrophe before it will be executed by the browser so change the onclick="adviceEvent('${advice?.content}');" into var str1 = '${advice?.content}'.replace("'","\\'"); onclick="adviceEvent('"+str1+"');" I think using another extra variable will do just to get away with all the confusion between escaping quotes within the codes itself.
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/25413617
downvote count: 0
has comment: http://stackoverflow.com/comment/39643211
linked to: http://stackoverflow.com/q/10668499
type: Question
tagged with: javascript
tagged with: forms
has answer: http://stackoverflow.com/a/25413938
accepted answer: http://stackoverflow.com/a/25413938
has comment: http://stackoverflow.com/comment/39643287
upvote count: 2
has body: NOTICE I realize this is very unusual and not really the "right" way but it is how this Wizard plugin is setup and out Wizard is already built using this jQuery Plugin so I would like to figure out a way to submit the data to my PHP script now as 1 FORM POST I am working on a Form Wizard that uses Bootstrap. It is different from anything I have ever worked with before in JavaScript and Frontend development for a FORM because instead of being 1 HTML FORM with all the form fields in a single form, it is broken into separate Forms. The code for the jquery plugin for this Wizard is located here https://github.com/sathomas/acc-wizard There is a live Demo to see the above Wizard in action here http://sathomas.me/acc-wizard/#prerequisites Each Step in the Wizard is wrapped in it;s own &lt;form&gt; tags. So in the last/final step of the Wizard, instead of a NEXT button, there is a Submit button. Now obviously this only Submits the very last &lt;form&gt; that the Submit button/field is attached to. I need to somehow make the Submit button submit all the Forms in the Wizard to a PHP script and have it POST as one single Array of items instead of each Form being separate. I am not good enough with JavaScript to know exactly how to go about doing this as I have never seen it done before! jQuery is also available to use in this project. I would appreciate any ideas and help in getting this to work and being able to submit multiple forms as 1 form with the last submit button. Form 1 &lt;form id="form-test-1"&gt; &lt;p&gt; Select a Channel Letter Sign Type &lt;select name="channel_type" class="form-control" id="channel_type" size="1"&gt; &lt;option value="1"&gt;Front Lit&lt;/option&gt; &lt;option value="2"&gt;Reverse Lit (Halo)&lt;/option&gt; &lt;option value="3"&gt;Front Lit &amp;amp; Back Lit&lt;/option&gt; &lt;option value="4"&gt;Reverse Pan Exposed Neon&lt;/option&gt; &lt;option value="5"&gt;Open Face&lt;/option&gt; &lt;option value="6"&gt;Reverse Pan Exposed Neon &amp;amp; Ba…
has comment: http://stackoverflow.com/comment/39643458
answer count: 1
has comment: http://stackoverflow.com/comment/39643232
has comment: http://stackoverflow.com/comment/39643275
tagged with: jquery
has comment: http://stackoverflow.com/comment/39643278
favorite count: 0
has comment: http://stackoverflow.com/comment/39643394
has comment: http://stackoverflow.com/comment/39643463
has comment: http://stackoverflow.com/comment/39643344
linked to: http://stackoverflow.com/q/9280720
has comment: http://stackoverflow.com/comment/39643205
has comment: http://stackoverflow.com/comment/39643155
score: 2
type: AnsweredQuestion
has title: How to submit multiple HTML Forms as One Form to a PHP script using JavaScript?

http://stackoverflow.com/comment/39788048
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25491600
has text: Great answer! Wasn't thinking about just storing a reference to the point in the table where I wanted to be - makes sense!
type: AnswerComment

http://stackoverflow.com/comment/39648931
type: AnswerComment
score: 0
type: Comment
has text: @JaredFarrish Yes, see the end of my last reply.
comment on: http://stackoverflow.com/a/25416741

http://stackoverflow.com/comment/39830172
type: Comment
type: QuestionComment
score: 0
has text: @ThadBlankenship: The current code is rather involved, but I'll see if I can't boil it down to something fidleable.
comment on: http://stackoverflow.com/q/25513935

static
tags question: http://stackoverflow.com/q/25411229
tag name: static
type: Tag

http://stackoverflow.com/comment/39832885
has text: If you show the code you use to hide the DIV, I'll show how it can be modified to disable the input.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25515386

http://stackoverflow.com/q/25458168
has answer: http://stackoverflow.com/a/25502149
has body: I am having trouble animating in Three.js, I'm not sure if the problem is in my code or my blender file. Here is the code I use to load and animate the model, please tell me if there is something wrong with it. loader.load('model.js', function (geometry, materials) { var mesh, material; mesh = new THREE.SkinnedMesh( geometry, new THREE.MeshFaceMaterial(materials) ); material = mesh.material.materials; for (var i = 0; i &lt; materials.length; i++) { var mat = materials[i]; mat.skinning = true; } scene.add(mesh); THREE.AnimationHandler.add(mesh.geometry.animation); animation = new THREE.Animation( mesh, 'ArmatureAction', THREE.AnimationHandler.CATMULLROM ); animation.play(); Thanks in Advance!
tagged with: javascript
has title: Three.js Skeletal Animation
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39756520
tagged with: three.js
tagged with: animation
score: 1
upvote count: 1
tagged with: skinning
type: Question

http://stackoverflow.com/comment/39869137
score: 0
type: Comment
has text: check this out: view-source:http://www.hiphopearly.com/download/TE1ND653
type: QuestionComment
comment on: http://stackoverflow.com/q/25535651

http://stackoverflow.com/q/25545210
linked to: http://stackoverflow.com/q/1343801
has comment: http://stackoverflow.com/comment/39886011
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39885905
linked to: http://stackoverflow.com/q/1017424
tagged with: javascript
has comment: http://stackoverflow.com/comment/39886320
duplicate of: http://stackoverflow.com/q/1017424
type: Question
linked to: http://stackoverflow.com/q/2190801
has answer: http://stackoverflow.com/a/25545743
has title: Get value from included javascript file
has comment: http://stackoverflow.com/comment/39885843
has comment: http://stackoverflow.com/comment/39885859
score: 0
has body: I am including a javascript file in my web page like as follows, Is possible to take the value mytestvalue to a variable in my javascript file my_script.js ? ie var my_value=somefunction(); //my_value = 'mytestvalue';
answer count: 2
has answer: http://stackoverflow.com/a/25549047

http://stackoverflow.com/q/25536233
accepted answer: http://stackoverflow.com/a/25536537
tagged with: javascript
has comment: http://stackoverflow.com/comment/39870278
has answer: http://stackoverflow.com/a/25536378
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25536537
tagged with: jquery
has comment: http://stackoverflow.com/comment/39870240
possible better answer: http://stackoverflow.com/a/25536378
type: AnsweredQuestion
has body: With a button click I am able to generate draggable divs that are then placed inside another div(container). The divs that are created from the button click are automatically placed on the left side of the parent(container) div. Then the user has the ability to drag it to the desired location. Is there a way to let the user generate the new div and then let them determine the location of this new div with a mouse click? JSFIDDLE As the user is figuring out the location and hovering through the container provide some sort of temporary guide something like this below: Jquery $('#button').click(function (e) { $('&lt;div /&gt;', { 'class': 'draggable ui-widget-content', text: $('textarea').val(), appendTo: '.middle-side', draggable: { containment: 'parent' } }); }); HTML &lt;textarea rows="4" cols="50" placeholder="Enter Text Here!"&gt;&lt;/textarea&gt; &lt;br/&gt; &lt;input type="button" id="button" value="Add Div with Text" /&gt; &lt;br/&gt; &lt;div&gt; &lt;div class="middle-side"&gt;&lt;/div&gt; &lt;/div&gt;
type: Question
has title: Placing a div inside another div on mouse click
has comment: http://stackoverflow.com/comment/39870830
has answer: http://stackoverflow.com/a/25536505

http://stackoverflow.com/a/25422698
type: Answer
answers question: http://stackoverflow.com/q/25421044
score: 0
has body: You can't toggle disabled by using .attr("disabled", false). This will cause dropdown disable anyway. You use this instead. $("#aap_name").attr("disabled", "disabled"); $("#aap_name").removeAttr("disabled"); Here is JSFiddle that should works for your case function changeDrop() { var val= document.getElementById("ttype").value; if(val == "Common") $("#aap_name").attr("disabled", "disabled"); else $("#aap_name").removeAttr("disabled"); };

http://stackoverflow.com/comment/39614963
has text: Isn't it better if we can your form html
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25398864
score: 0

http://stackoverflow.com/comment/39630657
has text: an acknowldgement system? tries again till a +ve ACK is received
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25407282

http://stackoverflow.com/q/25535423
tagged with: javascript
favorite count: 0
tagged with: android
has body: I'm starting out with PhoneGap, trying to write my first Android plugin. I am basing it on the Echo example from the docs. It compiles and installs, but the call to exec doesn't seem to work. Can anyone suggest what is wrong? The index.html, Java code and config.xml are below. I get the alert msg for "running exec" but then nothing. PhoneGap Test App. Apache Cordova Connecting to Device Device is Ready Run Plugin package org.apache.cordova.plugin; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.PluginResult; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /** * This class echoes a string called from JavaScript. */ public class Echo extends CordovaPlugin { /** * Executes the request and returns PluginResult. * * @param action The action to execute. * @param args JSONArry of arguments for the plugin. * @param callbackId The callback id used when calling back into JavaScript. * @return A PluginResult object with a status and message. */ public PluginResult execute(String action, JSONArray args, String callbackId) { try { if (action.equals("echo")) { String echo = args.getString(0); if (echo != null && echo.length() > 0) { return new PluginResult(PluginResult.Status.OK, echo); } else { return new PluginResult(PluginResult.Status.ERROR); } } else { return new PluginResult(PluginResult.Status.INVALID_ACTION); } } catch (JSONException e) { return new PluginResult(PluginResult.Status.JSON_EXCEPTION); } } } <?xml version='1.0' encoding='utf-8'?> PhoneGapTest Phonegap app. to test Wifi. <content src="index.html" /> <access origin="*" /> <plugin name="Echo" value="org.apache.cordova.plugin.Echo" />
tagged with: cordova
answer count: 0
has comment: http://stackoverflow.com/comment/39871796
type: UnansweredQuestion
tagged with: plugins
has title: Phonegap, plugin exec function doesn't seem to get called
has comment: http://stackoverflow.com/comment/39869626
score: 2
type: Question
upvote count: 2
downvote count: 0

http://stackoverflow.com/a/25410077
type: AcceptedAnswer
has body: Something more like this function validate(active) { var numb = active.prop('id').split('-').pop(), inputs = $("#formSteps-"+numb+" :input:not(:submit)"), value = true; inputs.each(function () { if ($(this).val().length &lt; 1 || $(this).hasClass("error")) { value = false; } }); return value; }
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25410016
answers question: http://stackoverflow.com/q/25410016
upvote count: 1

http://stackoverflow.com/comment/39698754
type: AnswerComment
comment on: http://stackoverflow.com/a/25444023
has text: @Sir Celsius: Well I'll try to explain it in an addendum, hopefully it won't be too convoluted.
type: Comment
score: 0

http://stackoverflow.com/q/25396163
score: 33
has body: Here is my code: var textArray = ['#text1', '#text2', '#text3', '#text4', '#text5', '#text6', '#text7', '#text8'] $('#capture').click(function() { for (var i in textArray) { console.log($(i).offset()); } }); Not sure why I am getting undefined in console. I feel like I am missing something very simple.
possible better answer: http://stackoverflow.com/a/25396178
upvote count: 34
has answer: http://stackoverflow.com/a/25396178
has answer: http://stackoverflow.com/a/25396188
downvote count: 1
has answer: http://stackoverflow.com/a/25396172
linked to: http://stackoverflow.com/q/9329446
has comment: http://stackoverflow.com/comment/39610346
answer count: 4
has answer: http://stackoverflow.com/a/25396183
duplicate of: http://stackoverflow.com/q/9329446
tagged with: javascript
has title: Why am I getting 'undefined' in console?
tagged with: jquery
type: Question
type: AnsweredQuestion
favorite count: 0
has comment: http://stackoverflow.com/comment/39610325
accepted answer: http://stackoverflow.com/a/25396183

http://stackoverflow.com/q/25441928
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/35890059
downvote count: 0
has comment: http://stackoverflow.com/comment/39694751
has answer: http://stackoverflow.com/a/25442790
accepted answer: http://stackoverflow.com/a/25442790
type: Question
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/39695775
tagged with: javascript
has comment: http://stackoverflow.com/comment/39694716
has comment: http://stackoverflow.com/comment/39694760
has comment: http://stackoverflow.com/comment/39694726
has title: Node.js script stops without any error
favorite count: 0
has comment: http://stackoverflow.com/comment/39694815
has body: I've written a scraper using the scraper module and the queue function of async module. I read the list of URLs to scrap from a json file and write the informations in another JSON file. This is my script: var fs = require("fs"); var scrap = require("scrap"), async = require("async"); var errors = []; // Queue a list of URLs var queue = JSON.parse(fs.readFileSync("products.json", "utf8")); var len = queue.products.length; var q = async.queue(function (url, done) { scrap(url, function(err, $) { var product = {}; product.name = $("#page-body h2").first().text().trim(); product.myarr = []; product.picture = $(".content img").first().attr("src"); try { if (product.picture.indexOf("someword") &gt; 1) { delete product.picture; } } catch (e) { console.error(e); } $(".content [style^=\"color: #\"] [style=\"font-weight: bold\"], .content [style=\"font-weight: bold\"] [style^=\"color: #\"]").each(function() { product.myarr.push($(this).text().trim().toLowerCase()); }); if (product.myarr.length) { fs.appendFile("products-parsed.json", JSON.stringify(product) + ",\n", function (err) { console.log(queue.products.indexOf(url), len, err); if (err) { errors.push(queue.products.indexOf(url)); } done(); }); } }); }, 20); q.drain = function() { console.log(errors); }; q.push(queue.products); When I run it, after about 3.000 pages, it stops (quit) and it does not give any error, I have to start from the latest worked page using: q.push(queue.products.slice(lastWorkedPage, queue.products.length - 1)); How can I fix this problem?
has comment: http://stackoverflow.com/comment/39694786
tagged with: node.js
possible better answer: http://stackoverflow.com/a/35890059
has comment: http://stackoverflow.com/comment/39694849

http://stackoverflow.com/comment/39739800
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25465860
has text: `$.fn.tabs = ...` Is that the answer to your question?
score: 1

http://stackoverflow.com/a/25531901
answers question: http://stackoverflow.com/q/25531793
score: 0
has body: just add { containment: "parent" } inside your draggable function $(function() { $( "#draggable" ).draggable({ containment: "parent" }); });
type: Answer

http://stackoverflow.com/q/25425921
has answer: http://stackoverflow.com/a/25426657
tagged with: node.js
score: 4
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has body: i am rendering a jade file as : On server side : var html = jade.renderFile('ui/index.jade', { printHello : function(){ console.log('Hello World'); } }); On client side in index.jade : script(type="text/javascript"). var s = #{JSON.stringify(patternMatch)}; s.printHello(); //Desired to print 'Hello world' on browser console But s.printHello() says Object Object does not have function 'printHello'; and console.log(s); // gives {} 'empty object'; Why is that so.? And how do i make printHello present and work?
upvote count: 4
tagged with: pug
downvote count: 0
favorite count: 0
type: Question
has title: sending javascript object with key : function pair in jade template

http://stackoverflow.com/q/25394060
answer count: 1
has comment: http://stackoverflow.com/comment/39608252
favorite count: 0
has comment: http://stackoverflow.com/comment/39606404
has answer: http://stackoverflow.com/a/25395347
has comment: http://stackoverflow.com/comment/39607856
type: UnansweredQuestion
has body: I am trying to create an arrow pointing upwards. I am trying to to do this in purely css. I am not able to reproduce in my fiddle as it uses scss. But thought It may help and provide more information. http://jsfiddle.net/311s1whu/4/ I have currently created trapezium shape, which is not quite what I would like. https://docs.google.com/file/d/0B3IBJKENGE7RRFR1WHZDYTF6LTQ/edit This is the scss that I have tried: .icon__controls__controls { float: left; display: block; margin-right: 2.1276595745%; width: 36.170212766%; margin-left: 38.2978723404%; margin-top: 10px; margin-bottom: 30px; text-align: center; } .icon__controls__controls:last-child { margin-right: 0; } .icon__controls__controls [class^=icon-] { font-size: 20px; font-size: 1.25rem; display: inline-block; vertical-align: baseline; zoom: 1; *display: inline; *vertical-align: auto; color: #666; margin: 0 5px; vertical-align: top; } .icon__controls__controls .zoom-out { color: red; } .icon__controls__controls:after { display: none; content: ''; z-index: 3; border: 50px solid transparent; /* border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 5px solid black; */ } .icon__controls__controls:after { border-top-color: #ef6f00; } .icon__controls__controls.active:after { display: block; }
has comment: http://stackoverflow.com/comment/39606698
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39606618
has comment: http://stackoverflow.com/comment/39606930
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39607753
tagged with: sass
has comment: http://stackoverflow.com/comment/39606399
has comment: http://stackoverflow.com/comment/39607618
tagged with: javascript
has comment: http://stackoverflow.com/comment/39606773
has comment: http://stackoverflow.com/comment/39607845
has comment: http://stackoverflow.com/comment/39607911
score: 0
has title: trying to achieve arrow pointing upwards

http://stackoverflow.com/a/25466110
answers question: http://stackoverflow.com/q/25452138
upvote count: 1
type: Answer
has body: So I had to change a bit my EventSource and it worked with : eventSources: [ { url: Routing.generate('fullcalendar_loader'), type: 'GET', // A way to add custom filters to your event listeners data: { Information : "value" }, error: function() { //alert('There was an error while fetching Google Calendar!'); } } ] and I added a route : ADesignsCalendarBundle:Calendar:loadCalendar true Hope it will work for you to if you have the same problem :)
downvote count: 0
score: 1

http://stackoverflow.com/q/25473606
has title: JSON saving issue
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39764868
has comment: http://stackoverflow.com/comment/39754468
has comment: http://stackoverflow.com/comment/39754167
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39756366
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: I'm trying to convert a BackboneJS app to plain jQuery. My previous Backbone app had some code that serialized a form (it used this): var json = $('#book_form').serializeJSON(); this.model.set(json); this.model.save(); when sent to the server, it looked like: {"book"=&gt;{"name"=&gt;"The Hilarious Book", "summary"=&gt;"", "authors"=&gt;[{"name"=&gt;"Jeff", "college"=&gt;"Harvard"}]}} But with jQuery, now my code looks like: var json = $('#book_form').serializeJSON(); $.ajax({ url: "URL", type: "post", data: json }); but when it is sent to the server, it looks like: {"book"=&gt;{"name"=&gt;"The Hilarious Book", "summary"=&gt;"", "authors"=&gt;{"0"=&gt;{"name"=&gt;"Jeff", "college"=&gt;"Harvard"}}}}
tagged with: backbone.js

http://stackoverflow.com/comment/39620935
has text: @parthicool05 , I am using this code in inside of interval function. There is nothing more than this code. I am failing here it self.
type: QuestionComment
comment on: http://stackoverflow.com/q/25401942
score: 0
type: Comment

http://stackoverflow.com/a/25402510
answers question: http://stackoverflow.com/q/25402444
score: 6
accepted answer of: http://stackoverflow.com/q/25402444
downvote count: 0
type: AcceptedAnswer
upvote count: 6
type: Answer
has body: its because the box-model, you can try with box-sizing: border-box; but it will not help I guess. I suggest you to use a transparent border on it. #components .wrp { padding: 10px; border: 2px solid transparent; border-radius: 25px; }

http://stackoverflow.com/a/25520514
type: Answer
has comment: http://stackoverflow.com/comment/39841409
answers question: http://stackoverflow.com/q/25520419
has body: You are incorrectly accessing the data property of the json response. It can be accessed using json['data'] Try this: $(json['data']).find('.one_feed').length;
score: 0
has comment: http://stackoverflow.com/comment/39841487

http://stackoverflow.com/q/25419897
score: 0
answer count: 3
upvote count: 1
downvote count: 1
tagged with: button
duplicate of: http://stackoverflow.com/q/2847185
favorite count: 0
has comment: http://stackoverflow.com/comment/39654134
type: UnansweredQuestion
has body: I have this button Sabitle And I have this function function displayMessage(message) { chatTextArea.value = message + "\n"; chatTextArea.scrollTop = chatTextArea.scrollHeight; if(message == "Stop") { !!!!! I want to click stopButton in this area !!!! } } How can I click this button in function?
has comment: http://stackoverflow.com/comment/39654027
has title: how to click a button in javascript function?
has answer: http://stackoverflow.com/a/25419939
has answer: http://stackoverflow.com/a/25419931
has comment: http://stackoverflow.com/comment/39654198
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/2847185
has answer: http://stackoverflow.com/a/25419921

http://stackoverflow.com/a/25524841
has body: The problem is your syntax. $('form.simple_form.new-channel').submit perform_validation() Because of javascript's liberality the fact that you are not invoking submit here and you have no semicolin after perform_validation... causes no error, but simply invokes perform validation as if it was on the line all by its self with a semicolin. to correct this, do this $('form.simple_form.new-channel').submit(perform_validation);
upvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39849188
downvote count: 2
has comment: http://stackoverflow.com/comment/39848930
has comment: http://stackoverflow.com/comment/39850307
score: -2
answers question: http://stackoverflow.com/q/25524334

http://stackoverflow.com/q/25418917
tagged with: http://stackoverflow.com/tag/html
has title: Reading smartphone sensor data through a remote website
has comment: http://stackoverflow.com/comment/39652482
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25419217
score: 0
has comment: http://stackoverflow.com/comment/39652786
answer count: 1
has body: Is it possible to read sensor data from smartphones when they browse a remote website? In other words, assume there is a website called www.xyz.com that requests for some sensor data like accelerometer reading when someone browses that page. Is this possible (raw values are fine)? If so, what is the easiest way to do that? Could you point me to some useful links.
type: UnansweredQuestion
tagged with: android

restangular
tags question: http://stackoverflow.com/q/25429386
tag name: restangular
tags question: http://stackoverflow.com/q/25436350
tags question: http://stackoverflow.com/q/25404617
type: Tag

http://stackoverflow.com/a/25512740
upvote count: 1
has body: Have you looked at this site?: http://responsivetest.net/ Simply put in your websites URL and you can select what type of device you would like to view it on.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25512510

http://stackoverflow.com/comment/113570977
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25394005
has text: it's worth noting that gz can be used only once. After it has been closed, no more data can be written to it. Therefore it's a often better to initialize gz during stream creation, not once for the whole file

http://stackoverflow.com/comment/39948852
comment on: http://stackoverflow.com/a/25543324
type: Comment
has text: Thanks for the reply. It didn't fix it in my app but I just tested the same concept here http://jsfiddle.net/7v2mz24v/ and for some reason I don't need to do any of that and it works fine. I can't see why its an issue in my other app.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39723500
type: QuestionComment
has text: The way I've seen is to use the promise returned by `then()` to chain the promises, is there a reason you put them into an array? Could you explain that a little more?
score: 0
comment on: http://stackoverflow.com/q/25456912
type: Comment

http://stackoverflow.com/q/25439787
type: Question
has comment: http://stackoverflow.com/comment/39703779
answer count: 2
has comment: http://stackoverflow.com/comment/39690841
has title: jQuery for populating one datapicker value on other datePicker
has comment: http://stackoverflow.com/comment/39690884
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25439850
has answer: http://stackoverflow.com/a/25439935
has body: i am trying to copy the date field(having Datepicker) value from one date field startDate into another field serviceDate on click of button using jquery. &lt;script type="text/javascript"&gt; function init() { var startDate = $("#startDate_1").val(); var servicesDate; $("#servicesDate").val(date1); } But its not working.Please suggest.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39698527
score: 0

http://stackoverflow.com/comment/39868493
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25535405
type: QuestionComment
has text: I have edit fiddle link which is http://jsfiddle.net/2kbbgvts/

http://stackoverflow.com/q/25444582
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39699388
type: Question
has comment: http://stackoverflow.com/comment/39699461
has comment: http://stackoverflow.com/comment/39699585
tagged with: node.js
has answer: http://stackoverflow.com/a/25444815
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25444815
has title: File not creating when using writeFile in nodejs
tagged with: javascript
has comment: http://stackoverflow.com/comment/39699517
tagged with: file-io
has body: Following is my code in update method for an event - Event.findOneAndUpdate({_id: req.body._id}, updateData, function(err, event){ if (err) { res.send({"message": "Something went wrong!", "err": err, "status_code": "500"}); } else { console.log("----I AM IN ELSE STATEMENT----"); // WRITE DATA TO LOG FILE fs.writeFile("/logs/update-event.txt", event, function(err) { if(err) throw err; res.send({"message": "success", "data": event, "status_code": "200"}); }); } }); And following is the error I am getting when updating - /home/myproject/controllers/events.js:71 if(err) throw err; ^ Error: ENOENT, open '/logs/update-event.txt' Though If am using the following code, it is creating File at the root of the folder- fs.writeFile("update-event.txt", event, function(err) { I tried by manually creating logs named folder but no luck. Let me know what I am doing wrong here.

http://stackoverflow.com/a/25401689
has comment: http://stackoverflow.com/comment/39839065
has comment: http://stackoverflow.com/comment/39805978
has comment: http://stackoverflow.com/comment/39844123
upvote count: 3
has comment: http://stackoverflow.com/comment/39838634
has comment: http://stackoverflow.com/comment/39809163
has body: Check out this fiddle. http://jsfiddle.net/7xjqzmqz/ Updated fiddle Note I'm using Jquery It isn't using your code specifically, but hopefully it gets the point across. Replace the url field with where you plan to POST to. //message is just an object to keep the comment var message = {name: 'Gabs00'}; $('form').on('submit', function(e){ //stop page reload e.preventDefault(); //Using $(this), target this specific form message.comment = $(this).find('.message').val(); var json = JSON.stringify(message); //Finding the parent div, to make sure I append only to this forms comment list var $parent = $(this).closest('.item-to-comment'); $.ajax({ type: 'POST', url: '/echo/json/', data:{json: json}, success: function(resp){ //Traversing back down the dom var $ul = $parent.find('.comments'); $ul.find('li').removeClass('special'); $ul.append('&lt;li class="special"&gt;' + resp.name + ': ' + resp.comment + '&lt;/li&gt;'); } }) });
answers question: http://stackoverflow.com/q/25400550
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39847678
has comment: http://stackoverflow.com/comment/39845976

http://stackoverflow.com/comment/39876908
score: 0
has text: It's the error block, anything winthin it is within the error scope.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25539922

http://stackoverflow.com/comment/39881657
type: AnswerComment
has text: Thanks for the edit! But I want to keep the actual content and just match the tags
type: Comment
comment on: http://stackoverflow.com/a/25541831
score: 0

http://stackoverflow.com/q/25509130
has body: I'm using breeze.js to get some serverdata on the client, this works fine. To create a more modular application i want to create a 'dataservice' to bundle the breeze query's in 1 module to be included in other modules as a dependency. this is the module: define(function () { var serviceName = window.location.protocol + "//" + window.location.host + '/breeze/n0uk', // route to the Web Api controller manager = new breeze.EntityManager(serviceName); function getPoster(callsign) { var query = breeze.EntityQuery.from('Posters').where("Callsign","==",callsign); return manager.executeQuery(query); }; return { getPoster:getPoster }; }); I've created a testmodule to test the function: define(["common/dataService"],function(n0uk) { alert("home/index geladen"); n0uk.getPoster("pe1l").then(function(data) { alert(data.Name); } ); }); sadly there is no data returned. I'm a breeze and require newby ( and js experience is also not topnotch). Can someone direct me in the right direction?
type: AnsweredQuestion
tagged with: javascript
type: Question
has title: Create dataservice with require.js + breeze.js
score: 0
tagged with: require
answer count: 1
has answer: http://stackoverflow.com/a/25513760
accepted answer: http://stackoverflow.com/a/25513760
tagged with: breeze

http://stackoverflow.com/a/25519027
has body: You can do document.getElementById and give the id to the a tag. To get the text you can use innerHTML function Working Fiddle HTML Markup Goes To Example.com JS: document.getElementById("test").innerHTML If you want it by href attribute only then you have to loop it over var els = document.getElementsByTagName("a"); for (var i = 0, l = els.length; i < l; i++) { var el = els[i]; if (el.href === 'http://www.example.com/') { alert(el.innerHTML); } }
answers question: http://stackoverflow.com/q/25518997
type: Answer
upvote count: 1
score: 0
has comment: http://stackoverflow.com/comment/39838941
downvote count: 1

http://stackoverflow.com/q/25537319
tagged with: jquery
type: UnansweredQuestion
has title: Storing additional data in CSS - accessing custom CSS parameters with jQuery
duplicate of: http://stackoverflow.com/q/2926326
score: 1
favorite count: 0
type: Question
has body: I have my own GUI generator for C++ applications. I don't want to create own file format for my GUI, and instead, I want to use simplified CSS for it. For example: #panel1{ width: 100px; height: 50px; background-color: red; } Thanks to it, somebody who is using my program won't have to learn new file format. And I can preview my GUI not only in my program, but also in any web browser (when I include some reset.css and few global css rules/fixes). But I've found an solid problem. I have some rules that do not exists in CSS (let's say it's background-id of type int). I can add that parameter to #panel1, browser will ignore it. The problem is, to preview my GUI in web browser, I need to apply my JavaScript/jQuery fix to each parameter (beucase of diffrences in interpretation of e.g. position in CSS and my model). For standard CSS parameters I can do it like that: fixWidth( $('#panel1').css('width') ); But it won't work for background-id (my custom parameter): fixBackgroundID( $('#panel1').css('background-id') ); because jQuery do not recognize it, unfortunatelly. Is there any walkaround for it?
tagged with: css
linked to: http://stackoverflow.com/q/2926326
upvote count: 1
has comment: http://stackoverflow.com/comment/39872340
answer count: 0
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25512433
has body: Because attributes are only strings, this code values[attr.nodeName] = attr.value; cannot capture your object-valued data. Instead, JavaScript converts your object to a string, which is why you see [Object object]. Capturing objects with mustaches ({{ }}) is a special Polymer feature that you enable by publishing the property as an attribute (or listing it in the publish map in the prototype). If, instead of making app-globals generic, we instead publish values and data directly, then we can make it work like so: {{globals.data.labels[property]}}: {{globals.data[property]}} Your original code doesn't have the json filter, but otherwise we are again asking Javascript to put an object in a string context, and it will render [Object object]. http://jsbin.com/vusayo/10/edit
score: 0
has comment: http://stackoverflow.com/comment/39844629
has comment: http://stackoverflow.com/comment/39883859
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39859020
accepted answer of: http://stackoverflow.com/q/25486261
answers question: http://stackoverflow.com/q/25486261

http://stackoverflow.com/comment/39897535
score: 0
comment on: http://stackoverflow.com/a/25531869
type: AnswerComment
type: Comment
has text: @SyedIbrahim i've updated my answer to include a non-jQuery way as well.

http://stackoverflow.com/comment/39808828
type: AnswerComment
type: Comment
has text: My suggestion in use data-* attribute in your links. Like this: 'info' and then use attribute value in your js.
comment on: http://stackoverflow.com/a/25502736
score: 0

http://stackoverflow.com/q/25481216
has answer: http://stackoverflow.com/a/25489391
tagged with: webrtc
answer count: 1
tagged with: getusermedia
favorite count: 0
type: UnansweredQuestion
has body: I'm trying to create a Object URL from an audio blob created from getUserMedia. The code works within Chrome, but there are problems in Firefox. The error: When I call stopAudioRecorder() it stops at audio_player.src = URL.createObjectURL(audio_blob); TypeError: Argument 1 is not valid for any of the 2-argument overloads of URL.createObjectURL. Code: var stopAudioRecorder = function(audio_recorder) { var audio_blob, audio_player, new_recording, save_button; audio_recorder.stopRecording(); audio_blob = audio_recorder.getBlob(); audio_player = document.createElement("audio"); audio_player.src = URL.createObjectURL(audio_blob); audio_player.controls = true; audio_player.play(); $('#new_recording').appendChild(audio_player); recording = false; return ($("#record_button")).text("Start recording"); }; I attempted to provide some cross-browser compatibility by adding a wrapper function function createObjectURL ( file ) { if ( window.webkitURL ) { return window.webkitURL.createObjectURL( file ); } else if ( window.URL &amp;&amp; window.URL.createObjectURL ) { return window.URL.createObjectURL( file ); } else { return null; } } from How to choose between `window.URL.createObjectURL()` and `window.webkitURL.createObjectURL()` based on browser, but that didn't work
score: 2
downvote count: 0
linked to: http://stackoverflow.com/q/11277677
type: Question
tagged with: javascript
has title: URL.createObjectURL for audio blob gives TypeError in Firefox
upvote count: 2
has comment: http://stackoverflow.com/comment/39780540
tagged with: firefox

http://stackoverflow.com/a/25486192
accepted answer of: http://stackoverflow.com/q/25485933
answers question: http://stackoverflow.com/q/25485933
type: AcceptedAnswer
downvote count: 0
has body: You must be talking about getters and setters. Those are function that gets called 'behind the scene' when you read (get) or assign (set) an object property. They are quite standard (IE>=9), but have a somehow complicated syntax. Look mdn : https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Object/defineProperty A (verbose) example, implementing a property backed by a variable : var A = (function() { var self = {}; var x = 0; var xPropertyDescriptor = { enumerable : true , get : function() { return x }, set : function(val) { x=val } }; Object.defineProperty(self, 'x', xPropertyDescriptor); return self; } () ); After the call to defineProperty, you can access 'x' just like a regular property, and either the get or set function will get called. So basically, writing : A.x = 12 // will call the getter : function(12) { x=12 }, and set the variable. Notice that you can define a getter/setter on the prototype for later having more efficient object creation (otherwise you have to define them in the constructor for each instance.). Yet defining the properties in the constructor is the only way to use a closure (like in the example above) to have truly private members. In use : var res = A.x ; // res == 0 A.x = 12 ; var res2 = A.x // res2==12
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/25467947
accepted answer of: http://stackoverflow.com/q/25467937
answers question: http://stackoverflow.com/q/25467937
score: 4
has body: $('select').each(function(){ if (!this.options.length) this.disabled = true; }); You can also do something like: $('select').prop('disabled', function () { return !this.options.length; });
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/25443956
tagged with: node.js
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25444111
tagged with: javascript
tagged with: express
has body: I have my controller like this //Get the Helpers var authHelper = require('authHelper'); //Route router.get('/manager', authHelper.checkPerm(req, res, next), function(req, res) { }); my authHelper.js exports.checkPerm = function(req, res, next){ if (req.user) { next(); } else { res.redirect('/sign-in'); } } This is the error i am getting router.get('/manager', authHelper.checkPerm(req, res, next), function(req, res ^ ReferenceError: req is not defined
score: 0
has title: Use Authentication function in express route
answer count: 1
accepted answer: http://stackoverflow.com/a/25444111

http://stackoverflow.com/a/25426667
score: 3
has body: I used DATATABLE PLUGIN in my application. It provide pagination and sorting of coloumns. This may help you http://datatables.net/
has comment: http://stackoverflow.com/comment/39693274
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25426503
upvote count: 3

http://stackoverflow.com/comment/39767883
has text: @Mritunjay: Just wanted to get the value 4.75 for `critiquesAvg` as `data.critiquesAvg`, having `critiquesAvg` calculated dynamically based on the number of critique objects in the `critiques` array.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25480585
type: QuestionComment

http://stackoverflow.com/comment/39842560
comment on: http://stackoverflow.com/q/25520747
type: Comment
type: QuestionComment
has text: I just added the CSS stuffs on the answer
score: 0

http://stackoverflow.com/q/25525457
score: 0
has answer: http://stackoverflow.com/a/25525522
has answer: http://stackoverflow.com/a/25525545
tagged with: jquery
has title: Make 2 simultaneous ajax calls and call back on completion of both?
answer count: 5
has body: I want to make 2 api requests, but calling the second request inside the first's callback function doesn't seem right to me. Is there any way I can just call them both simultaneously and run the callback function only when I got respond from both?
has answer: http://stackoverflow.com/a/25525550
has answer: http://stackoverflow.com/a/25525621
has answer: http://stackoverflow.com/a/25525549
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25525545
tagged with: javascript
has comment: http://stackoverflow.com/comment/39849947
possible better answer: http://stackoverflow.com/a/25525522

http://stackoverflow.com/a/41618111
has comment: http://stackoverflow.com/comment/84867633
type: Answer
has comment: http://stackoverflow.com/comment/78865728
has comment: http://stackoverflow.com/comment/127446424
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/72169476
answers question: http://stackoverflow.com/q/25414778
downvote count: 0
has body: Another easy solution I just found is to just add a function that uses a component handler to upgrade the DOM on any DataTables redraw. Can be used like: $(document).ready(function(){ var table = $('#table-1').DataTable({ "fnDrawCallback": function( oSettings ) { componentHandler.upgradeDOM(); } }); }); It solved my pagination issues when I was using a dropdown in one of the columns.

http://stackoverflow.com/comment/39827217
comment on: http://stackoverflow.com/a/25512617
score: 0
type: Comment
has text: @ Placplacboom, in that case you should use javascript or Jquery to open a new window with the appropriate dimensions, please see the link: http://www.w3schools.com/jsref/met_win_open.asp Note however, that this won't solve the scaling issue caused by any pixel density differential that may exist.
type: AnswerComment

http://stackoverflow.com/q/25494777
type: UnansweredQuestion
type: Question
has body: I am using vanilla tilemaps, I am not sure if there is software out there related to tilemaps, but if there is be assured I am just using plain javascript, I have an issue though, I want to move the x of a player when a button is pressed, but it doesn't move, the player is green, and is identified by the number 4 on the tilemap. it registers that I press the button(in console), but doesn't move the player at all, can anyone point out the issue? look at lines 62-89, thats where the error mostly occurs except for some global variables. here's a link to the jsfiddle, I used this because I needed to show that the blocks don't move. http://jsfiddle.net/8jr2ha3h/ var playerY = 0; var playerX = 0; var moveLeft = 65; var moveRight = -65; //THE PLAYER player.onload = function(){ for(var i = 0; i &lt; mapArray.length; i++){ for(var j = 0; j &lt; mapArray[i].length; j++){ if(mapArray[i][j]==4){ context.drawImage(player, playerX, playerY, 45,37); } playerX+=45; } playerX = 0; playerY +=37; } }; //KEY FUNCTIONS document.onkeydown = function(e) { //identifying that it's a window event. e = e || window.event; switch(e.which || e.keyCode) { //37 is key for left arrow. case 37: { playerX = playerX - moveLeft; console.log(playerX); console.log('left'); } break; } }
has title: Moving a player in tilemaps
has comment: http://stackoverflow.com/comment/39794258
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39795106
answer count: 1
has answer: http://stackoverflow.com/a/25495051
linked to: http://stackoverflow.com/q/9308257

http://stackoverflow.com/q/25474339
has comment: http://stackoverflow.com/comment/39755781
type: Question
has body: I'm sending an array object via ajax and C # MVC can not understand. I've tried several ways and does not work. What am I doing wrong? I already have and without JSON.stringify, and not work. Variable teste01 receives null. Class of object: public class Teste { public int dataid {get;set;} public string datapackage { get; set;} public int packageid {get;set;} } Contoller: [HandleError] [AcceptVerbs(HttpVerbs.Get)] [Authorize] public JsonResult ListaGenerica(DataTables param, string aController, Teste[] teste01, bool porID = false, string regra = "", int filtroID = 0, string tipo = "") JQuery functions: function Controller() { return "EmpresaCarga"; } function Dados() { var localproducts = []; localproducts.push({ 'dataid' : 1, 'datapackage' : 'test', 'packageid' : 3 }); localproducts.push({ 'dataid' : 2, 'datapackage' : 'test 01', 'packageid' : 4 }); return localproducts; } JQuery: var oTable = $('#listagem').dataTable({ "bServerSide": true, "sAjaxSource": '@Url.Action("ListaGenerica", "Ajax")', "fnServerParams": function ( aoData ) { aoData.push( { "name": "filtroID", "value": $("#ClienteID").find('option:selected').val() } ); aoData.push( { "name": "aController", "value": Controller() } ); aoData.push( { "name": "teste01", "value": Dados() } ); }, "bProcessing": true, "sPaginationType": "full_numbers", "aoColumns": [ { "mDataProp": "Carga", "sTitle": "Carga" }, { "mDataProp": "DtCarga", "sTitle": "DtCarga", "mRender": function (data, type, full) { return dtConvFromJSON(data); } }, { "mDataProp": "Empresa", "sTitle": "Empresa" }, { "mData": null, "bSortable": false, "mRender": function (data, type, row) { return '&lt;a class="btn btn-default btn-xs" href="/Produto/Detalhar/' + row.EmpresaCargaID + '" title="Clique para abrir"&gt;&lt;span class="glyphicon glyphicon-edit"&gt;&lt;/span&gt;&lt;/a&gt;';}} ], }); Query Strings Parameters sEcho:2 . . . filtroID: aController:EmpresaCarga aController:EmpresaCarga teste01:[{"dataid":1,"datapackage":"test","packageid":3},{"da…
has title: Send jQuery array to MVC Controller
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39755736
accepted answer: http://stackoverflow.com/a/25486520
has comment: http://stackoverflow.com/comment/39755921
has comment: http://stackoverflow.com/comment/39756030
has answer: http://stackoverflow.com/a/25486520
has comment: http://stackoverflow.com/comment/39755802
has comment: http://stackoverflow.com/comment/39756159
type: AnsweredQuestion

http://stackoverflow.com/q/25457411
has answer: http://stackoverflow.com/a/25457510
downvote count: 2
has body: I have a problem i want to check a variable.If its 0 then gain ++ after 1.5s.If its 10 then gain ++ after .4s.Its complicated.It doesnt really work.My code so far: if(road == 1){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},1400);} else if(road == 2){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},1300);} else if(road == 3){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},1200);} else if(road == 4){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},1100);} else if(road == 5){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},1000);} else if(road == 6){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},900);} else if(road == 7){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},800);} else if(road == 8){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},600);} else if(road == 9){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},400);} else if(road == 10){setInterval(function(){stamina = stamina+1;document.getElementById("stamina").innerHTML = stamina;},200);} else{setInterval(function(){stamina++;document.getElementById("stamina").innerHTML = stamina;},1500);} And the code to build a road is this: function build_road() { if ((wood + tavern) &gt;= 29 &amp;&amp; stone &gt; 4 &amp;&amp; road &lt; 10) { road++; document.getElementById("road_count").innerHTML = road; wood = (wood + tavern) - 20; stone = stone - 5; document.getElementById("wood").innerHTML = wood; document.getElementById("stone").innerHTML = stone; exp = exp + 20; var x = document.getElementById("PROGRESS"); x.setAttribute("value", exp); x.setAttribute("max", max…
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25457510
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/39724350
favorite count: 0
has title: Javascript Check variable.Then gain ++ per second
type: Question
tagged with: http://stackoverflow.com/tag/html
score: -2
has comment: http://stackoverflow.com/comment/39726424

http://stackoverflow.com/comment/39761234
comment on: http://stackoverflow.com/q/25477416
type: Comment
type: QuestionComment
has text: ```db.guests.find({"preferences.Transportation":"Taxi"})``` enjoy!
score: 0

http://stackoverflow.com/q/25514492
tagged with: router
tagged with: instantiation
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39830943
type: Question
upvote count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25515813
favorite count: 0
accepted answer: http://stackoverflow.com/a/25515813
has body: I notice that my app starts to become sluggish when I change urls too many times. I suspect this is because I have the routes set up in a way that they are instantiating a new view every time the url is visited, not sure if there is another way to do this. It may be that I don't understand javascript enough.What is happening to the views that I instantiated after they are not being used anymore, or in other words when I visit a new route? var Router = Backbone.Router.extend({ routes: { '':'doSomething', 'helloworld':'doSomethingElse' } }); var app_router = new Router; app_router.on('route:doSomething', function() { var thing = new SomeModel(); new someView({model : thing}); }); app_router.on('route:doSomethingElse', function() { var thing = new SomeModel(); new someOtherView({model : thing}); }); so in this simple example, if I were to click back and fourth on links &lt;a href="#"&gt; and &lt;a href="#helloworld"&gt; would there just be a build up of view and model objects? and if so would it be a problem.I would imagine that memory would be eaten up but I may just not be understanding things correctly. Here is a screenshot of the timeline as I click back and fourth between two routes. It seems that there is a build up of listeners which I am guessing is coming from the event listeners that I have set on one of the particular views. I think it is creating new listeners on every instantiation.
linked to: http://stackoverflow.com/q/6569704
answer count: 1
has title: Am I instantiating too many objects in my backbone.js routes?
tagged with: backbone.js

http://stackoverflow.com/q/25451010
tagged with: jquery
tagged with: jquery-select2
score: 1
has title: Nested Select2 with dependent AJAX call
favorite count: 0
accepted answer: http://stackoverflow.com/a/25452978
upvote count: 1
has body: I'm using Select2 with jQuery to build a dependent relationship between SELECT elements on a form. I'm trying to build the typically relation: Country has States, States has Cities, City has Town and so on. Right now I'm doing in this way: $(document).ready(function() { $(".pais").on('change', function() { pais = $(this).find('option:selected').val(); $.get(Routing.generate('estados', {pais_id: pais})).success(function(data) { if (data.message === "") { $('.estado').empty().append(' Seleccione un estado '); $.each(data.entities, function(i, d) { $('.estado').append(' ' + d.nombre + ' '); }); $('.estado').removeAttr('disabled'); $('.estado').next('span').remove(); $('.estado').closest('.form-group').removeClass('has-error'); $('.estado').select2(); } else { $('.estado').next('span').remove(); $('.estado').closest('.form-group').addClass('has-error'); $('.estado').after('' + data.message + ''); $('.estado').empty().append(' Seleccione un estado ').attr('disabled', 'disabled'); $('.municipio').empty().append(' Seleccione un municipio ').attr('disabled', 'disabled'); $('.ciudad').empty().append(' Seleccione un ciudad ').attr('disabled', 'disabled'); $('.parroquia').empty().append(' Seleccione un parroquia ').attr('disabled', 'disabled'); } }).error(function(data, status, headers, config) { if (status == '500') { message = "No hay conexión con el servidor"; } }); }); $(".estado").change(function() { estado = $(this).find('option:selected').val(); $.get(Routing.generate('municipios', {estado_id: estado})).success(function(data) { ... }).error(function(data, status, headers, config) { ... }); $.get(Routing.generate('ciudades', {estado_id: estado})).success(function(data) { ... }).error(function(data, status, headers, config) { ... }); }); $(".municipio").change(function() { municipio = $(this).find('option:selected').val(); $.get(Routing.generate('parroquias', {municipio_id: estado})).success(function(data) { ... }).error(function(data, status, headers, config) { ... }); }…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39712898
has answer: http://stackoverflow.com/a/42132699
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25452978
downvote count: 0
linked to: http://stackoverflow.com/q/14483348
possible better answer: http://stackoverflow.com/a/42132699
tagged with: javascript

http://stackoverflow.com/q/25518874
has answer: http://stackoverflow.com/a/25520106
upvote count: 2
score: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/25520106
type: Question
tagged with: pageobjects
has title: Protractor Page objects - TypeError: Object #<Object> has no method 'methodName'
tagged with: protractor
tagged with: javascript
answer count: 2
has body: I'm trying to write a simple test using page objects pattern - based on the 'docs/page-objects'. I created a file describing the page object and other using this page object to test a page. //page object var LoginPage = function() { this.userInput = browser.driver.findElement(by.id('username')); this.pwdInput = browser.driver.findElement(by.id('password')); this.btnEnter = browser.driver.findElement(by.id('btnLogin')); this.get = function(){ browser.get('http://example.com'); }; this.setUser = function (user){ this.userInput.sendKeys(user); }; this.setPasswd = function (password) { this.pwdInput.sendKeys(password); }; this.clickBtnEnter = function (){ btnEnter.click(); };}; The spec file: var loginPage = require('./LoginPage.js'); describe('myApp', function() { it('should save contract config', function (){ loginPage.get(); loginPage.setUser('userid'); loginPage.setPasswd('passwd'); loginPage.clickBtnEnter(); }); }); The following error is shown when I run this test: TypeError: Object # has no method 'get' - at this line: loginPage.get();. When I was searching for this problem I found various approaches about using page objects in Protractor, such as Astrolable. Now I am not sure about the correct usage of page objects. Do you have any ideas about how I can fix this test? Thank you guys.
favorite count: 0
has answer: http://stackoverflow.com/a/25539716
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25539716
type: AnsweredQuestion

http://stackoverflow.com/a/25455105
answers question: http://stackoverflow.com/q/25454990
type: AcceptedAnswer
type: Answer
score: 0
has body: From the docs: Disables a tab, disallows a user to click it (adds .disabled to the li element) So, reasonably, you can just add class="disabled" to any of the tabs you want disabled on page load. As for passing them all via the function, the plugin does not support that.
accepted answer of: http://stackoverflow.com/q/25454990

http://stackoverflow.com/q/25396355
has title: How to keep id on querystring when search data using ajax mvc
tagged with: ajax
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39610893
accepted answer: http://stackoverflow.com/a/25397706
has comment: http://stackoverflow.com/comment/39611308
has body: I am creating a search page using ajax. The scenario is: in our purchase system, user select the category from dropdownlist and then click browse button to show a modal form with a list of product based on selected category. The problem is after the modal shown and then user fill criteria for searching and click Search, the categoryID is null. How to keep this value when we search data using ajax? Below codes to represent what I've done so far: Purchase View: @using (Html.BeginForm("Create", "Invoice", FormMethod.Post, new { @enctype = "multipart/form-data" })) { @Html.LabelFor(model =&gt; model.CategoryID, new { @class = "control-label col-md-2" }) @Html.DropDownListFor(model =&gt; model.CategoryID, new SelectList(Model.Categories, "CategoryID", "Name"), "-- Please Select --", new { @class = "form-control" }) @Html.ValidationMessageFor(model =&gt; model.CategoryID) @Html.LabelFor(model =&gt; model.ProductID, new { @class = "control-label col-md-2" }) @Html.HiddenFor(model =&gt; model.ProductID) @Html.EditorFor(model =&gt; model.Product.Name, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } }) &lt;button class="btn btn-primary" id="btnLookupProduct" data-id="@Model.CategoryID" data-toggle="modal" data-target="#myModal"&gt;Lookup Product&lt;/button&gt; } &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Product List&lt;/h4&gt; @using (Ajax.BeginForm("Search", "Product", new AjaxOptions { HttpMethod = "POST", InsertionMode = InsertionMode.Replace, UpdateTargetId = "lookup-timekeeper-container" })) { @Html.DropDownList("FilterField", new List&lt;S…
has comment: http://stackoverflow.com/comment/39610840
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39611165
has comment: http://stackoverflow.com/comment/39610738
has comment: http://stackoverflow.com/comment/39612625
linked to: http://stackoverflow.com/q/3840967
type: Question
has comment: http://stackoverflow.com/comment/39611436
linked to: http://stackoverflow.com/q/498680
has comment: http://stackoverflow.com/comment/39611522
has comment: http://stackoverflow.com/comment/39610918
has comment: http://stackoverflow.com/comment/39612551
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25397706
has comment: http://stackoverflow.com/comment/39612457
has comment: http://stackoverflow.com/comment/39612408
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39612411

http://stackoverflow.com/comment/39731841
comment on: http://stackoverflow.com/q/25461540
score: 0
has text: How many ORs are we talking about?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39651456
has text: I want to execute 6 div elements once the page is loaded.. i hve created css for div and want a jscript to execute the div.. and what other method I can use to call the function?
type: Comment
comment on: http://stackoverflow.com/a/25418051
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39887714
type: Comment
type: QuestionComment
has text: i am wondering why someone did that ?
comment on: http://stackoverflow.com/q/25546185
score: 0

http://stackoverflow.com/comment/39752885
type: Comment
type: QuestionComment
has text: are you sure about sheets names as well ? check it using Logger.log(SpreadsheetApp.openById('1ka0MPaC1xXcu4EAbmSjc9c7BJyNDwOpggBkix2qMBxY').getSheetByName('Overtime Activities (Do not edit)').getName())
comment on: http://stackoverflow.com/q/25470171
score: 0

http://stackoverflow.com/comment/39706388
has text: @radicalsauce: I just updated my answer based on the requirements, would you mind taking a look?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25439045
type: QuestionComment

http://stackoverflow.com/comment/39825407
has text: Hey @Barmar, great call, I should have noticed that immediately! Also, side note to anyone reading. Make sure `Chart.min.js` is called after your external JS file containing your data and chart option elements. Otherwise you will see errors referencing Chart.min.js.
comment on: http://stackoverflow.com/a/25511078
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/comment/39795712
type: QuestionComment
has text: Are you sure you saw: `self.[global_variable] = 0;`, and not `self[global_variable] = 0;`? Because the first looks like a syntax error, at best.
type: Comment
score: 4
comment on: http://stackoverflow.com/q/25495799

http://stackoverflow.com/q/25446843
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25447213
has comment: http://stackoverflow.com/comment/39703731
tagged with: tabs
has answer: http://stackoverflow.com/a/25447213
has body: I have a vertical tab that which is working fine. But I am facing one problem here. I need this tab goes hidden when I click the tab again, something like toggling. Like if I click tab 2 it opens it's content but I am wanting if I click on the tab 2 again it goes away and become normal. As I am not very good in jQuery I am not finding how to make this or I am not sure if this is possible. FIDDLE JS $(document).ready(function() { $("#content div").hide(); // Initially hide all content $("#tabs li:first").attr("id","current"); // Activate first tab $("#content div:first").fadeIn(); // Show first tab content $('#tabs li a').click(function(e) { e.preventDefault(); if ($(this).attr("id") == "current"){ //detection for current tab return } else{ $("#content div").hide(); //Hide all content $("#tabs li").attr("id",""); //Reset id's $(this).parent().attr("id","current"); // Activate this $( $(this).attr('href')).fadeIn(); // Show content for current tab } }); }); Thanks in advance.
downvote count: 0
type: Question
has title: Toggle tab content
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25447433
has comment: http://stackoverflow.com/comment/39703411
has answer: http://stackoverflow.com/a/25447433
has comment: http://stackoverflow.com/comment/39703537
answer count: 2

http://stackoverflow.com/q/25517849
has body: I thought of a cool thing to do with my new site which is having a sliding transition between my pages. I have googled around and have found solutions like angular.js and many other like it, however those solutions seems to only work for single page use. Since I have more I would like to know if ther are any good and smooth ways of implementing an animation on the transition between two pages? So basically, the current page should have an animation which moves the page to left or right depending on where the next page is in the horizontal menu while loading next page. When the target page has finished loading it will display an animation for that page sliding in from the opposite direction where to previous page dissappeared to. Is this possible?
favorite count: 0
has title: Transition animation on page switch CSS3
tagged with: angularjs
type: UnansweredQuestion
downvote count: 1
score: -1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25517894
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css

http://stackoverflow.com/q/25399385
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: callback
has body: I am new to Meteor (and javascript) and trying to figure out how to integrate the Codrops sidebar menu found here: Codrops. I have created a "sidebar" template and all scripts are loading correctly. I have the following HTML code: Settings Menu Close the overlay Settings Default filters Storage Use Favorites And this javascript code for the Meteor callback: Template.sidebar.events({ 'click .morph-button': function () { $('.morph-content').transition(); } }); Template.sidebar.rendered = function () { $('.morph-content').transition(); }; I am having trouble understanding how this works. I am getting funny results. Help much appreciated!
score: 0
has title: Meteor Callback Codrops Menu
has answer: http://stackoverflow.com/a/25409986
tagged with: meteor
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/39731476
type: AnswerComment
comment on: http://stackoverflow.com/a/25460311
has text: Then use a normal JSON call to your own server. And download the JSON with a PHP function `file_get_contents`.
type: Comment
score: 1

http://stackoverflow.com/a/25503178
has body: You need to set position: fixed; for the right div Here are the updated CSS: #container { border: 1px solid black; padding: 20px; width: 450px; } #right { position: fixed; left: 250px; width: 200px; background-color: red; float: left; } Updated the fiddle. Here is the link: http://jsfiddle.net/odu29g1o/2/
score: 2
answers question: http://stackoverflow.com/q/25503099
downvote count: 0
has comment: http://stackoverflow.com/comment/39829699
type: Answer
has comment: http://stackoverflow.com/comment/39808950
has comment: http://stackoverflow.com/comment/39809501
upvote count: 2

http://stackoverflow.com/comment/39863442
comment on: http://stackoverflow.com/q/25532750
type: QuestionComment
type: Comment
has text: "I need this functions to run a dropdown click event independent of each other." - what does this mean?
score: 0

http://stackoverflow.com/q/25501107
answer count: 3
has comment: http://stackoverflow.com/comment/39805185
has answer: http://stackoverflow.com/a/25501142
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39805079
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/25501184
downvote count: 1
has comment: http://stackoverflow.com/comment/39805143
type: Question
has answer: http://stackoverflow.com/a/25501172
has comment: http://stackoverflow.com/comment/39805851
has comment: http://stackoverflow.com/comment/39805131
tagged with: javascript
tagged with: jquery
has title: Change a Dynamic Link's Color
has body: I want to change the color of a link, which is created on runtime. CSS Code: a{ color: #0C6A13; } The problem with this code is, it only changes those static links created before the document is loaded. JavaScript Code: $( "a" ).on( "load", function() { this.color = #0C6A13; }); I also use this code but it doesnt work.
score: 0

http://stackoverflow.com/q/25414342
has answer: http://stackoverflow.com/a/25414410
tagged with: css
score: 2
upvote count: 2
tagged with: twitter-bootstrap
has body: I am trying to implement an alert using Twitter Bootstrap however I am having a lot of difficulty in getting it to fade in when the user loads the page. Basically this is the code so far: HTML &lt;div class="alert alert-success fade alert-dismissible" role="alert"&gt; &lt;button type="button" class="close" data-dismiss="alert"&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;strong&gt;Welcome!&lt;/strong&gt; Administrator... &lt;/div&gt; CSS .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } jQuery $(document).ready(function(){ showAlert(); }); function showAlert(){ $(".close").addClass("in") } But when I load the page the Alert cannot be seen, I'm wondering what I am doing wrong?
type: Question
has answer: http://stackoverflow.com/a/25414498
type: AnsweredQuestion
answer count: 2
has comment: http://stackoverflow.com/comment/39644515
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25414498
favorite count: 0
has title: Fade in Bootstrap Alert is not working
possible better answer: http://stackoverflow.com/a/25414410

http://stackoverflow.com/comment/39676008
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25430830
has text: @Josh: jQuery will search the loaded file for the selector you passed (`#new-content`) and only append that element. Otherwise, it appends the entire file.
score: 0

http://stackoverflow.com/a/25531448
score: 0
has comment: http://stackoverflow.com/comment/40025244
type: Answer
has comment: http://stackoverflow.com/comment/39991352
has body: As far as the selector ('.grid &gt; a') is CSS2 compliant, this should work just fine. Because querySelectorAll only supports css2 selectors in IE8. Moreover you don't need to call the slice method and can just use the for each directly like this [].forEach.call(document.querySelectorAll('.grid &gt; a'), function (el) { var s = Snap(el.querySelector('svg')), path = s.select('path'), pathConfig = { from: path.attr('d'), to: el.getAttribute('data-path-hover') }; el.addEventListener('mouseenter', function () { path.animate({ 'path': pathConfig.to }, speed, easing); }); el.addEventListener('mouseleave', function () { path.animate({ 'path': pathConfig.from }, speed, easing); }); }); UPDATE - [].forEach is compatible with >= IE9 var nodeArray = [].slice.call(document.querySelectorAll('.grid &gt; a')); for (var i = 0; i &lt; nodeArray.length; i++) { var el = nodeArray[i]; var s = Snap(el.querySelector('svg')), path = s.select('path'), pathConfig = { from: path.attr('d'), to: el.getAttribute('data-path-hover') }; el.addEventListener('mouseenter', function () { path.animate({ 'path': pathConfig.to }, speed, easing); }); el.addEventListener('mouseleave', function () { path.animate({ 'path': pathConfig.from }, speed, easing); }); }
has comment: http://stackoverflow.com/comment/39988679
answers question: http://stackoverflow.com/q/25508461
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25508461

http://stackoverflow.com/comment/39837079
type: Comment
has text: check the plunkr link i just added
comment on: http://stackoverflow.com/a/25517793
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39791395
comment on: http://stackoverflow.com/a/25491802
type: AnswerComment
type: Comment
has text: Ok, so the arguments are different (arrays instead of the original values). That's definitely what I was after. Thanks.
score: 0

http://stackoverflow.com/comment/39971559
type: AnswerComment
has text: Looking at your footer, there is no indication you're attempting to bind using angular. You don't have something like mustache or handlebars processing on the server?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25520179

http://stackoverflow.com/q/25493950
has title: Render an embedded partial template from a pre-compiled template using handlebars?
score: 0
answer count: 1
has body: I have a pre-compiled handlebars template that is rendering as expected. I've decided to add an embedded (not pre-compiled) partial reference to the template that I'm pre-compiling but the content of the partial is not rendering properly. The end result is that the contents of the embedded partial are included in the rendered HTML (I suppose my partial is "partially" working :-D ), but: the name of the partial is also included on each line the expression in the partial is not populated with my data This is the HTML that is rendered. The 3 lines from the partial named templateBodyItemNumberPartial are listed below (the partial name seems to be prefixed to each line of output) and no data is rendered in the : templateBodyItemNumberPartial templateBodyItemNumberPartial templateBodyItemNumberPartial this is my body text this is my footer text This is the main, pre-compiled template that references the templateBodyItemNumberPartial partial: {{> templateBodyItemNumberPartial }} {{ templateBodyItem }} {{ templateBodyFooter }} This is the .html file where I define/register the partial and invoke my pre-compiled nameWithPartial template: var templateBodyObject = { templateBodyItemNumber : 4 , templateBodyItem : 'this is my body text' , templateBodyFooter : 'this is my footer text' }; // verify that the partial html is what I think it should be console.log( $( '#templateBodyItemNumberPartial' ).html() ); //=> {{ templateBodyItemNumber }} Handlebars.registerPartial( 'templateBodyItemNumberPartial' , $( '#templateBodyItemNumberPartial' ).html() ); var templateHtml = Handlebars.templates.nameWithPartial( templateBodyObject ); I'm attempting to use an embedded partial just to test how partials work in handlebars. Can anyone confirm if this functionality is supported OR do I have to use pre-compiled partials if my main template …
has answer: http://stackoverflow.com/a/25495734
type: UnansweredQuestion
tagged with: handlebars.js
tagged with: precompiled-templates
tagged with: node.js
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39864829
type: AnswerComment
type: Comment
has text: Problem is I can't sort it on the client. I need t go get the data sorted from the server. I have a paging on my view
comment on: http://stackoverflow.com/a/25529529
score: 0

http://stackoverflow.com/q/25400062
has title: jquery validate plugin - validate only if one of the field is not blank
favorite count: 0
has comment: http://stackoverflow.com/comment/39617122
has body: I should be able to save the username without changing the password.and validate #frmMyprofile only if current password is not blank.How to do that? Javascript Validation code: $('#frmMyProfile').validate({ rules: { "user[current_password]": "required", "user[password]": { required: true, minlength: 6 }, "user[password_confirmation]": { required: true, minlength: 6, equalTo: "#user_password" } }, messages: { "user[current_password]": "Please enter your current password", "user[password]": { required: "Please enter new password", minlength: "Please enter at least 6 characters" }, "user[password_confirmation]": { required: "Please enter confirm password", equalTo: "Please enter the same value as the new password." } } }); HTML: I should be able to save only user name or only password or both.It should only validate if current password is not blank. Email ID User Name Current Password New Password Confirm Password Save Clear
upvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25400955
type: Question
tagged with: javascript
tagged with: jquery
tagged with: jquery-validate
score: 2
has answer: http://stackoverflow.com/a/25400955
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0

http://stackoverflow.com/a/34246531
has body: How It depends: If you have some application code that you need to test against a browser (e.g. Angular, Backbone, etc.) - Use Karma and don't use require. Then just make sure your helpers.js file loads before the tests themselves. // @file Gruntfile.js // https://github.com/karma-runner/grunt-karma grunt.initConfig({ karma: { client: { options: { files: ['client/*.js', 'helpers/*.js', 'test/*.js'] } } } }); // @file helpers.js (function () { window.helpers = { foo: function () { return 'bar'; } }; })(); // @file spec.js (function (helpers) { it('does the thing', function () { expect(helpers.foo()).toBe('bar'); }); })(window.helpers); If you don't need to run your tests against a browser (i.e. you are strictly testing NodeJS code), you can simplify your setup by removing Karma and strictly using Jasmine: // @file Gruntfile.js // https://github.com/gruntjs/grunt-contrib-jasmine grunt.initConfig({ jasmine: { server: { src: 'server/*.js', options: { specs: 'test/*.js', helpers: 'helpers/*.js' } } } }); // @file helpers.js (function () { module.exports = { foo: function () { return 'bar'; } }; })(); // @file spec.js (function () { var helpers = require('helpers'); // require is available it('does the thing', function () { expect(helpers.foo()).toBe('bar'); }); })(); Why require doesn't exist because you are using Karma to run your tests. Karma simply loads files in a browser of your choosing and executes them in the order you provide in your karma.conf.js. It internally uses the test framework you provide (in this case Jasmine) to run tests against the browser(s) you provide (in this case PhantomJS). As is true with all JavaScript, the variable context is defined by the closure it is contained within. The Jasmine binary internally uses NodeJS, which emulates CommonJS require, making the require function available to you within the context of your node application. The Karma runner does what is the equivalent of writing &lt;script src="[path]"&gt; tags to the browser, wh…
upvote count: 5
score: 5
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25413099

http://stackoverflow.com/a/25406327
score: 0
has comment: http://stackoverflow.com/comment/39670609
has body: Have you tried using window.onload=function(){SomeJavaScriptCode}; in the script you are loading?. Take a look at this, the beforeload is what you might be looking for: How do you detect that a script was loaded *and* executed in a chrome extension?
type: Answer
answers question: http://stackoverflow.com/q/25406239
has comment: http://stackoverflow.com/comment/39639919

http://stackoverflow.com/a/28703614
type: Answer
score: 1
has body: You should use the developer tool of google chrome. You might to look on how to debug put break points in your script. you have an how to use here
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25533575
answers question: http://stackoverflow.com/q/25533575

http://stackoverflow.com/q/25478243
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/25479528
tagged with: asp.net-mvc-3
type: Question
has body: I want get list data from server, below is my code: //server side var forms = db.forms.where(f =&gt; f.user_id == 12); return View(forms.toList()); //client side, in javascript @model IEnumerable&lt;Workflow.Models.form&gt; &lt;script&gt; var formdata = &lt;%= new JavaScriptSerializer().Serialize(Model) %&gt;; &lt;/script&gt; but explorer always report error: Uncaught SyntaxError: Unexpected token &lt; Can someone please help, thanks
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/25479528
has title: How to get data by Serialize method in asp.net mvc
tagged with: razor

http://stackoverflow.com/a/25436877
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39823390
has body: Because it's not a valid JSON, specifically this part: "developer":" "name":"Simple Programmer", "url":"http://simpleprogrammer.com" }, should be: "developer": { "name":"Simple Programmer", "url":"http://simpleprogrammer.com" }, Note the change in the first line - opening curly bracket ({) instead of a quotation mark (").
has comment: http://stackoverflow.com/comment/39826132
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25436828
answers question: http://stackoverflow.com/q/25436828
has comment: http://stackoverflow.com/comment/39826091
has comment: http://stackoverflow.com/comment/39820015
has comment: http://stackoverflow.com/comment/39826228
type: AcceptedAnswer

http://stackoverflow.com/comment/39608252
score: 0
type: Comment
type: QuestionComment
has text: @coma Wasn't aware of that. Well the problem is that there is no definition of `$icons-selector` in the example you have given.
comment on: http://stackoverflow.com/q/25394060

http://stackoverflow.com/q/25517882
tagged with: javascript
score: 0
has body: I am making a 2D game in HTML5 and Javascript. The target is a Windows 8 app. I want to code the canvas so that on every monitor the player can't see more or less of the game. I can't seem to get anything to work... Any ideas? Thanks!
tagged with: canvas
answer count: 1
has answer: http://stackoverflow.com/a/25522026
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
has title: HTML 5 Canvas keep aspect ration

http://stackoverflow.com/a/64501781
answers question: http://stackoverflow.com/q/25398657
score: 1
upvote count: 1
has body: Having the same problem, together with variable chart title length for the same chart, the Tall Angel solution, although simple, wouldn't solve it. So, also considering the Joe P answer, I've created an automatic solution that overlaps perfectly with the title from google.visualization.LineChart (not tested with other types of charts, but could also work). The code: // Insert your chart code here... const chart = new google.visualization.LineChart(dataDivElement); chart.draw(dataTable, options); // Drawing chart // After chart is drawn, add chart title const node = document.createElement('div'); node.className = 'googleChartTitle'; node.innerHTML = 'Chart Title'; // Insert the node inside the chart divs dataDivElement.childNodes[0].childNodes[0].append(node); The CSS: .googleChartTitle { font: bold 11px Arial; text-align: center; position: absolute; width: 100%; padding-top: 8px; }
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39652506
score: 3
comment on: http://stackoverflow.com/a/25417874
has text: You welcome. I am not a big fan of patterns, believing that programming is an art. Art of finding best fit and of communicating it to the next programmer via the code. It is very useful to learn and understand patterns and be able to implement them. However, in practice, you end up changing them slightly to fit overall picture. If you examine popular opensource projects, patterns are almost never literally implemented. Yet bits and pieces are all over and programmers easily read and fix each others code. Nothing would change if I were to name observers listeners, for example.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25548929
downvote count: 0
has body: Unless there are some other constraints which you haven't mentioned, it's perfectly possible to mix HTML and SVG in the same document. There's probably no need to reinvent a input field in SVG.
accepted answer of: http://stackoverflow.com/q/25548785
upvote count: 3
answers question: http://stackoverflow.com/q/25548785
type: AcceptedAnswer
type: Answer
score: 3

http://stackoverflow.com/a/25463863
has body: I get your problem but if you float the sub menu's left it will over overlap the previous sub menu. have you tried. try to do this: #main_nav ul ul ul .... until you are at the ul that need to be float left and than add float left. that is the only thing i know. What you also can do is that you let menu1 collapse vertical (the sub menu's to). You can also make that lage menu collapse vertical instead of horizontal
has comment: http://stackoverflow.com/comment/39736669
score: 0
answers question: http://stackoverflow.com/q/25463643
type: Answer

http://stackoverflow.com/comment/39880519
type: Comment
comment on: http://stackoverflow.com/q/25541667
has text: i dont know how to create fiddle
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39729164
has text: I think someone better read will be able to provide a more specific answer, but you may wish to look at [ExecJS](https://github.com/sstephenson/execjs). I don't know much more than that, except the JS file will "run", allowing you to change your DOM as a result
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25459985

http://stackoverflow.com/comment/39675516
has text: Checkboxes that are not checked do not send anything when the form is posted. You would have to check which ones have value and then set the rest to 0.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25431334
score: 2

http://stackoverflow.com/a/25435477
downvote count: 0
has comment: http://stackoverflow.com/comment/39683665
upvote count: 2
has body: Yout script is hanging because you have a line-height of 20px, but you are choosing an ideal height of 18. No matter how much you reduce the font size, the height will always be 20px, which is greater than 18, so you are stuck in an infinite loop. Change ideal to 20: var ideal = 20; And it will work: http://jsfiddle.net/jtbowden/1r8abvom/ As a side note, if you track the minimum font size, you can set all of the divs to the same font size when you are done, and your grid will look more consistent: http://jsfiddle.net/jtbowden/1r8abvom/1/ But, it all depends on what your goal is.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25435238
type: Answer
accepted answer of: http://stackoverflow.com/q/25435238
score: 2

http://stackoverflow.com/comment/39662039
score: 0
type: Comment
has text: ah, sorry, I tried something else first. Forgot to remove the timeout :-) updated
comment on: http://stackoverflow.com/a/25423894
type: AnswerComment

http://stackoverflow.com/comment/39857820
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25529715
has text: @TedHopp: The what? Sorry, never heard of it. ;-D
type: Comment

http://stackoverflow.com/comment/39766722
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25480118
type: Comment
has text: Can you explain this?

http://stackoverflow.com/comment/39849947
has text: You could set two global boolean variables as indicators of each request's status, setting each to true in each callback, then checking to confirm if both status variables are true...
comment on: http://stackoverflow.com/q/25525457
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25515718
type: Answer
has comment: http://stackoverflow.com/comment/39892349
downvote count: 0
has comment: http://stackoverflow.com/comment/39869334
has comment: http://stackoverflow.com/comment/71751573
accepted answer of: http://stackoverflow.com/q/25514664
score: 7
has comment: http://stackoverflow.com/comment/39864158
answers question: http://stackoverflow.com/q/25514664
has comment: http://stackoverflow.com/comment/39892100
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39858937
has body: Here is a working solution : JSFiddle HTML : &lt;img class="svg" src="http://upload.wikimedia.org/wikipedia/en/e/e5/My_Little_Pony_Friendship_is_Magic_logo.svg"/&gt; CSS : svg path:hover { fill: red !important; } JavaScript : /* * Replace all SVG images with inline SVG */ jQuery('img.svg').each(function(){ var $img = jQuery(this); var imgID = $img.attr('id'); var imgClass = $img.attr('class'); var imgURL = $img.attr('src'); jQuery.get(imgURL, function(data) { // Get the SVG tag, ignore the rest var $svg = jQuery(data).find('svg'); // Add replaced image's ID to the new SVG if(typeof imgID !== 'undefined') { $svg = $svg.attr('id', imgID); } // Add replaced image's classes to the new SVG if(typeof imgClass !== 'undefined') { $svg = $svg.attr('class', imgClass+' replaced-svg'); } // Remove any invalid XML tags as per http://validator.w3.org $svg = $svg.removeAttr('xmlns:a'); // Replace image with new SVG $img.replaceWith($svg); // Add an handler jQuery('path').each(function() { jQuery(this).click(function() {alert(jQuery(this).attr('id'));}); }); }); });

http://stackoverflow.com/comment/39902244
has text: Yes sorry about that I am using mongoose-paginate library - it did not occur to me that the restriction was there - it is not a big problem I can exclude the fields in the schema instead - I just thought it was my lack of ability to join objects that was the problem. Not sure as to how to close this question!
type: Comment
comment on: http://stackoverflow.com/a/25548428
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39854078
has text: Jup, my bad. I've edited my answer, giving you a jQuery solution. Hope it suits you.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25527398

http://stackoverflow.com/a/26185028
has comment: http://stackoverflow.com/comment/56323723
score: 0
has body: Simply use a formatter with the _item field. Change your user_name column definition to { id:'user_name', field: '_item', ... formatter: function(item) { return "&lt;div title='"+item.first_name+" "+item.last_name+"'&gt;"+item.user_name+"&lt;/div&gt;"; }, } Using the field _item means that the entire item will become available to the formatter. Using the "dijit/Tooltip" is also possible, but for that you will require gridx1.2's CellWidget module.
type: Answer
answers question: http://stackoverflow.com/q/25413067

http://stackoverflow.com/comment/39882632
type: Comment
has text: I did. As I said before though, I'm able to reproduce on another computer. Very unlikely to be a memory corruption issue.
type: QuestionComment
comment on: http://stackoverflow.com/q/25542661
score: 0

http://stackoverflow.com/a/25410783
has comment: http://stackoverflow.com/comment/39661145
has comment: http://stackoverflow.com/comment/39662129
has comment: http://stackoverflow.com/comment/39660934
upvote count: 1
has comment: http://stackoverflow.com/comment/39663676
type: Answer
has comment: http://stackoverflow.com/comment/39661488
has comment: http://stackoverflow.com/comment/39661615
has comment: http://stackoverflow.com/comment/39662006
has comment: http://stackoverflow.com/comment/39663329
has comment: http://stackoverflow.com/comment/39663406
has comment: http://stackoverflow.com/comment/39663952
has body: Simply make a promise for each async function (onload handler) then! getAllFiles: function () { var deferreds = fileEntries.map(function(fileEntry){ var def = $.Deferred(); fileEntry.file(function (file) { var reader = new FileReader(); reader.onload = function (e) { def.resolve({ name: fileEntry.fullPath, content: e.target.result }); }; reader.onerror = def.reject; // don't forget error handling! reader.readAsArrayBuffer(file); }, def.reject); // here as well return def; }); return $.when.apply($, deferreds).then(function() { var files = $.map(arguments, function(args) { return args[0]; }); return files; }); } (the mapping over the arguments in the then is necessary because jQuery's $.when result is so ugly) To answer your actual question: What is the correct way to implement the functionality - using timeout like in example 1 or checking for equality in the callback function like in example 2? Do it from the callback. Polling results with setInterval is despised (it's slower, won't catch errors and even leak in the error case).
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25408363
score: 1
answers question: http://stackoverflow.com/q/25408363
type: AcceptedAnswer

http://stackoverflow.com/a/25488149
answers question: http://stackoverflow.com/q/25487160
accepted answer of: http://stackoverflow.com/q/25487160
has comment: http://stackoverflow.com/comment/39781108
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
has body: Your code is right, you just have a typo in the second version (should be module.exports instead of module.export): var SetIntervalMixin = { componentWillMount: function() { this.intervals = []; }, setInterval: function() { this.intervals.push(setInterval.apply(null, arguments)); }, componentWillUnmount: function() { this.intervals.map(clearInterval); } }; module.exports = SetIntervalMixin;

http://stackoverflow.com/a/25418825
has comment: http://stackoverflow.com/comment/39652618
has comment: http://stackoverflow.com/comment/39654042
has comment: http://stackoverflow.com/comment/39654149
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39652921
answers question: http://stackoverflow.com/q/25418791
type: Answer
has body: remove all &lt;link&gt; tag? var reg= /&lt;link\b[^&gt;]*?&gt;/gi Debuggex Demo
accepted answer of: http://stackoverflow.com/q/25418791
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39652456
has comment: http://stackoverflow.com/comment/39652591

http://stackoverflow.com/a/25471012
has body: You are naming your hasMany associations in singular, which isn't really following the convention. That being said, you have no 'apps' array. I don't think that should cause you any problems, I am just pointing out because you maybe searching for the wrong thing. I suppose your backend somehow restricts you to this payload?
answers question: http://stackoverflow.com/q/25454685
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39755344

key
tags question: http://stackoverflow.com/q/25505721
type: Tag
tag name: key

http://stackoverflow.com/comment/39624778
score: 0
type: Comment
has text: did you get alert inside success ?
type: AnswerComment
comment on: http://stackoverflow.com/a/25404205

http://stackoverflow.com/q/25438673
tagged with: angularjs-digest
upvote count: 1
has title: angular: checkbox group's validation is out of sync with the model
type: Question
has body: The group of checkboxes requires at least one to be checked in order enable the submit button. Deselecting all checkboxes disables the button. All checkboxes use the same scope property (showRequired), to mark them as required. What happens is, the first click does not enable the button like it should. Selecting and deselecting other checkboxes throws the whole thing out of whack; the button may or many not be enabled on any given click, regardless of what state the checkboxes are in. Troubling shooting it, what I see is that the class ng-valid is not always applied to all checkboxes. Sometimes it's on one checkbox, other times it's on all of them, or some combination of. Using the $timeout fixes everything, but I don't why, and using timers produces a bad code smell. There must be a better way. I can manually call the validation function to bring the view inline with the model: angular.element(document.querySelectorAll('.cb')).scope().checkBoxes() ...leading me to think I'm steping on the $digest loop. . . The following only works when using the $timeout: angular.module('app', []). controller('testCtrl', function ($scope, $timeout) { $scope.guests = [ {name:'stephen', lname:'wille'}, {name:'mary', lname:'torccaso'} ]; $scope.form = {}; $scope.form.cb = {one:false, two:false, three:false, four:false} $scope.showRequired = true; $scope.checkBoxes = function () { console.log('checkbox'); $scope.showRequired = !($scope.form.cb.one || $scope.form.cb.two || $scope.form.cb.three || $scope.form.cb.four); $scope.$apply(); }; $scope.login = function () { console.log('login'); }; angular.element(document.querySelectorAll('.cb')) .on('click', function () { console.log('click'); $scope.checkBoxes(); /* * using the $timeout solves the problem, but why? * $timeout(function () { $scope.checkBoxes(); }, 0, false); */ }); }); The $timeout triggers another $digest, but so does $scoope.$apply(). So what gives? Plunker example
tagged with: javascript
tagged with: angularjs-scope
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25438869
favorite count: 0
tagged with: angularjs-validation
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25438869
score: 1

http://stackoverflow.com/a/25415145
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25415026
upvote count: 2
type: Answer
has body: In 'ItemListCtrl' you should inject object created from 'abyssData' factory. Then, it should return $http promise and directly in controller, in success callback, you should assign returned result to $scope.items. It's just one, example way to do this, there's a plenty of methods and patterns on how to resolve such issues in Angular. console.log(result); // undefined logs 'undefined', because when you call this line, there's no response yet. Try to figure out, what promise is and how exactly AJAX calls work, especially what 'success' and 'error' should be defined.

http://stackoverflow.com/q/25425016
tagged with: ios7
has comment: http://stackoverflow.com/comment/39674309
has comment: http://stackoverflow.com/comment/39663243
type: Question
has title: Achieving 500MB+ WebSQL iOS safari storage
tagged with: ios
tagged with: javascript
score: 0
tagged with: web-sql
has body: Does anyone have any data on the supposed "no-limit" WebSQL feature of a homescreen web app in iOS7? Using storage abuser I have been able to store persistantly 450MB on my homescreen Safari web app until it continually crashes on startup. I noticed it doesn't ask the user for permission too which is great. Anyone else had any other experiences with it yet? Curious to see what the true upper limit is.
answer count: 0
type: UnansweredQuestion
tagged with: safari

http://stackoverflow.com/a/29268927
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25430968
has body: I've seen this as well, and I had the same problem. I fixed it in the stylesheet by giving the container full width and then setting the map class to the same size - notice the svg wrapper has the map class #vipMap, #vipMap .map {width:998px; height:400px; background:#666;} #vipMap {border:1px solid #CCC; position:relative; overflow:hidden;} The container is the #vipMap and by adding the .map class you ensure the svg remains the same width and height of the container
upvote count: 1
type: Answer

http://stackoverflow.com/comment/39601476
has text: A good question provides some context and explains what goes wrong, eg by providing some output of eg firebug. This makes the question more useful to a larger audience.
score: 0
comment on: http://stackoverflow.com/q/25391508
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25444244
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25444196
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25444196
has body: They are using something like this: var clickCount = 0; document.getElementById("box").onclick = function(){ switch(clickCount){ case 0: this.innerHTML += "Click me again&lt;br /&gt;" break; case 1: this.innerHTML += "And again&lt;br /&gt;"; break; case 2: this.style.display = "none"; break; } clickCount++; }; http://codepen.io/idmean/pen/EbHsz

http://stackoverflow.com/q/25458665
has answer: http://stackoverflow.com/a/25461591
type: Question
has title: Using a clickable div to submit a simple_form in Rails
tagged with: javascript
score: 0
has body: I've got this div that I'd like to be able to click on to submit a simple_form in Rails 4. <%= f.submit 'Submit' %> The idea is that I want to get the "submit-form" div to submit the form when clicked, rather than have a tiny button in the middle of it that says 'Submit'. I was thinking something along the lines of wrapping the entire thing in <%= link_to f.submit do %> but that doesn't work at all. Is there any way I can do this? Any help is greatly appreciated. Thanks
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: simple-form
tagged with: ruby-on-rails

http://stackoverflow.com/comment/39694417
has text: Just a comment: are you talking about jTable as the tag says (ie: the java swing component)? Are the jTable plugin from `http://www.jtable.org/`?
comment on: http://stackoverflow.com/q/25441749
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/a/25412886
has comment: http://stackoverflow.com/comment/39642788
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25412748
has comment: http://stackoverflow.com/comment/39642146
answers question: http://stackoverflow.com/q/25412748
upvote count: 1
has comment: http://stackoverflow.com/comment/39643415
has body: The reason why that might not work is because Cycle 2 Inits all slideshows right after it loads the plugin, so your jQuery won't affect your slideshows, because Cycle 2 has already been initialized. What happens if you add the attributes and THEN init the slideshow: $('.cycle-slideshow') .data('cycle-fx', 'scrollHorz') .data('cycle-timeout', '2000') .data('cycle-slides', '&gt; div') .cycle(); You can also, try to pass your options as an object to your slideshow: $('.cycle-slideshow') .cycle({ 'fx' : 'scrollHorz', 'timeout' : 2000, 'slides' : '&gt; div' }); Finally, you also try re-writing the cycle 2 defaults in order for all your slideshows to work accordingly. This should be avoided unless necessary, but it might work! $.fn.cycle.defaults = $.extend($.fn.cycle.defaults, { 'fx' : 'scrollHorz', 'timeout' : 2000, 'slides' : '&gt; div' }); $('.cycle-slideshow').cycle(); UPDATE: You might want to re-write the defaults before $(document).ready so that cycle uses your default options when initiating the plugin. It automatically calls itself on $(document).ready. Source Code: https://github.com/malsup/cycle2/blob/master/src/jquery.cycle2.core.js#L678-L681
score: 1

http://stackoverflow.com/comment/105516963
type: Comment
has text: is it worth checking the property exists first? `key in obj && obj[key] === undefined && delete obj[key]`
score: 0
comment on: http://stackoverflow.com/a/38340374
type: AnswerComment

http://stackoverflow.com/comment/39893672
has text: take a look on my updated answer
score: 0
comment on: http://stackoverflow.com/q/25549012
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25506949
type: UnansweredQuestion
downvote count: 1
type: Question
has title: How to count no.s of images from folder using either javascript or jquery and efit in another html page?
linked to: http://stackoverflow.com/q/11489738
upvote count: 0
answer count: 1
has body: Presently I have an html and I am uploading an image using file upload control, my Default.html page displays all uploaded images as this --> http://blog.readingroom.com/2012/01/27/scattered-images-and-not-so-random-numbers/. Now what I want is, using some javascript or jquery can I have count of uploaded images and then add that count of images in my Default.html page which displays all images. In short the process should be automated after file upload, image should be shown on Default.html page. Plz help as I have already searched many questions on SO and Google, but nothing seems fruitful to me. Your help would be really appreciated. Thanks in advance. Note that I am newbie in Jquery, so kindly show your detailed code.
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/25507903
linked to: http://stackoverflow.com/q/101156
tagged with: client
score: -1

http://stackoverflow.com/q/25518886
has comment: http://stackoverflow.com/comment/39838711
has answer: http://stackoverflow.com/a/25518939
accepted answer: http://stackoverflow.com/a/25518939
favorite count: 0
possible better answer: http://stackoverflow.com/a/25518934
has answer: http://stackoverflow.com/a/25518952
upvote count: 5
has comment: http://stackoverflow.com/comment/39838658
has comment: http://stackoverflow.com/comment/39838628
downvote count: 1
has comment: http://stackoverflow.com/comment/39838729
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/7202157
has title: JavaScript Expression
has body: Can anyone help me with this JavaScript expression? +[[+!![]]+[+![]]+[+!![]]+[-~!![]+-~!![]-~!![]]+[-~!![]]+[+![]]+[+!![]]+[-~!![]+-~!![]]] A friend sent it to me and asked me to copy and paste it in the browser console. This is the result: 10162014 If anyone could explain this to me or at least point me to right references please. Thanks!
linked to: http://stackoverflow.com/q/7202157
has answer: http://stackoverflow.com/a/25518934
type: Question
tagged with: javascript
score: 4
answer count: 3

http://stackoverflow.com/q/25391957
has comment: http://stackoverflow.com/comment/39642143
type: Question
has answer: http://stackoverflow.com/a/25420192
has answer: http://stackoverflow.com/a/25419381
tagged with: javascript
has comment: http://stackoverflow.com/comment/39605688
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39642418
has body: Alright, I am working on a site that displays third party developed courses, so I can't change anything in the actual pop-up window at all and the redirect call has to come from the parent window. The parent, child, and the redirectLocation are all on the same server, so that shouldn't be an issue. Here is the code I want to work. var new_window = window.open('courseAddress.php') new_window.onbeforeunload = function(){ popupClosing(); } function popupClosing(){ window.location ="redirectLocation.php"; alert('The popup has closed!'); return false; }; The alert is firing, but the parent window doesn't seem to refresh. If I put the window.location ="redirectLocation.php"; outside of the .onbeforeunload the refresh works just fine. I am sure I am missing something simple. Thank you in advance. I have read the other issue like this on here, however they were able to use window.opener.loactionfrom the child which unfortunately I am unable to do. I have found a way that works, buuuuuuuut it's really nasty. I just have the parent window keep checking to see if the child window is there. Here is the fiddle for it: http://jsfiddle.net/ex9e7uLq/ Thanks to Eclecticist for sticking with me on this one too!
type: UnansweredQuestion
has title: Redirect parent as child window closes, without adding code to child
has comment: http://stackoverflow.com/comment/39602786
has comment: http://stackoverflow.com/comment/39602501
has comment: http://stackoverflow.com/comment/39605429
has comment: http://stackoverflow.com/comment/39644032

http://stackoverflow.com/a/25473007
has body: Hi i think this might be helpful for you. Here you can find out the link to calculate hmac sha1: http://caligatio.github.io/jsSHA/ Here you can find the source code in javascript. https://github.com/Caligatio/jsSHA/releases/tag/v1.5.0
score: 8
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25472966
type: Answer
accepted answer of: http://stackoverflow.com/q/25472966
upvote count: 8

http://stackoverflow.com/q/25417967
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/39651457
has comment: http://stackoverflow.com/comment/39652355
score: 1
downvote count: 1
type: Question
tagged with: canvas
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39652639
has body: Well, from my previous query I came to know that the guys is canva.com have been playing with HTML5 canvas to produce the amazing effect on their homepage. Now my question is that, how can you make only a portion of the image(sharpened image, in case of the site here) appear when the mouse hovers. From what i know, the hover event handler would normally change the whole image on mousehover, but as seen on the site, the mouse hover only makes a portion(circular, to be precise) of the image to be displayed. Can anyone explain how it can be done? Thank You!
tagged with: http://stackoverflow.com/tag/html
has title: how to show only a portion of an image on Hover as seen in the homepage of the site canva.com
favorite count: 0
has comment: http://stackoverflow.com/comment/39651434

http://stackoverflow.com/comment/39740403
comment on: http://stackoverflow.com/a/25466163
score: 0
type: AnswerComment
type: Comment
has text: This doesn't work since the data coming back from the server is just the ID of the element which was created or altered. To get the list I use another function `GetCategories()` which adds the IDs to the list items. This still doesn't explain why selectRootCategory() works when it's called within the delete-function but not when it's called by document.ready().

http://stackoverflow.com/q/25443657
has comment: http://stackoverflow.com/comment/39699090
accepted answer: http://stackoverflow.com/a/25444058
answer count: 3
downvote count: 0
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/25443742
has title: How to fix this "syntax error" in Razor?
tagged with: razor
has body: I have code like this in my Razor view &lt;script&gt; var JsModel = @Html.Raw(Json.Encode(CsModel)); &lt;/script&gt; This works just fine. It converts the C# model received from the controller to a JS object, which is later used to populate Google Map with markers and various other stuff. The problem is, Visual Studio is showing a big red syntax error in this line, and it's driving me insane. The code is perfectly fine, model is always non-null, and the encoding always works. But Razor parser, or perhaps even R#, I'm not sure which, trips up on it, as it seems to ignore C# code. So what it sees is just var JsModel = ; and complains. Any way for me to tell it that it's ok? What can I do here?
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25443676
has answer: http://stackoverflow.com/a/25443676
type: Question
tagged with: c#
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25444058
has comment: http://stackoverflow.com/comment/39698743
tagged with: javascript

http://stackoverflow.com/q/25455668
type: AnsweredQuestion
has title: How to add data toggle to link tag if ul is present in the li
accepted answer: http://stackoverflow.com/a/25455781
has answer: http://stackoverflow.com/a/25455741
type: Question
has answer: http://stackoverflow.com/a/25455772
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25455781
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25455709
answer count: 4
has body: Please see the below code i have for my main menu on my website. I want to add a data-toggle to the link tag for the dropdown but when the li doesnt contain ul I dont want the data-toggle added to the a tag. Would jquery be able to do this? I am using bootstrap for this but in my menu I have menu links with no dropdown and the link url i add doesnt work as its expecting a dropdown to appear, if there a way around this? Menu 1 Menu Item Menu 2 Menu 3 Menu 4 Menu 5
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/25455709
has comment: http://stackoverflow.com/comment/39721067

http://stackoverflow.com/q/25533829
tagged with: javascript
upvote count: 2
has body: In my page there is 2 ng-repeat, 'widget in widgets', 'widget in widgetsOnPage'. When I try to locate a elements by element.all(by.repeater('widget in widgets')); it finds elements from both of the repeats. I try also, on the protractor example test ("\node_modules\protractor\example\example_spec.js") to change the 'todo in todos' repeater to: todoList = element.all(by.repeater('to')); And the test pass. How can I locate the repeats that equals exactly to the string? That behavior is a defect on protractor or a feature? Thanks.
answer count: 3
accepted answer: http://stackoverflow.com/a/25533985
favorite count: 0
possible better answer: http://stackoverflow.com/a/25537402
tagged with: angularjs
has title: Protractor locator by.repeater work with 'contains' instead of 'equals'
has answer: http://stackoverflow.com/a/25533985
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/25537402
tagged with: protractor
has answer: http://stackoverflow.com/a/25538204

http://stackoverflow.com/comment/39648883
comment on: http://stackoverflow.com/q/25416767
type: Comment
type: QuestionComment
has text: @JCOC611 thanks for such a quick response! The second code is put together from two answers found here @ stackoverflow... could you please give example on how it should look?
score: 0

timer
tag name: timer
tags question: http://stackoverflow.com/q/25455485
tags question: http://stackoverflow.com/q/25478900
type: Tag
tags question: http://stackoverflow.com/q/25431491
tags question: http://stackoverflow.com/q/25498405
tags question: http://stackoverflow.com/q/25434747

http://stackoverflow.com/q/25498982
accepted answer: http://stackoverflow.com/a/25499073
has body: I have jQuery script which dynamically adds buttons with onclick() event. Onclick() event is simply calling some other JavaScript function. jQuery works perfectly in that it creates buttons dynamically, but onclick() event triggers without clicking. I put debugging alert in someFunction and seeing it number_of_created_buttons times which means that onclick event triggering on render. How to prevent such strange behavior? I want onClick event to only fire when user presses the button. My script is the following:
has comment: http://stackoverflow.com/comment/39801181
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25499081
type: Question
has answer: http://stackoverflow.com/a/25499073
has answer: http://stackoverflow.com/a/25499194
has answer: http://stackoverflow.com/a/25499081
tagged with: javascript
tagged with: jquery
score: 0
tagged with: jquery-events
answer count: 3
has title: How to prevent dynamic button's onclick event triggering on render?

http://stackoverflow.com/a/25508149
has body: A working fiddle is here The issue lies in the function: function removeField() { $('.removeclass').click(function () { $(this).parent().remove(); }); return false; } When you click the X, this function is called, which adds a click event handler to the X to remove it; however, this event handler is not called until the next time you click it. (This is why clicking X twice works). In the updated fiddle, you simply pass this to removeField as such: //HTML &lt;a href="#" class="removeclass" onclick="removeField(this)"&gt;&amp;times;&lt;/a&gt;&lt;/div&gt; //JS function removeField(me) { $(me).parent().remove(); return false; }
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25507943

http://stackoverflow.com/q/25463638
tagged with: geolocation
type: Question
has answer: http://stackoverflow.com/a/25463812
accepted answer: http://stackoverflow.com/a/25463812
answer count: 1
tagged with: javascript
score: 0
has body: ok I am struggling with this for a while now http://plnkr.co/edit/AjNTek2EiiAwQUsfP5XQ?p=preview app.controller('MainCtrl', function($scope, $q, $window) { function getPosition() { var deferred = $q.defer(); if ($window.navigator.geolocation) { $window.navigator.geolocation.watchPosition(function(position) { deferred.resolve(position); }); } return deferred.promise; } $scope.homePosition = { coords: { latitude: 22, longitude: 25 } }; var promise = getPosition(); $scope.showDistance = function(pos, homePosition) { var position = { lat: pos.coords.latitude, lon: pos.coords.longitude }; var homePosition = { lat: homePosition.coords.latitude, lon: homePosition.coords.longitude }; /** Converts numeric degrees to radians */ function getDistance(lat1, lon1, lat2, lon2) { var R = 6371; // Radius of the earth in km var dLat = (lat2 - lat1).toRad(); // Javascript functions in radians var dLon = (lon2 - lon1).toRad(); var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = R * c; // Distance in km return d; } if (typeof(Number.prototype.toRad) === "undefined") { Number.prototype.toRad = function() { return this * Math.PI / 180; } }; return getDistance(position.lat, position.lon, homePosition.lat, homePosition.lon); }; $scope.s = function() { $scope.$watch(function() { return $scope.homePosition.coords.latitude; }, function(newValue, oldValue) { if (newValue) { $scope.distance = $scope.showDistance($scope.position, $scope.homePosition); } }) } promise.then(function(position) { $scope.position = position; $scope.distance = $scope.showDistance(position, $scope.homePosition); $scope.s(); }); }); when the watcher is not fired everything works ok when the watcher is fired I get a lat2.toRad() is not a function (took a while to find that.. in chrome I only got undefined is not a function.. thank you Firebug for being precise) which lead …
tagged with: angularjs
type: AnsweredQuestion
has title: AngularJs watchers why is this happening

http://stackoverflow.com/a/25435102
has comment: http://stackoverflow.com/comment/39688750
has comment: http://stackoverflow.com/comment/39683119
answers question: http://stackoverflow.com/q/25435075
downvote count: 0
has comment: http://stackoverflow.com/comment/39682844
has comment: http://stackoverflow.com/comment/39683821
type: Answer
has body: In order for event.preventDefault(); to work, you need to pass event as an argument: $('#submit').click(function(event){
score: 2
has comment: http://stackoverflow.com/comment/39683097
upvote count: 2

http://stackoverflow.com/a/25458119
answers question: http://stackoverflow.com/q/25457859
score: 0
type: Answer
has body: The problem is that $scope is an isolated scope created for your controller. You need to inject the $rootScope into your controller and modify hours on that if you want it to show up in your service. See more about scope hierarchies here. controller: angular.module('myApp', []).controller('ExampleController', ['$scope', '$rootScope', 'ScheduleService', function($scope, $rootScope, ScheduleService) { $scope.hours = 4; $rootScope.hours = 42; ScheduleService.test(); ScheduleService.initializeSchedule(); }]); service: angular.module('myApp') .factory('ScheduleService', function($rootScope) { return { test : function(){ alert("Test"); }, initializeSchedule : function(childScopeHours){ alert($rootScope.hours); } }; }); Working plnkr.

http://stackoverflow.com/comment/39734914
comment on: http://stackoverflow.com/q/25460990
type: QuestionComment
has text: @Brunis I agree, however with this question you don't need a Fiddle, and the OP did not say "do this assignment for me" rather the OP showed their attempt and asked how to fix it.
score: 0
type: Comment

http://stackoverflow.com/comment/39757380
comment on: http://stackoverflow.com/q/25475265
score: 0
has text: -rudie it is stored as a variable(of some sort)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39861519
type: Comment
has text: @SashaSalauyou: Nice one!
comment on: http://stackoverflow.com/a/25531049
type: AnswerComment
score: 0

http://stackoverflow.com/a/25549231
type: Answer
accepted answer of: http://stackoverflow.com/q/25548313
score: 0
answers question: http://stackoverflow.com/q/25548313
type: AcceptedAnswer
has body: Try using associative arrays in javascript/jQuery: DEMO var tableRowArray = $('table tr'); var titleArray = []; var mainArray = {}; // build an associative array of the values int he table tableRowArray.each(function(){ if($(this).children('th').length == 0) { var tempTitle = $(this).children('td').eq(0).text(); if(mainArray[tempTitle]){ mainArray[tempTitle][$(this).children('td').eq(1).text()] = $(this).children('td').eq(2).text(); } else { titleArray.push(tempTitle); mainArray[tempTitle] = {}; mainArray[tempTitle][$(this).children('td').eq(1).text()] = $(this).children('td').eq(2).text(); } } }); // print the formatted associative array to the page $('body').append("&lt;p&gt;&lt;/p&gt;"); var formattedString = ""; $.each(titleArray, function(index, value){ formattedString += "&lt;b&gt;" + value + " : &lt;/b&gt;&lt;br/&gt;"; for(var key in mainArray[value]) { formattedString += "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;" + key + " : " + mainArray[value][key] + "&lt;br/&gt;"; } }); $('p').html(formattedString); Basically, we create an associative array from your table and then the next piece iterates through the array to print it in the format you specified (you may need to edit the set up of the array if you table structure varies from what I used the in JSfiddle).

http://stackoverflow.com/a/25460271
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25454538
has body: This seems a bit irregular. You're only supposed to enter the facebook configs once. I.e Meteor.startup(function() { ServiceConfiguration.configurations.remove({ service: "facebook" }); ServiceConfiguration.configurations.insert({ service: "facebook", appID: "1111111111", secret: "1111111111" }); }); Your login click handler: "click #sign-in-facebook": function(e, tmp) { Meteor.loginWithFacebook({ requestPermissions: ['email'] }, function(err) { if (err) { console.log("error when login with facebook " + err); } else { console.log("login with facebook succeeded"); } }); }
has comment: http://stackoverflow.com/comment/39736280
has comment: http://stackoverflow.com/comment/39735980
downvote count: 0
has comment: http://stackoverflow.com/comment/39735745
type: Answer

http://stackoverflow.com/comment/39833260
has text: Could you please not edit the original code? The answer and its comments no longer make sense. Instead, could you post the latest version as an addition to your original post?
comment on: http://stackoverflow.com/q/25508721
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/25523289
has body: I am capturing audio data using getUserMedia() and I want to send it to my server so I can save it as a Blob in a MySQL field. This is all I am trying to do. I have made several attempts to do this using WebRTC, but I don't even know at this point if this is right or even the best way to do this. Can anybody help me? Here is the code I am using to capture audio from the microphone: navigator.getUserMedia({ video:false, audio:true, },function(mediaStream){ // output mediaStream to speakers: var mediaStreamSource=audioContext.createMediaStreamSource(mediaStream); mediaStreamSource.connect(audioContext.destintion); // send mediaStream to server: // WebRTC code? not sure about this... var RTCconfig={}; var conn=new RTCPeerConnection(RTCconfig); // ??? },function(error){ console.log('getUserMedia() fail.'); console.log(error); }); How can I send this mediaStream up to the server? After Googling around I've been looking into WebRTC, but this seems to be for just peer to peer communication - actually, now I'm looking into this more, I think this is the way to go. It seems to be the way to communicate from the client's browser up to the host webserver, but nothing I try even comes close to working. I've been going through the W3C documentation (which I am finding way too abstract), and I've been going thru this article on HTML5 Rocks (which is bringing up more questions than answers). Apparently I need a signalling method, can anyone advise which signalling method is best for sending mediaStreams, XHR, XMPP, SIP, Socket.io or something else? What will I need on the server to support the receiving of WebRTC? My web server is running a basic LAMP stack. Also, is it best to wait until the mediaStream is finished recording before I send it up to the server, or is it better to send the mediaStream as its being recorded? I want to know if I am going about doing this the right way. I have written file uploaders in javascript and HTML5, but uploading one of these mediaStreams seems…
has comment: http://stackoverflow.com/comment/40065968
has answer: http://stackoverflow.com/a/70402235
downvote count: 0
tagged with: webrtc
tagged with: getusermedia
favorite count: 0
score: 61
upvote count: 61
has answer: http://stackoverflow.com/a/25686367
has answer: http://stackoverflow.com/a/25686416
answer count: 4
possible better answer: http://stackoverflow.com/a/25686367
type: AnsweredQuestion
tagged with: audio
type: Question
has comment: http://stackoverflow.com/comment/40044724
has title: Sending a MediaStream to host Server with WebRTC after it is captured by getUserMedia
has answer: http://stackoverflow.com/a/75348795
accepted answer: http://stackoverflow.com/a/25686416
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25543478
type: Question
has title: Auto resize height of element
accepted answer: http://stackoverflow.com/a/25543534
tagged with: javascript
score: 0
answer count: 1
type: AnsweredQuestion
has body: I want to create a banner like this http://www.firstborn.com/ I have got 3 different images loading in at different resolutions but the part i am struggling with it finding JQuery to replicate the sizing. This banners height reduces with the screen size so if you just drag your browser viewport smaller you will see what i mean. i want to set the height initially for 3 or 4 set sizes then have the height reduce or enlarge depending on the screen. Ideally the solution needs to be as widely supported as possible :) Any help would be really appreciated.
tagged with: media-queries
has answer: http://stackoverflow.com/a/25543534

http://stackoverflow.com/a/25403202
has comment: http://stackoverflow.com/comment/120800816
upvote count: 1
type: Answer
has body: Try using JQuery. On document ready you focus on the div. You make the div scrollable by setting the overflow property in css. JQuery: $(document).ready(function(){ $( "#scrollable_div" ).focus(); } CSS: #scrollable_div { overflow: scroll; }
answers question: http://stackoverflow.com/q/25402766
downvote count: 0
score: 1

http://stackoverflow.com/a/76979686
has body: You can do this with CSS using overflow-anchor: https://caniuse.com/css-overflow-anchor const scroller = document.getElementById('scroller') const anchor = document.getElementById('anchor') let i = 0; setInterval(() =&gt; { const p = document.createElement("p") p.textContent = `Message ${i++}` scroller.insertBefore(p, anchor) }, 1000) #scroller { /* begin example styling */ display: flex; flex-direction: column; align-items: flex-start; /* end example styling */ } #scroller * { /* don't allow the children of the scrollable element to be selected as an anchor node */ overflow-anchor: none; } #anchor { /* allow the final child to be selected as an anchor node */ overflow-anchor: auto; /* anchor nodes are required to have non-zero area */ height: 1px; /* begin example styling */ align-self: stretch; /* end example styling */ } &lt;div id="scroller"&gt; &lt;!-- append content here --&gt; &lt;div id="anchor"&gt;&lt;/div&gt; &lt;/div&gt; Note that to activate this, the user must first scroll to the bottom of the page. You can work around this by using javascript to trigger an initial scroll as soon as it is possible.
upvote count: 0
answers question: http://stackoverflow.com/q/25505778
type: Answer
downvote count: 1
score: -1

http://stackoverflow.com/q/25452119
type: UnansweredQuestion
tagged with: php
has title: How to transform "aLengthMenu" values of dataTables into a PHP variable?
type: Question
has comment: http://stackoverflow.com/comment/39718843
has body: I use a dataTables table in my site with following configurations: $('#search-table').dataTable({ "dom": "&lt;'box-content'&lt;'col-md-4'l&gt;&lt;'col-md-8 text-right'f&gt;&lt;'clearfix'&gt;&gt;rt&lt;'box-content'&lt;'col-md-6'i&gt;&lt;'col-md-6 text-right'p&gt;&lt;'clearfix'&gt;&gt;", "aaSorting": 6, "desc" , "aoColumnDefs": [ { 'bSortable': false, 'aTargets': [ 7, 8 ] } ], "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]], "iDisplayLength": 50, "pagingType": "full_numbers", "oLanguage": { "sSearch": 'Filter within results: ', "sLengthMenu": '_MENU_' } }); I would like to know how I could get the value of "aLengthMenu" that is selected at the moment and save it as a PHP variable. By default the first 50 lines of the table will be displayed as we can see at "iDisplayLength". Then we should have the possibility to get this number as a variable. Then when the user changes the view to 10 (or 25, or 100, etc) the variable changes to the correspondent number. Many thanks in advance!
tagged with: javascript
tagged with: jquery
score: 0
tagged with: datatables
answer count: 1
has answer: http://stackoverflow.com/a/25452267

http://stackoverflow.com/a/25480811
accepted answer of: http://stackoverflow.com/q/25480661
answers question: http://stackoverflow.com/q/25480661
has body: first thing which i suggest is to make the button type="button" intead of type =" submit" if the button will always be used to do ajax call. &lt;input type="button" id="btnupload" name="upload" value="Upload"/&gt; Second probelm which i noticed is in $("btnupload").on("click", function(e) { e.preventDefault(); }); it seems you forget to add # before the id, Try $("#btnupload").on("click", function(e) { e.preventDefault(); });
has comment: http://stackoverflow.com/comment/39771688
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39771260
type: Answer
score: 0

http://stackoverflow.com/q/25469659
score: 1
type: Question
downvote count: 0
tagged with: javascript
has title: Clear errors in angularjs forms
accepted answer: http://stackoverflow.com/a/25469743
answer count: 1
has body: I have a form field that is required and email type. I want the form validation work when I lose focus from my field, so I am using: ng-model-options="{ updateOn: 'blur' }" example: when back to the field and start typing again I want my errors messages to disappear, so I am using: $rootScope.clearValidation = function(form,field){ field.$setPristine(true); }; my red css on the field disappears, but the error messages are not. What am I missing? my css: .form-validation .ng-invalid.ng-dirty { border-color: #e94b3b; } Thanks,
favorite count: 0
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25469743

http://stackoverflow.com/a/25418847
answers question: http://stackoverflow.com/q/25418791
has body: here's another way to remove &lt; link tag lines: strObject.replace(/^.*&lt;link.*$/mg, ""); It will work if your string has line break '\n' at the end of each line.
score: 0
type: Answer

http://stackoverflow.com/comment/39893030
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25548328
type: QuestionComment
has text: What happens if you insert the `script` element directly into the html code instead of using PHP for the inclusion? (I’m just trying to reduce the problem to a simpler case.)

http://stackoverflow.com/comment/39698348
comment on: http://stackoverflow.com/a/25443740
has text: @TomHart, yes they differ, please refer to [this post](http://stackoverflow.com/questions/3698200/window-onload-vs-document-ready)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25516905
has comment: http://stackoverflow.com/comment/39835590
type: Question
upvote count: 4
has title: HTML onload not working
has answer: http://stackoverflow.com/a/25516926
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I'm attempting to use html onload event to trigger javascript, but is not working. The original code was: html: JS: var generateMap = function(){ return{ createMap: function(){ console.log(this.attr('id')); element = this.attr('id'); navigator.geolocation.getCurrentPosition(initialize); } }; } In an attempt to test, I changed the html to: Can anyone tell me why nothing is working?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25516954
answer count: 4
score: 4
accepted answer: http://stackoverflow.com/a/25516926
possible better answer: http://stackoverflow.com/a/25516954
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25516955
has answer: http://stackoverflow.com/a/46494993

http://stackoverflow.com/q/25522694
linked to: http://stackoverflow.com/q/18739354
linked to: http://stackoverflow.com/q/24315512
tagged with: chat
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39893960
favorite count: 0
has body: I am developing chat application, using node.js socket.io module on a server, and javascript on a client. As it become more complex, I become tired to test different usage scenarios by clicking across browsers. At now I use different browsers in order to separate cookies. So in Firefox there is one chat participant, in Opera - second, etc. Therefore my question is: Can I automate this somehow? I've heard about headless testing engines like Phantom JS, Selenium WebDriver, but I don't know how to write tests between different browsers. In fact, I indeed need to separate cookies, different browsers are here only for this task. May be I cannot explain my problem to Google :) All answers on such question imply cross-browser development, and testing that aspect. Any help will be appreciated a lot!
has comment: http://stackoverflow.com/comment/39864919
upvote count: 2
type: UnansweredQuestion
has title: How to test chat web app
has comment: http://stackoverflow.com/comment/39854820
score: 2
tagged with: socket.io
type: Question
tagged with: functional-testing
tagged with: javascript
has answer: http://stackoverflow.com/a/25565763

http://stackoverflow.com/a/25493685
accepted answer of: http://stackoverflow.com/q/25493621
has body: Add to a new array if the city doesn't already exist in it. var cities = []; var numPeople = people.length; for (var i = 0; i &lt; numPeople; i++) { if(cities.indexOf(people[i].city) == -1){ cities.push(people[i].city); } } Then you can print your array if you wish: for(var i=0;i&lt;cities.length;i++){ console.log(cities[i]); }
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25493621
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39706209
has text: I have figured out its the tooltip that is displaying - any way of disabling it for the markers
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25446082

http://stackoverflow.com/comment/39675635
has text: My mistake, edited for consistency
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25430830
type: QuestionComment

http://stackoverflow.com/comment/39846547
comment on: http://stackoverflow.com/a/25498321
has text: Can you create a jsfiddle to show the code of your page, it will be easier for me to take it from there. My assumption is that some other CSS is probably overwriting these properties.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39714514
type: AnswerComment
type: Comment
has text: I believe it is. The "alert("onreadystatechange");" in my above code does become active after three error messages.
comment on: http://stackoverflow.com/a/25451939
score: 0

http://stackoverflow.com/a/25395879
downvote count: 0
answers question: http://stackoverflow.com/q/25395763
type: Answer
has body: If I got it right, you want to make sure each circle is completely inside the canvas. A circle in (x, y) with radius r is inside the canvas if, and only if: x-r&gt;=0 x+r&lt;=width y-r&gt;=0 y+r&lt;=height That is: r &lt;= x &lt;= width-r r &lt;= y &lt;= height-r So, a simpler logic would be to apply the limits right to your random generator. First you pick a random radius r=3+Math.random()*10, then pick: x in [r, width-r] y in [r, height-r] That gives you: x = r+(width-2*r)*Math.random() and y = r+(height-2*r)*Math.random() If you want to avoid a circle on top of another, then you'll need a similar logic of trial and error: for every new circle, pick random (x, y) and r as above, then check if it doesn't collide with any previous circle. If it does, try again. The logic for checking collision is simply checking if the distance is greater than the radius combined: function checkCollision(x1, y1, r1, x2, y2, r2) { return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) &gt; (r1+r2)*(r1+r2) // true if don't collide }
score: 1
upvote count: 1

http://stackoverflow.com/q/25402766
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39621975
favorite count: 0
has body: I do not know how to describe my concern and thats why I could not find anything on Google. I want to draw a div is focused at page call immediately and if you press the scroll wheel to scroll this div also. Whether you are with the mouse over the div or outside. sorry for my bad english, google translator .... embarrassing ^_^ Update: https://github.com/brandonaaron/jquery-mousewheel Thank you... thats worked on all browser but not on the ipad... is it possible on ipad? –
has comment: http://stackoverflow.com/comment/39622002
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Scroll a div from everywhere
tagged with: scroll
has answer: http://stackoverflow.com/a/25403558
accepted answer: http://stackoverflow.com/a/25403558
upvote count: 1
has comment: http://stackoverflow.com/comment/39621937
possible better answer: http://stackoverflow.com/a/25403202
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25403202
type: Question
answer count: 2

http://stackoverflow.com/comment/39885776
type: AnswerComment
score: 0
type: Comment
has text: This is only printing the last key in the object.!!
comment on: http://stackoverflow.com/a/25545128

http://stackoverflow.com/q/25443346
has comment: http://stackoverflow.com/comment/39697714
tagged with: twitter-bootstrap
type: AnsweredQuestion
has body: I'm trying to understand, how bootstrap transitions work. In the beginning of transition.js module I found a statement, which I can't understand: var el = document.createElement('bootstrap') How this is supposed to work? There's no bootstrap element in DOM, I believe.
tagged with: dom
type: Question
has title: What does javascript document.createElement('bootstrap') do? There's no such DOM element type as 'bootstrap'!
has comment: http://stackoverflow.com/comment/39697415
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39697834
score: 0
has answer: http://stackoverflow.com/a/25443912
accepted answer: http://stackoverflow.com/a/25443912

http://stackoverflow.com/q/25523047
answer count: 1
downvote count: 0
has title: How to set the scope for defined variables in another file for JSHint in WebStorm?
favorite count: 0
score: 6
upvote count: 6
type: AnsweredQuestion
has body: How can I set the scope of the defined variables for JSHint to my whole project in WebStorm? If I have multiple files and imports like jquery or Backbone I don't need to see the error JSHint: 'Backbone' is not defined.(W117). This is not only form my imported libraries, but also for my own external files. Some suggestions is that I should disable undefined errors, but this is the functionality that I want to use. I.E. In my main.js I have this: function Main(){ // Some epic code } Main.prototype.theBestFunctionEver = function(awesome, stuff){ return awesome + stuff; } and in foo.js I have this: function init(){ var main = new Main(); // Shows that Main is undefined var wrongVar = 6 + unInited // This should always give me an error // Rest of init }
tagged with: jshint
type: Question
tagged with: javascript
tagged with: webstorm
has answer: http://stackoverflow.com/a/25526073
accepted answer: http://stackoverflow.com/a/25526073

http://stackoverflow.com/a/25432042
downvote count: 0
has body: The reason is because the Haversine formula you have used above assumes a spherical earth, with a circumference of 6371 km whereas the Geography datatype uses the WGS 84 ellipsoid. The main difference between the two is that in WGS 84 the earth is an oblate spheroid (ie, squashed at the poles) and is assumed to have a circumference of 6378.13 km around the equator, but a circumference of 6356.75 km around the poles. The full equations for calculations using the WGS 84 ellipsoid are quite complex and Haversine is considered a good approximation in most circumstances. If you look at the introduction to this excellent resource, http://www.movable-type.co.uk/scripts/latlong.html, the author makes this exact point and suggests that the error from ignoring the ellipsoid is about 0.3% on average (yours is around 0.4%). I repeat the author's quote here, just in case the page ever goes down. All these formulæ are for calculations on the basis of a spherical earth (ignoring ellipsoidal effects) – which is accurate enough* for most purposes… [In fact, the earth is very slightly ellipsoidal; using a spherical model gives errors typically up to 0.3% – see notes for further details].
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25422857
answers question: http://stackoverflow.com/q/25422857
type: AcceptedAnswer
type: Answer
score: 2

http://stackoverflow.com/q/25397037
tagged with: forms
has body: I have a textarea within a form element and I want it to auto-resize with this jquery plugin, but it won't work when I have it in a form that has an id. This is the form, The textarea will resize if the form doesn't have an ID, but if it does then it won't.
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25397319
type: Question
has title: jQuery Autoresize plugin won't work on textarea within form

http://stackoverflow.com/comment/39714696
type: AnswerComment
type: Comment
score: 0
has text: I have added route config setting please guide what to do.?
comment on: http://stackoverflow.com/a/25452580

http://stackoverflow.com/comment/39719232
type: Comment
has text: @dandavis, I was using the template that Spencer suggested I look at. It imported .txt files fine, but not .dat... So, I have this binary file and I want to read it and convert it back in to words, as a way of saving space. I feel like it isn't interpreting the data correctly, this binary file has other characters other than 1's and 0's...
comment on: http://stackoverflow.com/q/25453814
score: 0
type: QuestionComment

http://stackoverflow.com/q/25518243
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
downvote count: 0
accepted answer: http://stackoverflow.com/a/25518295
has body: I'm new to web development but have a pretty solid programming background. I've tried multiple ways to create a element programatically based on user input. I'm trying to essentially create a grid through JQuery. I'm tackling this problem by storing the user input into a variable and going through a for loop to create the grid. Here is the code for the .js file: var rows = 8; var columns = 8; var $row = $(" ", {class: 'row'}); var $square = $(" ", {class: 'square'}); $(document).ready(function(){ for(var i = 0; i < rows; i++){ $("#wrapper").append($row); } for(var i = 0; i < columns; i++){ $(".row").append($square); } }); Now for some reason, this code only creates one row in #wrapper and one square in the row. I've tried copying the example CSS files that tackle this problem but nothing seems to work. Here's what I have right now for my CSS: #wrapper { width: 850px; height: 850px; margin-top: 100px; margin-left: auto; margin-right: auto; background: #000000; } .row { width: auto; height: 100px; background: #313131; } .square { width: 100px; height: 100px; margin: 0px; outline: 1px solid; display: inline-block; float: left; background: #FFFFFF; } And here's my HTML: Draw Grid Can anybody help me out? I'm so confused. I've tried everything. Is this a CSS formatting error?
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25518295
type: Question
has title: Creating grid with JQuery for loop
has comment: http://stackoverflow.com/comment/39837608
answer count: 1
has comment: http://stackoverflow.com/comment/39837582
tagged with: javascript
tagged with: web

http://stackoverflow.com/q/25525530
tagged with: javascript
type: UnansweredQuestion
has title: Draw font from Image on HTML5 Canvas
tagged with: canvas
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25525599
tagged with: sprite-sheet
has body: I have an image of a font I would like to draw on an HTML5 Canvas. At first I though about separating each letter into a different image but decided having a sprite sheet would be much cleaner. A problem with that though, is that not all the letters are the same size. Some are a few pixels wider than other characters. While looking on Google, I came across one way that some people handled the problem. They added a line under each character to represent that characters length and then draw the bottom most line of the font image into an off screen canvas and analyze it pixel by pixel. I tried to implement my own version of that idea, but was unable to get that far. Before I invest more time on that idea, I would like to know if it's a good solution or if there is any better ways of achieving the same thing. So far I have a few small snippets i'm trying to put together, like this code: getImagePixels: function( image, x, y, width, height ) { var canvas = document.createElement('canvas'); canvas.width = image.width; canvas.height = image.height; var ctx = canvas.getContext('2d'); ctx.drawImage( image, 0, 0, image.width, image.height ); return ctx.getImageData( x, y, width, height ); } and this loadFontImage: function( image ) { // Draw the bottommost line of this font image into an offscreen canvas // and analyze it pixel by pixel. // A run of non-transparent pixels represents a character and its width this.height = image.height-1; this.widthMap = []; this.indices = []; var px = getImagePixels( image, 0, image.height-1, image.width, 1 ); var currentChar = 0; var currentWidth = 0; for( var x = 0; x &lt; image.width; x++ ) { var index = x * 4 + 3; // alpha component of this pixel if( px.data[index] &gt; 127 ) { currentWidth++; } else if( px.data[index] &lt; 128 &amp;&amp; currentWidth ) { this.widthMap.push( currentWidth ); this.indices.push( x-currentWidth ); currentChar++; currentWidth = 0; } } }
tagged with: fonts
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/39895542
type: Comment
type: QuestionComment
has text: @markE The code I seek must wrap text in a confined area within a fixed container width and height which only allows 5 lines of text. That being said, since Canvas cannot currently interpret line breaks, the goal is to fill the useable container space with a fixed amount of characters determined by maxlength of textarea. Therefore, preceding spaces created by a new line of text caused by a word exceeding maxWidth container simply cannot be allowed. It's a must to break BBBB without causing a new line while keeping smaller words intact. See the latest fiddle, we're nearly there! Thx 4 input.
score: 0
comment on: http://stackoverflow.com/q/25528081

http://stackoverflow.com/comment/39600954
score: 0
type: Comment
type: QuestionComment
has text: Did you try loading your page through Firebug in FF? http://getfirebug.com it is an essential tool if you really want to be serious about js development.
comment on: http://stackoverflow.com/q/25391152

http://stackoverflow.com/comment/39778055
type: Comment
type: QuestionComment
has text: show the full code, you are using `emptyimage` as string why it should throw an error, are you missing anything.
score: 0
comment on: http://stackoverflow.com/q/25486756

http://stackoverflow.com/q/25445210
favorite count: 0
type: Question
tagged with: nsxmlparser
has comment: http://stackoverflow.com/comment/39701285
upvote count: 3
has title: How to Get HTML tag which seen in UIWebView Screen out of all HTML tag loaded in UIWebView
tagged with: ios
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39700999
score: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: In my UIWebView I loaded the "Chapter.xhtml" file like this. [webView loadRequest:[NSURLRequest requestWithURL:url]]; and the whole Chapter.xhtml is loaded in webView. I am showing it with some JavaScript logic in the webview. float pageOffset = pageIndex*webView.bounds.size.width; NSString* goTo =[NSString stringWithFormat:@"pageScroll(%f)", pageOffset]; [webView stringByEvaluatingJavaScriptFromString:goTo]; From this the New page will come as the button is pressed but page scrolling manually off in webview. So, if there are four pages with content in the webview, then only one page will come in the webview and as the "next" button is pressed the new page will come. But I need to get all the HTML tags that are seen on the screen. (only those which are on the screen) not whole loaded HTML in webview. For getting HTML tags I use NSXMLParser and got all tags in the didStartElement method and values in the foundCharacters method. But, I want to get only that tag that is on the screen and after second page tag and so on.... Any idea or suggestion will be helpful to me... EDIT : For example if there are three pages of HTML loaded in the webview then only one page is seen on the screen, and then by adding the height of the webview * page, the next page will come on screen but that page was also loaded in the webview, just not seen on screen. So is there anything that will give me those tags that are on screen. (or whose values are on the screen)?
tagged with: uiwebview

http://stackoverflow.com/comment/39892723
type: AnswerComment
comment on: http://stackoverflow.com/a/25547438
has text: Same problem: chrome is fine but firefox gives "TypeError: selectCampaigns.options[selectCampaigns.selectedIndex] is undefined"! I also have an issue that alerts are not working. Could this be related?
type: Comment
score: 0

http://stackoverflow.com/comment/39714948
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25452672
has text: Do you want `/` and `/info` to use the same router?
score: 0

http://stackoverflow.com/q/25479699
has body: The below implementation is for a set of three radio buttons, with the buttons having display :none in their CSS paired with labels. Now I've been trying to add some accessibility options to the page so that you can use the arrow keys to navigate across the radio buttons, changing the focus of the labels on each keypress. But I can't, for the life of me get it to change focus, the focus remains on the initial label that was tabbed to. I've tried a number of options that I've seen here in regards to timeout and enabling tabIndex as I go (want it to act as a group), none have worked. JS: $(".radio-type label").keydown(function (e) { // On Right Key press if (e.which == 39) { //Get the list of all buttons and labels var parentList = $(".radio-type").children(); //Get index of currently focussed button var indexThis = $(this).index(); //If not at the end of the list if (indexThis < parentList.length) { //Get the next in the list and its label var next = parentList.get(indexThis + 1); var nextLabel = parentList.get(indexThis + 2); $(next).change(); //Custom method that changes the selection //Remove the tab index from old and assign to nextLabel $(this).removeAttr("tabIndex"); $(nextLabel).attr("tabIndex", "0"); //Change the focus to the new selected label $(nextLabel).focus(); } } e.preventDefault(); }); EDIT: HTML Markup (names modified) All 1 2 Updated Cory's jfiddle: http://jsfiddle.net/n99o3upp/10/ (Sorry keep buggering it up...)
answer count: 2
has comment: http://stackoverflow.com/comment/39766346
has comment: http://stackoverflow.com/comment/39765749
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39766223
has comment: http://stackoverflow.com/comment/39804812
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: jQuery .focus() not working
has comment: http://stackoverflow.com/comment/39765825
has answer: http://stackoverflow.com/a/25517287
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25501270
type: Question
has comment: http://stackoverflow.com/comment/39765866
has comment: http://stackoverflow.com/comment/39766116

http://stackoverflow.com/a/25494001
answers question: http://stackoverflow.com/q/25493285
downvote count: 0
has body: This should help : DEMO js var shown = 1; function toggleImages() { if (document.getElementById('chk-box1').checked) { if (document.getElementById('chk-box2').checked) { showImage(4); } else { showImage(2); } } else if (document.getElementById('chk-box2').checked) { showImage(3); } else { showImage(1); } } function showImage(n) { document.getElementById(shown).style.display = 'none'; document.getElementById(n).style.display = 'block'; shown = n; } html checkbox 1 checkbox 2
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/q/25392385
has title: JavaScript timing events with setTimeout()
type: Question
has answer: http://stackoverflow.com/a/25392670
has answer: http://stackoverflow.com/a/25392474
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39603184
tagged with: javascript
has comment: http://stackoverflow.com/comment/39603222
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/25392474
accepted answer: http://stackoverflow.com/a/25392670
type: AnsweredQuestion
has body: I am trying to use seTimeout() to fade out and then back in a &lt;div&gt; element while the page is scrolling. fadeOut() works as intended but fadeIn() only ever gets to 0.1 opacity. It seems as if the opacity of the &lt;div&gt; element is set to 0 constantly and when I call fade in, it only bumps it up to .1 before it is reset back to 0.. That's my theory at least and since I'm new to JS I am having issues figuring this out. Code: function fadeOut() { console.log("fade out: " + document.getElementById('quotes').style.opacity) if(document.getElementById('quotes').style.opacity &gt; .11) { document.getElementById('quotes').style.opacity -= .1; fadeDelay = setTimeout('fadeOut()',100); } else { document.getElementById('quotes').style.opacity = 0; console.log("stopped fade out."); } } function fadeIn() { console.log("fade in: " + document.getElementById('quotes').style.opacity) if(document.getElementById('quotes').style.opacity &lt; .9) { document.getElementById('quotes').style.opacity += .1; fadeDelay = setTimeout('fadeIn()',100); } else { document.getElementById('quotes').style.opacity = 1; console.log("stopped fade in."); } }

http://stackoverflow.com/q/25547091
tagged with: jquery-ui
downvote count: 0
linked to: http://stackoverflow.com/q/12805942
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/31798659
has body: I saw last post emberjs bind data attributes and searched on google found link on emberjs http://emberjs.com/api/classes/Ember.View.html http://emberjs.com/guides/components/customizing-a-components-element/ But I am not able to understand how to create my own attributebinding. Taking an example case (It is only my assumption and may be i will far away from real scenario). Please correct me. HTML file contains : {{view App.DatePickerView data-dateBinding="rr"}} app.js file contains : attributeBindings: ["data-date"], rr: function() { alert("Hello"); }, I am completely mess up to know how attributebinding works? Thanks to all of you in advance.
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/25595337
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/47565101
has comment: http://stackoverflow.com/comment/45488654
tagged with: ember.js
upvote count: 1
has title: EmberJS attributeBinding
has comment: http://stackoverflow.com/comment/39916785
score: 1
type: Question

http://stackoverflow.com/a/25485678
has body: It looks like element you try to click in disabled and click operation cannot be performed to this element. Try to perform click operation on another element e.g. on : driver.findElement(By.css(".title_button tr")).click();
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25485515

http://stackoverflow.com/a/25468097
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25467212
has body: Since you already have jQuery you could use it to bind your event listeners so you don't have the IE trouble in getting the event: var oldZindex = 0; var theClickID = null; UIProgressButton.prototype._initEvents = function() { var self = this; $(this.button).on( 'click', function(param) { $('#overlay').css({'visibility':'visible'}); theClickID = $('button[data-id="' //you may prefer to get a named attribute //instead of by index: //param.getAttribute('attributeName') + param.target.attributes[1].value + '"]').parent().attr('id'); oldZindex = $('#' + theClickID).css('z-index'); }); }

http://stackoverflow.com/comment/117695769
score: 0
type: AnswerComment
has text: @NeilLunn can u please look in my question i need help https://stackoverflow.com/questions/66570381/mongoose-delete-nested-array-same-key-object
comment on: http://stackoverflow.com/a/25417291
type: Comment

http://stackoverflow.com/q/25498089
has body: I have two buttons like &lt;asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="vgSave" CssClass="submit3" Width="100px" Height="38px" OnClientClick="raiseEvent()" /&gt; &lt;asp:Button ID="btnTemp" runat="server" OnClick="btnSave_Click" CssClass="hidden"/&gt; and I want to call OnClick of btnTemp using javascript as below &lt;script type="text/javascript"&gt; function raiseEvent() { $('#&lt;%= btnTemp.ClientID %&gt;').click(); } &lt;/script&gt; but it do not work for me. But when I call it on document.ready() (just to test) it works, see code $(document).ready(function () { $('#&lt;%= btnTemp.ClientID %&gt;').click(); }); What I am doing wrong here?
type: AnsweredQuestion
has title: JQuery - Call server side event in client side in Asp.Net
has answer: http://stackoverflow.com/a/25498307
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/25498307

http://stackoverflow.com/q/25508565
has answer: http://stackoverflow.com/a/25508820
type: AnsweredQuestion
has body: I have embedded an iFrame into my web-page. The iFrame keeps prompting the user to enter their security details via a dialog box which appears on the screen. I do not have access to the server on which the iFrame is stored, but I do have security details and a username/password that works on this server. I would like to hardcode it so that the dialog box no longer appears - the details are automatically entered via Ruby/JS. Is it possible to do this? If so, how?
has comment: http://stackoverflow.com/comment/39819379
tagged with: iframe
accepted answer: http://stackoverflow.com/a/25508820
type: Question
has comment: http://stackoverflow.com/comment/39819538
has comment: http://stackoverflow.com/comment/39819447
answer count: 1
tagged with: javascript
tagged with: security
score: 0
has title: Auto-authentication on a dialog produced from an embedded iFrame

http://stackoverflow.com/comment/39618526
score: 0
has text: Thanks, the codepen is updated as well=)
comment on: http://stackoverflow.com/q/25395569
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39657450
type: Comment
type: QuestionComment
score: 0
has text: If you're having trouble getting it to work, please show the code you tried. We're not going to write it for you, but we'll help you fix your errors so you can learn from your mistakes.
comment on: http://stackoverflow.com/q/25421744

http://stackoverflow.com/q/25494170
tagged with: javascript
has title: D3 brush extent disappears from chart when dragged beyond extent
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25495141
downvote count: 0
score: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: Question
tagged with: d3.js
tagged with: css
accepted answer: http://stackoverflow.com/a/25495141
has body: I've put together a chart in D3 that uses a vertically-sliding brush with a circular handle, plus a horizontal line to show intersection with a curve: . . . but the brush extent, handle and line all disappear from the chart when I drag the handle past point of extent = 0: I've disabled the upper brush handle since this is a one-directional tool, but I suspect that may be the problem. I've also tried changing the margins to expose ">100% of the brush height", but the elements still disappear in the same way. Have I improperly defined the brush parameters or is this worth filing a ticket in the D3 repo? Here's the complete example: http://bl.ocks.org/wboykinm/1a2806d828cb3fa64c4d Thanks!
upvote count: 1
answer count: 1

http://stackoverflow.com/q/25403899
has answer: http://stackoverflow.com/a/25403942
accepted answer: http://stackoverflow.com/a/25403942
possible better answer: http://stackoverflow.com/a/25404010
favorite count: 0
has comment: http://stackoverflow.com/comment/39624067
upvote count: 4
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25404010
type: Question
has body: I have a code like this: $.ajax({ url: "http://localhost/Proxy/service.php", }).done(function() { console.log("rdy"); }); Now I want to know how to prevent jQuery to get a 404 (Not Found) or parsererror? When I e.g. can not reach localhost I will get a 404. But what can I do to catch this error and not show it in the console? EDIT: localhost/Proxy/service.php is my REST service
tagged with: javascript
tagged with: jquery
answer count: 2
downvote count: 2
has title: How to catch a 404 (Not Found) or parsererror when using jQuery to call a Rest service?

http://stackoverflow.com/a/25459927
answers question: http://stackoverflow.com/q/25450694
downvote count: 0
type: Answer
has body: I think the quotes around the field are missing here: db.ips.findOne({current.aksd: {$exists:true}}); This should work instead: db.ips.findOne({"current.aksd": {$exists:true}});
score: 1
upvote count: 1

http://stackoverflow.com/q/25505356
accepted answer: http://stackoverflow.com/a/25505390
has comment: http://stackoverflow.com/comment/39814667
has title: Why chosen select an element automatically?
has body: When I use chosen in a select box then it will automatically select an option form option list. When I click on x icon then it will show data-placebolder text. But I Want to show default data-placebolder text. Here is my code HTML Administrator Operator JS $('.chosen-select').chosen({allow_single_deselect: true});
tagged with: jquery-chosen
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39812946
score: 0
has answer: http://stackoverflow.com/a/25505390
type: Question

http://stackoverflow.com/a/25744918
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25398515
has body: Not working in IE8 ! Today we had issue on server. It's working in other browsers (IE9,IE10,IE11,FireFox and Chrome).
answers question: http://stackoverflow.com/q/25398515
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/a/25412174
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25412094
has comment: http://stackoverflow.com/comment/39652815
has comment: http://stackoverflow.com/comment/39640379
upvote count: 1
has comment: http://stackoverflow.com/comment/39640346
type: Answer
has body: Here is one way to do this, with comments throughout: var authenticate = function(req, success, failure) { // Use the Google strategy with passport.js, but with a custom callback. // passport.authenticate returns Connect middleware that we will use below. // // For reference: http://passportjs.org/guide/authenticate/ return passport.authenticate('google', // This is the 'custom callback' part function (err, user, info) { if (err) { failure(err); } else if (!user) { failure("Invalid login data"); } else { // Here, you can do what you want to control // access. For example, you asked to deny users // with a specific email address: if (user.emails[0].value === "no@emails.com") { failure("User not allowed"); } else { // req.login is added by the passport.initialize() // middleware to manage login state. We need // to call it directly, as we're overriding // the default passport behavior. req.login(user, function(err) { if (err) { failure(err); } success(); }); } } } ); }; One idea is to wrap the above code in some more middleware, to make it easier to read: // This defines what we send back to clients that want to authenticate // with the system. var authMiddleware = function(req, res, next) { var success = function() { res.send(200, "Login successul"); }; var failure = function(error) { console.log(error); res.send(401, "Unauthorized"); }; var middleware = authenticate(req, success, failure); middleware(req, res, next); }; // GET /auth/google/return // Use custom middleware to handle the return from Google. // The first /auth/google call can remain the same. app.get('/auth/google/return', authMiddleware); Credits : https://stackoverflow.com/a/13734798/1670308

acrobat
type: Tag
tags question: http://stackoverflow.com/q/25510391
tag name: acrobat

http://stackoverflow.com/a/25484724
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/25484543
has body: this is working like this : http://jsfiddle.net/Pascalz/hr8zua7q/ &lt;div ng-app="MyApp"&gt; &lt;div ng-controller="MyController"&gt; &lt;testkeyvalue accept="blabla(key, val)" key='keyA' value='valueA' /&gt; &lt;/div&gt; &lt;/div&gt; var myApp = angular.module('MyApp', []) myApp.directive('testkeyvalue', function () { return { restrict: 'E', replace: true, scope: { key: '@', value: '@', accept: "&amp;" }, template: '&lt;div&gt;&lt;label class="control-label"&gt;{{key}}&lt;/label&gt;&lt;br/&gt;' + '&lt;label class="control-label"&gt;{{value}}&lt;/label&gt;' , link: function (scope, element, attrs) { var arr = ["key", "value", "accept"]; for (var i = 0, cnt = arr.length; i &lt; arr.length; i++) { scope.$watch(arr[i], function () { cnt--; if (cnt &lt;= 0) { fireaccept() } }); } var fireaccept = function () { //This is the problem //I can't deliver this arguments to the "blabla" function im my controller scope.accept({key:scope.key, val:scope.value}); } } }; }); myApp.controller('MyController', function ($scope, $window) { $scope.blabla = function (key, val) { $window.alert("key:" + key + " val: " + val); }; });
score: 3
has comment: http://stackoverflow.com/comment/39775898
downvote count: 0
has comment: http://stackoverflow.com/comment/39774584
has comment: http://stackoverflow.com/comment/39774391

http://stackoverflow.com/comment/39860301
comment on: http://stackoverflow.com/q/25530175
type: Comment
has text: Why are you using *both* handlebars and Angular templates?
score: 0
type: QuestionComment

http://stackoverflow.com/a/25489064
has body: Because Array.prototype.toString is a different function to Object.prototype.toString. The designers of the function decided to make Array stringification output the data in the array.
downvote count: 0
score: 7
answers question: http://stackoverflow.com/q/25489047
type: Answer
upvote count: 7

http://stackoverflow.com/a/25527202
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39853968
has comment: http://stackoverflow.com/comment/39854160
accepted answer of: http://stackoverflow.com/q/25527074
has comment: http://stackoverflow.com/comment/39878365
answers question: http://stackoverflow.com/q/25527074
has comment: http://stackoverflow.com/comment/39853386
has comment: http://stackoverflow.com/comment/39853234
has comment: http://stackoverflow.com/comment/39894881
has comment: http://stackoverflow.com/comment/39853539
has comment: http://stackoverflow.com/comment/39853421
has body: You didn't give much information, so I apologize for the vague answer. The container for this class is .container-outer followed by .li-profile-container .company. So you'd want add that to your stylesheet and make it responsive. Need examples of responsive web design? Here ya go.
has comment: http://stackoverflow.com/comment/39853707
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39854740
has comment: http://stackoverflow.com/comment/39853592

http://stackoverflow.com/comment/39881605
type: QuestionComment
has text: @bumbumpaw This task include **filtering** operation (input whose attribute name is flag)
comment on: http://stackoverflow.com/q/25542481
score: 1
type: Comment

owl-carousel
tags question: http://stackoverflow.com/q/25486976
tags question: http://stackoverflow.com/q/25456765
tags question: http://stackoverflow.com/q/25464673
tag name: owl-carousel
type: Tag

http://stackoverflow.com/comment/39896380
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25550450
has text: If you're not getting any console errors, then maybe the `dataTable` plugin is registering it's own event handler for the `tr` elements and it's stopping event propagation. Try moving your click event handler `$('#tablenew').find('tr').live('click', function(){` above the plugin init code `$('#tablenew').dataTable({`
score: 0

http://stackoverflow.com/comment/39669364
score: 0
comment on: http://stackoverflow.com/q/25428078
has text: In your PHP if statement ( if(isset($_POST['quick_submit']) ) you check quick_submit param, but I can't find it in you javascript code. Where is it?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25463496
score: 2
has comment: http://stackoverflow.com/comment/39735386
accepted answer of: http://stackoverflow.com/q/25463352
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25463352
type: Answer
upvote count: 2
has body: Try this function: function unsigned_shift_right($value, $steps) { if ($steps == 0) { return $value; } return ($value &gt;&gt; $steps) &amp; ~(1 &lt;&lt; (8 * PHP_INT_SIZE - 1) &gt;&gt; ($steps - 1)); } The output, based on your code sample: 1 536870910 16 1073741821 134217727

http://stackoverflow.com/comment/39652510
type: Comment
has text: Welcome to the world of Ajax.
score: 3
comment on: http://stackoverflow.com/q/25418942
type: QuestionComment

http://stackoverflow.com/a/25443249
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/25443041
score: 4
has body: Well, it would kind of work. It could be easily: if(this.cachedResult) { return $q.when(this.cachedResult) } var that = this return getFromService().then(function(res){ that.cachedResult = res return res; }) Instead of the constructor bit. Although this opens the door to race conditions (what if the request is made 5 times while you're waiting for the first result? Five requests would be made. So it is better to cache the promise instead: var cache = null function myFunction(){ return cache || (cache = getFromService()) } Which is both shorter, more elegant and less prone to race conditions.
has comment: http://stackoverflow.com/comment/39697585
accepted answer of: http://stackoverflow.com/q/25443041
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39701540

http://stackoverflow.com/comment/39832600
type: Comment
has text: Hey @Barmer - Yes that works better but now it's disabled. Can you make it a proper answer?
score: 0
comment on: http://stackoverflow.com/q/25515386
type: QuestionComment

http://stackoverflow.com/a/25456489
has body: onclick is a function so you should pass the value button.onclick = function instead of button.onclick = function(node). Here is the correct way to do it HTML Many buttons Demo: PLAYGROUND
answers question: http://stackoverflow.com/q/25456336
score: 0
type: Answer

http://stackoverflow.com/q/25463020
upvote count: 1
favorite count: 0
downvote count: 3
has answer: http://stackoverflow.com/a/25463350
has answer: http://stackoverflow.com/a/25463045
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39734411
linked to: http://stackoverflow.com/q/5939423
has comment: http://stackoverflow.com/comment/39735153
has body: In its simplest form, here is the issue where a class will not be correctly returned exported if it is a class. app.js var Users = require('./users.js'); Users.find('test'); users.js var Users = function() { function Users() { console.log('Users Initiated'); } Users.prototype.find = function(username) { console.log(username); }; return Users; } module.exports = Users; The error I receive in the console /Users/me/nodejsClassExport/app.js:2 Users.find('test'); ^ TypeError: Object function () { function Users() { console.log('Users Initiated'); } Users.prototype.find = function(username) { console.log(username); }; return Users; } has no method 'find' at Object.&lt;anonymous&gt; (/Users/me/nodejsClassExport/app.js:2:7) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3 How do I export it correctly so it can be used without crashing?
type: Question
has title: How do I export a JavaScript class in Node.js?
has comment: http://stackoverflow.com/comment/39735063
score: -2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25463045
has answer: http://stackoverflow.com/a/25463215
accepted answer: http://stackoverflow.com/a/25463215
answer count: 3

http://stackoverflow.com/comment/39634827
type: Comment
type: QuestionComment
has text: He didn't say "give me the solution", he just wants the slution.
comment on: http://stackoverflow.com/q/25409404
score: 1

http://stackoverflow.com/comment/39682928
type: QuestionComment
has text: Basically, I want it to say active, so i can run another jquery to change the text down below.
score: 0
comment on: http://stackoverflow.com/q/25435108
type: Comment

http://stackoverflow.com/q/25391561
favorite count: 0
has comment: http://stackoverflow.com/comment/39608434
has title: Ember.js: Route without template for calls to 3rd party APIs
tagged with: ember.js
downvote count: 0
answer count: 0
type: UnansweredQuestion
type: Question
score: 1
tagged with: ember-data
has comment: http://stackoverflow.com/comment/39650688
has body: I'm making a fairly simple app that has almost no state, so I'm a little bit confused about how best to use Ember routes. The application consists of a list of objects ("commands") and a form. The user creates new objects by filling out the form. After they submit the form, the form is cleared out so they can take another action. The attributes of commands are populated by calls to third party APIs, handled by a rails controller on the backend. Commands have a "type" attribute - depending on that type, we'll go to a different API and render a different template in the list. It feels like I should use a route for each "new" call to a third party API, but in practice, since I don't want anything to change on the screen, this doesn't seem like the right approach. Really all I want is for the underlying collection of the list to change. As a result, I basically have one very large controller to create all of the different types of commands, and instead of using a route I'm using jquery.getJSON. I'm wondering if there's a more "Embery" way to structure this app - it feels like I'm fighting a little against the framework by using jquery.getJSON and having this gigantic controller smells a little bit to me.
upvote count: 1
has comment: http://stackoverflow.com/comment/39642497
tagged with: javascript

http://stackoverflow.com/comment/39671755
has text: @Haney when changing the orderer to `files.OrderBy(o => o.IncludedVirtualPath);` minification result comes out as `"function decodeQueryString(n,t,i,r){var f,u={},s,h,e,o;if(i||(i=function(){return}),r&&(u=r),t.length>1&&t[t...` which is line 17 of `OnTheMove.js` and `new BundleResolver(BundleTable.Bundles ).GetBundleContents ("~/OnTheMoveWebFiles/bundles/Testing");` starts with `[0]: "~/OnTheMoveWebFiles/js/jasmine.js" [1]: "~/OnTheMoveWebFiles/js/jasmine-html.js"` and `[12]: "~/OnTheMoveWebFiles/js/OnTheMove.js"` is 13th item in the list.
comment on: http://stackoverflow.com/q/25428952
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25402090
linked to: http://stackoverflow.com/q/10987674
tagged with: javascript
tagged with: amd
has title: How to load only module related content in SPA?
type: Question
score: 0
has answer: http://stackoverflow.com/a/25402255
has body: I'm working on a large backbone single page application where we've all the JS files specified in order just before &lt;/body&gt; tag. Then, for production, using grunt-usemin we concatenate and make single minified app.min.js file for production. Also all the templates are converted to JS using grunt-contrib-handlebars and concatenated into the same app.min.js file. As the code is growing, size of app.min.js file has gone up to 1.25MB and still this application has long way to go. There are many major sections yet to be developed. At the same time, I don't want to load 5 or more JS files and same number of templates when user visits to each screen. Rather, I wanted to have modules and load single module file and user can browse through whole of the module without loading any other JS file. Also I want those module files to be minified and optimized and revved (for cache busting) for production I was looking through require.js and it's optimizer. I've just started implementing one of our next module using require.js and when I came to building for deployment, it seems that r.js optimizer creates single output file which brings me back to square. Is it not possible to do what I'm looking for using require.js, or am I missing something? Or is there any better solution of my problem than require.js? NOTE: Though there is a benefit of using loader even though single big file is loaded at once, I don't want to load whole code when I just need one module of code.
answer count: 1
tagged with: backbone.js
type: UnansweredQuestion
tagged with: requirejs

http://stackoverflow.com/q/25519000
upvote count: 1
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/19659173
tagged with: jquery
has title: allow reload but not page closing using javascript/jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25519140
accepted answer: http://stackoverflow.com/a/25519177
has answer: http://stackoverflow.com/a/25519140
has answer: http://stackoverflow.com/a/25519177
type: AnsweredQuestion
has body: i want to give warning message to users when they try to close the webpage.the below code is working just fine but i want to refresh the page after every 60 seconds and this code is not allowing to refresh automatically.it gives warning message for refresh as well. but i want to show warning message only for closing when users click on close tab &lt;html&gt; &lt;head&gt;&lt;meta http-equiv="refresh" content="60;url=test.html"/&gt; &lt;script type="text/javascript"&gt; var hook = true; window.onbeforeunload = function() { if (hook) { return "msg here" } } function unhook() { hook=false; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt;
score: 1
type: Question
answer count: 2

http://stackoverflow.com/q/25485008
type: Question
accepted answer: http://stackoverflow.com/a/25486586
tagged with: javascript
tagged with: progress-bar
has title: Progressbar from Kendo UI don't work when I create it
tagged with: kendo-ui
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25486586
type: AnsweredQuestion
has body: I have some problem with Kendo UI. When I create a kendo progressbar it did't start. But when i use jQuery function .html() on DOM object, it start and throw me exception "pb[0].html is not a function". Here is a code: http://dojo.telerik.com/aXEl/4 Someone see what I did wrong?

http://stackoverflow.com/comment/39870694
comment on: http://stackoverflow.com/a/25536364
has text: Wrong question.. I mean, do you know how to fix so all of the store's shows up from my API? with markercluster
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39612399
comment on: http://stackoverflow.com/a/25397127
type: Comment
has text: Hi, the problem seems to be here: var pointerid = 1; how can i change from "1" to number from array based on element id that was clicked?
score: 0
type: AnswerComment

http://stackoverflow.com/a/25410529
score: -1
downvote count: 2
upvote count: 1
has body: DO THIS var myArrayOfObjects = [...]; //get desired &lt;div&gt;s here for(var i = 0; i &lt; myArrayOfObjects.length; i++){ myArrayOfOjects[i].onclick = function () { //Make some edit to the &lt;div&gt; myArrayOfObjects[i] here // here "this" will reder to "myArrayOfObjects[i]" So, you can do something to that div like this // this.doSomething() }; }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39637605
type: Answer
has comment: http://stackoverflow.com/comment/39637320
has comment: http://stackoverflow.com/comment/39637207
has comment: http://stackoverflow.com/comment/39637104
accepted answer of: http://stackoverflow.com/q/25410332
has comment: http://stackoverflow.com/comment/39637857
answers question: http://stackoverflow.com/q/25410332

http://stackoverflow.com/q/25484592
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25485000
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25484804
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Scroll to next div jQuery
has body: I´m working on this page As you can see, in the bottom-middle there is an arrow that right now I haven´t been able to make it scroll to the next section. You can see the next project by normal scroll but I want to activate it also on the arrow. This is the markup: &lt;a id="arrow-down" href="#" onclick="javascript:void(0);"&gt;&lt;/a&gt; This is what I have tried: $('#arrow-down').on('click', function () { var ele = $(this).closest("div").find(".project.skrollable"); // this will search within the section $("html, body").animate({ scrollTop: $(ele).offset().top }, 100); return false; }); Any ideas what I´m doing wrong? or how can I achieve it?
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39775037

http://stackoverflow.com/q/25502598
tagged with: javascript
tagged with: jquery
score: -1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
tagged with: android
has title: my onDeviceReady Event is not firing android phonegap?
upvote count: 0
has body: i've 2 question 1. my onDeviceReady event is not firing in my code as i try many times plzz help me and also tell me how to set a select statement output into a variable which can be further be used by if-else -------------------------------------------------------------------------------------------enter code here Responsive Image Maps jQuery Plugin plese help me
type: Question
has answer: http://stackoverflow.com/a/25509507

http://stackoverflow.com/comment/39637079
has text: @zigzaugg: See my comment just before yours.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25410332

http://stackoverflow.com/q/25527554
tagged with: javascript
has title: Filtering out keys from a JavaScript object
has body: I have a JavaScript object in the below format { "Node1": [ { "Node2": "node2detail1", "Node3": "node3detail1", "Node4": [ "node4detail1", ] }, { "Node2": "node2detail2", "Node3": "node3detail2", "Node4": [ "node4detail2", ] }, { "Node2": "node2detail3", "Node3": "node3detail3", "Node4": [ "node4detail3", ] } ]} Is it possible to write an jsonpath expression which would result in a JavaScript object in the following format? The intention is to filter by keys. { "Node1": [ { "Node2": "node2detail1", "Node3": "node3detail1", }, { "Node2": "node2detail2", "Node3": "node3detail2", }, { "Node2": "node2detail3", "Node3": "node3detail3", } ]}
accepted answer: http://stackoverflow.com/a/25540704
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25540704
type: AnsweredQuestion
tagged with: jsonpath
type: Question

http://stackoverflow.com/comment/39961153
type: AnswerComment
has text: Once I have that difference, I divide by 2 and subtract from larger x and y to hopefully get an XY coordinate that rests between my start and end coordinates and use that to decide my left: x; top: y; coordinates. When I do this though, the Arrow appears in a different location entirely. I switched the x and y thinking that maybe I juxtaposed the coordinates, and that didn't work either.... So arrow now changes length and rotation, but doesn't position itself where I want it.....
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25528141

http://stackoverflow.com/a/25529643
has body: You could change the structure of your data like this: var myArray = [{ "id" : "21_2" // id or whatever these are "timeStamps" : [1409158800,1409160000] }, { "id" : "20_1" "timeStamps" : [1409148000,1409149200] }]; Then you could sort it by the regular array sort: myArray.sort(function(a, b){ // however you want to compare them: return a.timeStamps[0] - b.timeStamps[0]; });
upvote count: 2
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25529278
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25529278

http://stackoverflow.com/comment/50842459
type: AnswerComment
score: 0
type: Comment
has text: I've used it without a problem, could you create a fiddle of your code and paste a link here?
comment on: http://stackoverflow.com/a/26644102

http://stackoverflow.com/a/31053053
has body: Below worked out for me. var connect=require('connect'), serveStatic=require('serve-static'); var path = require('path'); var server=connect(); server.use(serveStatic(path.resolve(__dirname, '..', 'angularjs'))); server.listen(5000);
answers question: http://stackoverflow.com/q/25457122
type: Answer
downvote count: 2
score: -2
upvote count: 0

http://stackoverflow.com/a/25392548
answers question: http://stackoverflow.com/q/25392445
has comment: http://stackoverflow.com/comment/39606015
has body: Simply clear out the event handler, like this: if(condition) { window.ondeviceorientation = function(e){ //my code window.ondeviceorientation = null; }; }
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/39646394
has text: @user29619 yes it's pretty important to understand how `this` works in JavaScript - it's quite a bit different from other languages that *look* similar. There are great questions about it on SO.
type: AnswerComment
comment on: http://stackoverflow.com/a/25415287
score: 0
type: Comment

http://stackoverflow.com/comment/39715462
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25452586
has text: And if the response is empty, there is no `406`?

http://stackoverflow.com/comment/39818228
comment on: http://stackoverflow.com/q/25506223
has text: @Celt I think it isn't possible, because the pdf file will be opend by the pdf plugin. For the browser itself are the data unknown and not convertable.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39969566
score: 0
comment on: http://stackoverflow.com/a/25575657
type: AnswerComment
type: Comment
has text: The first time I ran the code, each iteration outputted 0. The second time I ran the code (with the same data), there was a combination of 1's and 2's, and a couple of errors. The third time, just 2's and 1's.

http://stackoverflow.com/comment/39681531
comment on: http://stackoverflow.com/q/25434509
score: 1
has text: Tip: semicolons don’t belong after blocks. (The ones after `for` and `if`, here.)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39762617
score: 0
type: QuestionComment
type: Comment
has text: you are missing quotes in ==> `var text1= " sales headline ";`
comment on: http://stackoverflow.com/q/25478147

http://stackoverflow.com/comment/39647429
type: Comment
has text: No, I thought about putting it inside the usercontrol though. I'm trying to write a quick example at home.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25415637

http://stackoverflow.com/comment/39647327
type: AnswerComment
comment on: http://stackoverflow.com/a/25415383
has text: This doesn't work as I am using the javascript SDK not REST API. Do you know a way of loading the xml data of a URL in Javascript? I am able to parse it I just need to get the data from a URL, preferably without using jQuery
score: 0
type: Comment

http://stackoverflow.com/comment/39795550
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25478978
has text: I have added a small example for you
type: AnswerComment

http://stackoverflow.com/comment/39859641
type: QuestionComment
has text: ![ ](http://postimg.org/image/ldjuf9kg3/).
comment on: http://stackoverflow.com/q/25529456
score: 0
type: Comment

http://stackoverflow.com/comment/39650060
comment on: http://stackoverflow.com/a/25417406
type: AnswerComment
score: 0
type: Comment
has text: does not fix the problem - get_stylesheet_directory() returns child theme directory path, get_template_directory() returns parent theme

http://stackoverflow.com/q/25534506
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39923550
has comment: http://stackoverflow.com/comment/39895250
tagged with: highcharts
answer count: 1
has answer: http://stackoverflow.com/a/25565024
has comment: http://stackoverflow.com/comment/39895331
has comment: http://stackoverflow.com/comment/39902383
has title: Highcharts: multiple series columns by year
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25565024
type: Question
has body: I want to render 2 column series grouping by year. It works well if both series have data for all xAxis points (year). For example this example plots data for both series in 2012 and 2013 and works well. But what happens of I remove 2013 from series 1 and 2012 for series 2, this is the result. I know that adding null values and missing years will solve the problem, but may be there is another solution.

http://stackoverflow.com/q/25412768
has title: how to assign the same value to matching rows in a table dynamically
has body: I have a table with multiple rows where one or more rows with have the same source data attribute. I need to loop through all these rows and assign the lowest common denominator belonging to the matching group to each row that matches that specific data source so: one 2014-04-01 two 2014-11-23 three 2014-03-13 four 2014-06-02 five 2014-03-08 so in the above table the matches are row 1,3 and 5. and i need to assign the lowest date to all of the matches Thanks in advance for any help
has answer: http://stackoverflow.com/a/25412970
linked to: http://stackoverflow.com/q/4146502
has answer: http://stackoverflow.com/a/25412840
type: Question
has comment: http://stackoverflow.com/comment/39641420
answer count: 2
score: 0
has comment: http://stackoverflow.com/comment/39641502
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/q/25422426
answer count: 2
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25422591
has body: below is my code as shown in the above code when user clicks on smiley image it changes the value of text area #chat_textarea values are different for different smiley images,above code works fine... but what if i have more then 100 smileys? is there any way i can change the value of chat_textarea dynamically...? because to load images Iam just for loop which loads all images 1 to given number... Updated:Hi all I know that we can use classname $('.add_smile').on('click', function(){ // Prepend the ALT of the image to the textarea $('#chat_textarea').val( $('#chat_textarea').val()+ this.alt ); }); But my question is different...i can not add alt / value to each image, it should be loaded automatically,something like fetching ;) from json file by passing id ....is there any ways to fix in that way....
has answer: http://stackoverflow.com/a/25422591
has answer: http://stackoverflow.com/a/25422618
tagged with: http://stackoverflow.com/tag/html
has title: Jquery dynamically enter values
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25422618
type: Question
has comment: http://stackoverflow.com/comment/39659446
tagged with: javascript
score: 0

http://stackoverflow.com/a/25506544
type: Answer
has comment: http://stackoverflow.com/comment/39918702
answers question: http://stackoverflow.com/q/25461774
has comment: http://stackoverflow.com/comment/39918718
has comment: http://stackoverflow.com/comment/40009625
score: 0
upvote count: 1
downvote count: 1
has body: After investigating I believe the root of the problem lies with the way position fixed is being used on the section featured background image. Position fixed is not working as per the W3C specification in Google chrome which is also why the parallax scrolling effect is failing to work in Chrome. Simply REMOVING FIXED from your background position should resolve the problem of the image disappearing on scroll. CHANGE FROM section.featured { background: url('homepage.jpg') no-repeat center center fixed; } TO section.featured { background: url('homepage.jpg') no-repeat center center; } When the background is set as fixed, it is similar to putting a fixed 'div' in the background and setting the original div background to be transparent. This is actually a bug in Google Chrome. (Despite its popularity Chrome still does not comform to web standards as well as firefox.) RESOLUTION Although I have been unable to test this with your website their is a workaround for this bug. Setting the 'position' propery of the element AND ALL parent elements as 'static', or if you have given it some other value, namely 'relative', 'fixed' or 'absolute', just remove those. If the element or any container element, including: body &amp; html has any position property other than static the bug will occur. Additionally: Ensure that backface-visibility: hidden; is not set on the element or any of its containers, including: body &amp; html. ALTERNATE SOLUTIONS One alternative is to use the css clip function to create a similar effect. CLICK FOR DEMO Demo by Daniel Perván .element { position: relative; height: 400px; } .clipper { position: absolute; clip: rect(auto,auto,auto,auto); width: 100%; height: 100%; } .image { background: url(http://image.jpg) no-repeat 50% 50%; background-size: cover; position: fixed; width: 100%; height: 100%; top: 0; }

http://stackoverflow.com/a/25463812
has comment: http://stackoverflow.com/comment/39742035
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25463638
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25463638
has body: I think you need to rethink your logic a little. You have a number of issues in the code that even Plunkr is picking up on, like redefining homePosition in your showDistance method: ... $scope.showDistance = function(pos, homePosition) { ... // Here we define a new variable with the same name as our function's 2nd param var homePosition = { ... This isn't the root cause of your problem - I'm just calling it out because these warnings are often indications of practices that will get you into trouble in Javascript. Javascript has something called "variable hoisting" that basically means no matter where in your function you define a var, it will actually get defined at the very top, when you enter the function. This can create very unpredictable behavior if you haven't allowed for it, and re-defining a function parameter with a var of the same name is one of those gotchas that trip a lot of people up. Your root cause could not be simpler, though. In this case the debugger is your friend. I've forked your Plnkr and slightly modified it to add a debugger breakpoint: http://plnkr.co/edit/6amCdnBYqmzlUXVO9buP?p=preview If you look at your "locals" panel when you hit this point you will see that lat2 is a string. Strings objects don't support math functions - you need to convert it to an int or float first. :)
downvote count: 0
has comment: http://stackoverflow.com/comment/39752071
score: 1

http://stackoverflow.com/comment/39706642
type: Comment
type: QuestionComment
has text: why not use JavaScript to show the "scroll to top" link if the page *has been scrolled*?
comment on: http://stackoverflow.com/q/25448477
score: 0

http://stackoverflow.com/comment/39782604
comment on: http://stackoverflow.com/q/25489011
type: QuestionComment
has text: After all that, you need to include what the error actually is!
type: Comment
score: 0

http://stackoverflow.com/q/25483882
has comment: http://stackoverflow.com/comment/39772762
accepted answer: http://stackoverflow.com/a/25485330
has comment: http://stackoverflow.com/comment/39774586
type: Question
has body: I want to say: var b = new a.B(); where a is an object. I want the method B to be able to refer to the calling object a and to the newly created object b. Normally, first reference is achieved via method context and second - via constructor context. Both contexts bind referenced objects to this keyword. But how do I refer to both of them during a single call to B? USE CASE: Suppose, that I've written a library that allows user to easily insert my widget inside his web-page. Upon load my library exports a single name to the global namespace: Toolbar, which is a constructor that creates my widget within user's web-page element, called parent_dom_element: var toolbar1 = new Toolbar(parent_dom_element); Now, within my widget, corresponding to toolbar1 object, user can create sub-widgets like this: var comment = new toolbar1.Comment(); I want the constructor function Comment to be able to refer to the toolbar1 object and to act as a constructor at the same time like this: Toolbar.prototype.Comment = function (toolbar, ){ this.attr1 = toolbar.attr1; }; How to achieve this?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39772769
score: 0
linked to: http://stackoverflow.com/q/20784304
linked to: http://stackoverflow.com/q/15884096
answer count: 1
has answer: http://stackoverflow.com/a/25485330
has title: javascript: how to call a function in both method and constructor contexts simultaneously?
has comment: http://stackoverflow.com/comment/39773798
type: AnsweredQuestion

http://stackoverflow.com/comment/39697931
score: 0
type: Comment
type: QuestionComment
has text: Any reason you're not using the [pattern recommended by Drupal](https://www.drupal.org/node/756722#behaviors)?
comment on: http://stackoverflow.com/q/25442392

http://stackoverflow.com/comment/39710118
type: Comment
type: QuestionComment
has text: Step through your code to find out what's going on.
comment on: http://stackoverflow.com/q/25449572
score: 0

http://stackoverflow.com/q/25529034
tagged with: mongodb
answer count: 2
has answer: http://stackoverflow.com/a/25530541
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25530788
has title: "Uncaught TypeError: Illegal invocation" using POST request Ajax/NodeJs / MongoDB / Mongoose
type: UnansweredQuestion
tagged with: node.js
has body: I am getting an error in the console when I try to do a POST request thought Ajax/Jquery. This is the error: The lines createTeam.js 67 and 31 are : $.ajax({ //line 67 sendInvitation(teamID,_companyName,teamName) //line 31 the ajax request is inside the function sendInvitation. I call sendInvitation inside a success part of another ajax request: success: function(msg) { $.cookie("teamID",msg.teamID) $.cookie("sessionID",sessionID) var teamID = msg.teamID; sendInvitation(teamID,_companyName,teamName); alert("team supposedly saved") } This is sendInvitation function: function sendInvitation(teamID, adminName,teamName){ var emailList = []; $(".emails-ul").children("li").each(function(){ emailList.push($(this).value); }); $.ajax({ type: "POST", url: "http://xxx.xxx.x.xx:9000/email/"+teamID, dataType:'json', contentType: false, data:{ teamName: teamName, adminName:adminName, emails: "argomes@lakeheadu.ca" }, success: function(msg) { } }); } I dont know what I am doing wrong. Does someone know? Thank you in advance.
score: 0
type: Question

http://stackoverflow.com/comment/39854827
score: 0
type: Comment
type: QuestionComment
has text: I'm going to play around with window.performance.now() to see if it fits my needs: https://developer.mozilla.org/en-US/docs/Web/API/Performance
comment on: http://stackoverflow.com/q/25524471

http://stackoverflow.com/a/25544944
type: Answer
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39886036
has body: Provided I do understand your question correctly, I think you're way overcomplicating stuff. If you simple want to: a) have a list of shifts, from which one can be selected, and b) be able to edit that selected shift then the following is all you need: ctrl: $scope.shifts = [ { nr: 1, start_time: "12Start", end_time: "12END" }, { nr: 2, start_time: "34start", end_time: "786" }, { nr: 3, start_time: "123", end_time: "5656" }, { nr: 4, start_time: "098", end_time: "77" }, { nr: 5, start_time: "75757", end_time: "57567" } ]; $scope.active = null; view-demo: Select a shift Edit start/end start time snd time demo: http://jsbin.com/fibilalaciha/1/
answers question: http://stackoverflow.com/q/25542880
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25542880
score: 1

http://stackoverflow.com/a/25396691
answers question: http://stackoverflow.com/q/25396617
score: 3
upvote count: 3
has body: Here's one way to do it var nav = (function rec(el) { return el.map(function() { var o = $(this).data(), c = $(this).children('ul').children('li'); if ( c.length &gt; 0 ) o.child = rec(c); return o }).get(); })($(' body &gt; ul &gt; li')); recursively traversing the children and building the JSON FIDDLE
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39622002
comment on: http://stackoverflow.com/q/25402766
score: 0
type: QuestionComment
has text: did you even glance at [ready](http://api.jquery.com/ready/), [focus](http://api.jquery.com/focus/) or [scroll](http://api.jquery.com/scroll/) ?
type: Comment

http://stackoverflow.com/comment/39682596
score: 0
type: Comment
type: QuestionComment
has text: Ok I've done that and it doesn't fix the problem, but why does the same exact code work in IE and not give me a null pointer? that is my question
comment on: http://stackoverflow.com/q/25434831

http://stackoverflow.com/q/25462839
type: UnansweredQuestion
type: Question
has body: I'm working on an online music stream with JavaScript and cordova, for Android, iOS, and Windows phones. I use HTML Audio tag, when I replay a song, it download from beginning, My question is, is there any way to download and store it on user mobile device with cordova and play it while it downloads?
tagged with: javascript
tagged with: caching
score: 0
tagged with: audio-player
has answer: http://stackoverflow.com/a/25463071
answer count: 1
tagged with: cordova
has title: Is it possible to cache music in cordova to avoid download again?

http://stackoverflow.com/q/25508049
has answer: http://stackoverflow.com/a/25516461
tagged with: javascript
has body: I recently upgraded a mapping app to the Google Maps JS API v3. It was working perfectly, but now the maps are missing their tiles and controls. The map with the missing elements is visible at: http://test.mapping.cit.cornell.edu/publiclabs/map/ The surprising thing is that I'm not seeing any JS errors or 404s in my dev console. Also, the divs for the tiles are present (see the screenshot below). Has something changed in the API in the last couple of months that would cause this behavior?
tagged with: google-maps-api-3
tagged with: google-maps
upvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25516461
has title: Missing tiles and controls in Google Maps JS API
score: -1
type: AnsweredQuestion
downvote count: 1
type: Question

http://stackoverflow.com/comment/39816644
score: 0
type: Comment
type: QuestionComment
has text: As far as I know I'm using the latest version from https://github.com/ericmbarnard/Knockout-Validation/tree/master/Src
comment on: http://stackoverflow.com/q/25507003

http://stackoverflow.com/a/25445222
upvote count: 1
answers question: http://stackoverflow.com/q/25444956
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25444956
type: Answer
score: 1
has body: var data = $( "select" ).val(); Just regular jQuery.

http://stackoverflow.com/comment/39785004
type: Comment
comment on: http://stackoverflow.com/q/25488917
score: 0
type: QuestionComment
has text: are you going through any kind of proxy?

http://stackoverflow.com/a/25500341
has body: Try this: function changeColor() { var dd = document.getElementById('circle'); dd.style.backgroundColor = '#FF0'; }
score: 0
type: Answer
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25500293

http://stackoverflow.com/comment/39861054
score: 10
type: QuestionComment
comment on: http://stackoverflow.com/q/25531424
has text: An array with a single null element get's casted to a string, meaning it calls .join(',') on it, since there's only one element it becomes `(string)null`, which is an empty string.
type: Comment

http://stackoverflow.com/q/25477876
tagged with: dropbox-api
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25480921
accepted answer: http://stackoverflow.com/a/25480921
type: AnsweredQuestion
has title: How to know what the change was for each item in "changes" of Dropbox-js pullchanges
has body: I am using Dropbox-js to access existing files contained in Dropbox. I use a separate array which converts the list of files back to the hierarchical structure of folders with sub-folders. When I pullchanges - how would I be able to know what the change was on each file to know where to add it in / remove it from the hierarchy? Is it just a case of the following? Check whether path exists: if not --> new file was_removed == true --> delete file Check whether path exists, if exists &amp; name not the same --> file was renamed Does this count for the copy, move methods etc?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39693505
score: 0
comment on: http://stackoverflow.com/q/25441269
type: Comment
type: QuestionComment
has text: It must be some template language of some framework which i dont know about. It is definitely neither to js nor to string relevant.

http://stackoverflow.com/comment/39700100
score: 1
type: Comment
has text: http://en.wikipedia.org/wiki/Same-origin_policy
type: QuestionComment
comment on: http://stackoverflow.com/q/25445027

http://stackoverflow.com/a/25395092
has comment: http://stackoverflow.com/comment/39608372
has comment: http://stackoverflow.com/comment/39608417
has comment: http://stackoverflow.com/comment/39627619
has comment: http://stackoverflow.com/comment/39629550
has comment: http://stackoverflow.com/comment/39608449
has comment: http://stackoverflow.com/comment/39641069
score: 3
has comment: http://stackoverflow.com/comment/39627742
has comment: http://stackoverflow.com/comment/39629095
has comment: http://stackoverflow.com/comment/39627423
has comment: http://stackoverflow.com/comment/39628718
has comment: http://stackoverflow.com/comment/39627716
has comment: http://stackoverflow.com/comment/39608533
has comment: http://stackoverflow.com/comment/39627313
has comment: http://stackoverflow.com/comment/39627879
upvote count: 3
has comment: http://stackoverflow.com/comment/39627318
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39628802
has comment: http://stackoverflow.com/comment/39629365
has comment: http://stackoverflow.com/comment/39628412
has comment: http://stackoverflow.com/comment/39627098
has body: Angular Template Asset Pipeline Plugin author here. A couple tweaks and this should work for you. The plugin expects the module names to be in camel case. The plugin also removes the .tpl from the file name so you'll end up with a file named hierarchyviewertemplate.js in this case Make sure the file names (excluding the extension) are unique. On that last point, since The Asset Pipeline plugin will ignore the parent folders within the assets directory, a file in each of the following locations would cause a conflict: /assets/javascripts/hierarchyviewertemplate.js /assets/templates/hierarchyviewertemplate.tpl.html In terms of the actual code, something like this should work better for you: //= require_self //= require_tree /hierarchyViewer angular.module('hierarchyViewer', []).directive('hierarchyviewer',function(){ return { restrict: 'EA', scope: {}, replace: true, controller: function ($scope, $http) { }, templateUrl: 'hierarchyviewertemplate.html' } }); This would assume that your hierarchyviewertemplate.tpl.html file is located at grails-app -> assets -> templates -> heirarchyViewer -> hierarchyviewertemplate.tpl.html If your template is contained within a plugin, replace require_tree with require_full_tree Hope that helps.
accepted answer of: http://stackoverflow.com/q/25390307
type: Answer
has comment: http://stackoverflow.com/comment/39627810
answers question: http://stackoverflow.com/q/25390307
has comment: http://stackoverflow.com/comment/39608343
has comment: http://stackoverflow.com/comment/39629037
downvote count: 0
has comment: http://stackoverflow.com/comment/39628244

http://stackoverflow.com/q/25500324
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have a chained select which allows the user to select the file he/she wish to download according to the academic year >> subjects(according to the year selected) >> the user then clicks "download" to download the linked file found on an external address such as google. After adding a script that "should" transfer the user to the external address all I'm getting is opening a new tab/page for the same page I'm on (similar to a refresh) except the address in the url bar is www..../acyear=firstyear&subj=http%3A%2F%2Fwww.google.com&download=Download SUBMIT BUTTON SCRIPT $(document).ready(function() { $("#subj").chained("#acyear"); $("#download").on("click", function(e){ e.preventDefault(); $(this).attr('target', '_blank'); window.open($("#subj").val()); }); }); This happened after adding the code and script to the main page I wanted to have them in , which contains attached css sheets and jqueries for certain effects (like slideshows/navbar..) I also added some CSS styles to the submit button and select tags, maybe this is the reason? Not sure where the problem is since it works just fine on a simple html page.... here's the full code for the form and script... Academic Year 1st Year 2nd Year 3rd Year 4th Year 5th Year Please select a Subject Select Subject Calculus101 Calculus102 Physics101 Physics102 Chemistry101 Chemistry102 Engineering Workshops Chemistry102 English111 English112 Computer Skills Please select a Subject Select Subject Statics Dynamics Strength of Materials Engineering Drawing B Physics Lab C++ Mechanical Drawing Differential Equations Intermediate Analysis //same goes for 3rd,4th and 5th year
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
type: Question
has title: Chained Select Submit Button STOPPED functioning correctly
has answer: http://stackoverflow.com/a/25501550
tagged with: forms
score: 0

http://stackoverflow.com/a/25424758
has comment: http://stackoverflow.com/comment/39662837
has body: I'm not entirely sure it will help, but try using .on like so: $('body').on('click', '.read-more', function(){});
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25424279

http://stackoverflow.com/comment/39887441
type: AnswerComment
has text: @PHwpGUY Also you can use server sessions to set the same. If you know how to use `session_start()` and `$_SESSION` you will be able to achieve this using the server side! :)
type: Comment
comment on: http://stackoverflow.com/a/25545970
score: 0

http://stackoverflow.com/comment/39771765
has text: Yes, I've put ` ` in my main.htlm, and in Code.gs file I call my html file using `return HtmlService.createHtmlOutputFromFile('main')` but it displays nothing
comment on: http://stackoverflow.com/q/25449453
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25397070
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39611932
possible better answer: http://stackoverflow.com/a/25397360
has answer: http://stackoverflow.com/a/60100832
has comment: http://stackoverflow.com/comment/39611869
score: 5
has body: In my application, there is a comment box. If someone enters a comment like then an alert appears when I load that page. Is there anyway to prevent this?
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: xss
has answer: http://stackoverflow.com/a/59467317
has answer: http://stackoverflow.com/a/25397150
accepted answer: http://stackoverflow.com/a/25397150
upvote count: 5
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25397360
has comment: http://stackoverflow.com/comment/39611998
answer count: 4
favorite count: 0
has title: Prevent user-entered scripts from running in webpage
has comment: http://stackoverflow.com/comment/39611848

http://stackoverflow.com/a/25470297
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39748094
score: 1
answers question: http://stackoverflow.com/q/25470246
has body: $("Your selector").keypress(function (e) { var key = e.which; if(key == 13) // the enter key code { $(input[type = submit]).click(); return false; } });
upvote count: 1
has comment: http://stackoverflow.com/comment/39748016

http://stackoverflow.com/comment/39656219
type: Comment
type: QuestionComment
has text: instead of returning the actual array. you could return a new object with just ids or the properties that you want to expose
comment on: http://stackoverflow.com/q/25421082
score: 0

http://stackoverflow.com/a/29507906
type: Answer
answers question: http://stackoverflow.com/q/25452190
has body: Getting me same issue while showing content without template, make some changes in css and it's works for me. HTML -- item content--- CSS .myPivot { } .myPivot div.win-pivot-item { left:0px !important; visibility: visible; width:100%; } .myPivot .win-pivot .win-pivot-surface { width: 100%; position: fixed; }
score: 0

http://stackoverflow.com/a/25403560
answers question: http://stackoverflow.com/q/25403497
has comment: http://stackoverflow.com/comment/39623397
type: Answer
score: 0
has body: A similar question has been asked before - This should give you an answer Change CSS background-image with different intervals via jQuery
has comment: http://stackoverflow.com/comment/39631773

http://stackoverflow.com/comment/39685277
type: QuestionComment
comment on: http://stackoverflow.com/q/25436031
score: 0
has text: I posted it as an answer. I'm sure you can tweak it to fit your requirements. The whole idea shouldn't go so further from that.
type: Comment

http://stackoverflow.com/a/25445979
score: 3
has body: You can use e.stopPropagation(), because you have prevent parent click event on click of link $(window).click(function(){ console.log('Clicked'); }) $("a[href^='https']").click(function(e){ e.stopPropagation(); console.log('This was a link'); }) DEMO
has comment: http://stackoverflow.com/comment/39701805
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25445857
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/25445857

http://stackoverflow.com/a/25469564
type: Answer
answers question: http://stackoverflow.com/q/25468925
has comment: http://stackoverflow.com/comment/39754278
has body: Try watching on network_interfaces to know when it's modified exampleApp.controller('MainCtrl', ['$scope', '$http', 'exampleFactory', function($scope, $http, exampleFactory) { // This outputs the expected array in network_interfaces, identical // to the console output within the factory console.log(exampleFactory) // But then this outputs the initial 'Detecting network connections...' // string set in the factory console.log(exampleFactory.network_interfaces) // And {{network_interfaces}} and {{factory_state}} in the view keep // 'Detecting network connections...' as the value for network_interfaces // permanently $scope.factory_state = exampleFactory; $scope.network_interfaces = exampleFactory.network_interfaces; $scope.$watch('factory_state.network_interfaces', function() { console.log($scope.factory_state) }); }]);
score: 0
has comment: http://stackoverflow.com/comment/39759640

http://stackoverflow.com/comment/39850006
score: 0
type: AnswerComment
type: Comment
has text: Ah okay, because I tried a few things with your code and that didn't work. So it wasn't just me. :) Thank you again for the solution, I will use that instead. * thumbs up *
comment on: http://stackoverflow.com/a/25507503

http://stackoverflow.com/a/25503544
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/39809673
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39809848
answers question: http://stackoverflow.com/q/25503489
has body: You can do it with CSS: a.checkme[href='href1'], a.checkme[href='href2'] { display: none; } http://css-tricks.com/attribute-selectors/ http://jsfiddle.net/78zrnnvz/ I appreciate you asked for a js/jq solution, but it seems unnecessary in this situation
type: Answer
accepted answer of: http://stackoverflow.com/q/25503489

http://stackoverflow.com/a/25506130
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/25505972
has body: A very simple solution could be, for a variable named filename, use: filename.substring(0, filename.indexOf('.jpg') + 4); See substring and indexOf
accepted answer of: http://stackoverflow.com/q/25505972
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25410688
tagged with: ajax
has body: I am working on a project with Chinese language (gb2312). We have a form that submit customer input data from File 1 to a php File 2 using Ajax. The two files display Chinese without problem. But when the same data was submitted from File 1 to File 2, it turned to be totally wrong characters. For example: File 1 0 File 2 <?php echo $_POST['content']; ?> Both of the files display Chinese characters without problem. But when submitting content in Chinese from File 1 to File 2 the content becomes garbled not appears to be the correct characters. I think the problem should be somewhere in the Ajax submit script but do not know how to fix it. Would you please help me? Thank you in advance.
type: UnansweredQuestion
has title: How To Set Language to Chinese Using Ajax Form Submit to A Different PHP File?
type: Question
tagged with: forms
tagged with: special-characters
has answer: http://stackoverflow.com/a/25410986
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25449337
has comment: http://stackoverflow.com/comment/39708653
has answer: http://stackoverflow.com/a/25449674
downvote count: 0
linked to: http://stackoverflow.com/q/2878983
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39708378
tagged with: http://stackoverflow.com/tag/html
answer count: 1
score: 1
favorite count: 0
linked to: http://stackoverflow.com/q/699065
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39708511
has body: I want submit form for Jquery dialog by pressing enter key. HTML &lt;!-- Pin Notification Form --&gt; &lt;div id="pin-dialog-form" title="Verification Pin"&gt; &lt;div id="agent_pin_container"&gt; &lt;input type="password" name="verification_pin" id="verification_pin" value="" class="form-control" placeholder="Verification Pin" /&gt; &lt;/div&gt; &lt;/div&gt; JQUERY $( "#pin-dialog-form" ).dialog({ autoOpen: false, height: 200, width: 300, modal: true, buttons: { "Submit": function() { // PROCESS }, Cancel: function() { $( this ).dialog( "close" ); } }, close: function() { $( this ).dialog( "close" ); } }); Now, I can not use this type of code in here, if (e.keyCode == 13) {. Because, the form is submitted by modal window itself. on the other hand I can not use this, open: function() { $(this).parents('.ui-dialog-buttonpane button:eq(0)').focus(); } because, I need to enter PIN first then focus on submit button. Is there any other way to do it? Thanks.
has title: Jquery dialog submit form by Enter Key
has comment: http://stackoverflow.com/comment/39708560
tagged with: forms
type: Question

http://stackoverflow.com/q/25492281
score: 1
has body: The test case is I've a table in a form. The rows are generated dynamically. Right now with plain html + javascript I've like this, //some options Default Value //some options Default Value When the brandChanged(x) method is triggered it gets the options from another file with an ajax request and adds them to model_x select element. Everything is working fine, but my question is how to do it with jQuery? I mean what's the way to bind .change() to these input elements Also I don't like naming ids in name_id way. Is there a better design to solve this?
has answer: http://stackoverflow.com/a/25492729
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25492315
downvote count: 0
possible better answer: http://stackoverflow.com/a/25492729
tagged with: javascript
tagged with: jquery
has title: Adding .change to multiple select element
favorite count: 0
has answer: http://stackoverflow.com/a/25492315
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/39947376
score: 0
type: Comment
has text: Marc, found your code really interesting and i've downloaded chrome beta to play around with that also. turns out it was something stupid my end, as with most these things. i was "calling" the onreceive listener function when successfully connecting, not realising I should have set up the listener (asynchronously) and then connected to the device. Problem seemingly solved.
comment on: http://stackoverflow.com/a/25571976
type: AnswerComment

http://stackoverflow.com/comment/39723823
comment on: http://stackoverflow.com/a/25455035
score: 0
type: AnswerComment
type: Comment
has text: Thank you for your response. I've made the changes you suggested but it still does not work. My code was really large and I did not add the whole thing. However, I have edited to include more.

http://stackoverflow.com/q/25512918
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39827499
possible better answer: http://stackoverflow.com/a/25512940
score: 1
has answer: http://stackoverflow.com/a/25512940
upvote count: 1
has answer: http://stackoverflow.com/a/25513032
type: Question
has answer: http://stackoverflow.com/a/25513013
tagged with: javascript
has comment: http://stackoverflow.com/comment/39827474
has body: I need to get the src of an image inside the closest div with the class name "asd" but I keep getting "undefined" returned. Here's my code: HTML test Javascript function show(){ var url = jQuery(this).closest('.asd').find("img").attr("src"); alert(url); } This works: $('.asd').find('img').attr('src'); but it's not what I need. I need it be the closest div. What am I doing wrong?
has title: Get the closest img src inside a div
has answer: http://stackoverflow.com/a/25513038
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25513013
has answer: http://stackoverflow.com/a/25513061
favorite count: 0
has comment: http://stackoverflow.com/comment/39827500
answer count: 5

postdata
type: Tag
tags question: http://stackoverflow.com/q/25545852
tag name: postdata

http://stackoverflow.com/comment/39619579
comment on: http://stackoverflow.com/q/25401391
score: 0
type: Comment
type: QuestionComment
has text: JavaScript ain't php. Use: `document.getElementsByTagName("h1");` Keep in mind that `getElementsByTagName` retuns an array of html elements, if any are found.

http://stackoverflow.com/comment/40440381
comment on: http://stackoverflow.com/a/25639331
type: AnswerComment
score: 0
has text: Your refactored link is not valid. How could i see your solution?
type: Comment

http://stackoverflow.com/q/25397372
has answer: http://stackoverflow.com/a/25397488
has title: How to remove or change .html extension in my url using javascript or jQuery?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39612326
has answer: http://stackoverflow.com/a/25397618
answer count: 4
linked to: http://stackoverflow.com/q/824349
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25351184
type: Question
linked to: http://stackoverflow.com/q/6478485
has comment: http://stackoverflow.com/comment/39612328
has body: My html page url is www.example.com/training/product.html. I want to change my url like to www.example.com/training/product. Is it possible using javascript or Jquery? How?
upvote count: 4
duplicate of: http://stackoverflow.com/q/824349
has answer: http://stackoverflow.com/a/25397433
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39612366
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/25397473
favorite count: 0

http://stackoverflow.com/q/25466623
has comment: http://stackoverflow.com/comment/39741380
tagged with: asynchronous
linked to: http://stackoverflow.com/q/14220321
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/25466748
answer count: 1
linked to: http://stackoverflow.com/q/750486
has comment: http://stackoverflow.com/comment/39741233
score: 0
has comment: http://stackoverflow.com/comment/39741267
has comment: http://stackoverflow.com/comment/39741292
has title: Combining Chrome async APIs
tagged with: javascript
has answer: http://stackoverflow.com/a/25466748
type: Question
has body: I need to combine two Chrome APIs in loop and after the loop is finished, save array to storage. This is what I have chrome.downloads.search({}, function (DownloadItem) { for (var i=0; i&lt;DownloadItem.length; i++) { var itemID = DownloadItem[i].id; chrome.downloads.getFileIcon(itemID, function(iconURL) { DL_icons[itemID] = iconURL; }); } console.log(DL_icons); }); result of search is DownloadItem array of objects. I need to loop through it, get ID's, and for every ID I need to pass it into call of chrome.downloads.getFileIcon. Result of that getFileIcon method is iconURL which I need to push into new array on ID index (I could store it into new object with according ID and then push it into an array, doesn't matter in this case). After everything is done, I need to store it to local storage (or console.log...). As it is now, I'm getting the same ID and iconURL for every array element. Basically, I need to make a proper closure of inner API, and just can't make it right. Can someone pls help with it?
type: AnsweredQuestion

http://stackoverflow.com/comment/39858516
score: 0
comment on: http://stackoverflow.com/q/25529693
has text: this might be a useful post for anyone who looks for deeper explaination : http://benalman.com/news/2010/11/immediately-invoked-function-expression/ , thanks to adeneo for the searching key IIFE.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25411973
type: Answer
answers question: http://stackoverflow.com/q/25410666
has body: See my answer to this question for an example of nested directives. Since the question being asked is quite different, I will try and give a better explanation here. I'm not entirely sure I understand the question correctly, so I will lay it out as I understand it: Page loads, the markup for your directive shows nothing in particular. You grab some data asynchronously. You process that data and produce some HTML that you then want to append or insert to your directive. See this fork of my original plnkr. That is just to demonstrate how the transformData directive uses the method of the videoPlayer directive. The parent directive declared in the require: attribute has its scope passed to the child directive's linking function as controller (the fourth argument). This allows you to expose an API to the child directives on the parent directive's scope. I would suggest that you don't need to use $compile at all, though the $compile documentation is required reading for writing directives in my opinion. Here are some adjustments that I would make to the plnkr to suit your case: directive('myCustomComponent', ['$http', '$sce', function($http, $sce) { return { scope: { url: '@', output: '@' }, require: '^parentDirective', template: '&lt;div ng-bind-html="output"&gt;&lt;/div&gt;', link: function(scope, elem, attrs, controller) { $http({ url: scope.url, method: 'GET', // or whatever }). then(function(r) { var html = controller.getHtml(r.data); scope.output = $sce.trustAsHtml(html); }); } } }]); When your app is instantiated and the linking function is executed your async call will be performed and whenever it's finished, this div will be populated with the htmlified return data. Markup: &lt;my-custom-component url='//someurl.org' &gt;&lt;/my-custom-component&gt; You could also potentially set some placeholder text through the output attribute of the directive. Update: After seeing Nikolay Baluk's answer, I had to make some changes to acknowledge that angular doesn't just dum…
score: 0

http://stackoverflow.com/comment/39656621
has text: Now its ok, but even if the cookie reads `true` its not executing `alert('i wil change');`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25421299

http://stackoverflow.com/q/25478299
possible better answer: http://stackoverflow.com/a/25478311
has answer: http://stackoverflow.com/a/25478311
has title: How can I access the data inside this JSON?
has comment: http://stackoverflow.com/comment/39762975
has comment: http://stackoverflow.com/comment/39763025
tagged with: javascript
has comment: http://stackoverflow.com/comment/39762994
accepted answer: http://stackoverflow.com/a/25478438
has answer: http://stackoverflow.com/a/25478795
answer count: 3
has comment: http://stackoverflow.com/comment/39762985
has comment: http://stackoverflow.com/comment/39763123
has comment: http://stackoverflow.com/comment/39762907
has comment: http://stackoverflow.com/comment/39762868
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39762924
score: 0
has body: var USER_DETAILS= { "details": [ { "name": "john", "passwd": "xyz", "email": "j@g.com", "contact": "87685778", "lastLogin": "Sun Aug 24 2014 23:30:54 GMT+0530 (India Standard Time)" }, { "name": "peter", "passwd": "xyz", "email": "p@g.com", "contact": "09820984", "lastLogin": "Sun Aug 24 2014 23:41:04 GMT+0530 (India Standard Time)" }, { "name": "s", "passwd": "123", "email": "s@g.com", "contact": "3435", "lastLogin": "Mon Aug 25 2014 00:05:45 GMT+0530 (India Standard Time)" }, { "name": "y", "passwd": "k", "email": "j@jhj.com", "contact": "87685778", "lastLogin": "Mon Aug 25 2014 00:12:59 GMT+0530 (India Standard Time)" }, { "name": "johny", "passwd": "234", "email": "lkj@g.com", "contact": "34543", "lastLogin": "Mon Aug 25 2014 00:20:44 GMT+0530 (India Standard Time)" } ] } I have this jason data now I need to access the name "John". I have tried accessing it like USER_DETAILS.details[i].name but I am getting error USER_DETAILS.details is undefined. Here is my rest of the code for accessing JSON function check_details() { var users=JSON.parse(localStorage.getItem('USER_DETAILS')); for (var key in users) { alert(users.details[0].name); } }
type: Question
has comment: http://stackoverflow.com/comment/39762978
has answer: http://stackoverflow.com/a/25478438

http://stackoverflow.com/comment/39934281
comment on: http://stackoverflow.com/a/25504591
type: AnswerComment
score: 0
type: Comment
has text: In a meanjs project, links to the jsfiles are added automatically. The question is what do you have to do to avoid this manual step.

http://stackoverflow.com/q/25394107
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: I've just started out in the world of design and recently discovered scripts in Illustrator CS6. I currently use a script called "specify" in Illustrator(jsx). I've included a description of what this code actually does. "Select one object and run the script, Confirm the orientation of the measurement. This will specify the width or height of the object. Select two objects and run the script. This will specify the horizontal or vertical gap between the two objects. If you group several objects and run the script, you will get the size of the group of objects." I love this script however I wish I knew about coding and scripting as I would like to tweak this script so instead of saying "20" I would like it to include "mm" after the width/height. I was hoping that someone on here could help me out with this. I hope it is possible to do this, I've included the code below. Thanks in advance. Download link - http://cdn.tutsplus.com/vector/uploads/legacy/articles/2010/article_illustrator_plugin_scripts/scripts/specify.zip I tried posting the code but didn't have much luck. /* * Description: An Adobe Illustrator script that automates measurements of objects. This is an early version that has not been sufficiently tested. Use at your own risks. * Usage: Select 1 to 2 page items in Adobe Illustrator, then run this script by selecting File &gt; Script &gt; Other Scripts &gt; (choose file) * License: GNU General Public License Version 3. (http://www.gnu.org/licenses/gpl-3.0-standalone.html) * * Copyright (c) 2009. William Ngan. * http://www.metaphorical.net */ // Create an empty dialog window near the upper left of the screen var dlg = new Window('dialog', 'Spec'); dlg.frameLocation = [100,100]; dlg.size = [250,250]; dlg.intro = dlg.add('statictext', [20,20,150,40] ); dlg.intro.text = 'First select 1 or 2 items'; dlg.where = dlg.add('dropdownlist', [20,40,150,60] ); dlg.where.selection = dlg.where.add('item', 'top'); dlg.where.add('item', 'bottom'); dlg.where.add('item', 'left'…
tagged with: adobe-illustrator
has comment: http://stackoverflow.com/comment/39606477
downvote count: 3
has comment: http://stackoverflow.com/comment/39606476
has title: Illustrator "specify" JavaScript tweak
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/39606630
tagged with: javascript
score: -2
has answer: http://stackoverflow.com/a/25394316

http://stackoverflow.com/q/25469972
has title: Getting the values for a specific key from all objects in an array
favorite count: 0
has comment: http://stackoverflow.com/comment/39747378
linked to: http://stackoverflow.com/q/7364150
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/19590865
has answer: http://stackoverflow.com/a/42648283
duplicate of: http://stackoverflow.com/q/19590865
score: 59
upvote count: 59
has answer: http://stackoverflow.com/a/25470128
type: Question
has answer: http://stackoverflow.com/a/25470077
tagged with: javascript
has comment: http://stackoverflow.com/comment/39747337
has answer: http://stackoverflow.com/a/59898832
has answer: http://stackoverflow.com/a/25470009
has answer: http://stackoverflow.com/a/63824498
has answer: http://stackoverflow.com/a/65261343
has body: I'm running an express.js app that has a few apis feeding data to dropdown boxes. The data returned is in the form: [ { key: 'blah', value: 'Blah Blah' }, { key: 'foo', value: 'Foos' }, { key: 'bar', value: 'Bars' }, { key: 'baz', value: 'Bazingo' } ]; where key is my option key and value is the display text. The structure of this array is fixed and I know for a fact that I'll always have key and value as the fields in each object in the array. When I try to validate the form submitted (additional server side validation), I'd like to cross-reference the value provided for a field against all the values for "key" in the array (blah, foo, bar, baz). Given that this is going to be a frequently used route, I'd like to avoid iterating over the array to find the permitted values, every single time. Is there a simpler way to do this? In other words, I know I can use: permittedValues = []; for (i = 0; i &lt; array.length; i++){ permittedValues[i] = array[i]["key"]; } but I'd like to avoid this for loop, if possible. P.S: This seems to be a fundamental question and the answers I found online didn't exactly answer my question. So, apologies if this has already been asked and answered.
downvote count: 0
answer count: 7
linked to: http://stackoverflow.com/q/35136306

http://stackoverflow.com/q/25495509
tagged with: icollection
type: Question
tagged with: c#
has body: I am trying to serialize an ICollection to JSON and pass it to my JS via hidden field on my HTML. So far I have tried: @Html.HiddenFor(model =&gt; JsonConvert.SerializeObject(model.Details), new { Id = "WorkOrderDetails" }) // also tried model.Details.ToArray(). model.Details.ToList() var jsonSerialiser = new JavaScriptSerializer(); @Html.HiddenFor(model =&gt; jsonSerialiser.Serialize(model.Details), new { Id = "WorkOrderDetails" }) // also tried model.Details.ToArray(). model.Details.ToList() It complains about an Incompatibility error: InvalidOparationException I am thinking at this pace I will need to iterate my ICollection and pass every single detail individually. Is there a better way to do it?
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has title: Serializing an ICollection to JSON
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25495644

http://stackoverflow.com/q/25499263
tagged with: backbone.js
tagged with: todomvc
type: AnsweredQuestion
tagged with: underscore.js
type: Question
has title: Backbone.js View on TodoMVC: function and it's argument and how does it works
tagged with: function
has comment: http://stackoverflow.com/comment/39801912
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25501877
accepted answer: http://stackoverflow.com/a/25501877
has body: I am studying Backbone.js through the example todomvc application from here: http://todomvc.com/architecture-examples/backbone/ And I'm sort of stuck in the app-view.js part here: https://github.com/tastejs/todomvc/blob/gh-pages/architecture-examples/backbone/js/views/app-view.js Here's the snippet of the code: // Add a single todo item to the list by creating a view for it, and // appending its element to the `&lt;ul&gt;`. addOne: function (todo) { var view = new app.TodoView({ model: todo }); this.$list.append(view.render().el); }, Where did the 'todo' variable comes from on the function 'addOne'? I searched the whole project files and so far didn't find any specific function that specifies or initialize the 'todo' variable. I tried to read the Backbone.js and Underscore.js docs on their website and so far haven't find the explanation.
answer count: 1

http://stackoverflow.com/q/25437371
tagged with: javascript
has title: Wix website-Download the entered data in excel format
has body: Currently the client is using a Wix free website builder.And they want to have all the data in this form including the drag and drop objects into the baskets that the user has performed. I m going to embed this code into the Wix page. Drag and drop Food Items into baskets. Your name: Your email: Eaten more than once Basket Eaten more than twice Basket Eaten more than thrice Basket Is there any way that I can download the entered data into the excel format in a wix website? If it is not possible I want to send the data into the 3rd party database and then Download it in Excel format. Is this over ambitious? Or is there any third party app that I an embed in the Wix web page Here is a Fiddle
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39687312
type: UnansweredQuestion
tagged with: excel
has comment: http://stackoverflow.com/comment/39687262
answer count: 0
has comment: http://stackoverflow.com/comment/39687094
score: 0
type: Question
tagged with: database

list
type: Tag
tag name: list
tags question: http://stackoverflow.com/q/25425056
tags question: http://stackoverflow.com/q/25506438
tags question: http://stackoverflow.com/q/25396617
tags question: http://stackoverflow.com/q/25420297

http://stackoverflow.com/q/25548955
has title: Jquery accordion menu (3 level) How to?
answer count: 2
possible better answer: http://stackoverflow.com/a/34652439
upvote count: 1
has answer: http://stackoverflow.com/a/25549165
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25549165
has comment: http://stackoverflow.com/comment/39893066
tagged with: accordion
type: Question
has body: I have this jquery code: $(document).ready(function(){ $("#accordion2 h3").click(function(){ //slide up all the link lists $("#accordion2 ul ul").slideUp(); //slide down the link list below the h3 clicked - only if its closed if(!$(this).next().is(":visible")) { $(this).next().slideDown(); } }) }) And HTML: Articles Nature Wild life Flowers Animals Earth Space Ocean Land How do i modify the jQuery code so that the user can slidedown the "Nature" and its contents? 3 third level menu.
has answer: http://stackoverflow.com/a/34652439
tagged with: css
tagged with: menu

laravel
tags question: http://stackoverflow.com/q/25516112
tags question: http://stackoverflow.com/q/25449675
tags question: http://stackoverflow.com/q/25497052
tags question: http://stackoverflow.com/q/25396540
tags question: http://stackoverflow.com/q/25437032
tags question: http://stackoverflow.com/q/25425786
tag name: laravel
tags question: http://stackoverflow.com/q/25489011
tags question: http://stackoverflow.com/q/25486881
tags question: http://stackoverflow.com/q/25466891
type: Tag
tags question: http://stackoverflow.com/q/25428605

http://stackoverflow.com/a/25505709
has comment: http://stackoverflow.com/comment/39814682
score: 4
downvote count: 0
answers question: http://stackoverflow.com/q/25505611
type: Answer
has body: Move the onclick to outside the function $.fn.sl_dialog = function(params){ var self = this; self.after('&lt;div class="dialog-background"&gt;&lt;/div&gt;') $('.dialog').toggleClass('show'); return false; } $('.dialog .close, .dialog .button.no').on('click', function(){ $('.dialog-background').remove(); $('.dialog').toggleClass('show'); }); Here is the updated Fiddle
upvote count: 4

http://stackoverflow.com/q/25422270
tagged with: javascript
answer count: 1
downvote count: 0
has title: Fullcalendar CalEvent for single day end date will be null
favorite count: 0
has body: calEvent.end.getFullYear() + "/" + (calEvent.end.getMonth()+1) + "/" + calEvent.end.getDate() when i hover mouse to see the enddate is = null, but for the range for few day is ok and the end date result will show, how to fix for the single day?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31201609
upvote count: 1
type: Question
tagged with: c#
score: 1

http://stackoverflow.com/comment/39707983
score: 0
type: Comment
type: QuestionComment
has text: And even then, it will check *every* checkbox, not just the one you want -- although if the one you want is the one in the 'element' string, it doesn't exist in the DOM to *be* checked, anyway.
comment on: http://stackoverflow.com/q/25449133

http://stackoverflow.com/q/25514048
has title: Is there any way to trigger a callback after a window.location change is finished?
tagged with: javascript
linked to: http://stackoverflow.com/q/13811582
answer count: 2
has comment: http://stackoverflow.com/comment/39830424
linked to: http://stackoverflow.com/q/4505798
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/2064882
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39830612
score: 14
has answer: http://stackoverflow.com/a/25514341
upvote count: 14
has body: All of the following will successfully redirect a user to another page (with their own caveats, of course): window.location.replace(new_url), window.location.assign(new_url), window.location = new_url, The typical response to someone asking if you can get a callback for changing location is, of course, no, because whisking a user off to a new page means the scripts on your page are no longer active. That's all fine and dandy, but in the case where you are using any of the three methods above to download a file, not only does the user stay on the same page as they are on, but there is also a slight lag (depending on network speeds) between updating location and when the file actually starts downloading. In this situation (the user remaining on the page in which window.location was updated), is there any way to create a callback that would enable, for example, a loading icon being displayed the line prior to the redirect up until the file actually starts downloading?
has comment: http://stackoverflow.com/comment/39829688
tagged with: google-chrome
has answer: http://stackoverflow.com/a/48327307
type: Question
has comment: http://stackoverflow.com/comment/39829676

http://stackoverflow.com/comment/54761600
comment on: http://stackoverflow.com/a/33402045
type: Comment
score: 2
has text: That doesn't mask anything at all!
type: AnswerComment

http://stackoverflow.com/comment/39681747
type: QuestionComment
comment on: http://stackoverflow.com/q/25434612
score: 0
has text: What exactly is your use case?
type: Comment

http://stackoverflow.com/q/25482042
tagged with: http://stackoverflow.com/tag/json
has body: I've a code like this: jQuery.each(images, function (k, v) { v = v.split(':'); data.questions.push({ source: questionAssetPath + v[0], match: v[1], mouse: mouseAssetPath + v[2] + '.png' }); data.answers.push({ answer: v[1], match: v[1] }); }); When I run a grunt task (browserify:js), I've got this error: ParseError: Unexpected token + Please help me figure out of this. Thanks you. UPDATE: I've solved it myself. Thanks guys. I've noticed that I can't use + operator with objects (wtf with me) images = [ "maria-ozawa.png:MariaOzawa:1", "aoi-125239.png:Aoi:2", "sasha-grey.png:SashaGrey:3" ]; jQuery.each(images, function (k, v) { v = v.split(':'); v[0] = questionAssetPath + v[0]; v[2] = mouseAssetPath + v[2] + '.png'; data.questions.push({source: v[0], match: v[1], mouse: v[2]}); data.answers.push({answer: v[1], match: v[1]}); });
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39769757
has comment: http://stackoverflow.com/comment/39769688
has comment: http://stackoverflow.com/comment/39769766
tagged with: javascript
has comment: http://stackoverflow.com/comment/39769773
has title: How to use '+' to concat string in JSON data?
answer count: 2
has comment: http://stackoverflow.com/comment/39769750
downvote count: 0
has comment: http://stackoverflow.com/comment/39769697
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25482116
has answer: http://stackoverflow.com/a/25482158
type: UnansweredQuestion

http://stackoverflow.com/q/25446984
has answer: http://stackoverflow.com/a/25451716
has body: I have this String : var str = " visibility value1 TAG1 visibility value2 TAG2 visibility value3 TAG3 1408709686 TAG4 " I would like to get the value of tag containing in where =TAG2. So for my example, I would like to get this result : var result = value2 ; How can I parse this? (because str contains multiple )
answer count: 3
has title: Parse a Javascript String which contains XML
tagged with: parsing
tagged with: http://stackoverflow.com/tag/xml
favorite count: 0
has comment: http://stackoverflow.com/comment/39704705
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/25447377
has answer: http://stackoverflow.com/a/25447029
type: Question
upvote count: 0
score: -2
tagged with: javascript

http://stackoverflow.com/q/25542578
has comment: http://stackoverflow.com/comment/39881625
score: 0
answer count: 3
has body: I have this code: //FIRST ELEMENT All libraries Main Library //SECOND ELEMENT Go And the arrangement of the elements looks like this. FIRST ELEMENT | SECOND ELEMENT But when I tried to customize my first element using Jquery: $('#select_library').parent().append(' All libraries '); $('#select_library option').each(function(){ $('#newselect_library').append(' '+$(this).text()+' '); }); $('#newselect_library').append(' '); $('#select_library').remove(); $('#newselect_library').attr('id','select_library'); The arrangement of my elements turns out to be: SECOND ELEMENT | FIRST ELEMENT And my HTML Output is: //SECOND ELEMENT Go //MODIFIED FIRST ELEMENT All libraries All libraries Main Library I don't know what to do to keep it on its original arrangement.Sorry if I couldn't post an image. Anyhelp would be very much appreciated.Thanks. SOLUTION: I used prepend instead of append in my jquery code. $('#select_library').parent().prepend(' All libraries '); $('#select_library option').each(function(){ $('#newselect_library').append(' '+$(this).text()+' '); }); $('#newselect_library').append(' '); $('#select_library').remove(); $('#newselect_library').attr('id','select_library');
has answer: http://stackoverflow.com/a/25542624
has title: Float Div To The Left
has comment: http://stackoverflow.com/comment/39882771
has answer: http://stackoverflow.com/a/25542714
tagged with: dom
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25716435
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25542714
tagged with: css
possible better answer: http://stackoverflow.com/a/25716435

http://stackoverflow.com/a/25478110
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25478076
has body: This removes the last part of your path var st = '/website.com/index.php/Tools/Misc/renderer'.split(/\/[^/]+$/).join('/');
score: 1

http://stackoverflow.com/comment/39689357
score: 0
has text: Could it be due to the tween trying to take the short path, which would be zero change?
comment on: http://stackoverflow.com/q/25436926
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25489766
has answer: http://stackoverflow.com/a/25490072
accepted answer: http://stackoverflow.com/a/25490072
has title: angular.js rerender div after model change
type: Question
has body: I have a select with ng-model="vm.selectedUserId" and somewhere on the page I have .table-responsive(ng-if="vm.selectedUserId") %time-tracking-calendar( user-id="vm.selectedUserId" company-id="vm.companyId") The thing is: I want the .table-responsive block to be rerendered without touching the directive when the vm.selectedUserId changes. My current solution is to have .table-responsive(ng-if="vm.selectedUserId &amp;&amp; vm.showCalendar") %time-tracking-calendar( user-id="vm.selectedUserId" company-id="vm.companyId") and $scope.$watch('vm.selectedUserId', function() { vm.showCalendar = false; $timeout(function() { vm.showCalendar = true; }, 100); }); in the controller, but it looks way too dirty for me. Is there a more elegant solution (except the obvious one of watching the userId variable inside the directive) ?
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39784247
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/a/42081024
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25421233
score: 3
upvote count: 3
has body: Mhh.. I think @Damian asks for remove undefined field (property) from an JS object. Then, I would simply do : for (const i in myObj) { if (typeof myObj[i] === 'undefined') { delete myObj[i]; } } Short and efficient solution, in (vanilla) JS ! Example : const myObj = { a: 1, b: undefined, c: null, d: 'hello world' }; for (const i in myObj) { if (typeof myObj[i] === 'undefined') { delete myObj[i]; } } console.log(myObj);

http://stackoverflow.com/q/25525993
answer count: 2
has title: How can I unbind an event for an element which comes with AJAX
has body: My javascript binds an event to a specific element like this: $(document).on('click', '.element-class', function() { binding_function(); } I need to bind this way, since the element is on the content which comes with AJAX. I tried to unbind: $(".element-class").unbind(); But this doesn't work. How can I unbind this?
accepted answer: http://stackoverflow.com/a/25526395
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
possible better answer: http://stackoverflow.com/a/25526041
has answer: http://stackoverflow.com/a/25526395
has answer: http://stackoverflow.com/a/25526041
score: 0

http://stackoverflow.com/q/25459824
has title: jquery animation to change text of radio
has answer: http://stackoverflow.com/a/25460014
possible better answer: http://stackoverflow.com/a/25460003
has answer: http://stackoverflow.com/a/25460003
type: Question
tagged with: javascript
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25460014
tagged with: jquery
has body: I am trying to introduce animation and change the text inside a div tag and also text against radio buttons Am able to change the text of the div with animation However I am not able to change the text against the radio with animation NOTE - without animation I was able to do this based on an earlier question I had asked Here is what I have as HTML: loremipsum dah blah blah small The Jquery that works for the simple div : $('#questionBlock article').fadeOut(function() { $(this).text(val["carType"]).fadeIn().delay(3000); }); The Jquery that is not working for the label text change with animation: $('#sizeSmall')[0].nextSibling.nodeValue.fadeOut(function() { $(this)[0].nextSibling.nodeValue(val["carType"]).fadeIn().delay(3000); }); Any ideas ?
tagged with: animation
type: AnsweredQuestion

http://stackoverflow.com/comment/39854031
has text: @fiskers7 Good points, thanks. This is the route I wound up going down, inheritance just really seems to make the most sense in this case.
score: 0
comment on: http://stackoverflow.com/q/25513306
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25500404
has comment: http://stackoverflow.com/comment/39804020
has comment: http://stackoverflow.com/comment/39804014
score: 4
type: Answer
upvote count: 4
has body: The most flexible way of doing it is to add a class .active to your CSS, and apply that class to your circle on click. If you want to catch for clicks outside the circle, you'll have to set the event listener on the body, and then check e.target to see if it matches your element. var circle = document.getElementById('circle'); document.onclick = function(e) { //Set the event handler in JavaScript, not in HTML. if (e.target === circle) { //e.target is the clicked element. circle.classList.add("active"); } else { circle.classList.remove("active"); } } Then in your CSS: #circle{ height: 100px; width: 100px; border-radius: 100px; background: #F00; border: 2px solid ; } #circle.active { background: #FF0; } Toggle means that it would apply the class if it's not there, and remove it if it is. Now if you want to add extra styles to happen on click, you can simply add them to the #circle.active selector. Demo
has comment: http://stackoverflow.com/comment/39803777
downvote count: 0
answers question: http://stackoverflow.com/q/25500293
has comment: http://stackoverflow.com/comment/39803801

http://stackoverflow.com/a/25479720
type: Answer
has body: You can get the DOM element which you need, In this case with class "table-data pure-table-odd". Then clone it. Loop through the data you have from back end. Inject the name and other particulars into the object by using specific ids or order of the nodes. And append it back to the node with class "pure-table". You can get all the functions you need from JQuery. Like clone(), append() etc. Hope this helps. A sample code(not tested) is give below. Need to include the looping part from JSON. var original_element = $("table-data pure-table-odd"); var clone_element = $(original_element).clone(); //name 1 and all comes from the json you have. //you will have to loop through that data for this section $(clone_element).find("td")[0].append("name 1"); $(clone_element).find("td")[1].append("student number 1"); $(clone_element).find("td")[2].append("email 1"); $(clone_element).find("td")[3].attr("id", "id 1"); $("pure-table").append(clone_element);
accepted answer of: http://stackoverflow.com/q/25474269
answers question: http://stackoverflow.com/q/25474269
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/25479019
has body: Here's an extended version with more dynamic functionality, jic: http://jsfiddle.net/ofnh7gke/ And the smaller version: http://jsfiddle.net/rqf3s72n/ Javascript var sites = ['http://www.google.com','http://www.github.com']; document.getElementById('btnStockPurchasePlan').onclick = function(){ window.open(sites[0],'_parent'); return false; }; HTML Employee Stock Purchase Plan Information
answers question: http://stackoverflow.com/q/25478951
score: 0
type: Answer

http://stackoverflow.com/comment/39834229
has text: This requires you to know the coordinates which make the boundry. I just want to give a string of a location, and google should automatically convert it into a region.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25516266

http://stackoverflow.com/comment/39697714
score: 0
type: Comment
type: QuestionComment
has text: @DavidFregoli so HTML5 is essentially XML now (with arbitrary attributes allowed as well)? Thanks. I can remove this question, or I can accept your answer, if you post it as an answer.
comment on: http://stackoverflow.com/q/25443346

http://stackoverflow.com/q/25437419
has comment: http://stackoverflow.com/comment/39687122
tagged with: javascript
has comment: http://stackoverflow.com/comment/39687273
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39687196
has comment: http://stackoverflow.com/comment/39687157
has comment: http://stackoverflow.com/comment/39687463
has comment: http://stackoverflow.com/comment/39687113
has answer: http://stackoverflow.com/a/25437691
has comment: http://stackoverflow.com/comment/39687146
tagged with: cordova
has title: Issue with AJAX call of images paths, converting JSON message into javaScript array and trying to display the images?
has comment: http://stackoverflow.com/comment/39687241
type: UnansweredQuestion
has body: Trying to load images from a PHP array into a javaScript array using JSON messages and AJAX. Using the function buildImage() to load the first image in the array into the div content. Using onclick to change the image to the next one in the array. Im very new to AJAX and JSON. The conversion between the JSON message and javaScript array is the major issue for me. PHP &lt;?php include("mysqlconnect.php"); $select_query = "SELECT `ImagesPath` FROM `offerstbl` ORDER by `ImagesId` DESC"; $sql = mysql_query($select_query) or die(mysql_error()); $data = array(); while($row = mysql_fetch_array($sql,MYSQL_BOTH)){ $data[] = $row['ImagesPath']; } echo $images = json_encode($data); ?&gt; This is the client side script &lt;script&gt; var images = JSON.parse(xmlhttp.responseText); function importJson(str) { // console.log(typeof xmlhttp.responseText); if (str=="") { document.getElementById("content").innerHTML=""; return; } 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) { images = JSON.parse(xmlhttp.responseText); document.getElementById("content").innerHTML=images; } } xmlhttp.open("GET","http://content.php"); xmlhttp.send(); } function buildImage(src) { var img = document.createElement('img') img.src = src alert("1"); document.getElementById('content').appendChild(img); } for (var i = 0; i &lt; images.length; i++) { buildImage(images[i]); } &lt;/script&gt; &lt;/head&gt; &lt;body onload= "importJson();" onload= "buildImage();" &gt; &lt;div class="contents" id="content" onclick="buildImage()"&gt;&lt;/div&gt; &lt;/body&gt;
has answer: http://stackoverflow.com/a/25437510
tagged with: php
has comment: http://stackoverflow.com/comment/39687133
has comment: http://stackoverflow.com/comment/39687137
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39687218
has comment: http://stackoverflow.com/comment/39687195
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39687171

http://stackoverflow.com/q/25528436
has title: Mustache js - template for navigation not loaded sometimes
has answer: http://stackoverflow.com/a/25552830
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25552830
tagged with: rendering
tagged with: http://stackoverflow.com/tag/json
has body: I'm building a site with the help of Mustache js. There is quite a lot of data in the top navigation. The problem is that approximately half of the time when I load the html, the navigation is not loaded/missing -The output is an empty div : Here is the html code : Title {{{header}}} {{{nav}}} ... ... ... Here are the templates : var Templates = { 'header': ' ' + ' '+ ' '+ ' '+ ' Login '+ ' ' + ' '+ '{{#user_type_list}}'+ ' {{user_type_element_text}} '+ '{{/user_type_list}}'+ ' '+ ' ' + ' ' + ' ', 'nav': ' ' + '{{#menu_links}}' + ' ' + '{{menu_text}}' + ' ' + ' ' + '{{/menu_links}}' + ' ', 'products_services': ' ' + ' ' + '{{#top_list}}' + ' ' + '{{top_list_text}}' + ' ' + ' ' + ' ' + '{{#categories}}' + ' ' + ' {{category_name}} ' + ' ' + '{{#subcategories}}' + ' {{subcategory_name}} ' + '{{/subcategories}}' + ' ' + ' ' + '{{/categories}}' + ' ' + ' ' + ' ' + '{{#teasers}}' + ' ' + '' + ' ' + '' + ' ' + '{{teaser_caption}}' + ' ' + ' ' + '{{/teasers}}' + ' ' + ' '+ ' ' + '{{/top_list}}' + ' ' + '{{#appointment}}' + ' Appointment ' + '{{/appointment}}' + ' ', 'footer': ' ' + ' ' + '{{#footer_list}}' + ' ' + ' {{footer_title}}' + ' ' + ' ' + '{{#footer_sub_list}}' + ' ' + '' + '{{footer_sub_link_title}}' + '' + ' ' + '{{/footer_sub_list}}' + ' ' + ' ' + '{{/footer_list}}' + ' ' + ' ' } And this is the main js : jQuery(document).ready(function($){ $.templates = function(page) { var plugin = this; var mustache; plugin.init = function() { getHeader(); getNav(); getFooter(); } var getHeader = function(){ ... }; var getNav = function(){ var template = Templates.nav; var pages = ["products_services"]; // setTimeout(function() { $.ajax({ type: "GET", url: "data/menu.json", dataType: "JSON", success: function(data) { $('#menuWrapper').html(Mustache.render(template, data)); $.each(pages, function(key, val){ var template = Templates[val]; $.ajax({ type: "GET", url: "data/"+val+".json", dataType: "JSON", success: function(data) { var html = Mustache.render(template, data); var …
answer count: 1
tagged with: javascript
score: 0
tagged with: loading
tagged with: mustache

http://stackoverflow.com/comment/39660759
has text: Do you see any errors in your console?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25423064

http://stackoverflow.com/comment/39930812
type: AnswerComment
has text: Max height won't work with 100% height. I'm trying to keep it fluid so that it stretches, is there a way to keep the bottom of the scrolling div at the bottom?
comment on: http://stackoverflow.com/a/25538826
type: Comment
score: 0

http://stackoverflow.com/q/25538117
has comment: http://stackoverflow.com/comment/39873685
type: Question
tagged with: c#
accepted answer: http://stackoverflow.com/a/25538174
has body: So the code I have is: PrintPage.aspx &lt;asp:Button ID="ViewAuctionsButton" OnClientClick="checkValidated();" Text="Visa" CssClass="" runat="server" /&gt; &lt;script type="text/javascript"&gt; function checkValidated() { if (document.getElementById('remember').checked) { ViewAuctionsButton_Click; } else { ViewAuctionsButtonChecked_Click; } } &lt;/script&gt; PrintPage.aspx.cs protected void ViewAuctionsButton_Click(object sender, EventArgs e) { *do stuff* } protected void ViewAuctionsButtonChecked_Click(object sender, EventArgs e) { *do stuff* } I hope you are seeing what I am trying to do here. "remember" is a checkbox but that's not really important because I know for a fact that when I click the button it will run the if / else code in checkValidated. (I tried it with alert("") boxes.). Now I have no idea how to make this run beucase it doesn't seem to react to the "ViewAuctionsButtonChecked_Click;". But if I instead change the code to following: &lt;asp:Button ID="ViewAuctionsButton" OnClick="ViewAuctionsButtonChecked_Click;" Text="Visa" CssClass="" runat="server" /&gt; Then it will run. But then I am missing the part about the checkbox being checked or not. Any ideas on how I can fix this? Thanks in advance.
has title: Javascript function not reaching other function?
linked to: http://stackoverflow.com/q/886903
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/25538174
has comment: http://stackoverflow.com/comment/39873791
type: AnsweredQuestion
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/25528443
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/25528881
type: Question
tagged with: external-links
possible better answer: http://stackoverflow.com/a/25528825
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25528881
answer count: 2
has title: Opening external links from select/option dropdown in a new tab
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
tagged with: drop-down-menu
has body: I have a select-option dropdown with links, both internal and external. I want the external links (and only them) to open in a new tab. This is what I have. A list of internal and external links External Link Internal links JS to open the links. EDIT: Changing the JS to this does it: chriserwin's answer below is also good! Thanks!
favorite count: 0
has answer: http://stackoverflow.com/a/25528825

http://stackoverflow.com/comment/39737678
has text: You didn't escape `$` from the string...
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25464726

http://stackoverflow.com/a/25463350
answers question: http://stackoverflow.com/q/25463020
has body: There is a problem with this line: this.users = nStore["new"]('data/users.db'); It is either not saving a new object to this.users or it falling victim to an asynchronous race condition, as it is complaining about how this.users.find() does not exist. Likely, it is because that function for nStore takes a callback, so you'll have to consider that with the rest of your code. this.users = nStore.new('data/users.db', function () { console.log('Users Initiated'); // now it is safe to use the methods in 'this.users' });
score: 0
has comment: http://stackoverflow.com/comment/39735132
type: Answer

http://stackoverflow.com/q/25482131
tagged with: jquery
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Strange behavior of link fading
has answer: http://stackoverflow.com/a/25482398
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25482408
has comment: http://stackoverflow.com/comment/39769984
has answer: http://stackoverflow.com/a/25482416
tagged with: css
has body: I am creating a "scroll to top" link for my personal webpage but I have ran into some strange behavior that I cannot seem to correct. I want the link to fade in when the user scroll to a certain amount of pixels and then fade out again if the user scrolls up above this point. Pretty standard behavior. The markup is pretty simple: &lt;a href="#home" id="scroll-top" class="scroll"&gt;&lt;/a&gt; The CSS: #scroll-top { position: fixed; right:30px; bottom:30px; width: 30px; height:30px; color: #38555e; z-index: 99; border-radius: 50%; border:2px solid #38555e; text-align: center; background:#fff; -webkit-transition:all 0.2s linear; -moz-transition:all 0.2s linear; -o-transition:all 0.2s linear; transition:all 0.2s linear; display:none; } #scroll-top:hover { background:#38555e; color:#fff; border-color:#fff; } and the Jquery code: $(window).scroll(function () { if(!( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )) { if ($(this).scrollTop() &gt; 100) { $('#scroll-top').fadeIn(2000); } else { $('#scroll-top').fadeOut(2000); } } }); DEMO: http://jsfiddle.net/chc91n5f/4/ My problem is that when the link is faded in, it waits about 2 seconds and then fades in fast instead of starting the fading immediately and fading slowly. Also when the link fades out it waits and then fades out fast. What am I missing here?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39844373
has text: @PinoyStackOverflower concantate the string and insert the name variable `':contains('+data.name+')`
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25522244
type: AnswerComment

http://stackoverflow.com/a/25434767
has comment: http://stackoverflow.com/comment/39683358
upvote count: 0
has body: If you want to bind all links (a tags) in your body, you want to do something like this. This will work as expected: $('body').on('click', 'a', function(event) { alert("Link clicked"); var href = $(this).attr("href"); alert(href); }); However, you won't be able to access or bind the contents of an iframe (see this question), since that would be a huge security problem.
answers question: http://stackoverflow.com/q/25434657
score: -1
has comment: http://stackoverflow.com/comment/39683776
type: Answer
has comment: http://stackoverflow.com/comment/39683831
downvote count: 1

http://stackoverflow.com/comment/39768752
type: QuestionComment
has text: may be its because of the return type from server ?
type: Comment
comment on: http://stackoverflow.com/q/25481491
score: 0

http://stackoverflow.com/a/55050082
answers question: http://stackoverflow.com/q/25537003
has comment: http://stackoverflow.com/comment/96850384
score: 0
has body: $('[name="StartDate"]').datepicker({ weekStart: 1, autoclose: true, todayHighlight: true }).on('changeDate', function (selected) { if ($('[name="StartDate"]').val() == '' || typeof $('[name="StartDate"]').val() == "undefined") { $('[name="EndDate"]').val('').datepicker('setStartDate', null); } else { $('[name="EndDate"]').val('').datepicker('setDate', new Date()); $('[name="EndDate"]').datepicker('setStartDate', null); startDate = new Date(selected.date.valueOf()); startDate.setDate(startDate.getDate(new Date(selected.date.valueOf()))); $('[name="EndDate"]').datepicker('setDate', startDate); $('[name="EndDate"]').datepicker('setStartDate', startDate); $('[name="EndDate"]').val('').datepicker('update', ''); } }); $('[name="StartDate"]').blur(function (selected) { if ($('[name="EndDate"]').val() != '' &amp;&amp; $('[name="StartDate"]').val() == '' || typeof $('[name="StartDate"]').val() == "undefined") { $('[name="StartDate"]').datepicker('setDate', new Date()); $('[name="StartDate"]').val('').datepicker('setStartDate', null); $('[name="EndDate"]').datepicker('setDate', new Date()); $('[name="EndDate"]').val('').datepicker('setStartDate', null); } }); $("#datepicker2").datepicker({ autoclose: true, todayHighlight: true }).datepicker();
type: Answer

http://stackoverflow.com/comment/128834923
type: Comment
has text: Is there a way to make those links open in a new tab?
score: 0
comment on: http://stackoverflow.com/a/43398857
type: AnswerComment

http://stackoverflow.com/comment/39664107
has text: Min and max are samples only. This could be also avg, sum or something else.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25422423
score: 0

http://stackoverflow.com/comment/39670286
has text: You sir are my hero. Thank you so much!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25428259
type: Comment

http://stackoverflow.com/comment/39709692
score: 0
type: Comment
has text: Next week i will have my pc and i will give a try for you.
comment on: http://stackoverflow.com/a/25444249
type: AnswerComment

http://stackoverflow.com/q/25416989
downvote count: 0
accepted answer: http://stackoverflow.com/a/34957306
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/csv
favorite count: 0
possible better answer: http://stackoverflow.com/a/25431228
tagged with: angularjs
has answer: http://stackoverflow.com/a/25431228
has answer: http://stackoverflow.com/a/34957306
score: 4
type: AnsweredQuestion
has title: Angular.js generate csv file from json data
has body: I am trying to generate a csv file from json data using Angular.js. When I get the data from my server, the user sees it in a table and can use various filters on the data. When the user filters it as desired, I want them to be able to create a csv report. Instead of sending the filters back to the server to generate the file. I would like to do it directly from the filtered data in Angular. Right now, I have this: $scope.getReport = -&gt; filteredItems = $filter('filter')($scope.records, $scope.query) filteredItems = $filter('orderBy')(filteredItems, $scope.tableSort.getOrderProp()) csvRows = [] csvRows.push('Title,Assigned ID,Last Name,First Name,Start Date,Complete Date,Page,Test Progress,Certificate') csvRows.push("#{record.course.title},#{record.course.assigned_id},#{record.user.last},#{record.user.first},#{record.start_date},#{record.complete_date},#{record.page},#{record.test_progress},#{record.get_cert}") for record in filteredItems csvString = csvRows.join("\r\n"); report = document.createElement('a') angular.element(report) .attr('href', 'data:application/csv;charset=utf-8,' + encodeURI csvString) .attr('download', 'report.csv') console.log(report) document.body.appendChild(report); report.click(); It's a bit messy, but it seems to work in Firefox and Chrome. I need something that will work in IE9+ as well. Another option I was thinking, but I can't figure out how to do would be to use a form and send the json data to the server. I can then have the server respond with a CSV file. My problem here is that I don't know how to get the json data to the server without using Ajax which won't download the file returned. Update I don't think it's the best method, but I am using a combination of my two solutions. I have javascript create the CSV like above. Then when I submit a form, it adds the 'csvString' as the value of a hidden form input. The data goes to the server which just responds with a csv file. Update 2 Again, this method seems to not work in IE...
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 4

http://stackoverflow.com/q/25427582
has answer: http://stackoverflow.com/a/25445512
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39668602
upvote count: 2
tagged with: ruby-on-rails
type: Question
has body: I've got a Rails app, and unfortunately, my confirm dialogs aren't working as expected. Here's the template snippet: &lt;%= button_to user_path, data: {confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-danger' do %&gt; &lt;%= fa_icon 'trash-o', text: 'Delete' %&gt; &lt;% end %&gt; The generated HTML looks like this: &lt;form class="button_to" method="post" action="/users/name"&gt; &lt;div&gt; &lt;input type="hidden" value="delete" name="_method"&gt; &lt;button class="btn btn-danger" type="submit" data-confirm="Are you sure?"&gt; &lt;i class="fa fa-trash-o"&gt;&lt;/i&gt; Delete &lt;/button&gt; &lt;input type="hidden" value="LSb8IIBGyQ+mB080WDdpEb16RYFJ26DTYbfMs8gc/F8=" name="authenticity_token"&gt; &lt;/div&gt; &lt;/form&gt; Now, when I click the Delete button, a confirm dialog is created. When I click OK, this shows up in the log: Started GET "/users/name" for 127.0.0.1 at 2014-08-21 14:53:02 +0200 Processing by UsersController#show as JS Parameters: {"id"=&gt;"name"} That request returns a HTTP 200, and then another dialog is spawned. After clicking OK on that dialog, nothing happens, the dialog is simply omitted, and no delete request is sent. Since there are already several questions similar to this one, here's what I've tried: Looking for multiple javascript_include_tags. This is not the case. Looking for multiple inclusions of javascript code. This is not the case, only jquery and jquery_ujs are in my application.js. Turning off turbolinks. This did not help. Using another browser (tried Chrome 36.0.1985.143 and Firefox 31.0) UsersController code here: https://gist.github.com/sonOfRa/3f7638e321a22f243ce9
accepted answer: http://stackoverflow.com/a/25445512
tagged with: javascript
answer count: 3
score: 2
has answer: http://stackoverflow.com/a/25588436
downvote count: 0
has comment: http://stackoverflow.com/comment/39668544
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25428232
has comment: http://stackoverflow.com/comment/39668370
possible better answer: http://stackoverflow.com/a/25428232
has title: Rails duplicate confirm dialogs

http://stackoverflow.com/comment/39773160
comment on: http://stackoverflow.com/q/25476964
score: 0
type: Comment
has text: I edited the description. I want to have multiple lines of text in a cell.
type: QuestionComment

http://stackoverflow.com/a/25470546
type: Answer
has comment: http://stackoverflow.com/comment/39750538
has comment: http://stackoverflow.com/comment/39750594
upvote count: 1
has comment: http://stackoverflow.com/comment/39748659
has comment: http://stackoverflow.com/comment/39748708
has comment: http://stackoverflow.com/comment/39748590
score: 1
has body: The request you are sending is giving an error: to check error : try $.ajax({ url: 'https://ajax.googleapis.com/ajax/services/language/translate', dataType: 'jsonp', data: { q: 'Hello world!', // text to translate v: '1.0', langpair: 'en|es' }, // '|es' for auto-detect success: function(result) { alert(JSON.stringify(result)); //console.log(result); alert(result.responseData.translatedText); }, error: function(XMLHttpRequest, errorMsg, errorThrown) { alert('dddd'); alert(errorMsg); } }); Code using alternative $.ajax({ url: 'http://api.mymemory.translated.net/get', data: { q: 'Hello world!', // text to translate langpair: 'en|es' }, // '|es' for auto-detect success: function(result) { //console.log(result); alert(result.responseData.translatedText); }, error: function(XMLHttpRequest, errorMsg, errorThrown) { alert('dddd'); alert(errorMsg); } }); Detailed Document on API DOC
has comment: http://stackoverflow.com/comment/39748926
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25470486
has comment: http://stackoverflow.com/comment/39748648
answers question: http://stackoverflow.com/q/25470486
has comment: http://stackoverflow.com/comment/39748892
has comment: http://stackoverflow.com/comment/39748688
has comment: http://stackoverflow.com/comment/39748757
has comment: http://stackoverflow.com/comment/39748566

http://stackoverflow.com/comment/39746351
type: Comment
type: QuestionComment
score: 0
has text: ob_start() at start don't help
comment on: http://stackoverflow.com/q/25469222

http://stackoverflow.com/comment/39789864
type: AnswerComment
comment on: http://stackoverflow.com/a/25492545
has text: @SizzlingCode How / with what are you validating your form?
type: Comment
score: 0

http://stackoverflow.com/comment/39785737
comment on: http://stackoverflow.com/q/25490599
type: QuestionComment
type: Comment
has text: Where do you want/need to avoid the timeout? In the database responding? From making (too) many parallel ajax requests?
score: 0

http://stackoverflow.com/comment/39769688
has text: Please post some sample data as well
type: Comment
score: 2
comment on: http://stackoverflow.com/q/25482042
type: QuestionComment

http://stackoverflow.com/q/25458546
has answer: http://stackoverflow.com/a/25461934
accepted answer: http://stackoverflow.com/a/25461934
type: Question
tagged with: javascript
has body: Is there a way to get the element value from browser to web driver. i.e. whenever I click on browser it should send value of that element to selenium web driver.
upvote count: 2
score: 0
has title: How to get value through javascript using selenium webdriver?
answer count: 1
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/39726781
tagged with: selenium-webdriver
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40152683

http://stackoverflow.com/q/25451528
has answer: http://stackoverflow.com/a/25457456
has comment: http://stackoverflow.com/comment/39720753
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39719165
tagged with: ajax
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39719919
has title: Variable out of EXACT selection - Javascript/Ajax
accepted answer: http://stackoverflow.com/a/25457456
has body: I have this code here: if (!window.TextSelect) { TextSelect = {}; } TextSelect.Selector = {}; TextSelect.Selector.getSelected = function () { var t = ''; if (window.getSelection) { t = window.getSelection(); } else if (document.getSelection) { t = document.getSelection(); } else if (document.selection) { t = document.selection.createRange().text; } return t; } TextSelect.Selector.mouseup = function () { var st = TextSelect.Selector.getSelected(); if (st != '') { $("#paragraphs div").removeClass("selected"); goodoldst = st.toString(); quoteExist = ''; for (i = 0; i < assocs.length; i++) { if (st.toString().indexOf(assocs[i]) >= 0) { quoteExist = quoteExist + '1'; } else { quoteExist = quoteExist + '0'; } } console.log(quoteExist) if (quoteExist.indexOf('1') >= 0) { alert('ALREADY IN DATABASE!!!') } else { newst = ' ' + st + ' '; newvalue = paraval.replace(st, newst); $('#paragraphs').html(newvalue); if (newst != '' && $('.explanation').css('display') == 'none') { $('.explanation').toggle(); } $('#newDescr').html(' SELECTED TEXT FORM SUBMIT! '); if ($("#annotation").css("display") == "block") { $("#annotation").toggle(); } makeitglob(goodoldst); $.post('ajax.php?q=a', { newstajax: newst }).done(function (data) { //$('.explanation').html(data); }); } } } The problem is that if I select some text, if I have that specific selection before, it selects the FIRST occurrence of that selection, not what I have selected. The big problem is when I select a letter (let's say " D " ). Instead of having the letter D selected from the paragraph, the D from the tag DIV gets selected. I want to get the EXACT selection, not the first occurrence. Thanks http://jsfiddle.net/zq1dqu3o/ try this. Its the same problem. If i select the last "text", then click on highlight, the last one gets selected. I want the one I selected to get highlited, even if it is the LAST one or one from the middle. by text i mean the word "text" What I am trying to do is have a system like "Genius" ( http://scree…
has comment: http://stackoverflow.com/comment/39720243
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39719780
has comment: http://stackoverflow.com/comment/39720010
type: Question

http://stackoverflow.com/comment/39802156
comment on: http://stackoverflow.com/q/25499315
has text: I have checked. No console errors.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/54245711
comment on: http://stackoverflow.com/a/25512332
score: 0
type: AnswerComment
type: Comment
has text: This approach is not applicable in this particular case. It may so happen that analytics.js is not loaded but the page/app has analytics code .In this case, ga is always defined .In such cases, this is the solution. https://www.domsammut.com/code/workaround-for-when-the-hitcallback-function-does-not-receive-a-response-analytics-js

http://stackoverflow.com/a/25432712
answers question: http://stackoverflow.com/q/25426324
has body: I think that there is a misunderstanding what is custom formatter and how it will be used. Custom formatter is already callback function which you have to define if you want use the functionality. jqGrid calls your callback if the property formatter in defined for some column and its value is a function. Because jqGrid makes the call, jqGrid specify parameters which it uses. On the other side the second parameter (options parameter) of custom formatter contains some properties which can be helpful for you. For example colModel property (options.colModel) is the element of colModel where custom formatter are used. The following code shows what I mean function myFormatter(cellvalue, options, rowObject) { var myOption1 = options.colModel.formatoptions.myOption1; ... } ... colModel: [ { name: "col1", formatoptions: { myOption1: "abc" }, formatter: myFormatter }, { name: "col2", formatoptions: { myOption1: "xyz" }, formatter: myFormatter }, ... ] In the above way the same function myFormatter will be called with different myOption1 option ("abc" or "xyz") for different columns. You can define any set of options of any type (inclusive callback functions). If it's required you can access to rowid inside of custom formatter: you can just use options.rowId.
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25426324

http://stackoverflow.com/comment/39648362
comment on: http://stackoverflow.com/q/25416414
type: Comment
type: QuestionComment
has text: @RobG sorry, I should've linked my project in the question. This is my solution of a universal `equals` method within `Object.prototype`
score: 0

http://stackoverflow.com/comment/39656459
comment on: http://stackoverflow.com/q/25421233
score: 0
type: QuestionComment
type: Comment
has text: How much more cleaner do you want it to be, it is already clean!

http://stackoverflow.com/comment/39724962
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25452371
has text: @8DK The problem with your code is that you use a random key of the array, instead of its corresponding value. For example, say the first time you get `5`, so the next time you will have `[1,...,4,6,...,40]`. But instead of getting one of those numbers, you get a number between `2` and `40`. And the next time, between `2` and `39`, `2` and `38`, and so on. So, instead of preventing recent numbers to be chosen again, you exclude high numbers.
type: AnswerComment

http://stackoverflow.com/a/25550905
type: Answer
score: 4
upvote count: 4
type: AcceptedAnswer
has body: No need of {{}} in ng-mouseover since its an angular component, you can use the method directly like ng-mouseover="textlimit(item.id, 900)" instead of ng-mouseover="textlimit({{item.id}}, 900)" A sample example is shown below Working Demo html Download script var app = angular.module('myApp', []); app.controller('ArrayController', function ($scope) { $scope.item = { id:21 } $scope.textlimit = function(id, value) { console.log('id::',id); console.log('value::',value); } });
downvote count: 0
answers question: http://stackoverflow.com/q/25550783
accepted answer of: http://stackoverflow.com/q/25550783
has comment: http://stackoverflow.com/comment/39897216

http://stackoverflow.com/a/25536919
has comment: http://stackoverflow.com/comment/39871442
type: AcceptedAnswer
score: 0
has body: Making it an array instead of giving it duplicate keys would make the most sense. "metrics": [ ["metric1, metric3"], ["metric1", "metric4", "metric5"] ],
accepted answer of: http://stackoverflow.com/q/25536890
type: Answer
answers question: http://stackoverflow.com/q/25536890

http://stackoverflow.com/q/25404129
score: 1
has body: :) I have a problem with jqgrid. I'm using two pages. The main page(=call "A") has a one jqgrid. and it's simple grid. The second page(=call "B") are call from page "A" via jquery ajax (dataType : "html"). And "B" page has two jqgrid as a inlineHTML. ========= And now the problem is, after loaded "B" page (no problem in "B" page). In "A" page. The $grid.trigger("reloadGrid"); is not working. But if not use jquery.ajax event, then "A" page works. ========= here is my source. [1] page > "A" > call method "B" $.ajax({ url: "B.html", dataType : "html" }).done(function(result) { $('#div_memberSearchPopup').bPopup({ // content:'ajax' //'ajax', 'iframe' or 'image' // contentContainer:'.memberSearchPopup_content' zIndex: 2 // , modalClose: false , positionStyle: 'fixed' , follow: [false, false] , position: [100, 100] , onOpen: function() { $('#div_memberSearchPopup').find(".memberSearchPopup_content").html(result); $('#div_memberSearchPopup').draggable(); } }); }); [2] page > "B" > reload method "A".trigger("reloadGrid") $gridElement.jqGrid('clearGridData') .jqGrid('setGridParam', { url : "A.html", page : 1, mtype : "get", contentType: "application/json", dataType : "json", postData : dataValue, loadComplete: function(){ if(typeof loadCompleteFunc === 'function') { loadCompleteFunc(); } } }).trigger("reloadGrid");
type: Question
tagged with: jqgrid
tagged with: javascript
has comment: http://stackoverflow.com/comment/39626304
has answer: http://stackoverflow.com/a/25417008
upvote count: 1
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: jqgrid - why after jquery.ajax(type:html) then jqgrid reload event not working?

http://stackoverflow.com/comment/39806893
score: 0
has text: They can, I guess. But my question is based on [this](http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/) article and specifically this line _Singletons are nothing more than global state. Global state makes it so your objects can secretly get hold of things which are not declared in their APIs, and, as a result, Singletons make your APIs into pathological liars._
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25501919

http://stackoverflow.com/comment/39813930
comment on: http://stackoverflow.com/a/25505217
score: 0
type: Comment
has text: Remove all your scripts which are placed in your page as you mentioned in your question.
type: AnswerComment

http://stackoverflow.com/comment/39647880
has text: I'd recommend taking a look at jQuery's serializeArray http://api.jquery.com/serializearray/
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25416270

http://stackoverflow.com/q/25471659
tagged with: popup
has comment: http://stackoverflow.com/comment/39751259
type: Question
linked to: http://stackoverflow.com/q/2797560
has comment: http://stackoverflow.com/comment/39750753
has answer: http://stackoverflow.com/a/25471771
has body: I want to know that is child popup completely lorded or not? When i use internal pages of domain like test.html it working but when i am trying with external domain as in my code it not working . so is the any way to achieve this with JavaScript or Jquery. I am writing code as following. &lt;script type="text/javascript"&gt; var popup; function test() { popup = window.open("http://dailyhoroscope.com/", "Popup", "width=300,height=100"); popup.onload = function() { // Do Somthing } }; &lt;/script&gt;
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39751893
upvote count: 0
answer count: 1
has title: listen even of JavaScript when child popup onload for external link
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39751649
downvote count: 2
tagged with: onload

http://stackoverflow.com/q/25501914
tagged with: jquery
has title: run python script using ajax
tagged with: ajax
has comment: http://stackoverflow.com/comment/39810527
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39809729
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39807020
tagged with: python
has body: I have the python script which export data from a database. The script executes the exportData function() I would like to run that on the website by clicking a button via ajax. This is want i have come up with but it does not seem to run the python script. $(document).ready(function() { $("#open").click(function(){ $.ajax({ url:"export.py", success: function(){alert("DONE");} }); }); }); Button Any help would be very much appreciated.
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/25501995
has comment: http://stackoverflow.com/comment/39809647
type: Question
tagged with: javascript

http://stackoverflow.com/a/25490835
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39786628
type: Answer
accepted answer of: http://stackoverflow.com/q/25490731
answers question: http://stackoverflow.com/q/25490731
upvote count: 1
has body: You can delete properties from objects using the delete keyword. For example, given the following object: var b = { Name:"Name1", Id:51, checked:true }; Delete the checked property: delete b.checked; This results in the following object: { Name:"Name1", Id:51 } Fiddle: http://jsfiddle.net/t0upqxvt/
score: 1
has comment: http://stackoverflow.com/comment/39786343
has comment: http://stackoverflow.com/comment/39805061
has comment: http://stackoverflow.com/comment/39786424

http://stackoverflow.com/q/25453085
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25453763
has comment: http://stackoverflow.com/comment/39716993
has answer: http://stackoverflow.com/a/25453763
type: AnsweredQuestion
has body: I am trying to hide a div element if the time now is greater then the time specified in the ID attribute. (The time in the ID attribute is a just a php mktime function) I have wrote the following code below but it doesn't seem to be working. Can anyone please help me out? Thanks! Test
score: 1
has answer: http://stackoverflow.com/a/25453255
upvote count: 1
has comment: http://stackoverflow.com/comment/39715986
type: Question
has answer: http://stackoverflow.com/a/25453248
tagged with: javascript
has title: Need help hiding an element based on the time now
accepted answer: http://stackoverflow.com/a/25453248
answer count: 3
downvote count: 0

http://stackoverflow.com/comment/39873380
has text: Output returned from backend should be in JSON format not in text
score: 1
comment on: http://stackoverflow.com/q/25537634
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25520533
answers question: http://stackoverflow.com/q/25520116
has body: The code will take time so i have outlined the full logic for you, you just need to add the basic syntax now and it will work for you. The html part // check while load its in the checked session array or not $checked=''; if(in_array($item['ItemID'],$_SESSION['checked'])) { $checked = 'checked'; } echo "&lt;div id='a'&gt;&lt;input type='checkbox' ".$checked." class='tick' name='items[$i]' id='$i' value='". $item['ItemID'] ."' onchange='check_status(this.value)' &gt;".$item['ItemName']."&lt;/div&gt;"; The Script logic &lt;script&gt; function check_status(check_id) { // make a ajax call here and send the box value(itemid) to php } &lt;/script&gt; The ajax php file // get the id of checked box and add to session // check if id already in the session if yes then its a uncheck call so remove it from session array by searching // into the array using array_search and then unset the index of array // reset the array index using array_values //else add to the array $_SESSION['checked'][]=/*add the id each time here*/;
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25520116
type: Answer

http://stackoverflow.com/comment/39738569
type: QuestionComment
has text: @Whisher a question on how to use this... does the expectTransitionTo take the abstract state in my case (fbCustomAudiences) or the route that would get initialized at the url the the $urlRouterProvider redirects to (fbCustomAudiences.root)... also I thought whenGET was for creating a mock API for e2e testing and that expectGET was used to test whether or not a request was made https://docs.angularjs.org/api/ngMock/service/$httpBackend#request-expectations-vs-backend-definitions? Do you find using 1 works better than the other?
score: 0
comment on: http://stackoverflow.com/q/25465076
type: Comment

http://stackoverflow.com/a/27087024
accepted answer of: http://stackoverflow.com/q/25415826
answers question: http://stackoverflow.com/q/25415826
type: AcceptedAnswer
score: 0
type: Answer
has body: You're gonna have to put your plugin usage code after the deviceready event has fired! document.addEventListener('deviceready', function(){ //your code here //chrome.socket.create("tcp", null, Socket_create_callback) }, false); if your are using ionic or angularjs your could leverage some other tricks too.

http://stackoverflow.com/comment/39834357
type: Comment
has text: ooh i seee, this mean that I need to include the forder name before the html name ?
type: AnswerComment
comment on: http://stackoverflow.com/a/25516281
score: 0

http://stackoverflow.com/q/25424835
has comment: http://stackoverflow.com/comment/39662903
type: Question
score: 0
has answer: http://stackoverflow.com/a/25705740
has answer: http://stackoverflow.com/a/25425007
accepted answer: http://stackoverflow.com/a/25705740
has comment: http://stackoverflow.com/comment/39663298
has body: Declaring global variables is easy, you just put the identifier followed by equals and the value you want. You can do this anywhere, like when setting arguments for a function call or inside a loop. But when I want this variable to be local things seem to get more restricted. I can't declare a local variable in a function call, and putting var x=i+3; inside a loop would just re-declare the variable over and over. Is there something I overlooked in the documentations? Or is this just the way it is? ... obj.do_my_thing(cached_int = 4 + cars.amount(), true); ... for( var e in list ) cached_float += cached_int/0.5; console.log(cached_float); ... What I would like todo is: ... obj.do_my_thing(var cached_int = 4 + cars.amount(), true); ... for( var e in list ) var cached_float += cached_int/0.5; console.log(cached_float); ...
tagged with: ecmascript-5
favorite count: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25425003
has title: One liner variable declaration
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25425003
tagged with: javascript

http://stackoverflow.com/comment/40020078
type: Comment
has text: Because i am building the whole thing in HTML with jquery mobile and releasing it woth phonegap therefore no native android kt ios prohrammimg so no java only java script
type: AnswerComment
comment on: http://stackoverflow.com/a/25614525
score: 0

http://stackoverflow.com/comment/39722296
type: AnswerComment
comment on: http://stackoverflow.com/a/25454132
score: 0
type: Comment
has text: Thanks Craig! I don't know how I missed the loaded event! I tried this and was able to get it to work by wrapping the entire adjustsize function with the loaded.bs.modal function. However, it still does the same thing -- the modal loads first at the top of the browser, and then moves down to the center. I'm trying to figure out how to get it to load in the center both times. I tried repeating the function, once on "show.bs.modal" and again on "loaded.bs.modal" but it still does the same thing.

http://stackoverflow.com/q/25454716
has comment: http://stackoverflow.com/comment/39718996
has comment: http://stackoverflow.com/comment/39718926
has comment: http://stackoverflow.com/comment/39719164
has answer: http://stackoverflow.com/a/25454786
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39718983
has answer: http://stackoverflow.com/a/25454781
has body: I use this code. I need click a area to select the username to insert $('#r_user').click(function(){ $('#reply_comment_textarea').val($('#reply_comment_textarea').val()+$(this).attr('alt')); }); ...something I planing the user is click the li area... will get the alt content insert to the textarea (#reply_comment_textarea) the page will be have many li#r_user and textarea#reply_comment_textarea eg... ...something ...something ...something ...something ...something ...something how can I click the li#r_user will be insert the alt content to next #reply_comment_textarea Now mycode only available for the first li tag?
has answer: http://stackoverflow.com/a/25454799
answer count: 3
has comment: http://stackoverflow.com/comment/39718962
has comment: http://stackoverflow.com/comment/39719109
possible better answer: http://stackoverflow.com/a/25454781
has comment: http://stackoverflow.com/comment/39719111
accepted answer: http://stackoverflow.com/a/25454786
score: 0
linked to: http://stackoverflow.com/q/192048
has comment: http://stackoverflow.com/comment/39719077
type: AnsweredQuestion
has title: jquery cdoe why only available for first item?
type: Question

http://stackoverflow.com/q/25414351
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39644670
has body: I want to draw circles on the screen but I want to store them in an array for later use in building a centipede type game. I am somewhat new to object in Javascript. My object is Circles as below. function Circles(x,y,r) { var cX = x; var cY = y; var cR = r; } I want to create an array of say 50 circles that I can loop through and display to the screen because currently I have a square that moves around the screen that I can control with the left and right keys. I want to redraw the array to the screen. **How can I create the array?" Code: It appears that your browser does not support HTML5 and the canvas element.
upvote count: 2
type: Question
tagged with: javascript
tagged with: canvas
score: 2
answer count: 1
downvote count: 0
has title: How to make an array of graphic circles that I can redraw to the screen on intervals?
favorite count: 0
has answer: http://stackoverflow.com/a/25414489

http://stackoverflow.com/a/25470214
has body: Your approach is correct : save the time in UTC in the database and display it to the users according to their timezones. momentjs can help you to do it but you need to give it the file of historical timezone changes. check http://momentjs.com/timezone/ for further explanations. once you have this, it is as easy as var jun = moment("2014-06-01T12:00:00Z"); jun.tz('America/Los_Angeles').format('ha z'); // 5am PDT also: don't store the user timezone as EDT, CST or -6. The hour shift can change with Summer times, Winter times, .. you need to store the Olson format, 'America/Los_Angeles'
accepted answer of: http://stackoverflow.com/q/25470057
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25470057
has comment: http://stackoverflow.com/comment/39747936
type: Answer
has comment: http://stackoverflow.com/comment/39749721
upvote count: 7
has comment: http://stackoverflow.com/comment/39780319
score: 7

src
tags question: http://stackoverflow.com/q/25482772
tag name: src
tags question: http://stackoverflow.com/q/25462167
tags question: http://stackoverflow.com/q/25454776
type: Tag

http://stackoverflow.com/q/25541159
score: 0
has answer: http://stackoverflow.com/a/25541809
answer count: 1
linked to: http://stackoverflow.com/q/1959040
tagged with: promise
has comment: http://stackoverflow.com/comment/39884740
has body: I want to return an array of promise using Q.all(); like this: return Q.all([ list[0].getCssValue('height'), list[1].getCssValue('height'), ..., list[list.length-1] .getCssValue('height') ]); I need to return all list in the array and I can get the length by array.length. The question is that I can't for(var i = 0; i &lt; list.length; i++) to make the return items like list[i].getCssValue('height'); So how should I do this?
type: AnsweredQuestion
has title: Q.js Q.all() when the length of array of promise is not sure
type: Question
accepted answer: http://stackoverflow.com/a/25541809
has comment: http://stackoverflow.com/comment/39884785
tagged with: javascript

http://stackoverflow.com/comment/39648199
type: Comment
has text: Does this find content also? I updated the OP with a solution.
type: AnswerComment
comment on: http://stackoverflow.com/a/25416435
score: 0

http://stackoverflow.com/comment/39831412
score: 0
type: Comment
has text: Wait...are you saying that if you click a link in the iframe, it loads that link in the parent window that holds the iframe in the DOM? [Because I can't replicate that](http://jsfiddle.net/a1f2k9kz/)
type: QuestionComment
comment on: http://stackoverflow.com/q/25514841

http://stackoverflow.com/a/25584829
has comment: http://stackoverflow.com/comment/39991905
accepted answer of: http://stackoverflow.com/q/25503634
has body: http://jsfiddle.net/eguneys/77frf1f2/ if (@curTab == 'signin') @tabContent.show (new authApp.signUpView()) else @tabContent.show (new authApp.signinView()) I omitted controllers, and didn't bother with active links, but you should easily integrate them, just get the idea.
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25503634
score: 1
upvote count: 1

http://stackoverflow.com/comment/39860403
type: QuestionComment
score: 0
has text: You can still bind another event using jQuery.
comment on: http://stackoverflow.com/q/25531071
type: Comment

http://stackoverflow.com/q/25485476
has title: Parse.com Cloud Code, trying to filter query, but query still contains all objects
possible better answer: http://stackoverflow.com/a/25514766
answer count: 2
upvote count: 1
favorite count: 0
tagged with: parse-platform
accepted answer: http://stackoverflow.com/a/25575657
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25575657
type: Question
has answer: http://stackoverflow.com/a/25514766
has body: I'm trying to add unique objects to my parse database, that is, the name property must be different for each object. I try to query for all objects with a given name like so var query = new Parse.Query(Food); query.exists("name", name); query.count({ success: function(number) {....} However, query.count is always the total number of objects (90) stored on the database, even though there should be 0 or 1 objects with a given name stored. EDIT: Following one of the answers, I modified the code to this. However, I still see duplicates in the database. var query = new Parse.Query(Food); query.equalTo("name", name); query.first({ success: function(results) {...} Below is the entire (edited) function Parse.Cloud.define("recordFavorite", function(request, response) { var foodList = request.params.foodList; //string array of food names var foodListCorrected = new Array(); var Food = Parse.Object.extend("Food"); // Wrap your logic in a function function process_food(i) { // Are we done? if (i == foodList.length) { //console.log("count is " + foodListCorrected.length); Parse.Object.saveAll(foodListCorrected, { success: function(foodListCorrected) {}, error: function(foodListCorrected) {} }); return; } var name = foodList[i]; //console.log("before name is " + name); var query = new Parse.Query(Food); query.equalTo("name", name); query.first({ success: function(results) { if(!results){ console.log("new"); var food = new Food(); food.set("name", name); foodListCorrected.push(food); // console.log(foodListCorrected.length); } else { //don't create new food console.log("exists"); } process_food(i+1) }, error: function(error) { console.log("error"); } }); } // Go! Call the function with the first food. process_food(0); }); EDIT: I've tried an alternate approach to this problem using promises, but the line return Parse.Object.saveAll(foodListCorrected); does not seem to be executing. I've verified that foodListCorrected is a non-empty array. Below is the entire code for the function…
tagged with: javascript

http://stackoverflow.com/comment/39751280
has text: What might be the problem? I don't want them to press enter.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25471861

http://stackoverflow.com/comment/39672744
comment on: http://stackoverflow.com/a/25429780
score: 0
type: AnswerComment
type: Comment
has text: That was an error yeah, but it still isn't posting.

http://stackoverflow.com/q/25514886
favorite count: 0
tagged with: instanceof
has body: How do you detect if a function is a method for a jQuery element? For example, $.fn.fadeIn is a function: typeof $.fn.fadeIn === 'function' //true However, I need a way to distinguish it from a regular non-jQuery method. The goal is to be able to pass a function as a parameter and then call the function correctly. Below is an example using a function called doIt that takes a jQuery element and a function to be applied to the element. Example HTML: jQuery Function Test Highlight this line. Hide this line. Example JavaScript: function doIt(elem, func) { if (func === 'a jQuery function') //possible? func.apply(elem); else func(elem); } function highlight(elem) { elem.css('background-color', 'gold'); } doIt($('p.t1'), highlight); doIt($('p.t2'), $.fn.fadeOut); Line #2 of the JavaScript needs help. Interactive version: http://jsfiddle.net/sxduwke9/
has comment: http://stackoverflow.com/comment/39834242
upvote count: 4
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39831506
has answer: http://stackoverflow.com/a/25818518
accepted answer: http://stackoverflow.com/a/25818518
has title: Check if a JavaScript function is a method for a jQuery element
possible better answer: http://stackoverflow.com/a/25514953
type: Question
tagged with: typeof
has comment: http://stackoverflow.com/comment/39831738
tagged with: function
tagged with: javascript
score: 4
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/25514953

http://stackoverflow.com/comment/39788560
comment on: http://stackoverflow.com/q/25491111
type: Comment
score: 1
type: QuestionComment
has text: You would need to fix this in whatever you're using to generate the JSON.

http://stackoverflow.com/q/25394057
type: Question
score: 0
answer count: 3
tagged with: jquery
has title: I can't get my jQuery accordion to collapse on click?
tagged with: accordion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25394268
tagged with: css
has answer: http://stackoverflow.com/a/25394331
accepted answer: http://stackoverflow.com/a/25394268
possible better answer: http://stackoverflow.com/a/25394331
has answer: http://stackoverflow.com/a/25394341
type: AnsweredQuestion
has body: I have this accordion set up so that when I click it, the panel opens. But I can't figure out how to make the panels close when it's clicked again? I'm not very jQuery savvy, so I tried a few things which didn't work. Please help? The CSS .accordion { margin: 50px; } .accordion dt, .accordion dd { padding: 10px; border-bottom: 0; } .accordion dt a, .accordion dd a { display: block; color: black; font-weight: bold; } .accordion dd { border-top: 0; font-size: 12px; } .accordion dd:last-of-type { border-top: 1px solid white; position: relative; top: -1px; } The HTML Panel 1 Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc. Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc. Panel 2 Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc. Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.Pellent…
tagged with: javascript

http://stackoverflow.com/comment/39639501
has text: This doesn't seem to answer the question. Perhaps you misunderstood.
comment on: http://stackoverflow.com/a/25411564
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39788317
type: AnswerComment
has text: Thank you! How does the virtual page name thing work?
type: Comment
comment on: http://stackoverflow.com/a/25465579
score: 0

http://stackoverflow.com/comment/39820387
comment on: http://stackoverflow.com/a/25505810
type: AnswerComment
score: 0
type: Comment
has text: Yes perfect!!.. But this script dont work on Safari so i cant use it :/

http://stackoverflow.com/q/25515936
has answer: http://stackoverflow.com/a/77656715
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/39835065
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39833597
score: 57
has answer: http://stackoverflow.com/a/57421321
has answer: http://stackoverflow.com/a/70662890
has body: Is it possible to send a curl request in jQuery or javascript? Something like this: curl \ -H 'Authorization: Bearer 6Q************' \ 'https://api.wit.ai/message?v=20140826&amp;q=' So, in PHP on submission of a form, like this: $header = array('Authorization: Bearer 6Q************'); $ch = curl_init("https://api.wit.ai/message?q=".urlEncode($_GET['input'])); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $response = curl_exec($ch); curl_close($ch); What I'm trying to do is perform this curl request, which returns json and then I plan on parsing it with jQuery's $.get() function.
upvote count: 57
linked to: http://stackoverflow.com/q/10113911
linked to: http://stackoverflow.com/q/11312908
has comment: http://stackoverflow.com/comment/39833686
possible better answer: http://stackoverflow.com/a/57421321
favorite count: 0
tagged with: curl
has answer: http://stackoverflow.com/a/25515976
has answer: http://stackoverflow.com/a/47084565
has title: Perform curl request in javascript?
has comment: http://stackoverflow.com/comment/39833626
answer count: 5
has comment: http://stackoverflow.com/comment/62727414
linked to: http://stackoverflow.com/q/26695359
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39833644
accepted answer: http://stackoverflow.com/a/25515976

http://stackoverflow.com/q/25392412
has comment: http://stackoverflow.com/comment/39603324
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25393088
has comment: http://stackoverflow.com/comment/39603578
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39603861
answer count: 1
accepted answer: http://stackoverflow.com/a/25393088
favorite count: 0
has comment: http://stackoverflow.com/comment/39605201
has comment: http://stackoverflow.com/comment/39603179
has comment: http://stackoverflow.com/comment/39603688
has body: A certain .aspx page renders a simple SELECT list with various OPTIONs. Some, but not all, of these OPTION elements will have a special style class applied to render them in a different color to reflect a particular distinct status. Ultimately, this works, with a single frustrating exception. If the first OPTION within the SELECT is given the CLASS designation, IE11 will not render that option with the color specified in the corresponding CSS rule. When viewing the page within the IE11 dev tools, it appears that the rule is being applied, yet, visually, it isn't. If the particular OPTION appears as any other item in the SELECT, the rule works. The solution at hand, a snippet of which is provided below, was modeled after a seemingly very similar case presented here: How to change the text color of first select option .. Hi Bye The intent, in effect, is to say "render this SELECT with OPTIONs ordinarily in black, unless they are given the 'specialStatus' class. When 'specialStatus' is present, render the OPTION in red. The 'first-child' rule was an effort to overcome any default styling that may be present. Oddly enough, this styling works 100% of the time in old, nasty IE8 - this behavior of the first OPTION not being honored is seen only in IE11. That's why the subject solution linked above seemed the obvious choice - it works, but obviously something in conjunction with the class designations is causing a problem. Help would be most appreciated in diagnosing exactly what's wrong.
has comment: http://stackoverflow.com/comment/39604106
tagged with: css
linked to: http://stackoverflow.com/q/17608880
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39603230
upvote count: 1
downvote count: 1
has title: IE11 not applying CSS class to first Option element of Select dropdown
type: Question

http://stackoverflow.com/q/25416896
accepted answer: http://stackoverflow.com/a/25416916
score: 2
has comment: http://stackoverflow.com/comment/39649093
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25416943
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/39649042
tagged with: javascript
has answer: http://stackoverflow.com/a/25416916
answer count: 2
has title: adding HTML to div if next element has a class
downvote count: 0
tagged with: jquery
favorite count: 0
has body: firstly here's the fiddle: http://jsfiddle.net/krish7878/rwz7egdz/1/ What I am trying to do is very simple, there are two div's on with class "panel-heading" and other with class "panel-collapse", there are two conditions, Condition 1: if 'panel-collapse' has class 'collapse' add some html to 'panel-heading' Condition 2: if 'panel-collapse' has class 'collapse' add some different html to 'panel-heading' Here's the code: HTML: &lt;div class="panel-heading"&gt; Panel Heading &lt;/div&gt;&lt;!-- /.panel-heading--&gt; &lt;div class="panel-collapse collapse"&gt; Panel Collapse with a just a collapse &lt;/div&gt;&lt;!-- /.panel-collapse --&gt; &lt;br&gt;&lt;br&gt; &lt;div class="panel-heading"&gt; Panel Heading &lt;/div&gt;&lt;!-- /.panel-heading--&gt; &lt;div class="panel-collapse collapse in"&gt; Panel Collapse with collapse &amp;amp; in &lt;/div&gt;&lt;!-- /.panel-collapse --&gt; JS Code: $( ".panel-heading" ).next().hasClass(".collapse").append( "&lt;i class='fa fa-plus'&gt;&lt;/i&gt;" ); $( ".panel-heading" ).next().hasClass(".collapse.in").append( "&lt;i class='fa fa-minus'&gt;&lt;/i&gt;" ); I am quite sure I am missing something in the js part. Any help would be appreciated.
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/25416943

http://stackoverflow.com/comment/39868371
score: 0
type: Comment
type: QuestionComment
has text: @drneel Once 5 have been checked two div-2 and div 3 should fade. Once 10 divs have been checked it should fave div-1 and div 3. When 10 or more divs have been checked only div-3 should be showing while the others fade.
comment on: http://stackoverflow.com/q/25535170

http://stackoverflow.com/comment/39641291
type: Comment
has text: @Ballanne Why are the statements inside a `{}`?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25394356

http://stackoverflow.com/comment/39983279
type: Comment
type: QuestionComment
has text: Can you add the code which is called when the "Buy now" button is clicked?
score: 0
comment on: http://stackoverflow.com/q/25534646

http://stackoverflow.com/comment/39750013
has text: googles translate api is not a free service https://developers.google.com/translate/v2/pricing you could prob do a scrape with curl but im sure it would be in violation of the tos
comment on: http://stackoverflow.com/q/25471305
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25467644
has answer: http://stackoverflow.com/a/25467698
type: Question
accepted answer: http://stackoverflow.com/a/25467792
tagged with: javascript
tagged with: jquery
has body: I've applied the toggle function so that when a user clicks on, say, "Show More", a bunch of further HTML shows up. For now a re-click makes the revealed HTML disappear. I know I can change it so that the toggle text changes to "Show Less", but that's not what I want. What I want is for the "Show More" toggle to completely disappear, and ideally for the revealed HTML to appear not below where the toggle text was, but over top of it, in its place. Is this possible? I've done a fair bit of searching but can't find an answer. I've got the basics so far: Show More blah blah text and images blah blah and As a side note, the revealed HTML has images in it. I'd prefer them not to preload. Is that a default, or would I have to specify this? Thanks in advance for any help. (And my apologies if this answer exists elsewhere.)
score: 0
answer count: 3
has title: Can I make the toggle link disappear on click?
linked to: http://stackoverflow.com/q/11490310
has answer: http://stackoverflow.com/a/25467713
has answer: http://stackoverflow.com/a/25467792
possible better answer: http://stackoverflow.com/a/25467698
type: AnsweredQuestion

http://stackoverflow.com/comment/39732579
type: Comment
comment on: http://stackoverflow.com/q/25461885
has text: Sorry I haven't ever posted on a site like this, I hope the code I put in was right..
score: 0
type: QuestionComment

http://stackoverflow.com/a/25505399
downvote count: 0
score: 1
has body: Your problem might be related to redraws/repaints of your page or parts of it. Google Chrome gives you some nice tools to see where redraws happen. You could start by using the "Timeline" in the Developer Tools to see how your site performs. To see the paints just open your Google Chrome Developer Tools, press "esc" (a little area on the buttom should show up now). Then in "Rendering" check "Show paint rectangles, Show FPS meter" and if you like "Enable continuous page repainting" and "Show potential scroll bottlenecks". Those might give you an idea on how to improve your performance. Also check out this video on "Debugging CSS &amp; Render Performance" by Chelsea Derrick https://www.youtube.com/watch?v=gqc88qWuiI4
has comment: http://stackoverflow.com/comment/39813166
answers question: http://stackoverflow.com/q/25505186
upvote count: 1
type: Answer

http://stackoverflow.com/a/25444289
has comment: http://stackoverflow.com/comment/39702668
has comment: http://stackoverflow.com/comment/39699382
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25443629
has body: document.aanvraag.totaal.value = result; That was causing my error
downvote count: 1
score: -1

http://stackoverflow.com/comment/39801190
comment on: http://stackoverflow.com/a/25498143
score: 0
type: AnswerComment
type: Comment
has text: As per the Downloadify documentation, the project needs to be hosted on a web-server, for the download to run. So you'll need to host the files on a webserver, or a local webserver. You could use XAMPP or Dropbox for this if you don't want to upload the files for now. Here are the links to [XAMPP](https://www.apachefriends.org/download.html), and [Dropbox](https://www.dropbox.com) ... For xampp, move your project folder to `htdocs` (access via `localhost`), and for dropbox, move to public folder, and access via `right click > copy public link`

http://stackoverflow.com/comment/39817980
score: 0
has text: Thank You very much! Just replaced new jquery.mb.YTPlayer.js! and it worked!
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25506732

http://stackoverflow.com/comment/39638689
has text: Are you certain that `count` is correctly set? The only things that look likely to be wrong are `count` being set to a number smaller than 16 (and therefore slicing nothing) and the fact that you are using `scroll` which will be called many many times.
type: Comment
comment on: http://stackoverflow.com/q/25411065
score: 0
type: QuestionComment

ajax
tags question: http://stackoverflow.com/q/25539213
tags question: http://stackoverflow.com/q/25464332
tags question: http://stackoverflow.com/q/25468245
tags question: http://stackoverflow.com/q/25392943
tags question: http://stackoverflow.com/q/25435244
tags question: http://stackoverflow.com/q/25417793
tags question: http://stackoverflow.com/q/25436879
tags question: http://stackoverflow.com/q/25410688
tags question: http://stackoverflow.com/q/25398535
tags question: http://stackoverflow.com/q/25462097
tags question: http://stackoverflow.com/q/25422961
tags question: http://stackoverflow.com/q/25484621
tags question: http://stackoverflow.com/q/25424003
tags question: http://stackoverflow.com/q/25547040
tags question: http://stackoverflow.com/q/25511019
tags question: http://stackoverflow.com/q/25461709
tags question: http://stackoverflow.com/q/25439491
tags question: http://stackoverflow.com/q/25466078
tags question: http://stackoverflow.com/q/25519023
tags question: http://stackoverflow.com/q/25412212
tags question: http://stackoverflow.com/q/25472469
tags question: http://stackoverflow.com/q/25501914
tags question: http://stackoverflow.com/q/25499102
tags question: http://stackoverflow.com/q/25417373
tags question: http://stackoverflow.com/q/25450036
tags question: http://stackoverflow.com/q/25455399
tags question: http://stackoverflow.com/q/25519563
tags question: http://stackoverflow.com/q/25536655
tags question: http://stackoverflow.com/q/25488595
tags question: http://stackoverflow.com/q/25405017
tags question: http://stackoverflow.com/q/25428078
tags question: http://stackoverflow.com/q/25421126
tags question: http://stackoverflow.com/q/25429811
tags question: http://stackoverflow.com/q/25402632
tags question: http://stackoverflow.com/q/25446014
tags question: http://stackoverflow.com/q/25470083
tags question: http://stackoverflow.com/q/25429471
tags question: http://stackoverflow.com/q/25437091
tags question: http://stackoverflow.com/q/25452082
tags question: http://stackoverflow.com/q/25501602
tags question: http://stackoverflow.com/q/25430679
tags question: http://stackoverflow.com/q/25401223
tags question: http://stackoverflow.com/q/25433609
tags question: http://stackoverflow.com/q/25492352
tags question: http://stackoverflow.com/q/25460518
tags question: http://stackoverflow.com/q/25458248
tags question: http://stackoverflow.com/q/25532153
tags question: http://stackoverflow.com/q/25547533
type: Tag
tags question: http://stackoverflow.com/q/25537590
tags question: http://stackoverflow.com/q/25476294
tags question: http://stackoverflow.com/q/25481423
tags question: http://stackoverflow.com/q/25395395
tags question: http://stackoverflow.com/q/25497766
tags question: http://stackoverflow.com/q/25404879
tags question: http://stackoverflow.com/q/25454518
tags question: http://stackoverflow.com/q/25443273
tags question: http://stackoverflow.com/q/25433541
tags question: http://stackoverflow.com/q/25448056
tags question: http://stackoverflow.com/q/25405268
tags question: http://stackoverflow.com/q/25480776
tags question: http://stackoverflow.com/q/25499416
tags question: http://stackoverflow.com/q/25471880
tags question: http://stackoverflow.com/q/25467708
tags question: http://stackoverflow.com/q/25520541
tags question: http://stackoverflow.com/q/25437419
tags question: http://stackoverflow.com/q/25404505
tags question: http://stackoverflow.com/q/25391650
tags question: http://stackoverflow.com/q/25480661
tags question: http://stackoverflow.com/q/25528109
tags question: http://stackoverflow.com/q/25476898
tags question: http://stackoverflow.com/q/25467343
tags question: http://stackoverflow.com/q/25536053
tags question: http://stackoverflow.com/q/25440393
tags question: http://stackoverflow.com/q/25462565
tags question: http://stackoverflow.com/q/25493706
tags question: http://stackoverflow.com/q/25394806
tags question: http://stackoverflow.com/q/25539043
tags question: http://stackoverflow.com/q/25441112
tags question: http://stackoverflow.com/q/25482829

http://stackoverflow.com/comment/39672199
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25429368
type: Comment
has text: @floctime - `toggle` alone won't do what you want. Try my edit.

http://stackoverflow.com/comment/39645118
comment on: http://stackoverflow.com/q/25414700
score: 0
type: Comment
type: QuestionComment
has text: You need to create the xml object before you do any of this. http://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery

http://stackoverflow.com/comment/39876574
type: QuestionComment
has text: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
comment on: http://stackoverflow.com/q/25539639
score: 0
type: Comment

http://stackoverflow.com/comment/39648211
type: Comment
comment on: http://stackoverflow.com/a/25416450
has text: @cdhowie can you elaborate? In how many ways will they behave differently?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39841943
has text: @KevinLabécot are you sure? i don't want to remove it. Just want disable it.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25520862

http://stackoverflow.com/comment/39670618
score: 0
type: Comment
has text: Ok I used your answer and now ifI put an alert at the top of the function is does alert. But nothing else happens. My code matches yours but all that happens is the page reloads and thats all. I need the email to be sent and the form reset without a page reload. The page shouldnt reload at any point. I am editing my question to show my current code
comment on: http://stackoverflow.com/a/25428745
type: AnswerComment

http://stackoverflow.com/comment/39871511
comment on: http://stackoverflow.com/q/25536254
has text: You probably want to use [`$.ajaxSetup`](http://api.jquery.com/jquery.ajaxsetup/) instead, and add the appropriate `{headers: {...}}` option
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39739313
score: 2
comment on: http://stackoverflow.com/q/25465647
type: QuestionComment
type: Comment
has text: You want to fix the format coming from the DB. Use JSON.

http://stackoverflow.com/comment/39675352
comment on: http://stackoverflow.com/a/25417291
has text: The third code listing is the closest thing to a helpful answer, because my goal is not to do a query but to actually modify the database and make the duplicates go away forever. I tried it and I get no results from the query. And I do not mean that the query does not remove duplicates; I mean that it literally has no results returned.
type: AnswerComment
score: 0
type: Comment

drop-down-menu
tags question: http://stackoverflow.com/q/25537081
tags question: http://stackoverflow.com/q/25423108
tags question: http://stackoverflow.com/q/25424802
tags question: http://stackoverflow.com/q/25531076
tags question: http://stackoverflow.com/q/25500394
type: Tag
tags question: http://stackoverflow.com/q/25528443
tags question: http://stackoverflow.com/q/25547528
tags question: http://stackoverflow.com/q/25512214
tag name: drop-down-menu
tags question: http://stackoverflow.com/q/25523262
tags question: http://stackoverflow.com/q/25542129
tags question: http://stackoverflow.com/q/25407281
tags question: http://stackoverflow.com/q/25436022
tags question: http://stackoverflow.com/q/25473252
tags question: http://stackoverflow.com/q/25477595
tags question: http://stackoverflow.com/q/25451602

http://stackoverflow.com/comment/39817991
type: Comment
type: QuestionComment
score: 6
comment on: http://stackoverflow.com/q/25507847
has text: Where did you learn about `this.$`

http://stackoverflow.com/a/25485511
has comment: http://stackoverflow.com/comment/39954352
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25485395
answers question: http://stackoverflow.com/q/25485395
type: Answer
has body: You should be using the $routeProvider provided by Angular. The routeProvider creates an association for each template-- you can associate the template, a controller, and other parameters (like view state, etc.). Check into the docs for more information, but the example below should be sufficient to fix your issue. var yourApp = angular.module('yourApp', ['ngRoute'] ); yourApp.config(['$routeProvider', function( $routeProvider ) { $routeProvider .when('/', { templateUrl: 'myapps/home.html', controller: 'someCtrl' }) .when('/top', { templateUrl: 'myapps/top.html', controller: 'anotherCtrl' .otherwise({ redirectTo: '/' }); }]) Note: You will also need to have an ng-view defined in your application (probably in your initial index.html file. You can only have one ng-view per application. &lt;div ng-view&gt;&lt;/div&gt; The controllers can be defined within the same JavaScript file, or in another file that is linked on the page via &lt;script src='yourScript.js'&gt;&lt;/script&gt;. Below is an example of how you would define a controller. yourApp.controller('anotherCtrl', [ '$scope', '$http', '$location', function( $scope, $http, $location ) { alert('You are now on a page using the anotherCtrl Controller!'); }]); Another note: One of the amazing things about Angular is dependency injection, which is how we're supplying the $scope, $http, and $location arguments. As you get into angular, you should definitely check out the other services available. These services and directives are what Angular so great.
score: 0
has comment: http://stackoverflow.com/comment/39775868

http://stackoverflow.com/a/25456134
has comment: http://stackoverflow.com/comment/39722686
has comment: http://stackoverflow.com/comment/87160657
has comment: http://stackoverflow.com/comment/87160760
has comment: http://stackoverflow.com/comment/138984956
accepted answer of: http://stackoverflow.com/q/25456013
type: Answer
has comment: http://stackoverflow.com/comment/77405959
answers question: http://stackoverflow.com/q/25456013
upvote count: 55
score: 54
has comment: http://stackoverflow.com/comment/110697777
has body: As you suspect, you're returning the match of the first property seen. You should return false if that property doesn't match, but keep looking otherwise. Also, return false if there's no prop property found on y (that is, the counts match, but not the actual properties). If all properties have matched, return true: var deepEqual = function (x, y) { if (x === y) { return true; } else if ((typeof x == "object" && x != null) && (typeof y == "object" && y != null)) { if (Object.keys(x).length != Object.keys(y).length) return false; for (var prop in x) { if (y.hasOwnProperty(prop)) { if (! deepEqual(x[prop], y[prop])) return false; } else return false; } return true; } else return false; } var deepEqual = function (x, y) { if (x === y) { return true; } else if ((typeof x == "object" && x != null) && (typeof y == "object" && y != null)) { if (Object.keys(x).length != Object.keys(y).length) return false; for (var prop in x) { if (y.hasOwnProperty(prop)) { if (! deepEqual(x[prop], y[prop])) return false; } else return false; } return true; } else return false; } var obj = {here: {is: "an", other: "3"}, object: 2}; console.log(deepEqual(obj, obj)); // → true console.log(deepEqual(obj, {here: 1, object: 2})); // → false console.log(deepEqual(obj, {here: {is: "an"}, object: 2})); // → false console.log(deepEqual(obj, {here: {is: "an", other: "2"}, object: 2})); // → false console.log(deepEqual(obj, {here: {is: "an", other: "3"}, object: 2})); // → true
has comment: http://stackoverflow.com/comment/122707325
has comment: http://stackoverflow.com/comment/77404812
has comment: http://stackoverflow.com/comment/39721949
has comment: http://stackoverflow.com/comment/139834771
has comment: http://stackoverflow.com/comment/85861010
has comment: http://stackoverflow.com/comment/85841593
has comment: http://stackoverflow.com/comment/110705845
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/comment/39642093
has text: as in it will not be a number at all? if this is the case you will just have to amp up the comparison to look for number vs. string, otherwise you should be able to parseInt/parseFloat, etc.
comment on: http://stackoverflow.com/a/25412970
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/39787566
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25488404
has text: I put in the hole site in the jsfiddle and it works.. but not for me localy

http://stackoverflow.com/q/25538846
has title: How can i get pie chart with dynamic json data in Angular js
type: Question
tagged with: charts
tagged with: highcharts
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/39953270
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25545814
type: UnansweredQuestion
has body: in my controller: calling the web services if the services is success then get the data and pushinig the data into corresponding arrays for(var i = 0; i &lt; $scope.reportRangeList.length; i++) { count++; if(angular.isNumber($scope.reportRangeList[i].businessName)) { $scope.nameBusiness.push($scope.reportRangeList[i].businessName); }else{ $scope.nameBusiness.push(+$scope.reportRangeList[i].businessName); } if(angular.isNumber($scope.reportRangeList[i].total1)) { $scope.total.push($scope.reportRangeList[i].total1); }else{ $scope.total.push(+$scope.reportRangeList[i].total1); } if(count == $scope.reportRangeList.length){ //$log.info("dddd"+ angular.toJson($scope.bname) ) $scope.fetchChart(); $scope.comlete = true; } } and in fetchChart() : $scope.fetchChart = function(){ $scope.chartConfig = { title: { text: "" },tooltip: { visible: true, pointFormat: '&lt;b&gt;{point.name}&lt;/b&gt;: {point.percentage:.1f} %', }, options: { chart: { type: 'pie' }, plotOptions: { series: { stacking: '' }, pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, format: '&lt;b&gt;{point.name}&lt;/b&gt;: {point.percentage:.1f} %', style: { color: (Highcharts.theme &amp;&amp; Highcharts.theme.contrastTextColor) || 'black' } }, showInLegend: true }, }, legend: { layout: 'vertical', align: 'topleft', verticalAlign: 'top', borderWidth: 1, format: '&lt;b&gt;{point.name}&lt;/b&gt;: {point.percentage:.1f} %', } }, /*xAxis: { categories: $scope.bname },*/ credits: { enabled: true }, seriesDefaults: { labels: { template:'{series.name}: &lt;b&gt;{point.percentage:.1f}%&lt;/b&gt;', position: "outsideEnd", visible: true, background: "transparent" } }, series: [{ type: "pie", name: "", data: //$scope.bname, [ $scope.nameBusiness,$scope.total //['Firefox', 42.0] /* ['IE', 26.8], { name: 'Chrome', y: 14.8, sliced: true, selected: true }, ['Safari', 6.5], ['Opera', 8.2], ['Others', 0.7]*/ ], }], loading: false } }; I would like to display the pie chart high chart with above data ,…
has answer: http://stackoverflow.com/a/45611222
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/39624572
score: 0
comment on: http://stackoverflow.com/q/25404158
has text: keep in mind that even if the task is a "hello world", each webworker means to spawn another process and wait for another request to resolve. My notebook chokes when I have like 20 tabs open in chrome. I guess it wouldn't go much farther on webworkers
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39809517
comment on: http://stackoverflow.com/q/25502096
type: Comment
type: QuestionComment
score: 1
has text: :) wait please. i know "plz give....." :)

http://stackoverflow.com/q/25409761
tagged with: web-component
answer count: 1
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Pass nodes inside <content> to nested component element
type: Question
tagged with: polymer
has body: I have two Polymer elements: <content id="images" select="img"> <content id="images" select="img"> As you can see <fruit-item> use . I am trying to pass all inside <fruit-item>s content to . Unfortunately it doesn't work. It pass text node instead of s from <fruit-item>s content. (DEMO)
tagged with: javascript
has answer: http://stackoverflow.com/a/25410149
accepted answer: http://stackoverflow.com/a/25410149
score: 0

http://stackoverflow.com/a/25501890
has body: What you really need isn't .append but .html which will remove previous element from the div.. By doing so, you won't have duplicate entries. $('#result').html('&lt;ul&gt;&lt;/ul&gt;'); setInterval(function(){ $.getJSON('score.php', function(data){ $('#result').html('&lt;ul&gt;&lt;/ul&gt;');//reset here.. $.each(data, function(i){ $('#result &gt; ul').append('&lt;li&gt;'+i+' : '+data[i]+'&lt;/li&gt;'); }); }); },1000);
answers question: http://stackoverflow.com/q/25501682
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39806952

http://stackoverflow.com/q/25436274
has title: Trigger field validation
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25436392
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25436388
has comment: http://stackoverflow.com/comment/39685036
linked to: http://stackoverflow.com/q/25443597
has body: I am trying to fill a website with the help of a greasemonkey script. This website has some required fields and I can't submit the form when they are not filled in. Now, I have the following problem: I fill the required fields using jQuery's .val. When I now click the submit button - even manually with the mouse - then it says that some of the required fields are not filled in. When I click in one of the affected fields with the mouse and then click the submit button again, it accepts the value and proceeds. My question is: How do I figure out which event the website listens to? Or: How can I trigger the validation of the fields from my script? Update: I tried the following command directly in Chrome's developer tools' console: jQuery('#ext-comp-1080').click().focus().focusin() .val('my value').change().blur().focusout()
has comment: http://stackoverflow.com/comment/39684957
has answer: http://stackoverflow.com/a/25436388
has comment: http://stackoverflow.com/comment/39692705
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25436392
linked to: http://stackoverflow.com/q/5006460
has comment: http://stackoverflow.com/comment/39697667
type: Question
linked to: http://stackoverflow.com/q/446892

http://stackoverflow.com/comment/39770836
has text: @cm8188 opened your fiddle, got alert "it worked" UPD: found why it was not working with bg-color. It was cause of conflict between bgcolor in #box and .boxRed, adding !important to css rule fixed the problem, for some reason your class rule was placed before id rule in cascade , so it caused the conflict, so here is the fiddle http://jsfiddle.net/f8y85424/1/
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25476450
type: Comment

http://stackoverflow.com/q/25443273
answer count: 3
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25444407
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39697944
has title: How to pass parameter to js.erb in Rails?
tagged with: ruby
score: 2
downvote count: 0
type: UnansweredQuestion
tagged with: ruby-on-rails
has body: I want to an ajax request to call user controller's xyz action with the passed parameter stage and then append it on #the_box so that I can perform conditional operation like for stage x append @user.age, for stage y append @user.age+1 and for stage z append @user.age-1. How should I do? I have a html.erb file contains such code: &lt;center&gt; &lt;%= link_to "A", xyz_user_path, stage: "x", remote: true %&gt; &lt;%= link_to "B", xyz_user_path, stage: "y", remote: true %&gt; &lt;%= link_to "C", xyz_user_path, stage: "z", remote: true %&gt; &lt;/center&gt; &lt;div id="the_box"&gt;&lt;/div&gt; and users_controller.rb has before_action :set_user, only: [ :xyz] def xyz respond_to do |format| format.js {} end end private def set_user @user = User.find(params[:id]) end and this xyz.js.erb is what I have now but cannot deal with parameter so it cannot handle conditional operation $("#the_box").append("&lt;%= @user.age%&gt;");
type: Question
has comment: http://stackoverflow.com/comment/39698377
has answer: http://stackoverflow.com/a/25443357
has answer: http://stackoverflow.com/a/25443731
has comment: http://stackoverflow.com/comment/39698490
upvote count: 2

http://stackoverflow.com/comment/39650824
has text: generally classes can be multiple separated by space but for id there is only one so spacing in id wouldn't be recommended to use...
type: Comment
comment on: http://stackoverflow.com/q/25417834
score: 0
type: QuestionComment

http://stackoverflow.com/a/25444126
has body: Declare str globally to explicitly set it's scope. var str; function myf(){ str = "Change"; document.write(str); } myf(); document.write(str); // can access str Keep in mind that without the call to myf() the value of str remains undefined. In general, you don't want to modify global variables inside a function because of dependency issues. Consider something like: function myf() { return "Change"; } document.write(myf()); Or if you need state: function myf() { var state = "Change"; return { get_state: function () { return state; }, set_state: function () { // } } } var f = myf(); document.write(f.get_state());
score: 1
answers question: http://stackoverflow.com/q/25444057
accepted answer of: http://stackoverflow.com/q/25444057
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25520959
type: Question
has body: i thought i will have no more problems with dataTables as its working now even the refresh. Turns out some time it works in some places, but in some places it just give this stupid error. TypeError: oTable.fnReloadAjax is not a function Well i have a functon which adds new data in table, after success i want datatable to refresh. it did work on other view but now As i have created this view, it is not working. Im using Ignited Datatables. i have a common.js file includes the datatables script. this script is working fine. function commonDataTables(selector,url,aoColumns){ var responsiveHelper; var breakpointDefinition = { tablet: 1024, phone : 480 }; oTable = selector.dataTable({ sPaginationType: 'bootstrap', oLanguage : { sLengthMenu: '_MENU_ records per page' }, "autoWidth" : false, "aoColumns":aoColumns, "bServerSide":true, "bProcessing":true, "bJQueryUI": true, "sPaginationType": "full_numbers", "sAjaxSource": url, "iDisplayLength": 25, "aLengthMenu": [[2, 25, 50, -1], [2, 25, 50, "All"]], 'fnServerData' : function(sSource, aoData, fnCallback){ $.ajax ({ 'dataType': 'json', 'type' : 'POST', 'url' : sSource, 'data' : aoData, 'success' : fnCallback }); //end of ajax }, 'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) { $(nRow).attr("data-id",aData[0]); responsiveHelper.createExpandIcon(nRow); return nRow; }, fnPreDrawCallback: function () { // Initialize the responsive datatables helper once. if (!responsiveHelper) { responsiveHelper = new ResponsiveDatatablesHelper(selector, breakpointDefinition); } }, fnDrawCallback : function (oSettings) { // Respond to windows resize. responsiveHelper.respond(); } }); } Then in my Codeigniter View file. oTable = ''; //Data Tables Script Here. var selector = $('#ManageTabs'); var url = "{{base_url()}}admin/configurations/listTabs_DT/"; var aoColumns = [ /* ID */ { "bVisible": false, "bSortable": false, "bSearchable": false }, /* Tab Name */ null, /* Tab Order */ null, /* Tab Desc */ null, /* Actions */ n…
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25521764
score: 2
has comment: http://stackoverflow.com/comment/39842362
answer count: 1
favorite count: 0
upvote count: 2
tagged with: php
tagged with: datatable
has answer: http://stackoverflow.com/a/25521764
type: AnsweredQuestion
has title: TypeError: oTable.fnReloadAjax is not a function - DataTables
tagged with: codeigniter

http://stackoverflow.com/a/25456827
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25456565
has body: Ok this worked: #/test.json.builder json.array!(@lenders) do |json, lender| json.(lender, :id, :email, :latitude, :longitude) json.inventories lender.inventories do |json, inventory| json.(inventory, :id, :itemlist_id, :description) end end Drawn from this answer
accepted answer of: http://stackoverflow.com/q/25456565
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/27281709
score: 1
type: Answer
answers question: http://stackoverflow.com/q/25430333
upvote count: 1
has body: You can use the "isInViewport" plugin (linked below) to find out which video is currently in the viewport and execute some js code accordingly. $(function () { $('#fullpage').fullpage({ verticalCentered: true, sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE'], afterRender: function () { $('video').each(function () { if ($(this).is(":in-viewport")) { $(this)[0].play(); } } }); }); Bare in mind that looping through every video element is not the most efficient method to employ, but this should be enough to get you started. jQuery plugin: isInViewport
downvote count: 0

http://stackoverflow.com/comment/39815838
type: Comment
has text: @FelixLahmer Images are block elements and will work exactly the same way as the divs I used. Let me know if you get stuck on something.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25506591

http://stackoverflow.com/comment/39973637
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25522301
has text: OK it worked after removing the Referrers, I was accessing the api using local host and local host cannot be a Referrer. Thank you again Damien.

http://stackoverflow.com/comment/39941166
comment on: http://stackoverflow.com/a/25569472
type: AnswerComment
has text: I think that would be possible only with a custom code that you have tried to write. Ideally you shouldn't make two strategies required. An API token should identify and authenticate the user, same with basic authentication. So it should be enough if one strategy succeeds.
score: 0
type: Comment

http://stackoverflow.com/q/25408137
tagged with: javascript
has title: HTML canvas dynamic masking
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25410355
tagged with: masking
tagged with: drawing
favorite count: 0
has body: Simply put, I'm drawing a red line across the screen on an HTML canvas and I would like a moving white circle to only be visible on the current portion of the line that it's touching. I read a lot about canvas masking but I haven't run into a similar situation to use as a reference. The entire circle should never be visible, only the portion of it that's covering the line or lines if there happen to be more than one. Any suggestions? Thanks!
accepted answer: http://stackoverflow.com/a/25410355
has comment: http://stackoverflow.com/comment/39647678
upvote count: 1
answer count: 1
score: 0
downvote count: 1
tagged with: canvas

http://stackoverflow.com/comment/39742593
comment on: http://stackoverflow.com/a/25467322
type: Comment
has text: Yes, as explicitly encouraged in the FAQ. The question is basically how I would have asked it this morning at 10 o'clock; the answer is what I know now, having stumbled on a resource which happened to mention that key fact that the jQuery library is implemented as a single function.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25546833
has body: I currently writing an application which need to show map from foursquare. I tested in simple html and it's work well. But It turn out white blank page when I tried to embed in OnsenUI tags. The Code as follows. Javascript ons.ready(function() { navigator.geolocation.getCurrentPosition(function(data) { var lat = data['coords']['latitude']; var lng = data['coords']['longitude']; /* Create map. */ L.mapbox.accessToken = 'sometokenhere'; var map = L.mapbox.map('map', 'myname.myid').setView([lat, lng], 15); //map.attributionControl.addAttribution('Places data from Foursquare'); // Create a Foursquare developer account: https://developer.foursquare.com/ // NOTE: CHANGE THESE VALUES TO YOUR OWN: // Otherwise they can be cycled or deactivated with zero notice. var CLIENT_ID = 'something'; var CLIENT_SECRET = 'somewhere'; // https://developer.foursquare.com/start/search var API_ENDPOINT = 'https://api.foursquare.com/v2/venues/search' + '?client_id=CLIENT_ID' + '&client_secret=CLIENT_SECRET' + '&v=20130815' + '&ll='+lat+','+lng+ '&query=food' + '&callback=?'; // Keep our place markers organized in a nice group. var foursquarePlaces = L.layerGroup().addTo(map); $.getJSON(API_ENDPOINT .replace('CLIENT_ID', CLIENT_ID) .replace('CLIENT_SECRET', CLIENT_SECRET) .replace('LATLON', map.getCenter().lat + ',' + map.getCenter().lng), function(result, status) { if (status !== 'success') return alert('Request to Foursquare failed'); // Transform each venue result into a marker on the map. for (var i = 0; i < result.response.venues.length; i++) { var venue = result.response.venues[i]; var latlng = L.latLng(venue.location.lat, venue.location.lng); var marker = L.marker(latlng, { icon: L.mapbox.marker.icon({ 'marker-color': '#BE9A6B', 'marker-symbol': 'cafe', 'marker-size': 'large' }) }) .bindPopup('' + venue.name + '') .addTo(foursquarePlaces); } }); }); }); markup That code is work well but this code isn't work. Could you show me a way to solve it. Thank you
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27794058
possible better answer: http://stackoverflow.com/a/25969260
has answer: http://stackoverflow.com/a/25969260
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40018469
has title: Foursquare Map doesn't render in OnsenUI tags
tagged with: onsen-ui
accepted answer: http://stackoverflow.com/a/27794058
tagged with: foursquare
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25442273
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39698872
score: 2
tagged with: google-chrome-devtools
has title: prefixfree.min.js on cdn affects other files
type: Question
upvote count: 2
tagged with: javascript
favorite count: 0
tagged with: css
has body: My website is hosted on cloudfront and i'm using cdn for different locations. I'm using prefixfree.min.js to solve the css3 codes in the website, but it is giving the issue as shown in the image below:
tagged with: amazon-cloudfront
answer count: 0
downvote count: 0

http://stackoverflow.com/q/25442969
tagged with: ajax
tagged with: delphi
has body: I have read, it is possible to do any cross-domain AJAX requests if only the server allows this explicitly. Now we are using a JavaScript program trying to send huge POST data to a virtual server running in a exe-file written in Delphi, using Indy library. The URL is 127.0.0.1:8084, the JavaScript program is embedded in a HTML, which is opened from the hard drive (so its URL is C:\Blabla...). Of course there is the cross origin policy which makes it impossible to fulfill our task. Any advices? Which headers we need to set in JavaScript? Which settings must be set in Indy?
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25444402
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25444402
tagged with: indy
linked to: http://stackoverflow.com/q/5469440
score: 0
has title: Delphi Indy + JavaScript - Cross Domain Post Request
has comment: http://stackoverflow.com/comment/39698795
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/39713087
type: Comment
has text: Yes i understand and that is the reason i didn't downvote you. But as you see i answer some time earlier and you can either upvote/downvote my answer or post a different one. :)
type: AnswerComment
comment on: http://stackoverflow.com/a/25450044
score: 0

http://stackoverflow.com/q/25498842
tagged with: jquery
has comment: http://stackoverflow.com/comment/39800920
has answer: http://stackoverflow.com/a/25498888
possible better answer: http://stackoverflow.com/a/25498892
has answer: http://stackoverflow.com/a/25498892
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/25479871
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39801126
type: Question
accepted answer: http://stackoverflow.com/a/25498888
has comment: http://stackoverflow.com/comment/39801070
has title: 'td' - element not appending to 'tr' element using loop
tagged with: javascript
has comment: http://stackoverflow.com/comment/39801030
has answer: http://stackoverflow.com/a/25498941
has comment: http://stackoverflow.com/comment/39801186
has comment: http://stackoverflow.com/comment/39800964
score: 0
has comment: http://stackoverflow.com/comment/39801111
answer count: 3
has body: I am dynamically creating a table with 3 col based. I am using this code, But the td is not appending to tr. Here is my code : var l = 10; for(i=0; i&lt;l; i++){ if(i%3==0){ var tr = $('tbody').append('&lt;tr/&gt;') } $(tr).append('&lt;td&gt;'+i+'&lt;/td&gt;'); //not appending to tr element! } Live Demo

http://stackoverflow.com/q/25395166
type: Question
has body: I am developing my first app using Angular and I can't see what's wrong. I have used ui-bootstrap date with no issues in other places but then I tried using it inside a modal and whenever you pick a date inside the modal for the first time it works properly but then if you pick the wrong date and want to pick the correct one clicking the button to open the calendar a second time it doesn't work if it's inside the modal. I have created a plunker sample where the error is reproduced. Code fragments follows: index.html Angular ui date! Date(This works) Open Date Modal dateModal.html Date Modal Sample Modal Date(works only the first time! whyyyyyy?????) Cancel app.js 'use strict'; (function () { var myApp = angular.module('myApp', ['ui.bootstrap']); myApp.controller('DateController', ['$scope', '$modal', '$log', function($scope, $modal, $log){ //Initializes date $scope.today = function () { $scope.activityDate = new Date(); }; //open calendar to select initial date $scope.open = function ($event) { $event.preventDefault(); $event.stopPropagation(); $scope.opened = true; $log.info('open function was called'); }; $scope.today(); $scope.format = 'MM/dd/yyyy'; //open modal window $scope.openModal = function () { var modalInstance = $modal.open({ templateUrl: 'dateModal.html', controller: 'DateModalController' }); } }]); myApp.controller('DateModalController', ['$scope', '$modalInstance', function($scope, $modalInstance){ $scope.cancel = function () { $modalInstance.dismiss('Cancel'); }; //Initializes date $scope.today = function () { $scope.dateModal = new Date(); }; //open calendar to select initial date $scope.open = function ($event) { $event.preventDefault(); $event.stopPropagation(); $scope.opened = true; $log.info('open button from modal calendar field has been pressed!!!!'); }; $scope.today(); $scope.format = 'MM/dd/yyyy'; }]); })();
tagged with: javascript
tagged with: angular-ui-bootstrap
has answer: http://stackoverflow.com/a/25406088
accepted answer: http://stackoverflow.com/a/25406088
score: 0
linked to: http://stackoverflow.com/q/25375075
answer count: 2
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Strange behaviour using angular-ui-bootstrap date inside an angular-ui-modal
possible better answer: http://stackoverflow.com/a/25395472
has comment: http://stackoverflow.com/comment/39609496
has answer: http://stackoverflow.com/a/25395472

http://stackoverflow.com/comment/39812529
score: 0
comment on: http://stackoverflow.com/q/25504659
type: QuestionComment
type: Comment
has text: Not possible via Ajax.

http://stackoverflow.com/q/25517914
type: Question
has answer: http://stackoverflow.com/a/25523852
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25523852
score: 2
answer count: 1
downvote count: 0
favorite count: 0
has title: Rangy, contenteditable caret positioning and focus in Firefox
tagged with: rangy
type: AnsweredQuestion
upvote count: 2
has body: I am trying to use Rangy to position the cursor within a contenteditable div, but I am finding inconsistent behaviour across browsers (which is odd, considering this is touted heavily as a "cross-browser solution"). When I open this fiddle in Chrome 36.0.1985.143 m, I observe that anywhere I click (within the "results" portion of the page), the selection is updated and the blue div gains a green border. However; visiting in Firefox 31 will, after step 2, position the caret but NOT move the green border... and after step 3, will not position the caret at all. My Question: How can I reliably set the position of the caret inside a contenteditable div regardless of what the "current" selection/focus is? Screenshot of example: HTML: Every 2 seconds, a setInterval fires that tells rangy to set the selection to the firstChild (ie: text node) of the blue div at index 49 (between the second 2 arrows). Click the blue div, between the first 2 arrows, watch to see rangy reposition the caret. Click the red div, between the arrows, watch to see rangy reposition the caret. (Doesn't also move focus in Firefox 31 ?!?) Click this list right here. DOES THE CARET REPOSITION?!?! CLICK HERE --><-- RANGY WILL REPOSITION HERE --><-- CLICK HERE --><-- CSS: div#one { color: white; background-color: #00f; } div#two { color: white; background-color: #f00; } div#msg { background-color: #ccc; padding: 10px; } :focus { border: 2px solid lime; padding: -2px; } JS: setInterval(function () { rangy.getSelection().collapse($('#one')[0].firstChild, 49); }, 2000);

http://stackoverflow.com/comment/39865988
type: QuestionComment
comment on: http://stackoverflow.com/q/25428008
has text: Then I'm not exactly sure what you're asking :/
score: 0
type: Comment

http://stackoverflow.com/a/25619342
has comment: http://stackoverflow.com/comment/40023968
has comment: http://stackoverflow.com/comment/40038706
has comment: http://stackoverflow.com/comment/40038302
answers question: http://stackoverflow.com/q/25546861
has comment: http://stackoverflow.com/comment/40024551
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40054140
has body: You can try this approach where you create a directive which triggers the scroll on click. You can add this directive to your link as an attribute. where the sref attribute will be the id of the target div. app.directive('scrollTo', function() { return { link: function(scope, element, attrs) { element.bind('click', function() { var divPosition = $(attrs.sRef).offset(); $('html, body').animate({ scrollTop: divPosition.top }, "slow"); }); } }; }); Plunker
score: 2
has comment: http://stackoverflow.com/comment/40024586
upvote count: 2
has comment: http://stackoverflow.com/comment/40024461

http://stackoverflow.com/a/46407333
answers question: http://stackoverflow.com/q/25529924
score: 0
has body: I had the same problem, with this code I've solved $(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange", function () { if (!(document.mozFullScreen || document.webkitIsFullScreen || document.fullscreenchange)) { exit_fullscreen(); } }); function exit_fullscreen() { [...] //whatever you need to change in layout if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } }
type: Answer

http://stackoverflow.com/comment/39817670
type: Comment
has text: Wasn't familiar with regex. But thank you! Now understood regex a bit
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25507495

http://stackoverflow.com/comment/39638419
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25411065
has text: Hey Andrew, no, there is no errors when in scroll effect i use alert(); it`s works, but when using the fadeIn it`s not working, i think the code is wrong. Right now i have 141 a elements and inside there is img element. 16 a elements ar visible and others are hidden, how can i on scroll show next 16 elements and after again 16 elements untill hidden elements is ended?
type: Comment

http://stackoverflow.com/a/25493864
has body: It was rly stupid one mistake... now it is: function ajaxQuery(filename, postData, func_var) { $.ajax({ type: "POST", url: "ajax/" + filename + ".php", contentType: "application/json; charset=utf-8", data: JSON.stringify(postData), success: func_var }) postData = []; delete postData; } It was all about filename.
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25493620
accepted answer of: http://stackoverflow.com/q/25493620
type: Answer

http://stackoverflow.com/q/25491460
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39789203
has body: I got the below code from JFiddle which helped me to beautify a json. if (!library) var library = {}; library.json = { replacer: function(match, pIndent, pKey, pVal, pEnd) { var key = '&lt;span class=json-key&gt;'; var val = '&lt;span class=json-value&gt;'; var str = '&lt;span class=json-string&gt;'; var r = pIndent || ''; if (pKey) r = r + key + pKey.replace(/[": ]/g, '') + '&lt;/span&gt;: '; if (pVal) r = r + (pVal[0] == '"' ? str : val) + pVal + '&lt;/span&gt;'; return r + (pEnd || ''); }, prettyPrint: function(obj) { var jsonLine = /^( *)("[\w]+": )?("[^"]*"|[\w.+-]*)?([,[{])?$/mg; return JSON.stringify(obj, null, 3) .replace(/&amp;/g, '&amp;amp;').replace(/\\"/g, '&amp;quot;') .replace(/&lt;/g, '&amp;lt;').replace(/&gt;/g, '&amp;gt;') .replace(jsonLine, library.json.replacer); } }; But after making some minor edits in the beautified form, I want to get the json back into the normal form. I tried it on a sample json { active: "&lt;b&gt;something&lt;/b&gt;", codes: [48348, 28923, 39080], city: "London" } What I did was given below. var prettyJson = $("#prettyJsonContainer").text(); //this will strip all html tags var pureJson = JSON.stringify(prettyJson); But the result was "{\n active: \"&lt;b&gt;something&lt;/b&gt;\",\n codes: [\n 48348,\n 28923,\n 39080\n ],\n city: \"London\"\n}" The expected Json was { active: "&lt;b&gt;something&lt;/b&gt;", codes: [48348, 28923, 39080], city: "London" } Please help.
type: Question
has answer: http://stackoverflow.com/a/25491533
upvote count: 1
tagged with: javascript
tagged with: jquery
has title: Converting prettified JSON back to normal
answer count: 1
has comment: http://stackoverflow.com/comment/39789479
tagged with: regex
has comment: http://stackoverflow.com/comment/39787767
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39791457

http://stackoverflow.com/comment/39802941
has text: Take a look at the Google Maps JavaScript API which gives you the functionality needed for this: https://developers.google.com/maps/documentation/javascript/markers
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25499721
score: 0

http://stackoverflow.com/a/25533358
has body: This is pretty much what you want function tab2BeforeShow(){ var $form = $('#SomeajaxFormObject'); // This is the form you want to submit // I'd probably show some load indicator here var result; $.ajax({ url: $form.attr('action'), type: 'POST', data: $form.serialize(), async: false, success: function(response) { result = true; // set the result variable declared in outer function }, error: function() { result = false; // bad response - dont show new tab } }); // Hide your load indicator now // since we declared async: false on the ajax request, // we can be positive that result is set to a boolean value at this point $(this).data('show', result); } We make a synchronous post to your forms action url, serializing the form's data so we can make an ajax POST with it. This should drop in, with maybe some minor tweaking. The key factors here are that we set data to $form.serialize() and we set async to false, so the browser does not continue execution while the request is working. If there is any way to avoid using synchronous ajax, you really should. If you can't avoid it, this should work for you. Do note that if the server hangs, it is going to hang your client as well.
upvote count: 2
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25513935

http://stackoverflow.com/a/25499030
has body: In general, you can't do that. Web pages do not have access to the local filesystem. Chrome can access the contents of a directory that is selected using a file input field. However, other browsers, such as Internet Explorer and Firefox, have not implemented this feature at this time, nor is there currently any way to access a directory that was not selected by the user. In theory, it is possible to read arbitrary files using a signed Java (not Javascript) applet. However, this requires the user to approve a series of extremely scary warning dialogs — and requires Java! — so it's really not a viable solution.
type: Answer
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25498955
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25498955

http://stackoverflow.com/q/25415637
has comment: http://stackoverflow.com/comment/39647489
has comment: http://stackoverflow.com/comment/39646732
type: Question
has comment: http://stackoverflow.com/comment/39648092
has body: I have the following scenario. UpdatePanel GridView EditMode Shows UserControl with JQuery code Inside that usercontrol I can't see the fields from JQuery. If I remove the update panel everything works fine. Most examples I've found don't seem to have a usercontrol inside the update panel. I'm not sure if that makes a difference or not. I tried using the ScriptManager.RegisterClientScriptBlock but I may have had it in the wrong place. This worked for me, the example didn't use wildcards though, that did the trick. Since I had the control on datarows, each one had a different ID. function BindEvents() { $(document).ready(function () { $("[id*='txtBox']").on("mouseover",function () { $(this).val("DOn't leave"); var other = 0; }); }); }
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39647429
score: 0
answer count: 1
tagged with: asp.net
has comment: http://stackoverflow.com/comment/39646835
has title: asp.net user control and updatepanel break javascript
has comment: http://stackoverflow.com/comment/39646823
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39647346
has comment: http://stackoverflow.com/comment/39646810
has comment: http://stackoverflow.com/comment/39648069
linked to: http://stackoverflow.com/q/256195
has comment: http://stackoverflow.com/comment/39647732
has answer: http://stackoverflow.com/a/25416515

http://stackoverflow.com/comment/81440673
type: QuestionComment
comment on: http://stackoverflow.com/q/25531738
type: Comment
has text: Possible duplicate of [WebBrowser control and JavaScript errors](https://stackoverflow.com/questions/5529615/webbrowser-control-and-javascript-errors)
score: 0

http://stackoverflow.com/a/25442828
score: 1
has body: $("select.starttime").on("change", function(){ // Access "&lt;tr /&gt;" elem. // This can be resolved better (this assumes there will be exactly // one select.starttime per row. I'd recommend giving [unique] ID to // each row (or select.endtime) and passing it to select.starttime // (in extra attribute perhaps). var parent = $('tr')[$("select.starttime").index(this)]; var $this = $(this); // Clear select.endtime of same table row $("select.endtime", parent).empty(); // Get selected option index of this &lt;select /&gt; var startix = $("option:selected", $this).index(); // Run through this &lt;select /&gt; options $("option", $this).each(function(ix, el){ if (ix &gt;= startix) { $("select.endtime", parent).append($(this).clone()); } }); });
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25442295

http://stackoverflow.com/a/25416047
accepted answer of: http://stackoverflow.com/q/25410470
upvote count: 1
has body: In you AJAX success function, you are returning JSON, not html so this line wont work $('#NewStudent').html(e.NewStudents); You need to extract the values and then update each element, for example success: function (e) { $('#FirstName').val(e.NewStudent.FirstName); $('#StateID').val(e.NewStudent.StateID); }
score: 1
answers question: http://stackoverflow.com/q/25410470
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25454214
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25454881
has comment: http://stackoverflow.com/comment/39719209
has body: I have HTML input fields that need to limit the input to numbers only as well as set the field to overwrite mode (text is highlighted) when the user clicks or tabs over to the field. I seem to be able to do one or the other, but not both at the same time. &lt;input type="text" class="numOnly" value="10"&gt; &lt;input type="text" class="numOnly" value="20"&gt; &lt;input type="text" class="numOnly" value="30"&gt; &lt;input type="text" class="numOnly" value="40"&gt; &lt;input type="text" class="numOnly" value="50"&gt; &lt;input type="text" class="numOnly" value="60"&gt; &lt;input type="text" class="numOnly" value="70"&gt; &lt;input type="text" class="numOnly" value="80"&gt; $('.jqndo').keyup(function () { this.value = this.value.replace(/[^0-9\.-]/gi, ""); }); $(".jqndo").focusin(function(){ $(this).select(); }); What happens is a preliminary set of numbers is entered, then later someone goes back in and corrects them. It would nice if they could just tab across and enter the new numbers without highlighting first. JSfiddle
tagged with: http://stackoverflow.com/tag/html
has title: html input - numbers only AND overwrite mode
accepted answer: http://stackoverflow.com/a/25454881
possible better answer: http://stackoverflow.com/a/25454556
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25454556
has comment: http://stackoverflow.com/comment/39718057
score: 0
has comment: http://stackoverflow.com/comment/39718529
type: Question

http://stackoverflow.com/a/25434250
type: Answer
answers question: http://stackoverflow.com/q/25431309
score: 0
has body: Very Short and Simple: &lt;asp:Button ID="Button1" runat="server" OnClientClick='return confirm("Are You Sure?")' /&gt;

http://stackoverflow.com/comment/39778981
comment on: http://stackoverflow.com/a/25485192
has text: var arr = $.parseJSON(data); $(arr).each { // code; }
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39671078
has text: xD I Knew I had to hurry for this question.
type: AnswerComment
comment on: http://stackoverflow.com/a/25429092
type: Comment
score: 0

http://stackoverflow.com/comment/39649764
type: Comment
has text: Awesome, I learned something today. I've been messing with it all day and you solved it in less than 5 minutes. Cheers!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25417220

http://stackoverflow.com/q/25492003
has answer: http://stackoverflow.com/a/70404223
downvote count: 0
tagged with: javascript
has title: How to check a web page request came from user inbox
type: UnansweredQuestion
favorite count: 0
has body: I have a web application which sends a download link to subscribers. Subscribers are able to click the link from their inbox and get access to download a pdf document. It is fine but what I want is to allow the access to pdf document only when link is clicked from his inbox only. I mean if subscriber forwards this email to some one else or tries to paste the link in browser manually it should not work.
type: Question
tagged with: email
score: 1
has comment: http://stackoverflow.com/comment/39788558
linked to: http://stackoverflow.com/q/4145531
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/39788691
has answer: http://stackoverflow.com/a/25492050
has answer: http://stackoverflow.com/a/25492083
has answer: http://stackoverflow.com/a/25492052
answer count: 4

http://stackoverflow.com/comment/39690597
type: AnswerComment
type: Comment
has text: I'm looking into trying this out with an updated MongoDB server. I have been testing with 2.4.9 and not getting the results that you are talking about. I'm going to try with 2.6.4 and see if I get the expected results.
comment on: http://stackoverflow.com/a/25417291
score: 0

http://stackoverflow.com/comment/39673965
comment on: http://stackoverflow.com/q/25430453
score: 0
type: Comment
type: QuestionComment
has text: This is a mistake of copy and paste. I've updated the question.

http://stackoverflow.com/q/25417117
answer count: 1
tagged with: javascript
has title: D3 updating data on box plot without removing previous SVG first
accepted answer: http://stackoverflow.com/a/25439817
has comment: http://stackoverflow.com/comment/39657724
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
linked to: http://stackoverflow.com/q/17676779
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25439817
type: Question
score: 0
has body: I'm following the box plot on this page Box Plot Link. In this example it reads in the box plot values from a data file. I'm trying to add a button that will read in new data from another data file and update the box plot. Here's the code they use to first create the box plot. var svg = d3.select("#viz").selectAll("svg") .data(data) .enter().append("svg") .attr("class", "box") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.bottom + margin.top) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")") .call(chart.duration(1000)); and this to update the box plots every second setInterval(function() { svg.datum(randomize).call(chart.duration(1000)); }, 2000); When I click on the update button it calls my snippet here: var svg = d3.select("#viz").selectAll("svg") .data(data) .enter().append("svg") .attr("class", "box") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.bottom + margin.top) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); svg.call(chart.duration(1000)); However this won't update my boxplot. If I want the box plot to change, I have to first remove the box plot SVG first d3.selectAll('svg').remove(); But I'd like to have an transition rather than new box plots. Why do I have to remove the previous SVG first? Any help?

http://stackoverflow.com/comment/39643232
type: QuestionComment
comment on: http://stackoverflow.com/q/25413617
has text: @Samsquanch this is pretty much in my head how it needs to be done, just not sure how to do it
score: 0
type: Comment

http://stackoverflow.com/comment/39864919
has text: @Blubberguy22 I don't clearly understand, what do you mean with this extension. Can you explain more further your idea?
score: 0
comment on: http://stackoverflow.com/q/25522694
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25396790
answers question: http://stackoverflow.com/q/25396705
score: 0
has body: http://jsfiddle.net/5tfcuy1w/13/ Added CSS code .right{ float:right !important; } Included the class to tag
type: Answer

http://stackoverflow.com/a/25455324
score: 0
type: Answer
has body: You shouldn't be wrapping around triggering, you should wrap around event binding. Provide your own function to bind multiple events. It will bind its own handler for the individual events. This function will keep track of which events have occurred, and when all the events in the list occur it will then call the supplied handler function. The caller would call it as: model.multiBind('namechange agechange', function() { ... });
has comment: http://stackoverflow.com/comment/39720491
answers question: http://stackoverflow.com/q/25454501
has comment: http://stackoverflow.com/comment/39720446

http://stackoverflow.com/comment/39745877
score: 1
comment on: http://stackoverflow.com/q/25469167
has text: Again: why? Is something happening that you don't expect? If so, what is it?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39791473
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25492626
has text: @SizzlingCode, I don't know, but if it doesn't, you could easily concatenate the `select2` data onto the `.serialize()` array.

http://stackoverflow.com/a/25544048
downvote count: 0
has body: You can toggle classes using the classList.toggle() function: var element = document.getElementById('sidebar'); var trigger = document.getElementById('js-toggle-sidebar'); // or whatever triggers the toggle trigger.addEventListener('click', function(e) { e.preventDefault(); element.classList.toggle('sidebar-active'); // or whatever your active class is }); That should do everything you need - if you have more than one trigger I'd recommend using document.querySelectorAll(selector) instead.
type: Answer
answers question: http://stackoverflow.com/q/25543956
score: 40
upvote count: 40

http://stackoverflow.com/comment/39602393
comment on: http://stackoverflow.com/q/25392000
type: Comment
type: QuestionComment
has text: `$(".function_header").on( "click", ".form_submit", function() {` should work provided the class `function_header` exists and is the correct context.
score: 0

http://stackoverflow.com/a/25465579
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39785895
has comment: http://stackoverflow.com/comment/39790662
has body: Setup a goal with required steps and you can view the funnel (how many people continue, how many people exit the site, or how many people just go to another page) under the "Funnel Visualization" report.
has comment: http://stackoverflow.com/comment/39788317
accepted answer of: http://stackoverflow.com/q/25465043
type: Answer
has comment: http://stackoverflow.com/comment/39739287
answers question: http://stackoverflow.com/q/25465043
has comment: http://stackoverflow.com/comment/39741750
has comment: http://stackoverflow.com/comment/39788851
has comment: http://stackoverflow.com/comment/39783263
upvote count: 1
has comment: http://stackoverflow.com/comment/39789038
score: 1
has comment: http://stackoverflow.com/comment/39788765
has comment: http://stackoverflow.com/comment/39742013

http://stackoverflow.com/comment/39838686
has text: Yes I have referred the JS files with accurate names.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25518735
type: QuestionComment

http://stackoverflow.com/q/25524003
downvote count: 0
type: UnansweredQuestion
tagged with: css
has title: Dynamically generated page scrolling down
has answer: http://stackoverflow.com/a/25524327
score: 1
has body: In my App, I am creating the dynamic pages, in which I given the css property to page container as overflow-y:auto. all works fine, the problem is whenever the page loads, the page height exceeds and the height of the contaienr, the scroll works, but the scroll bar placed in the end of page. so i am seeing the end of the content of the container instead of the top. is there any way to sort this issue without using script? if so any one suggest me the correct way please? or do I need to add any special css property in the container? any one advice me the correct approach please? Update This is happening only with Chrome browser. ie and firefox behaves correctly.
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39848185
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/comment/39881565
type: QuestionComment
has text: I think you missed the question? Be more specific.
comment on: http://stackoverflow.com/q/25542603
score: 0
type: Comment

asp.net-mvc
tags question: http://stackoverflow.com/q/25425674
tags question: http://stackoverflow.com/q/25499199
tags question: http://stackoverflow.com/q/25458217
tags question: http://stackoverflow.com/q/25424873
tags question: http://stackoverflow.com/q/25445615
tags question: http://stackoverflow.com/q/25524834
tags question: http://stackoverflow.com/q/25508122
tags question: http://stackoverflow.com/q/25542031
tags question: http://stackoverflow.com/q/25429146
tags question: http://stackoverflow.com/q/25532901
tags question: http://stackoverflow.com/q/25474339
tags question: http://stackoverflow.com/q/25448005
tags question: http://stackoverflow.com/q/25531383
tags question: http://stackoverflow.com/q/25491539
tags question: http://stackoverflow.com/q/25526044
tags question: http://stackoverflow.com/q/25500261
tags question: http://stackoverflow.com/q/25444870
tags question: http://stackoverflow.com/q/25549395
tags question: http://stackoverflow.com/q/25486619
tags question: http://stackoverflow.com/q/25511943
tags question: http://stackoverflow.com/q/25456733
tags question: http://stackoverflow.com/q/25474196
tags question: http://stackoverflow.com/q/25395588
tags question: http://stackoverflow.com/q/25474138
tags question: http://stackoverflow.com/q/25503627
tags question: http://stackoverflow.com/q/25425204
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/25441451
tags question: http://stackoverflow.com/q/25532770
tags question: http://stackoverflow.com/q/25396355
tags question: http://stackoverflow.com/q/25461730
tags question: http://stackoverflow.com/q/25455684
tags question: http://stackoverflow.com/q/25518735
tags question: http://stackoverflow.com/q/25456250
tags question: http://stackoverflow.com/q/25503490
tags question: http://stackoverflow.com/q/25461592
tags question: http://stackoverflow.com/q/25519023
tags question: http://stackoverflow.com/q/25543938
tags question: http://stackoverflow.com/q/25494522
tags question: http://stackoverflow.com/q/25414816
tags question: http://stackoverflow.com/q/25500849
tags question: http://stackoverflow.com/q/25511048
tags question: http://stackoverflow.com/q/25453339
type: Tag
tags question: http://stackoverflow.com/q/25430693
tags question: http://stackoverflow.com/q/25443657
tags question: http://stackoverflow.com/q/25475577
tags question: http://stackoverflow.com/q/25537169
tags question: http://stackoverflow.com/q/25546284
tags question: http://stackoverflow.com/q/25547335
tags question: http://stackoverflow.com/q/25529877
tags question: http://stackoverflow.com/q/25404850
tags question: http://stackoverflow.com/q/25396489

http://stackoverflow.com/comment/39682208
type: Comment
comment on: http://stackoverflow.com/q/25434831
score: 0
type: QuestionComment
has text: It breaks before it can get to the for loop

http://stackoverflow.com/a/25508959
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39820669
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39821293
score: 1
answers question: http://stackoverflow.com/q/25508911
accepted answer of: http://stackoverflow.com/q/25508911
has body: Since a foreach() is used, I doubt you can do that... If there are multiple results, your code is going to try to redirect multiple times to a different url (or at least the first it encounters). $json_string = file_get_contents("http://www.kimonolabs.com/api/e45oypq8?apikey=XXX"); $parsed_json = json_decode($json_string); //var_dump($parsed_json-&gt;results-&gt;collection1); foreach($parsed_json-&gt;results-&gt;collection1 as $collection){ header('Location: ' . $collection-&gt;title-&gt;href); die(); }
has comment: http://stackoverflow.com/comment/39821572
has comment: http://stackoverflow.com/comment/39820140
has comment: http://stackoverflow.com/comment/39820994
upvote count: 1

http://stackoverflow.com/comment/39879729
has text: Thanks for the suggestion. I was hoping posting this would allow me to expand my knowledge, so I`ll look into those.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25541459
score: 0

http://stackoverflow.com/comment/39668359
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25427529
has text: i need it alows only three signs i.e. 1. + if it then it should be the first digit 2. - shouldn't be the first and last character and shouldn't appear immediately after +, if + is present. 3. . (dot) is also allowed

http://stackoverflow.com/comment/39610012
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25395899
has text: I tried this but it wasn't successful... even with equal value or type operator (I don't know if is right to use)...

http://stackoverflow.com/a/25467371
has comment: http://stackoverflow.com/comment/39743057
has comment: http://stackoverflow.com/comment/39743741
answers question: http://stackoverflow.com/q/25467343
has body: I hope this will do what you want :) jQuery(document).ready(function(){ // #1 get the data to submit var jInput; var oData = {}; var aInput = jQuery('#form1 input'); var i = aInput.length; while ( --i !== -1 ) { jInput = jQuery( aInput[i] ); oData[ jInput.attr('id') ] = jInput.val(); console.log( jInput.val() ); } // #2 submit data via ajax (method == 'post') // without response jQuery.post( 'url-to-send-ajax-request-to.php', oData ); // with response jQuery.post( 'url-to-send-ajax-request-to.php', oData, function( sResponse ){ alert( sResponse ); // would be the output of the file you sent your ajax request to alert('Thank You'); }); }); PHP-file ('url-to-send-ajax-request-to.php'): print_r( $_POST );
has comment: http://stackoverflow.com/comment/39743754
has comment: http://stackoverflow.com/comment/39743181
has comment: http://stackoverflow.com/comment/39743231
has comment: http://stackoverflow.com/comment/39742693
score: 0
has comment: http://stackoverflow.com/comment/39743152
type: Answer
has comment: http://stackoverflow.com/comment/39743076
has comment: http://stackoverflow.com/comment/39742824
has comment: http://stackoverflow.com/comment/39743100

http://stackoverflow.com/comment/39754777
score: 1
has text: This is a complete answer although you only need one setTimeout since all of them are occurring at the same time. Or better yet, use transitionend event so that you can define the length of the transition in css.
type: Comment
comment on: http://stackoverflow.com/a/25473968
type: AnswerComment

http://stackoverflow.com/comment/39610688
type: Comment
comment on: http://stackoverflow.com/a/25395728
has text: @Suffii A few things to note about this example, **1.:** `each()` and `queue()` both use for loops under the hood. **2.:** `delay()` uses `setTimeout()`. **3:** This example creates 52 jQuery objects for `#box`. You should consider caching your jQuery objects to prevent this.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39628589
type: Comment
comment on: http://stackoverflow.com/a/25406215
type: AnswerComment
has text: I added the missing semicolon. All my apologies for letting such errors in my code. Yet it changed nothing to the situation.
score: 0

http://stackoverflow.com/q/25446035
type: Question
accepted answer: http://stackoverflow.com/a/25446136
tagged with: javascript
has title: HTML5 audio playbackRate property is not working for mobile browser?
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25446136
tagged with: http://stackoverflow.com/tag/html
has body: $('#audioPlayerControl').playbackRate=1.5; $('#audioPlayerControl') is audio element and i set playbackRate for this audio element. desktop chrome browser it working application but it is working properly but mobile chrome browser it is not working.
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/39795398
has text: Where should i close the db?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25495587

http://stackoverflow.com/comment/39832702
comment on: http://stackoverflow.com/q/25515439
score: 0
type: Comment
type: QuestionComment
has text: If you are new to JSON, [this](http://www.w3schools.com/json/) may be helpful. You can tell that it is an array because of the square brackets around it `[]` and then an object by use of squiggly brackets `{}`.

http://stackoverflow.com/a/25484862
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39774476
upvote count: 3
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25484787
has body: .delay() works with only those method with uses the queue() based execution like .animate(), so it doesn't work with .addClass() or .html(). You can use a manual queue to fix it like $('div.text').delay(2000).queue(function () { $(this).addClass('animated fadeOutLeft').html('New content!').delay(2000).queue(function () { $(this).addClass('animated fadeInRight') }).dequeue() }); Demo: Fiddle
answers question: http://stackoverflow.com/q/25484787
score: 3

http://stackoverflow.com/comment/39881664
has text: did you try ownerCt or this.down('fieldset')?
type: Comment
comment on: http://stackoverflow.com/q/25542468
score: 0
type: QuestionComment

http://stackoverflow.com/q/25527213
has comment: http://stackoverflow.com/comment/39853647
has answer: http://stackoverflow.com/a/25527566
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39853509
type: Question
has title: How to get the background image url of anchor tag using id
answer count: 2
has answer: http://stackoverflow.com/a/25527398
has body: I want to give hover effect to multiple images on single page. There is separate hover image for each image so I am using dynamic background image change. My logic is : use 2 anchor tag and hide 1 one them hidden image contains the image which should shown on hover image. When user hovers, first anchor tag's background image should be get replaced with hidden anchor tag's bg-image. here is my code : &lt;td class="cell-style-img"&gt; &lt;a href="&lt;?php echo $linkedin; ?&gt;" id="img&lt;?php echo '-'.$founder_count;?&gt;" class="img-circular img_hover" style="background-image: url(&lt;?php echo $src;?&gt;);"/&gt; &lt;a href="&lt;?php echo $linkedin; ?&gt;" class="img-circular" style="display:none;background-image: url(&lt;?php echo $hover_src;?&gt;);" id="hover&lt;?php echo '-'.$founder_count;?&gt;"/&gt; &lt;/a&gt; &lt;/td&gt; $("a.img_hover").bind({ mouseenter: function () { var id = $(this).attr('id'); var id1 = id.replace (/[^\d.]/g, ''); id1 = 'hover-'+(id1); //alert(id1); var bg = $("#"+id1).css('background-image').replace(/^url|[\(\)]/g, ''); bg = bg.replace('url(','').replace(')',''); $("#"+id).css('background-image', bg ); }, mouseout: function () { var id = $(this).attr('id'); var id1 = id.replace (/[^\d.]/g, ''); id1 = 'hover-'+(id1); $("#"+id).show(); $("#"+id).show(); } }); My Problem is that I am not able to get second hidden anchor tag's bg-image. How I can get the background-image of anchor tag using jquery.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39853355
tagged with: jquery
score: 0

http://stackoverflow.com/comment/39762901
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25477591
has text: You're trying to use the `HTMLElement` `value` property on a jQuery object, not an HTML Element. You can use `value()` on a jQuery object instead. The page technically doesn't 'refresh'. What it does is posts to the URL in the `action` attribute of the form. If the server language doesn't do any redirection, it will return the same page again, which appears to 'refresh' the page.
type: AnswerComment

http://stackoverflow.com/q/25394909
has answer: http://stackoverflow.com/a/25402380
answer count: 1
has title: Adding Forms Dynamically From Dropdown Menu Selection
tagged with: ruby
tagged with: ruby-on-rails
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25402380
type: Question
tagged with: javascript
tagged with: jquery
has body: I have a Ruby on Rails question about adding a dynamic form through a drop down selection rather than having individual buttons for each possible selection. Right now, through the help of following some Railscasts, my application works where I have three individual buttons that are able to dynamically add three different types of nested forms to the parent, all corresponding to different models with different form partials. The parent model here is a Workout, allowing traditional_blocks, emon_blocks, and tempo_blocks to be added dynamically using JS. Workout Model class Workout &lt; ActiveRecord::Base has_many :tempos has_many :traditionals has_many :emons accepts_nested_attributes_for :tempos, allow_destroy: true accepts_nested_attributes_for :emons, allow_destroy: true accepts_nested_attributes_for :traditionals, allow_destroy: true end /app/views/workouts/new.html.erb &lt;div&gt; &lt;%= button_to_add_fields "Add EMON Block", f, :emons %&gt; &lt;%= button_to_add_fields "Add traditional Block", f, :traditionals %&gt; &lt;%= button_to_add_fields "Add tempo Block", f, :tempos %&gt; &lt;/div&gt; /apps/helpers/application_helper.rb module ApplicationHelper def button_to_add_fields(name, f, association) new_object = f.object.send(association).klass.new id = new_object.object_id fields = f.fields_for(association, new_object, child_index: id) do |builder| render(association.to_s.singularize + "_fields", f: builder) end button_to(name, '#', class: "add_fields", data: {id: id, fields: fields.gsub("\n", "")}) end end app/assets/javascripts/workouts.js.coffee $(document).on 'click', 'form .add_fields', (event) -&gt; time = new Date().getTime() regexp = new RegExp($(this).data('id'), 'g') $(this).before($(this).data('fields').replace(regexp, time)) event.preventDefault() Like I said earlier, everything works as I want it to when I click the buttons. However, I would like to be able to put "emon block, traditional block, tempo block" inside a collection_select with one button n…
score: 0

http://stackoverflow.com/comment/39744305
has text: I was looking for such a solution. init() is called when I wrap the document ready, but then I get ReferenceError: startstop is not defined startstop.Timer.toggle(); which is defined in previous jquery loaded file: ;(function($) { .... this.toggle = function(reset) { if(this.isActive) {this.pause();} else if(reset) {this.play(true);} else {this.play();} return this; }; .... })(jQuery);
comment on: http://stackoverflow.com/a/25468246
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39836906
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25517800
type: Comment
has text: I think I misunderstood....you want to run myFunction, which is defined in the newly opened window, from the window that opened the new tab, right? It's not that you want to run a function in the opener window from the newly opened window, correct?

http://stackoverflow.com/comment/39771471
comment on: http://stackoverflow.com/q/25482884
type: Comment
score: 0
type: QuestionComment
has text: The result returned from the server: http://pastebin.com/M4M8D3Gg - I believe that is what you mean.

http://stackoverflow.com/comment/39719092
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25453763
has text: Ohh okay. I gotchya. Thanks a lot dude!
score: 0

http://stackoverflow.com/a/25464988
score: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25464947
has body: This will work for you document.getElementsByName('my_field')[0].value
type: Answer
upvote count: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25464947

http://stackoverflow.com/a/25529963
has body: I don't know if this is exactly what you are looking for, but here's how I'd do it. Make a function that does the underlining Make a recursive call on animation callback Create a global variable to keep count of the current underlined line Add a boolean that stops the function when false var lines = $('#page')[0].getClientRects(); var play = true; var index = 0; underlineLine(); $('button').click(function(){ play = !play if(play){ underlineLine() $(this).html("STOP") }else{ $(this).html("CONTINUE") } }) function underlineLine(){ if(index &gt;= lines.length) return if(play){ $('#under_liner').css('top', lines[index].bottom).dequeue(); $('#under_liner').css('width','0px'); $('#under_liner').animate({ width: lines[index].right - lines[index].left }, 1000, function(){ underlineLine(index++) }) $('#under_liner').css('width', 0).dequeue(); } } HERE IS A FIDDLE WITH THE CODE. Hope it helps.
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25529093
answers question: http://stackoverflow.com/q/25529093
has comment: http://stackoverflow.com/comment/39858444

http://stackoverflow.com/q/25532153
score: 1
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25532511
has comment: http://stackoverflow.com/comment/39862443
type: AnsweredQuestion
has body: I have a php file with a list of news that are coming from database. And in each news I have a link to delete it, like this: echo 'Delete'; And then I have my jQuery and AJAX to get id of my news and delete my news. But my news is only deleted if the user clicks in "Yes" in a dialog modal that I make available. Yes No And my delete is working fine when I delete each news, but... Im having a problem here. The problem Im having: When I click in "Delete", my dialog confirmation appears, But If I click "No" in that moment the news is not deleted (so its working fine) and my confirmation dialog is closed... But in the next moment if I click in "Delete" in other news and click "Yes" in my dialog confirmation, this news is deleted but also my news that I clicked "No" before is also deleted. Can you please give me a help to try understand what is happening here? My jQuery & Ajax $('.content').on('click','.j_newsdelete',function(){ var news_id = $(this).attr('id'); $('.content .news li[id="'+ news_id +'"]').css('background','red'); $('.delete_dialog p').text('Are you sure you want to remove this news?'); $('.delete_dialog').fadeIn("slow",function(){ $('.confirm').fadeIn("slow"); }); $("a#no").click(function(event){ event.preventDefault(); $('.confirm').fadeOut("slow",function(){ $('.delete_dialog').fadeOut("slow"); }); $('.content .news li[id="'+ news_id +'"]').css('background','#f5f5f5'); }); $("a#delete").click(function(event){ event.preventDefault(); $.post(url,{action:'news_del',id: news_id},function(){ window.setTimeout(function(){ $('.content .news li[id="'+ news_id +'"]').fadeOut("slow"); },500); $('.confirm').fadeOut("fast",function(){ $('.delete_dialog').fadeOut("fast"); }); }); }); return false; })
has title: I just want to delete one news each time, but I´m deleting more than one
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25532511
possible better answer: http://stackoverflow.com/a/25532606
has answer: http://stackoverflow.com/a/25532606

http://stackoverflow.com/a/25464637
score: 0
answers question: http://stackoverflow.com/q/25464583
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25464583
type: Answer
has body: It looks like ab is a string. You need to wrap it with quotes. " "+ab +" "; Of course inline handlers are not the best way. You can use event delegation instead: bind single onclick handler on the table itself. $('#mytable').on('click', '.change-to-some-page', function() { var num = $(this).data('num'); }); And when generating rows. tmp += ' ' +ab +' ';

http://stackoverflow.com/comment/39616232
type: Comment
score: 1
type: QuestionComment
has text: Standards do not support browser sniffing instead they support determining if the browser has a feature. What this means is that whatever you do today to determine the browser may not work for the next version of browser.
comment on: http://stackoverflow.com/q/25399554

http://stackoverflow.com/q/25544548
accepted answer: http://stackoverflow.com/a/25544660
possible better answer: http://stackoverflow.com/a/25545410
has comment: http://stackoverflow.com/comment/39884807
has answer: http://stackoverflow.com/a/25545410
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39884660
answer count: 2
tagged with: highcharts
tagged with: javascript
tagged with: jquery
has title: How to call a Jquery automatically after a Div is created?
has answer: http://stackoverflow.com/a/25544660
tagged with: http://stackoverflow.com/tag/html
has body: I need some help here. I am trying to get Highchart to load (http://www.highcharts.com/docs/getting-started/your-first-chart). The sample chart loads properly when the div already exist in my index.html. However, the div for the highchart will be created on the fly whenever a button is created. function querySomething { //I have an popup that is able to display html code onto itself. So here "out" contains the html code to be sent to the popup. var out = ""; out = out + "START OF CHART"; out = out + "&lt;div id='chart' style='width:100%; height:100px;'&gt;&lt;/div&gt;"; out = out + "END OF CHART"; //process and display the html in "out" here } So below in the same javascript file, I put what the webpage gave: $(function () { $('#container').highcharts({ chart: { type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] }, yAxis: { title: { text: 'Fruit eaten' } }, series: [{ name: 'Jane', data: [1, 0, 4] }, { name: 'John', data: [5, 7, 3] }] }); }); However, when I access the popup, all I see is a huge blank between my start and end: START OF CHART END OF CHART I think it is because the jquery is called when the page load, but the div is not created yet. I googled and found out about the on() method. .on( events [, selector ] [, data ], handler ) So I tried: $('body').on('click', '#chart', function () { $('#chart').highcharts({ chart: { type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] }, yAxis: { title: { text: 'Fruit eaten' } }, series: [{ name: 'Jane', data: [1, 0, 4] }, { name: 'John', data: [5, 7, 3] }] }); }); However, it still did not work. Also, The event is not supposed to be on click but to automatically display the chart as soon as the div is created. Any help please? EDIT: I changed to event to "change" like so: $('body').on('change', '#chart', function () { $('#chart').highcharts({ chart: { type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis:…
has comment: http://stackoverflow.com/comment/39884916
has comment: http://stackoverflow.com/comment/39884788
type: AnsweredQuestion

http://stackoverflow.com/q/25466000
accepted answer: http://stackoverflow.com/a/25466096
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39740488
has answer: http://stackoverflow.com/a/25466126
tagged with: javascript
has answer: http://stackoverflow.com/a/25466156
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39740471
has comment: http://stackoverflow.com/comment/39741265
has title: Prime Factors function crashes console
has comment: http://stackoverflow.com/comment/39740760
possible better answer: http://stackoverflow.com/a/25466126
has comment: http://stackoverflow.com/comment/39740150
has body: I can't figure out why this code is crashing my console: var isPrime = function(n) { for (i=2;i&lt;n;i++) { if (n % i === 0) { return false; break } else { return true } } }; var primeFactors = function(n) { factorsArray = []; for (i=0;i&lt;n;i++) { if (isPrime(i)) { if (i % n === 0) { factorsArray.push(i); } } } return factorsArray } When I run the "isPrime" function by itself, it runs great. However, the primeFactors function (for any value greater than 3) will crash the console. I don't see how it could be an infinite loop. May not be the most efficient solution to the problem, but it should still work I think......
has answer: http://stackoverflow.com/a/25466096

http://stackoverflow.com/q/25408779
tagged with: javascript
tagged with: asp.net
has answer: http://stackoverflow.com/a/25426059
favorite count: 0
has title: html encoding on postback issue
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/25426059
has comment: http://stackoverflow.com/comment/39635021
has body: I am getting an error when I try to post data from an asp textbox to the database. The reason for this is that the text is html due to using an html text editor. However when I try to encode the html I get the following error: BC30451: 'Bind' is not declared. It may be inaccessible due to its protection level. Below is the asp code I have for the textbox that's causing the error. &lt;asp:TextBox ID="TxtBx" runat="server" Text='&lt;%# Server.HtmlEncode(Bind("Details").ToString())%&gt;'/&gt; I'm sure it's something small but can't resolve it. I have also tried the below with the same outcome: Text='&lt;%# System.Web.HttpUtility.HtmlEncode(Bind("Details"))%&gt;' I have also attempted to create my own function in the backend to resolve this with the following asp and vb: Text='&lt;%# encodeIT(Eval("Details"))%&gt;' Public Function encodeIT(Details As String) As String Return HttpUtility.HtmlEncode(Details) End Function Any help would be greatly appreciated. Update 1 I have attempted a client solution but still doesn't appear to be working, not sure if I've missed something, been testing in a basic web project to avoid any compatibility issues that could crop up. I have removed the databind for the purpose of this test as ASP throws the same error regardless. ASP &lt;asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"&gt; &lt;script src="../Scripts/tinymce/tinymce.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { tinymce.init({ menubar: false, width: 800, height: 250, selector: "textarea" }); var decodeStuff = (function () { // preventing any overhead from creating more than one instance of the function var element = document.createElement('div'); function decodeHtml(str) { if (str &amp;&amp; typeof str === 'string') { // strip script and html tags str = str.replace(/&lt;script&gt;[^&gt;]*&gt;([\S\s]*?)&lt;\/script&gt;/gmi, ''); str = str.replace(/&lt;\/?\w(?:[^"'&gt;]|"[^"]*…
tagged with: vb.net
type: Question
has comment: http://stackoverflow.com/comment/39668865
has comment: http://stackoverflow.com/comment/39669586
has comment: http://stackoverflow.com/comment/39667074
has comment: http://stackoverflow.com/comment/39672547
linked to: http://stackoverflow.com/q/1219860
has comment: http://stackoverflow.com/comment/39661020
has comment: http://stackoverflow.com/comment/39673642
score: 2
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39799084
has text: Hi Amar its working fine, but second time when I mouse enter on panel it's automatically coming out and in. and i have did some changes here... $('.tools_expand').hover(function () { $('.tools_collapsed').show().animate({ right: '0' }, { duration: speed }); $('.tools_collapsed .collapse_btn').show(); })
type: AnswerComment
comment on: http://stackoverflow.com/a/25487738
score: 0
type: Comment

http://stackoverflow.com/a/25450874
has comment: http://stackoverflow.com/comment/39711814
has comment: http://stackoverflow.com/comment/39711670
has comment: http://stackoverflow.com/comment/39711713
has comment: http://stackoverflow.com/comment/39711839
has comment: http://stackoverflow.com/comment/39711527
has body: Got it: if(typeof Object.create !== "function") { Object.create = function (o) { function F() {} F.prototype = o; return new F(); }; } Thanks for your responses. Ya, I don't know why I included call() in there. Kyle
answers question: http://stackoverflow.com/q/25450564
score: 0
type: Answer

newrelic
tags question: http://stackoverflow.com/q/25405718
type: Tag
tag name: newrelic

http://stackoverflow.com/a/25440858
has comment: http://stackoverflow.com/comment/39693147
has comment: http://stackoverflow.com/comment/39695071
score: 1
downvote count: 0
has body: Have a look at the below code. Hope it will help you to solve your problem : $('#submitButton').click(function () { var reg = new RegExp(/^\S[A-Za-z]*-\S[A-Za-z]*$/); var valid = $('#codeCityId').val().replace(/ /g, '').match(reg); if (valid) { alert("valid"); } else { alert("Not valid"); } });
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25440288

http://stackoverflow.com/a/25460053
answers question: http://stackoverflow.com/q/25460002
upvote count: 1
has comment: http://stackoverflow.com/comment/39729420
score: 1
accepted answer of: http://stackoverflow.com/q/25460002
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39729240
type: Answer
has body: $("#next").click(function () { var current = $(".qn:visible"), total = $(".qn").length, last = $(".qn:last"); $(current).next().show(); $(current).hide(); if ($(current).next().is(last)) {//check if it is last question $("#next").hide(); $("input[type='submit']").show(); } }); See updated fiddle here.

http://stackoverflow.com/comment/39796055
score: 0
type: Comment
has text: Thanks for the advice. That bit was a snippet that I modified to ask the question, so I won't actually use 'a' in the actual program. I do then pass the formatted string into a Date object and use that to calculate times. It looks like parseInt() and what you linked will help a lot. Thanks again!
type: AnswerComment
comment on: http://stackoverflow.com/a/25494597

http://stackoverflow.com/comment/39727053
has text: @Matthew - perhaps because you didn't state what your result was and what made you think there's a problem. (It was obvious, I think, but many don't like having to work out the problem and then provide tips on how to solve it)
score: 1
comment on: http://stackoverflow.com/a/25458891
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39627380
has text: Ok thanks an its - http://jsfiddle.net.
comment on: http://stackoverflow.com/q/25405320
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25510563
has body: If you don't mind not using underscore for this, JavaScript has a relatively easy means of achieving the same with regular expressions (though there's a little complexity in the creation of that regular expression): formatVideoTitle = function (title) { var phrases = [ '(Official Music Video)', '(Official Video)', '(Music Video)'], // creating Regular Expression object, by joining the phrases together with '|' // characters (an 'OR' relationship) to create a string, prefacing the '(' and ')' // characters with a double escape (to escape them in the created RegExp), and // wrapping that created string in '(' and ')' to create a matching group: reg = new RegExp('(' + phrases.join('|').replace(/(\(|\))/g, function(a){ return '\\' + a; }) + ')', 'gi'); // returning the amended title: return title.replace(reg, ''); } console.log(formatVideoTitle("Lower Dens - Propagation (Official Music Video)")); JS Fiddle demo. References: Array.prototype.join(). JavaScript Regular Expressions. RegExp(). String.prototype.replace().
answers question: http://stackoverflow.com/q/25510184
score: 0
type: Answer

http://stackoverflow.com/a/25587362
type: Answer
answers question: http://stackoverflow.com/q/25423453
score: 0
has body: Drag/Rotate/Resize = http://liveweave.com/ik8TB5 (Includes My New RotateMe Plugin): http://jsbin.com/zeguyipizizi/1/edit Drag/Rotate/RotateX/RotateY = http://jsbin.com/dusacabobupa/1/edit http://liveweave.com/vLYVUW Drag/Rotate/Resize = http://liveweave.com/ik8TB5 Drag/Rotate/RotateX/RotateY = http://liveweave.com/vLYVUW The only way I could figure out how to get it to work is by calling a variable rotateable and calling true/1 or false to enable/disable the rotation methods. Not the best way to go about doing this, but I haven't figured out another way on getting this to work. Drag/Rotate/Resize var rotateable = false; $('.element').drag('start',function( ev, dd ){ dd.attr = $( ev.target ).prop("className"); dd.width = $( this ).width(); dd.height = $( this ).height(); }).drag(function( ev, dd ) { var props = {}; if ( dd.attr.indexOf("E") &gt; -1 ){ props.width = Math.max( 32, dd.width + dd.deltaX ); } if ( dd.attr.indexOf("S") &gt; -1 ){ props.height = Math.max( 32, dd.height + dd.deltaY ); } if ( dd.attr.indexOf("W") &gt; -1 ){ props.width = Math.max( 32, dd.width - dd.deltaX ); props.left = dd.originalX + dd.width - props.width; } if ( dd.attr.indexOf("N") &gt; -1 ){ props.height = Math.max( 32, dd.height - dd.deltaY ); props.top = dd.originalY + dd.height - props.height; } if ( dd.attr.indexOf("element") &gt; -1 ){ props.top = dd.offsetY; props.left = dd.offsetX; } $( this ).css( props ); }); // Rotate 360 Degrees $(".rotatable").on("mousedown touchstart", function() { rotateable = 1; if (rotateable) { $(".element").each(function() { var container = $(this), body = $(document), angler = container.find(".rotatable").parent(); angler.on("mousedown touchstart", mouseDown); body.on("mouseup touchend", mouseUp); function setAngle(value) { angler.css("transform", "rotate(" + value + "deg)").change(); } function mouseDown(event) { body.on("mousemove.rotatable", handleMove); body.on("touchmove.rotatable", handleMove); handleMove(event); event.preventDefault(); } functi…
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25423453

http://stackoverflow.com/a/25544779
has comment: http://stackoverflow.com/comment/39885713
has comment: http://stackoverflow.com/comment/39888009
has comment: http://stackoverflow.com/comment/39885363
has comment: http://stackoverflow.com/comment/39954635
has comment: http://stackoverflow.com/comment/40004878
score: 0
has comment: http://stackoverflow.com/comment/39885204
has comment: http://stackoverflow.com/comment/39885882
type: Answer
has comment: http://stackoverflow.com/comment/39885985
answers question: http://stackoverflow.com/q/25544620
has comment: http://stackoverflow.com/comment/39954847
has comment: http://stackoverflow.com/comment/39887283
has comment: http://stackoverflow.com/comment/40283028
has body: You are doing it almost right. You only need to return the promise from your service. If I understand you question you are concerned about $scope.data being null when you call $log.info($scope.data) on the very last page. And that is perfectly correct. $scope.data will be set later, when the HTTP call is finished successfully. If you need to do any operations only when the data arrived, you must include it success callback. Here is how it could look like: var app = angular.module('app',[]); app.factory('featuresService', ['$http', '$log', function($http, $log) { var getPromise = function() { //create the promise, this will be returned from this function var promise = $http({method: 'GET', url: '../../LIBS/inc/getAllGeoFeatures.php'}); //on error do some logging here promise.error(function(data, status, headers, config) { $log.warn(data, status, headers, config); }); return promise; }; return { getPromise: getPromise; } }]); app.controller('testCtrl', 'featuresService', function($scope, featuresService) { //set initial values $scope.data = null; $scope.vectorAllLibs = null; var init = function() { featuresService.getPromise().then(function(data) { $scope.data = data; $scope.vectorAllLibs = convertVectorAllLibs(data); }; }; var convertVectorAllLibs = function(data) { return ol.source.GeoJSON({ projection: 'EPSG:3857', object: data }); }; $scope.processVectorAllLibs = function() { if (!$scope.vectorAllLibs) { alert('sorry, no data yet!'); return; } //process here }; init(); });

http://stackoverflow.com/a/25490102
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25489719
upvote count: 1
answers question: http://stackoverflow.com/q/25489719
has body: Since response is null, accessing a property from null would lead to this issue. Try this instead: if (response &amp;&amp; response.taken ) { //... } This way, you would check for truth value of the object response, and then access a property if it evaluates to true

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/25512023
tags question: http://stackoverflow.com/q/25454889
tags question: http://stackoverflow.com/q/25480285
type: Tag
tags question: http://stackoverflow.com/q/25421828

http://stackoverflow.com/comment/39730333
type: QuestionComment
score: 1
has text: Maybe duplicate of [JSLint message: Unused variables](http://stackoverflow.com/questions/6583623/jslint-message-unused-variables)
comment on: http://stackoverflow.com/q/25460596
type: Comment

http://stackoverflow.com/comment/39751176
score: 0
comment on: http://stackoverflow.com/q/25471880
type: Comment
type: QuestionComment
has text: Its pretty simple : 1) Table that will match jquery current style. 2)Add part of json string as a row .

http://stackoverflow.com/q/25547040
has comment: http://stackoverflow.com/comment/39889078
has answer: http://stackoverflow.com/a/25547234
has body: I have small issue - I'm making ajax query to transfer data to another php file and once query success I need to load one script. $.ajax({ type: 'POST', url: 'promote.php', data: { country:country }, success: function() { //What to do here? } }); The script is: &lt;script type="text/javascript"&gt; var var1 = "d1dtGWhrOaxxUVCy%2FNjJwkpd9lCj%2FGijAGXS5d7LYPU%3D"; var var2 = "jn9drdklwlr5hjYc2eHTCaXRjdpHDqhaqL5LXpsyc54%3D"; var var3 = "E770DuKV8GKaHhaZO%2B%2F9sPzUI9mAUFVRrxRTH75pHvA%3D"; var var4 = "LhWNAMH8CgveH%2FqRHKxqg8ebEVZKTX4pQw3pp5wTRl8%3D"; var network = "xxxxxxx"; &lt;/script&gt; &lt;script type="text/javascript" src="http://xxxxxxx/js/xx.js"&gt;&lt;/script&gt; So any suggestions how could I load this script when ajax query success? I need to do that in in this file, please don't suggest putting script in other file and loading from it. Would that be possible?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39889111
answer count: 2
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25547234
has comment: http://stackoverflow.com/comment/39889109
favorite count: 0
tagged with: ajax
linked to: http://stackoverflow.com/q/7718935
has title: Need suggestion about ajax success function
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25547141
has answer: http://stackoverflow.com/a/25547141
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39889440

php
tags question: http://stackoverflow.com/q/25490252
tags question: http://stackoverflow.com/q/25392100
tags question: http://stackoverflow.com/q/25517276
tags question: http://stackoverflow.com/q/25416367
tags question: http://stackoverflow.com/q/25461248
tags question: http://stackoverflow.com/q/25395395
tags question: http://stackoverflow.com/q/25547528
tags question: http://stackoverflow.com/q/25530853
tags question: http://stackoverflow.com/q/25468310
tags question: http://stackoverflow.com/q/25535577
tags question: http://stackoverflow.com/q/25528630
tags question: http://stackoverflow.com/q/25472860
tags question: http://stackoverflow.com/q/25528013
tags question: http://stackoverflow.com/q/25442643
tags question: http://stackoverflow.com/q/25458661
tags question: http://stackoverflow.com/q/25467708
tags question: http://stackoverflow.com/q/25457471
tags question: http://stackoverflow.com/q/25437419
tags question: http://stackoverflow.com/q/25517730
tags question: http://stackoverflow.com/q/25532565
tags question: http://stackoverflow.com/q/25523654
tags question: http://stackoverflow.com/q/25528109
tags question: http://stackoverflow.com/q/25439175
tags question: http://stackoverflow.com/q/25514841
tags question: http://stackoverflow.com/q/25467343
tags question: http://stackoverflow.com/q/25440393
tags question: http://stackoverflow.com/q/25396494
tags question: http://stackoverflow.com/q/25462565
tags question: http://stackoverflow.com/q/25483728
tags question: http://stackoverflow.com/q/25477264
tags question: http://stackoverflow.com/q/25446593
tags question: http://stackoverflow.com/q/25406940
tags question: http://stackoverflow.com/q/25460655
tags question: http://stackoverflow.com/q/25463793
tags question: http://stackoverflow.com/q/25511529
tags question: http://stackoverflow.com/q/25478719
tags question: http://stackoverflow.com/q/25483595
tags question: http://stackoverflow.com/q/25539043
tags question: http://stackoverflow.com/q/25482829
tags question: http://stackoverflow.com/q/25480858
tags question: http://stackoverflow.com/q/25402194
tags question: http://stackoverflow.com/q/25479119
tags question: http://stackoverflow.com/q/25458263
tags question: http://stackoverflow.com/q/25451549
tags question: http://stackoverflow.com/q/25525919
tags question: http://stackoverflow.com/q/25540833
tags question: http://stackoverflow.com/q/25527702
tags question: http://stackoverflow.com/q/25487205
tags question: http://stackoverflow.com/q/25449229
tags question: http://stackoverflow.com/q/25512038
tags question: http://stackoverflow.com/q/25390583
tags question: http://stackoverflow.com/q/25460442
tags question: http://stackoverflow.com/q/25517700
tags question: http://stackoverflow.com/q/25428605
tags question: http://stackoverflow.com/q/25499547
tags question: http://stackoverflow.com/q/25428036
tags question: http://stackoverflow.com/q/25503935
tags question: http://stackoverflow.com/q/25449945
tags question: http://stackoverflow.com/q/25448031
tags question: http://stackoverflow.com/q/25485546
tags question: http://stackoverflow.com/q/25478167
tags question: http://stackoverflow.com/q/25474176
tags question: http://stackoverflow.com/q/25448834
tags question: http://stackoverflow.com/q/25437308
tags question: http://stackoverflow.com/q/25536041
tags question: http://stackoverflow.com/q/25480410
tags question: http://stackoverflow.com/q/25484793
tags question: http://stackoverflow.com/q/25452808
tags question: http://stackoverflow.com/q/25476404
tags question: http://stackoverflow.com/q/25409168
tags question: http://stackoverflow.com/q/25528474
tags question: http://stackoverflow.com/q/25460123
tags question: http://stackoverflow.com/q/25453686
tags question: http://stackoverflow.com/q/25449675
tags question: http://stackoverflow.com/q/25420310
tags question: http://stackoverflow.com/q/25490473
tags question: http://stackoverflow.com/q/25425046
tags question: http://stackoverflow.com/q/25452119
tags question: http://stackoverflow.com/q/25449520
tags question: http://stackoverflow.com/q/25491544

http://stackoverflow.com/comment/39830716
type: Comment
type: QuestionComment
has text: this link could you help [link](http://stackoverflow.com/questions/2342371/jquery-loop-on-json-data-using-each) or you can use JSON.parse(data)
score: 0
comment on: http://stackoverflow.com/q/25514509

http://stackoverflow.com/a/25396709
accepted answer of: http://stackoverflow.com/q/25396654
answers question: http://stackoverflow.com/q/25396654
type: Answer
has comment: http://stackoverflow.com/comment/90292511
upvote count: 1
has comment: http://stackoverflow.com/comment/90255292
score: 1
type: AcceptedAnswer
downvote count: 0
has body: There are two problems in your code. 1) "OneString"-"SecondString" will return NaN. So ca return that in this situation. 2) Array.sort sorts the given array in place. It returns the sorted array. Say like this clientListArray.sort(function(a, b){ if(a.lastName &lt; b.lastName) return -1; if(a.lastName &gt; b.lastName) return 1; return 0; })
has comment: http://stackoverflow.com/comment/90293930

http://stackoverflow.com/q/25412789
tagged with: socket.io
type: Question
tagged with: client-server
answer count: 1
tagged with: websocket
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25413182
has title: Removing phantom sockets in Socket.io
favorite count: 0
has body: I am making a game where a node server speaks to javascript clients using socket.io. Players can connect and disconnect from the game and the server keeps track of who is connected. However, I have found that on many occasions when i close the server, close all open client tabs, then restart a new node server, the number of clients connected seems incorrect. For example, I will connect with just one client but the node debugger shows that the server is keeping track of three sockets. This is a problem because often these orphaned clients will receive messages from the server or timeout, and this messes up the game logic on the server (it was not expecting this many players etc.) I think the reason this is happening is: 1. Clients in socket.io automatically attempt a reconnect periodically when they are disconnected 2. When closing a tab the sockets associated with that page are not being "flushed" or cleared for some reason. 3. When the server is closed and then started up again, these unflushed clients think "oh, the server is back up, i will try and reconnect" How can I tell the difference between sockets that have had their tabs closed/were associated with the old server, and new clients attempting to connect to the newly restarted server? Or is there a way for me to ensure the clients get "flushed" when either the server is closed or a tab?
upvote count: 1
tagged with: node.js
accepted answer: http://stackoverflow.com/a/25413182
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/25473514
has comment: http://stackoverflow.com/comment/39754347
type: Answer
answers question: http://stackoverflow.com/q/25472689
has body: Since the procedure involves asynchronous calls, the best choice is to follow the same pattern in makeGetFunction, by adding a callback argument: function makeGetFunction(url, callback) { url = url + '?' + authstring; console.log("get " + url); request.get(url, function(e, r, data) { var json = JSON.parse(data); var resp = json.entities; callback(resp); }); } When using makeGetFunction, pass it a handler function instead of retrieving the return value: makeGetFunction('www.myurl.net/what', function(resp) { // do stuff with response });
score: 0
has comment: http://stackoverflow.com/comment/39754309

http://stackoverflow.com/q/25517989
has title: Why can't I redefine a property in a Javascript object?
has answer: http://stackoverflow.com/a/25518028
type: Question
has answer: http://stackoverflow.com/a/57767015
tagged with: javascript
downvote count: 0
has body: I am creating a object using Object.create and I want to add properties to it. &gt; var o = Object.create({}); undefined &gt; Object.defineProperty(o, "foo", {value: 43, enumerable: true}); {foo: 43} &gt; o {foo: 43} &gt; o.foo 43 &gt; for (var i in o) { console.log(i); } foo &gt; Object.keys(o) ['foo'] &gt; Object.defineProperty(o, "foo", {value: 43, enumerable: false }); TypeError: Cannot redefine property: bar Q1) Why can't I redefine the property ? &gt; o.__proto__ {} &gt; o.prototype undefined Q2) Why is the prototype empty ? And why are these 2 values different i.e. {} vs undefined ?
favorite count: 0
has answer: http://stackoverflow.com/a/51112727
has comment: http://stackoverflow.com/comment/39837328
has answer: http://stackoverflow.com/a/25518045
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/69476634
score: 77
upvote count: 77

http://stackoverflow.com/q/25544532
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/39885249
tagged with: twitter-bootstrap
upvote count: 1
accepted answer: http://stackoverflow.com/a/25545041
has body: Html code: Mini Slider First Thumbnail label Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit. Second Thumbnail label Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit. Third Thumbnail label Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit. ‹ › I've created a mini slider with images using bootstrap. I tried to show popup of each image while clicking on it... Fiddle : http://jsfiddle.net/salmanamaan24/Et4pc/281/
has comment: http://stackoverflow.com/comment/39885551
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39885316
has comment: http://stackoverflow.com/comment/39885183
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25545041
has title: Image slider with popup not working?
tagged with: slider
answer count: 1

http://stackoverflow.com/comment/39770989
has text: Yes, you are right about the failing units, but this answer doesn't give the (whole) solution, since `position.right` isn't valid. Test it yourself, and you'll see. Don't give an answer without going through completely ;)
type: AnswerComment
comment on: http://stackoverflow.com/a/25482824
score: 0
type: Comment

http://stackoverflow.com/comment/39678821
type: QuestionComment
has text: It would be but that is essentially the same thing as checking the configType.
score: 0
comment on: http://stackoverflow.com/q/25433063
type: Comment

http://stackoverflow.com/q/25395872
has comment: http://stackoverflow.com/comment/39609855
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39609816
has answer: http://stackoverflow.com/a/25395899
favorite count: 0
has title: Is the syntax of this IF/OR statement wrong?
has comment: http://stackoverflow.com/comment/39610055
has comment: http://stackoverflow.com/comment/39609818
has comment: http://stackoverflow.com/comment/39609811
has body: What is wrong with this code? var variable = prompt("Choose answer1, answer2, answer3 or answer4"); if ((variable !== "answer1") || (variable !== "answer2") || (variable !== "answer3") || (variable !== "answer4")) { return "You must choose one of these four options!" }
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39609799
accepted answer: http://stackoverflow.com/a/25395899
downvote count: 1
type: Question
tagged with: if-statement
tagged with: javascript
score: -1

http://stackoverflow.com/comment/39723359
comment on: http://stackoverflow.com/a/25417291
type: AnswerComment
has text: @andrewrk You are doing something wrong. Everything above is cut and paste on the data you supply yourself. Either just as an aggregation sample or as actually removing from the collection in an update the results appear as shown. I tried to explain to you reasons why it may not work on other data. Your question therefore does not explain what you are trying to do elsewhere. Cut and paste your own example. I'll even "fix" the data for so it is possible to do so. The information will at least be useful to others.
score: 0
type: Comment

http://stackoverflow.com/comment/39855217
type: Comment
has text: Try to call it as `indexOf([i,j])`
type: QuestionComment
comment on: http://stackoverflow.com/q/25528282
score: 2

http://stackoverflow.com/comment/39891996
comment on: http://stackoverflow.com/a/25548349
score: 0
type: Comment
has text: Yes - in this case the path is relative to the html page that's loaded the javascript file, unlike a stylesheet where it's relative to the stylesheet file itself
type: AnswerComment

http://stackoverflow.com/a/25406170
type: Answer
answers question: http://stackoverflow.com/q/25406090
accepted answer of: http://stackoverflow.com/q/25406090
score: 0
has body: Yes. Its possible to check that your desired website is working or not when anyone visit on your site. Here I am sharing a small pure JavaScript code with you. &lt;script type='text/javascript'&gt; // Check Server/Website Is Online Or Offline Via Pure JavaScript // Shared On www.exeideas.com var url = 'URL-OF-ANY-IMAGE-IN-YOURE-DESIRED-WEBSITE'; var img = new Image(); img.src = url; img.onload = function() { alert('WEBSITE IS UP AND RUNNING') } img.onerror = function() { alert('WEBSITE IS DOWN AND NOT-RUNNING') } &lt;/script&gt; Rest you can know more about this code at Check Server/Website Is Online Or Offline Via Pure JavaScript.
type: AcceptedAnswer

http://stackoverflow.com/a/25432580
has body: Simply add each vendor's prefix for each browser e.g. chrome's -webkit in your css file FORKED PLUNKER .slide.ng-enter, .slide.ng-leave{ position: absolute; } .slide.ng-enter { animation: slideInRight 0.5s both ease-in; z-index: 8888; -webkit-animation: slideInRight 0.5s both ease-in; z-index: 8888; } .slide.ng-leave { animation: slideOutLeft 0.5s both ease-in; z-index: 9999; -webkit-animation: slideOutLeft 0.5s both ease-in; z-index: 9999; } @keyframes slideOutLeft { to { transform: translateX(-100%); } } @-webkit-keyframes slideOutLeft { to { transform: translateX(-100%); } } @keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } } @-webkit-keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
type: Answer
has comment: http://stackoverflow.com/comment/39679540
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/43419891
answers question: http://stackoverflow.com/q/25431986
accepted answer of: http://stackoverflow.com/q/25431986
has comment: http://stackoverflow.com/comment/41059845
type: AcceptedAnswer
upvote count: 6

http://stackoverflow.com/comment/39671337
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25428746
has text: Well works properly http://jsfiddle.net/4vbd7pvz/2/, second solution is using self-call function http://jsfiddle.net/4vbd7pvz/4/
type: AnswerComment

http://stackoverflow.com/comment/39898583
has text: This grabs the `h1` tags from all currently rendered templates, so it should work fine.
comment on: http://stackoverflow.com/a/25551359
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/124207199
comment on: http://stackoverflow.com/a/26359661
score: 0
type: AnswerComment
type: Comment
has text: thank both who answer and who question

http://stackoverflow.com/a/25476935
downvote count: 0
has comment: http://stackoverflow.com/comment/60557771
upvote count: 13
has comment: http://stackoverflow.com/comment/116153791
answers question: http://stackoverflow.com/q/25476898
type: Answer
score: 13
has body: You can just do: var columns = [{ "title": "Date", "width": "10%", "data": "date"}, { "title": "Entry", "width": "90%", "data": "entry", "orderable": false}]; if(isAdmin){ columns.push({"title": "Delete", ...}); } jQuery('#combat_record').dataTable( { "data": t.responseJSON, "paging": true, "ordering": true, "order": 0, "desc" , "info": false, "columns": columns });

http://stackoverflow.com/a/25455868
has comment: http://stackoverflow.com/comment/39721577
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39721644
has comment: http://stackoverflow.com/comment/39721585
upvote count: 2
has comment: http://stackoverflow.com/comment/39721653
type: Answer
score: 2
has body: $('#billingExpirationYear').val('20' + userInfo.exp_year.toString());
has comment: http://stackoverflow.com/comment/39721518
has comment: http://stackoverflow.com/comment/39721551
accepted answer of: http://stackoverflow.com/q/25455804
answers question: http://stackoverflow.com/q/25455804

http://stackoverflow.com/q/25440001
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: ngtable
upvote count: 1
has body: I'm trying to modify ng-table to create expandable nodes/treeview, Plunker example The JSON structure is specified based on ID's. [ { "BodyId": 1, "TrId": null, "TdId": null, "Title": "BodyId1", "Status": "Ok" }, { "BodyId": 2, "TrId": null, "TdId": null, "Title": "BodyId2", "Status": "Ok" }, { "BodyId": 3, "TrId": null, "TdId": null, "Title": "BodyId3", "Status": "Ok" }, { "BodyId": 1, "TrId": 1, "TdId": null, "Title": "TrId1", "Status": "Ok" }, { "BodyId": 1, "TrId": 2, "TdId": null, "Title": "TrId2", "Status": "Ok" }, { "BodyId": 2, "TrId": 1, "TdId": null, "Title": "TrId1", "Status": "Ok" }, { "BodyId": 2, "TrId": 2, "TdId": null, "Title": "TrId2", "Status": "Ok" }, { "BodyId": 3, "TrId": 1, "TdId": null, "Title": "TrId1", "Status": "Ok" }, { "BodyId": 3, "TrId": 2, "TdId": null, "Title": "TrId2", "Status": "Ok" }, { "BodyId": 1, "TrId": 1, "TdId": 1, "Title": "TdId1", "Status": "Ok" }, { "BodyId": 1, "TrId": 1, "TdId": 2, "Title": "TdId2", "Status": "Ok" }, { "BodyId": 1, "TrId": 2, "TdId": "1", "Title": "TdId1", "Status": "Ok" }, { "BodyId": 2, "TrId": 1, "TdId": 1, "Title": "TdId1", "Status": "Ok" }, { "BodyId": 2, "TrId": 1, "TdId": 2, "Title": "TdId2", "Status": "Ok" }, { "BodyId": 2, "TrId": 2, "TdId": 1, "Title": "TdId1", "Status": "Ok" }, { "BodyId": 3, "TrId": 3, "TdId": 1, "Title": "TdId1", "Status": "Ok" }] I managed to display parent node by: {{node[column.field]}} And here I'm stuck because I don't know how to attach below each parent node the corresponding child nodes and make all expandable after click. Would be a good solution to parse this JSON structure and change it to JSON like would that make this problem easier to solve ? [{ BodyId: 1, TrID: [{ Id: 1, TdId: [{ Id: 1, Name: "Td1" }, { Id: 2, Name: "Td2" }] }] }]
type: Question
has title: Modifying ng-table
has answer: http://stackoverflow.com/a/25837558
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/39650355
score: 0
type: Comment
type: QuestionComment
has text: By the way use `$(this).val()` instead of `$(this).text()`
comment on: http://stackoverflow.com/q/25417629

http://stackoverflow.com/comment/39761110
has text: Can you make it more specific, so that it only affects elements that contain non-latin characters, eg `Text άλφα` and not `Text`?
type: Comment
comment on: http://stackoverflow.com/a/25477212
score: 0
type: AnswerComment

http://stackoverflow.com/q/25509541
type: Question
has body: I'm trying to make a script that scrolls the page automatically to the specific element when I scroll my mouse, but for some reason my animation gets repeated and the scroll goes back and forth. Edit: I would like to point out that this doesn't happen if the page scrolls to the last element on the page, but if it scrolls to the second element it will bounce instantly back to the top. Here's my jQuery: $(document).ready(function(){ comp = 0; current_scroll_position = $(window).scrollTop(); console.log("CURRENT SCROLL POSITION = " +current_scroll_position); second = $("#second").offset().top; $(window).scroll(function(scroll_action){ $('body').on({ 'mousewheel': function(e) { e.preventDefault(); e.stopPropagation(); } }); if(comp==0){ console.log("COMP =" +comp); comp++; new_scroll_position = $(window).scrollTop(); console.log("YOU SCROLLED, NEW CURRENT POSITION IS :" +new_scroll_position); if (new_scroll_position &gt; current_scroll_position){ //scroll going down console.log(new_scroll_position +" &gt; "+ current_scroll_position +" GOING DOWN"); $('body').animate({ scrollTop: second }, 500, function(){ //callback function for completed animation completed_animation_scroll = true; current_scroll_position = $(window).scrollTop(); console.log(" ANIMATING "); console.log("CURRENT SCROLL POSITION = " +current_scroll_position); console.log("NEW SCROLL POSITION = " +new_scroll_position); console.log("ANIMATION COMPLETED = " +completed_animation_scroll); console.log(" ******************* ************************ ******************"); $('body').unbind('mousewheel'); comp = 0; }); } else{ console.log(new_scroll_position +" &gt; "+ current_scroll_position +" GOING DOWN"); $('body').animate({ scrollTop: 0 }, 500, function(){ //callback function for completed animation completed_animation_scroll = true; current_scroll_position = $(window).scrollTop(); console.log(" ANIMATING "); console.log("CURRENT SCROLL POSITION = " +current_scroll_position); console.log("NEW SCROLL POSITION =…
tagged with: jquery-animate
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25510284
has comment: http://stackoverflow.com/comment/39821461
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/25510284
favorite count: 0
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Animate() doesn't work with scrollTop properly

http://stackoverflow.com/comment/39837121
comment on: http://stackoverflow.com/a/25517928
has text: I didn't want to attach it as a url parameter. The accepted answer works good though.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25458346
type: Answer
score: 0
has body: instead of adding class to $c, add the class to a common parent, and use CSS to control visibility of $a and $b .a, .b {display:none;} .parentClass .a, .parentClass .b{ display:block } and add or removeClass depending on which element is clicked.
answers question: http://stackoverflow.com/q/25458314

http://stackoverflow.com/comment/39648678
type: QuestionComment
comment on: http://stackoverflow.com/q/25416611
has text: @nnnnnn Yes, I'm using Codeacademy to learn javascript and it's asking me to form for, while, and do/while loops. I was getting infinite loops so I was going through each one by one and //'d the others. That might be my error.
score: 0
type: Comment

http://stackoverflow.com/comment/39829266
score: 0
has text: Thanks! I had not thought about this. I thought there was something wrong with my jquery. lol
type: Comment
comment on: http://stackoverflow.com/a/25513822
type: AnswerComment

http://stackoverflow.com/comment/39752109
has text: This shouldn't run at all with that syntax error; check your console.
score: 1
comment on: http://stackoverflow.com/q/25472469
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26067248
type: AcceptedAnswer
has body: Finally fixed it. In your require config file (as it says in the docs, and I mention above in my reply) only put shim references to other shim modules. I called my script from the paths but because it had dependencies I put those in the shim and that's where it broke. TL:DR; Call your main script with the path entry, then in the main script list your deps in the deps section of the define wrapper...
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25473172
answers question: http://stackoverflow.com/q/25473172

http://stackoverflow.com/a/25415280
has body: If you want to get the next element of a certain tag name (or any other selector), use: $(this).nextAll('tagname').get(0) this being a reference to which element you're working from, it could be a selector instead. http://jsfiddle.net/hwf6pyyu/
type: Answer
accepted answer of: http://stackoverflow.com/q/25395460
answers question: http://stackoverflow.com/q/25395460
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39620652
has text: in angularjs the way to handle it is to use directives like [ui-date](https://github.com/angular-ui/ui-date)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25401947
type: QuestionComment

http://stackoverflow.com/comment/39755028
score: 0
type: Comment
has text: When i checked it i wantedto enabled the TextBoxes
comment on: http://stackoverflow.com/a/25473806
type: AnswerComment

http://stackoverflow.com/q/25487296
has comment: http://stackoverflow.com/comment/39779267
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25487545
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39779291
has title: How To Send Form Data To Two Or More PHP Files?
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/25487381
has body: I have a Form in an HTML page like below that is sending my data to a page at http://www.aaaaaa.com/1st-file.php... &lt;form action="http://www.aaaaaa.com/1st-file.php" method="post" enctype="plain" id="theForm"&gt; &lt;input type="text" name="NAME" value="Some Data" /&gt; &lt;input type="submit" value="Send Data" /&gt; &lt;/form&gt; But I want to send the same data on http://www.bbbbbb.com/2nd-file.php. My form is on HTML page and I want to send data via one click on Send Data only. So is this possible to send data on both PHP pages using pure JavaScript not JQuery? If yes then how? Update: My both PHP receiving files have codes something like below... &lt;?php $data_from_site= $_POST['NAME']; echo $data_from_site; ?&gt;
has comment: http://stackoverflow.com/comment/39779313
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25487545
has comment: http://stackoverflow.com/comment/39779235
has answer: http://stackoverflow.com/a/25487470
possible better answer: http://stackoverflow.com/a/25487381
tagged with: forms

http://stackoverflow.com/q/25455562
has answer: http://stackoverflow.com/a/25455872
tagged with: http://stackoverflow.com/tag/svg
tagged with: animation
has body: I'm trying to draw a line animation of a circle. I need this to work on mobile so opted for SVG. I have a perfect working example, but it is very inefficient and makes the other animations on the page stutter. This is what I currently have and what I'm trying to achieve: http://jsfiddle.net/sj76ysqs/ &lt;svg class="bean-halo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 500 500" preserveAspectRatio="xMidYMid" style="width:100%; height:100%; position:absolute; top:0; left:0;"&gt; &lt;path d="M200,200 " id="bean-halo" fill="none" stroke="#FF0000" stroke-linecap="round" stroke-width="2.5" stroke-dasharray="0.1,10" /&gt; &lt;/svg&gt; (function() { var i = 0, circle = document.getElementById('bean-halo'), angle = 0, radius = 167, interval = 20, d, radians, x, y, e; window.timer = window.setInterval(function() { angle -= 5; angle %= 360; radians = (angle / 180) * Math.PI; x = 250 + Math.cos(radians) * radius; y = 250 + Math.sin(radians) * radius; e = circle.getAttribute('d'); d = e + (i === 0 ? ' M ' : ' L ') + x + ' ' + y; if (angle === -5 &amp;&amp; i !== 0) { window.clearInterval(window.timer); this.beanHaloisDrawn = 1; } circle.setAttribute('d', d); i++; }.bind(this), interval); })() I'd like to use the following technique or something similar, but don't know enough about SVGs to do this: http://css-tricks.com/svg-line-animation-works/ I've also though about having a static dotted line that is masked by an animated line that reveals it, but again, I don't know how to do this. Any help would be appreciated. UPDATE: The solution has to work on an element with a image as background.
possible better answer: http://stackoverflow.com/a/25455872
has title: SVG animate dotted line around cicle
type: AnsweredQuestion
score: 3
upvote count: 3
accepted answer: http://stackoverflow.com/a/25455745
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25455745
favorite count: 0

http://stackoverflow.com/q/25494365
tagged with: module
has answer: http://stackoverflow.com/a/32278373
has body: I've seen public exports of ES6 modules done in both of the following ways: // method 1 export var getAnswer = function () { return 'forty two'; }; // method 2 export default function () { return 'forty two'; }; Are both of these valid? If so, why do they both exist? Are there other valid options for module exports using ES6 syntax? I'm surprised I haven't been able to find the answer with my googlefu. I'm concerned only with ES6 modules, not CommonJS, RequireJS, AMD, Node, etc.
type: AnsweredQuestion
tagged with: syntax
upvote count: 83
has comment: http://stackoverflow.com/comment/39793264
type: Question
linked to: http://stackoverflow.com/q/33611812
has answer: http://stackoverflow.com/a/34842087
score: 83
tagged with: javascript
has answer: http://stackoverflow.com/a/25815291
tagged with: export
tagged with: ecmascript-6
answer count: 3
possible better answer: http://stackoverflow.com/a/25815291
downvote count: 0
has title: ES6+ javascript module export options
favorite count: 0
accepted answer: http://stackoverflow.com/a/34842087
has comment: http://stackoverflow.com/comment/73391134
linked to: http://stackoverflow.com/q/36795819

http://stackoverflow.com/q/25504285
tagged with: charts
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39906006
type: Question
tagged with: google-visualization
has title: Chart with different colour for each cell
tagged with: highcharts
tagged with: javascript
has comment: http://stackoverflow.com/comment/39810858
has answer: http://stackoverflow.com/a/25508751
accepted answer: http://stackoverflow.com/a/25508751
score: 0
has body: I'm working for my website and I want to create such a chart where each cell of the chart has a different colour as shown in the image below: I've searched Google Charts and other various javascript based api's for charts but no luck. Any solution is warmly welcome.
upvote count: 1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39918012
favorite count: 0

http://stackoverflow.com/q/25426259
has title: Conversion of Date from .Net to Angularjs
favorite count: 0
possible better answer: http://stackoverflow.com/a/25426615
tagged with: angularjs
has answer: http://stackoverflow.com/a/25426615
has comment: http://stackoverflow.com/comment/39665709
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/39665672
has answer: http://stackoverflow.com/a/31317595
type: Question
tagged with: c#
linked to: http://stackoverflow.com/q/249760
has body: when passing an object which contains a date from C# to AngularJS the value of the date appears as "/Date(1408482000000)/" and not as a valid date. my angular code: $scope.GetLastCompletedAction = function () { $http.post('Default.aspx/GetLastCompletedAction', {}).success(function (data, status, headers, config) { $scope.objects = JSON.parse(data.d); }).error(function (data, status, headers, config) { $scope.status = status; console.log(status); }); } objects is a list of objects. every object contains a field named startDate which appears invalid. thanks, Nadav
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/31317595
has comment: http://stackoverflow.com/comment/39665998
linked to: http://stackoverflow.com/q/17925020
downvote count: 0
has comment: http://stackoverflow.com/comment/39665991
tagged with: asp.net

http://stackoverflow.com/a/25528817
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25528498
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25528498
score: 2
has comment: http://stackoverflow.com/comment/39894525
has body: jsFiddle Example with multiple levels of unordered lists. $("a[href='" +activeHREF+ "']").parent().addClass("active") Using filter can do the same thing $('a').filter(function() { return $(this).attr('href') == activeHREF; }).parent().addClass('active');
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39878549

http://stackoverflow.com/a/25521441
type: Answer
has body: Have you tried setting readonly config param? According to TinyMCE doc (http://www.tinymce.com/wiki.php/Configuration3x:readonly): This option enables you to specify make editor instances in readonly mode. When they are in readonly mode nothing can be changed and the contents are just presented to the user. You can use this in combination with body_class to present a different visual presentation for the readonly mode. So, you could add something like (from the same source): // Move focus to specific element tinyMCE.init({ ... theme : "advanced", readonly : 1 });
answers question: http://stackoverflow.com/q/25520862
score: 0

http://stackoverflow.com/comment/39860617
comment on: http://stackoverflow.com/a/25515636
score: 0
type: Comment
has text: *Where* do you want to "have the index"? I see you edited your question, which has unfortunately made it less clear. Is `id=1&id=3&id=5` the query string you want to end up with? Since it's a very non-standard format (with duplicate parameters most endpoints will take only the last, i.e. `id=1` and `id=3` will be ignored in favor of `id=5`), so you'll probably have to just build the string manually. I'll update my answer to show how you might do that.
type: AnswerComment

ssl
tags question: http://stackoverflow.com/q/25395520
type: Tag
tags question: http://stackoverflow.com/q/25405493
tag name: ssl
tags question: http://stackoverflow.com/q/25430524
tags question: http://stackoverflow.com/q/25528248

http://stackoverflow.com/q/25499315
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39801807
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25548495
possible better answer: http://stackoverflow.com/a/25499360
favorite count: 0
has answer: http://stackoverflow.com/a/25499360
type: Question
accepted answer: http://stackoverflow.com/a/25548495
has title: Toggle bootstrap navbar using button
has comment: http://stackoverflow.com/comment/39802156
has comment: http://stackoverflow.com/comment/39802167
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
answer count: 3
has comment: http://stackoverflow.com/comment/39801834
upvote count: 1
tagged with: javascript
has body: How to hide navbar while clicking a button? I have tried the following, but it is not working. &lt;b:commandButton value="New User" onclick="$('.nav').toggle();" actionListener="#{loginController.openRegistrionPopup}"/&gt;
has answer: http://stackoverflow.com/a/25500253

http://stackoverflow.com/comment/39607905
comment on: http://stackoverflow.com/q/25394608
score: 0
has text: No, it is where it should be. `MYAPP.modals.Throttling` just dynamically adds a pop up modal to the DOM that the user uses to add settings to Throttling. After they hit Submit and the an API is called, the callback function is executed and that is when `getThrottles` gets called.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25540865
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25540903
has answer: http://stackoverflow.com/a/25541096
has comment: http://stackoverflow.com/comment/39878506
type: Question
downvote count: 4
has answer: http://stackoverflow.com/a/25540909
has title: .text() and .val() in select tag
has body: I have a simple HTML Markup as shown below :- AAA BBB CCC DDD EEE Jquery Code :- $("#select1").change(function(){ $("#t1").val($(this).text()); // 1st }); $("#select1").change(function(){ $("#t2").val($(this).val()); // 2nd }); My Questions :- 1.) When I use 1st jquery code using .text() ,the text of all the options in select tag are shown instead I was expecting that only selected option text should be displayed in 1st jquery code. 2.) When I use 2nd jquery code using .val() ,in this case .val() is working even though I don't expect that it will work because there no values in my dropdown, but it is working and giving selected option text as value. Above written are my two questions.I just want a explanation why above 1st and 2nd jquery code is behaving unexpectedly. Fiddle Link :- http://jsfiddle.net/mzfmxsd8/ Thanks in Advance..!!
score: -2
has answer: http://stackoverflow.com/a/25540975
tagged with: javascript
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/25540936
possible better answer: http://stackoverflow.com/a/25540909
has answer: http://stackoverflow.com/a/25540903
favorite count: 0
has answer: http://stackoverflow.com/a/25540895
upvote count: 2
has comment: http://stackoverflow.com/comment/39878475
has comment: http://stackoverflow.com/comment/39878489

http://stackoverflow.com/a/25546599
type: Answer
accepted answer of: http://stackoverflow.com/q/25545709
answers question: http://stackoverflow.com/q/25545709
has comment: http://stackoverflow.com/comment/39889081
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40222130
has body: just add this function to your code. function anotherTab(title, content) { var label = title || "Tab " + tabCounter, id = "tabs-" + tabCounter, li = $( tabTemplate.replace( /#\{href\}/g, "#" + id ).replace( /#\{label\}/g, label ) ), tabContentHtml = content || "Tab " + tabCounter + " content."; tabs.find( ".ui-tabs-nav" ).append( li ); tabs.append( " " + tabContentHtml + " " ); tabs.tabs( "refresh" ); tabCounter++; } Now if you need a new tab instantly - you put anotherTab('Tab Name', 'Some content here.'); in your test function - BUT you need to put ALL your code in the same context to make it work together - do it like this: EDIT. Ok - so if you need a global scope - the code would be something like this below:
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25454674
downvote count: 0
has comment: http://stackoverflow.com/comment/39719739
score: 20
type: AcceptedAnswer
has body: For the requirements you mentioned, the best solution is browserify (or similar). Using reactify transform you can have the JSX to JS happen all in one step. Browserify (and Webpack) are very common the react community, so nearly all libraries are published to npm for easy consumption. Browserify packs your JavaScript, your React version of choice, and any libraries into a single JS file which doesn't use globals or other patterns that conflict with other code running on the page. You can also look into some libs like react-css to isolate your styles from the page styles. The styles will also be isolated in your bundle. Of course if the page does something like div {margin: 1em}, the only solutions are iframes or web-components.
type: Answer
accepted answer of: http://stackoverflow.com/q/25454029
has comment: http://stackoverflow.com/comment/75636787
answers question: http://stackoverflow.com/q/25454029
upvote count: 20
has comment: http://stackoverflow.com/comment/46342905

http://stackoverflow.com/a/25497547
answers question: http://stackoverflow.com/q/25497530
type: AcceptedAnswer
downvote count: 0
has body: Passing variables into a module to localize them will yield faster lookup times, if I am not mistaken, since they are in local scope. In addition, it ensures that $ is indeed the jQuery library. It protects the $ from being tainted by another use.
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25497530
has comment: http://stackoverflow.com/comment/39798805
has comment: http://stackoverflow.com/comment/39798843

http://stackoverflow.com/q/25541441
has title: Removing all html tags except for html with specific class using regex
tagged with: javascript
has comment: http://stackoverflow.com/comment/39879382
score: 0
has body: I have this test string @test@test @test @test2@test @test test@test.com Test @test.com dsfsfdsdfsdfs asdf test f And I was hoping to remove all tags whilst leaving their content EXCEPT the span with class mention.. In order to be left with the following: @test@test @test @test2@test @test test@test.com Test @test.com dsfsfdsdfsdfs asdf test f This is far as I got but it still doesn't work correctly /(?!<span class="mention".*?<\/span>)(<([a-z]*)>(.[^<>]*|)<(\/[a-z]*)>)/g Any help would be appreciated!
answer count: 2
possible better answer: http://stackoverflow.com/a/25543685
upvote count: 1
has answer: http://stackoverflow.com/a/25543685
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25541831
accepted answer: http://stackoverflow.com/a/25541831
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39879377
linked to: http://stackoverflow.com/q/1732348
type: Question

http://stackoverflow.com/q/25474525
tagged with: javascript
tagged with: extjs
score: 0
type: UnansweredQuestion
type: Question
has title: Parsing jsonstore content
has body: The data loaded by jsonstore is as follows: "[{"Year":"2014","Total":"5.6","Rank":"6","Share":"6"}, {"Year":"2013","Total":"5.6","Rank":"6","Share":"6"}, {"Year":"2014","Total":"5.6","Rank":"6","Share":"6"}, {"Year":"2013","Total":"5.6","Rank":"6","Share":"6"}]" We needed to iterate the response: FeesByProduct_store = new Ext.data.JsonStore({ root: 'list', url: '...............', fields: FeeByProduct, listeners: {load: function(store) { //create a json object from the response string var res = Ext.encode(Ext.pluck(store.data.items, 'data')); // if we have a valid json object, then process it if(res !== null &amp;&amp; typeof (res) !== 'undefined'){ // loop through the data Ext.each(res, function(obj){ //add the records to the array if (obj != null) { ... } }); } } } }); However,on iterating - 'obj' contains the entire value of the response rather than each row at a time. What is being done wrong here?
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25475420
answer count: 1

http://stackoverflow.com/a/40033606
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/117905618
upvote count: 1
answers question: http://stackoverflow.com/q/25517201
has body: 1) install dom-event-listener as for: https://www.npmjs.com/package/dom-event-listener 2) in main.js add something like: var domEventListener = require('dom-event-listener'); var element = document.getElementById('my-button'); domEventListener.add(element, 'click', function(event) { console.log(event); });

http://stackoverflow.com/comment/39868609
has text: @user1471980 Your original code runs both at the same time.
comment on: http://stackoverflow.com/a/25532953
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39818443
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25488585
has text: as per your suggestion i have created the div id in html as "content" in below find my code for your reference: chrome.app.window.create('Printwindow.html', function(_win) { _win.contentWindow.document.querySelect('#content').innerHTML = " whatever html you want goes here "; _win.contentWindow.print(); });but error is found like undefined is not a function.

http://stackoverflow.com/comment/139834771
has text: This doesn't work for dates
type: AnswerComment
comment on: http://stackoverflow.com/a/25456134
score: 0
type: Comment

http://stackoverflow.com/q/25525634
tagged with: javascript
tagged with: file-upload
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25592593
tagged with: form-data
upvote count: 6
score: 6
type: AnsweredQuestion
has title: AngularJS file upload sends stale formData
has body: I use https://github.com/nervgh/angular-file-upload for file uploads. I have a form which, in addition to uploading a file, sends some other fields. For clarity, I send only one field in this example: $scope.save_with_upload = function(user) { $scope.uploader.formData = [{ name: user.name, }]; $scope.uploader.uploadAll(); } Let’s say the value of the name input is Test 1. When I first load the page and click Save, it sends the file but doesn’t send formData at all. Then I change name field to Test 2 and hit Save. It sends the file and formData, but the value of name it sends is Test 1. Then I change name field to Test 3 and hit Save. It sends the file and formData, but the value of name it sends is Test 2. … and so on … So it seems to always send the data that was assigned to formData before the last call to uploadAll. To clarify: If I do dir(user, $scope.uploader.formData) just before calling uploadAll, it shows correct up-to-date values in both. I’ve been struggling with it for a few hours and just can’t seem to see what’s wrong. Any ideas?
type: Question
accepted answer: http://stackoverflow.com/a/25592593
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25442457
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25442502
has title: Regular expressions - find all linebreaks not after a ","
answer count: 1
downvote count: 0
favorite count: 0
has body: This regex drive me crazy... can you help me? I need a Regex that find all line breaks, if there are not after a comma. I tried this: ((?!\,)\n) But he match all line breaks. What I want to do this: Transform a JSON (String with line breaks) [ { "username": "tim", "comment": "you doing a great job!" }, { "username": "tim", "comment": "when you have new workshoppers?" } ] to: [ { "username": "tim", "comment": "you doing a great job!" }, { "username": "tim", "comment": "when you have new workshoppers?" } ] So I tried to replace all line breaks not after a "," with "".
tagged with: regex
has answer: http://stackoverflow.com/a/25442502

http://stackoverflow.com/q/25487547
has comment: http://stackoverflow.com/comment/39779714
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39779788
has answer: http://stackoverflow.com/a/25487738
has title: have to Change click event mouse in mouse out event
type: Question
has body: With below script written for click event. I want to use Same code(selectors) for Mouse in, mouse out event $('.tools_collapsed').wrap('&lt;div class="newparent" /&gt;'); var speed = 600; $('.tools_collapsed').show().css({ right: '-250px' }).hide(); $('.tools_collapsed .collapse_btn').hide(); $('.tools_expand').click(function () { $('.tools_collapsed').show().animate({ right: '0' }, { duration: speed }); $('.tools_collapsed .collapse_btn').show(); }) $('a.collapsed').click(function () { $('.tools_expand').css({ display: 'none' }); $('.tools_collapsed').animate({ right: '-250', easing: 'easeOutQuad' }, 400, function () { $('.tools_collapsed .collapse_btn').css("display", "none"); $('.tools_expand').show("normal"); }); }) }
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/25487648
has comment: http://stackoverflow.com/comment/39779634
has comment: http://stackoverflow.com/comment/39779778

http://stackoverflow.com/q/25526854
has comment: http://stackoverflow.com/comment/39852667
has answer: http://stackoverflow.com/a/25527097
has comment: http://stackoverflow.com/comment/39852745
has answer: http://stackoverflow.com/a/25527093
has answer: http://stackoverflow.com/a/25527303
type: Question
upvote count: 2
possible better answer: http://stackoverflow.com/a/25526923
tagged with: unobtrusive-javascript
tagged with: javascript
has comment: http://stackoverflow.com/comment/39880056
has comment: http://stackoverflow.com/comment/39853150
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25527881
has comment: http://stackoverflow.com/comment/39875488
favorite count: 0
has body: Is there a preferred way or advantages to using one over the other ? i.e. You can have a hyperlink a where the href points to # with a class or id and then javascript that looks for that elements on-click event. You can have a simple div or span that has a class or id and bind the javascript on-click to that element. I have seen both done. Context is ruby on rails applications that are using javascript for some functionality.
answer count: 5
has title: Use tags or any tags for javascript links?
linked to: http://stackoverflow.com/q/1357118
has comment: http://stackoverflow.com/comment/39852511
tagged with: ruby-on-rails
linked to: http://stackoverflow.com/q/1291942
accepted answer: http://stackoverflow.com/a/25527303
has comment: http://stackoverflow.com/comment/39854612
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25526923
downvote count: 0

http://stackoverflow.com/q/25441545
has comment: http://stackoverflow.com/comment/39694102
answer count: 3
has comment: http://stackoverflow.com/comment/39694092
tagged with: regex
has comment: http://stackoverflow.com/comment/39694001
has answer: http://stackoverflow.com/a/25441587
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has body: I use this regex for my email validation /.+@.+\..+/i I can't get it to work on my server side though. I tried this so far var pattern = @"^.+@.+\..+i$"; var pattern = @".+@.+\..+i"; I get 0 results trying it (also in my code). Any ideas? Not sure if it helps but the requirement is to allow a@b.c so 1 char, one @ and at least one '.'.
linked to: http://stackoverflow.com/q/46155
accepted answer: http://stackoverflow.com/a/25441587
type: Question
tagged with: c#
possible better answer: http://stackoverflow.com/a/25441637
has answer: http://stackoverflow.com/a/25441637
tagged with: javascript
has title: Issues with my regex in c#, works with javascript
has comment: http://stackoverflow.com/comment/39694028
has comment: http://stackoverflow.com/comment/39694067
favorite count: 0
has answer: http://stackoverflow.com/a/25441653
score: 0

http://stackoverflow.com/a/25402546
answers question: http://stackoverflow.com/q/25402444
upvote count: 2
has body: When hovering, the CSS is adding a 2px border - this means it is having to find space for 4px total (top to bottom) and another 4px (left and right). The flickering is caused by your elements being shifted slightly to accommodate the extra pixel space required. There are two alternative ways to fix this: 1) Use 'outline' instead of 'border' 2) Set an identical but transparent border on your elements so that when you hover, only the colour of the border is changing
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/39648794
score: 1
has text: The short answer is you can't. Javascript runs client side (unliess you're using something like node.js) while C#/ASP.net runs serverside. You need something to bridge the gap like AJAX and webservices.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25416620

http://stackoverflow.com/comment/39839092
type: Comment
comment on: http://stackoverflow.com/q/25519023
type: QuestionComment
has text: I'm focusing on the "used to work" part: were there changes in the URL paths, either client-side or server-side? Did you switch from HTTP to HTTPS, or the inverse?
score: 0

http://stackoverflow.com/a/25473292
upvote count: 1
downvote count: 0
has body: The thing you're asking for is simply not possible. JavaScript is a client-side scripting language and is interpreted by the browser of the viewer of your animation. This means that, by the nature of the language, the viewer needs the code loaded in his/her browser to view your animation. More in-depth information can be found here: http://computer.howstuffworks.com/javascript.htm The only way you could achieve your goal is by screen capturing the animation, but that would, of course, only work with static animations.
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25473194

http://stackoverflow.com/a/25567437
type: Answer
accepted answer of: http://stackoverflow.com/q/25534532
answers question: http://stackoverflow.com/q/25534532
score: 0
type: AcceptedAnswer
has body: Few solutions. build 2 menus - mobile and desktop (mobile with nolink# for collapse events) this menus dysplays based on screen size Prevent default via JS, but u loss links functional But i recommend build your walker for this menu based on bootstrap. Here the walker https://github.com/twittem/wp-bootstrap-navwalker/blob/master/wp_bootstrap_navwalker.php (About walkers: http://codex.wordpress.org/Function_Reference/wp_nav_menu)

http://stackoverflow.com/a/25495239
answers question: http://stackoverflow.com/q/25495172
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25495172
type: Answer
upvote count: 1
has body: Your onclick isn't actually using the function you define within it. You can make it work (on IE9+ and other modern browsers) like this: onclick="event.stopPropagation();" Note that that isn't a function, it's the contents of a function. DOM0 onXyz handlers essentially boil down to this: theElement.onclick = function(event) { // ...your onclick content here }; So you can see why your code wasn't working: theElement.onclick = function(event) { function handler(event) {event.stopPropagation();} }; But as you're using jQuery, your better bet would be to not use onXyz attributes at all, and instead hook up your handler in a modern way: $(".carousel-caption").on("click", function(e) { e.stopPropagation(); // do your thing here });
score: 1

http://stackoverflow.com/a/25527917
answers question: http://stackoverflow.com/q/25527720
has body: The CSS given in the style attribute on an element always wins over the stylesheets. The best option to override this CSS is to edit the style attribute using some JS: &lt;script&gt; function clearInlineStyling(element){ element.style= null; } &lt;/script&gt; Next you have to watch the html for your script to add new elements, find them and remove their styling. I would suggest JQuery for this.
score: 0
type: Answer

http://stackoverflow.com/comment/39647489
has text: Aslo inspect the HTML rendered to the page/update panel (use dev tool in Chrome or Firebug for Firefox) and check for ID mangling if you're using ID's for your jQuery hooks.
score: 0
comment on: http://stackoverflow.com/q/25415637
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25410149
has comment: http://stackoverflow.com/comment/39641110
score: 1
has comment: http://stackoverflow.com/comment/39641518
has body: There's a fair bit in your custom elements that you don't need at all. I did a rewrite over at http://jsbin.com/rijezabapuwe/1/edit but the gist is to not style with JS, use styling with the :host and ::content shadow dom selectors. That immediately removes any need for the ready function that you were using, so turns your elements into noscript elements instead.
accepted answer of: http://stackoverflow.com/q/25409761
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39650458
answers question: http://stackoverflow.com/q/25409761
has comment: http://stackoverflow.com/comment/39640964
has comment: http://stackoverflow.com/comment/39641658
downvote count: 0
has comment: http://stackoverflow.com/comment/39641566
has comment: http://stackoverflow.com/comment/39641738
has comment: http://stackoverflow.com/comment/39641487
type: AcceptedAnswer

http://stackoverflow.com/comment/39818835
has text: I'm fairly sure a brilliant mind like yourself can work around that :) In reality, it will be set by the time Firebase has initialized a connection, so if you have some data to compare it to, you'll have an offset.
score: 2
comment on: http://stackoverflow.com/a/25491860
type: AnswerComment
type: Comment

highest
tag name: highest
tags question: http://stackoverflow.com/q/25472117
type: Tag

http://stackoverflow.com/comment/39975141
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25575657
type: Comment
has text: So that means there are multiple rows with the same name. Do you want this? @Mahir

createjs
tags question: http://stackoverflow.com/q/25415450
tags question: http://stackoverflow.com/q/25548233
tags question: http://stackoverflow.com/q/25410189
type: Tag
tag name: createjs

http://stackoverflow.com/a/25434216
type: Answer
has body: jsReturnValue="The Return Value From Your JS Script" var elems=Array.prototype.slice.call(document.querySelectorAll('.hourlyChartPeriod')); var elem=elems.filter(function(e){return e.getAttribute('data-period')===jsReturnValue}); elem.classList.add('newClass') // or you could use jQuery - which I suspect you might be var elems=jQuery('.hourlyChartPeriod'); elems.filter(function(){ return $(this).data('period')===jsReturnValue; }).addClass('yourNewClass');
score: 0
has comment: http://stackoverflow.com/comment/39680791
answers question: http://stackoverflow.com/q/25433983

http://stackoverflow.com/q/25532605
type: Question
has title: Error parsing JSON which starts with "var ..."
accepted answer: http://stackoverflow.com/a/25532643
has body: I got into a little thing while getting a JSON file from a server, the JSON file contains something like this: var reviews = [ { "firstName":"Simon", "lastName":"Lock", "fullName":"Simon Lock", "location":"San Francisco", "reviewTitle":"Super quality.. I will show here again!", "reviewBody":"Super nice quality, fast devilery, good prices. I will shop here again!", "starRating":"5" }, { "firstName":"John", "lastName":"Smith", "fullName":"John Smith", "location":"New York", "reviewTitle":"Princely Sum", "reviewBody":"A decent local curry house in Faversham, Kent known for its Elvis nights.", "starRating":"4" }, ]; And as expected, I get an error while getting the file with $.ajax: SyntaxError: Unexpected token v Since is not a valid JSON format, but I did also try to do it with another kind of dataType. My question is: Is there any way to get that variable in JSON file stored in another variable so it can be manipulated normally? also I did try to use FileReader() but I didn't work for me. thanks
has comment: http://stackoverflow.com/comment/39863244
answer count: 2
upvote count: 1
downvote count: 1
score: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25532643
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39863494
has comment: http://stackoverflow.com/comment/39863459
has comment: http://stackoverflow.com/comment/39863856
tagged with: javascript
has comment: http://stackoverflow.com/comment/39863242
favorite count: 0
possible better answer: http://stackoverflow.com/a/25532847
has comment: http://stackoverflow.com/comment/39863284
has answer: http://stackoverflow.com/a/25532847

http://stackoverflow.com/comment/39804436
has text: CSS doesent help so much. I need the effect to be applied to the canvas so i can export the result into an image format.
comment on: http://stackoverflow.com/a/25500597
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39662530
score: 0
type: AnswerComment
has text: Thank you! That must be the case. Further investigation tells me nothing in my stop-method actually get executed and what you're saying explains why I get errors only in IE and not other browsers.
type: Comment
comment on: http://stackoverflow.com/a/25424582

http://stackoverflow.com/comment/39689182
score: 0
type: Comment
has text: Can you show us your HTML as well for the and contents.
comment on: http://stackoverflow.com/a/25438543
type: AnswerComment

http://stackoverflow.com/a/25483072
upvote count: 2
has comment: http://stackoverflow.com/comment/39771326
score: 2
has comment: http://stackoverflow.com/comment/39774130
answers question: http://stackoverflow.com/q/25482971
downvote count: 0
type: Answer
has body: Wrong jQuery selector $('.button').on('click', function (e) { $('.topcoat-range-input').css('background', 'rgba(255, 208, 255, 0.75)'); }); In your case I would try to override css for this button . .topcoat-range::-webkit-slider-thumb Plain javascript seems to work: for(var j = 0; j &lt; document.styleSheets[1].rules.length; j++) { var rule = document.styleSheets[1].rules[j]; if(rule.cssText.match("webkit-slider-thumb")) { rule.style.backgroundColor="rgba(255, 208, 255, 0.75)"; } }

http://stackoverflow.com/comment/39652618
type: Comment
has text: @BubbaYakoza `var reg= /<\/?script\b[^>]*?>/gi`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25418825

http://stackoverflow.com/q/25405391
answer count: 0
has comment: http://stackoverflow.com/comment/39627431
type: UnansweredQuestion
type: Question
has body: If I have not filled any text box in my Form then i need to move to other page but it Not Allowing me to Move because i have values in Drop down list So when i Try to Move Other Page it is Not allowing me to Move.. it shows Dialog Box Are you want Move? So can i Avoid This Problem if I am having Values in Drop-down list. This Following Code Works Fine If i am Not Having Drop down List in my page $(window).bind('beforeunload', function () { if (formData != $('#formDivision').serialize() &amp;&amp; !isSaved) { return 'There is unsaved data on the page, Are you sure u want to loose these changes.'; } });
has comment: http://stackoverflow.com/comment/39627215
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39627332
score: 0
has title: I am using jquery onbeforeunload function(). It show Dialog box when i Move to other Page If my dropdown list box Contains Values
has comment: http://stackoverflow.com/comment/39627268

http://stackoverflow.com/q/25429235
has comment: http://stackoverflow.com/comment/39673534
favorite count: 0
tagged with: ajax
has title: JQuery .load() does not work
has comment: http://stackoverflow.com/comment/39672783
accepted answer: http://stackoverflow.com/a/25429803
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25430044
downvote count: 1
has answer: http://stackoverflow.com/a/25430044
has comment: http://stackoverflow.com/comment/39671223
type: Question
has comment: http://stackoverflow.com/comment/39673583
has comment: http://stackoverflow.com/comment/39671936
has comment: http://stackoverflow.com/comment/39671282
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25429803
has body: I want to load the content of a webpage in a div. Here's my code: When the this item is clicked, the webpage should be loaded inside the content id: My account JS: $("#menu_top").click(function() { var href = $ (this).attr('href'); alert(href); $("#content").load(href); return false; }); testing.html: SUCCESS! Unfortunately, the above code does not work. I have checked it multiple times but could not find the issue.
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/39671230
tagged with: jquery
has comment: http://stackoverflow.com/comment/39672299

cordova
tags question: http://stackoverflow.com/q/25451795
tags question: http://stackoverflow.com/q/25503139
tags question: http://stackoverflow.com/q/25519290
tags question: http://stackoverflow.com/q/25515497
tags question: http://stackoverflow.com/q/25497299
tags question: http://stackoverflow.com/q/25492678
tags question: http://stackoverflow.com/q/25548461
tags question: http://stackoverflow.com/q/25500450
tags question: http://stackoverflow.com/q/25408257
tags question: http://stackoverflow.com/q/25483587
tags question: http://stackoverflow.com/q/25437419
tags question: http://stackoverflow.com/q/25402949
tags question: http://stackoverflow.com/q/25528109
tags question: http://stackoverflow.com/q/25528248
tags question: http://stackoverflow.com/q/25444913
tags question: http://stackoverflow.com/q/25488284
tags question: http://stackoverflow.com/q/25519327
tags question: http://stackoverflow.com/q/25405605
tags question: http://stackoverflow.com/q/25440678
tags question: http://stackoverflow.com/q/25418878
tags question: http://stackoverflow.com/q/25502598
tags question: http://stackoverflow.com/q/25482705
tags question: http://stackoverflow.com/q/25424378
tag name: cordova
tags question: http://stackoverflow.com/q/25442902
tags question: http://stackoverflow.com/q/25524019
tags question: http://stackoverflow.com/q/25435944
tags question: http://stackoverflow.com/q/25427290
tags question: http://stackoverflow.com/q/25509660
tags question: http://stackoverflow.com/q/25404544
tags question: http://stackoverflow.com/q/25550504
tags question: http://stackoverflow.com/q/25462839
tags question: http://stackoverflow.com/q/25519340
tags question: http://stackoverflow.com/q/25503062
tags question: http://stackoverflow.com/q/25451563
tags question: http://stackoverflow.com/q/25486895
tags question: http://stackoverflow.com/q/25546910
tags question: http://stackoverflow.com/q/25523830
tags question: http://stackoverflow.com/q/25476527
tags question: http://stackoverflow.com/q/25542911
tags question: http://stackoverflow.com/q/25475357
tags question: http://stackoverflow.com/q/25422838
tags question: http://stackoverflow.com/q/25470083
tags question: http://stackoverflow.com/q/25439518
tags question: http://stackoverflow.com/q/25548622
tags question: http://stackoverflow.com/q/25535423
type: Tag
tags question: http://stackoverflow.com/q/25487102
tags question: http://stackoverflow.com/q/25415826
tags question: http://stackoverflow.com/q/25483805

http://stackoverflow.com/q/25392876
tagged with: angularjs
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/25111831
has body: Here is my HTML and JS File HTML file Angular Playground {{message}} Total Length: {{message.length}} JAVASCRIPT FILE var MainController = function($scope) { $scope.message = "Hello, Michael"; }; If I use the latest stable build, then I get the following result (which is obviously correct): Angular Playground Hello, Michael Total Length: 14 However, if I use Beta 18, then I get the following error: Error: [ng:areq] Argument 'MainController' is not a function, got undefined and the page returns the following: Angular Playground #2 {{message}} Total Length: {{message.length}} Any idea, what could be causing this?
upvote count: 24
type: Question
has answer: http://stackoverflow.com/a/25393110
accepted answer: http://stackoverflow.com/a/25393110
score: 24
has comment: http://stackoverflow.com/comment/39604267
has comment: http://stackoverflow.com/comment/39604121
has title: Argument 'MainController' is not a function, got undefined in AngularJS
linked to: http://stackoverflow.com/q/25111831
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/25450687
has answer: http://stackoverflow.com/a/25450816
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25450793
favorite count: 0
has comment: http://stackoverflow.com/comment/39712223
possible better answer: http://stackoverflow.com/a/25450810
has answer: http://stackoverflow.com/a/25450810
has body: I have only just started messing up with Javascript inheritance and can't get my hed round this one: If I run this code: function Foo(y) { this.y = y; } Foo.prototype.x = 1; var Bar1 = new Foo(2); var Bar2 = new Foo(3); I expect to have the following "structure" in memory: I messed up in the graphic, Bar2 obviously has a value of "3" for its property "y" And happily enough, I can confirm that, by running this code: console.log("Prototype - x: ", Foo.prototype.x, " y: ", Foo.prototype.y); console.log("Bar1 - x: ", Bar1.x, " y: ", Bar1.y); console.log("Bar2 - x: ", Bar2.x, " y: ", Bar2.y); which prints: Prototype - x: 1 y: undefined Bar1 - x: 1 y: 2 Bar2 - x: 1 y: 3 Correct me if I'm wrong but what is happening there is that when I try to access the property x in the Bar1 and Bar2 objects, as those objects don't localy have a property called x, I'm getting that property from the next object in the prototype chain; i.e. the one whose reference they store in their "_ proto _" property. Now is when I get lost, because if I after that code I alter the value of x like this: Bar1.x = 10; when I now run console.log("Prototype - x: ", Foo.prototype.x, " y: ", Foo.prototype.y); console.log("Bar1 - x: ", Bar1.x, " y: ", Bar1.y); console.log("Bar2 - x: ", Bar2.x, " y: ", Bar2.y); what I'am getting is Prototype - x: 1 y: undefined Bar1 - x: 10 y: 2 Bar2 - x: 1 y: 3 instead of what I would expect : Prototype - x: 10 y: undefined Bar1 - x: 10 y: 2 Bar2 - x: 10 y: 3 At that moment I could only explain that by assuming that each object was creating a copy of the Foo.prototype object, but if I run this console.log(Object.is(Foo.prototype, Bar1.__proto__), Object.is(Bar1.__proto__, Bar2.__proto__)); I get true true, so both Bar1, Bar2 are accesing the same object. Why is Bar1 then showing a different value for x if they are both getting it from the same object?
score: 6
linked to: http://stackoverflow.com/q/16063394
upvote count: 7
downvote count: 1
has answer: http://stackoverflow.com/a/25450793
has comment: http://stackoverflow.com/comment/39713173
type: AnsweredQuestion
tagged with: prototypal-inheritance
has comment: http://stackoverflow.com/comment/39711084
has comment: http://stackoverflow.com/comment/39711336
tagged with: prototype-programming
has comment: http://stackoverflow.com/comment/39711179
type: Question
answer count: 3
has title: About the prototype object and it's role in Javascript inheritance

http://stackoverflow.com/a/25409526
has comment: http://stackoverflow.com/comment/39635010
score: 0
has body: Your problem has to be somewhat different that you are showing: When I run this code through my console: var k = JSON.parse('{"SomeProperty":"A\u0026B"}') console.log(k); // Object {SomeProperty: "A&amp;B"} everything behaves correctly. Though it looks strange, this is valid JSON: {"SomeProperty":"A\u0026B"}
answers question: http://stackoverflow.com/q/25409426
has comment: http://stackoverflow.com/comment/39635132
type: Answer

http://stackoverflow.com/comment/39759102
comment on: http://stackoverflow.com/q/25476321
score: 0
type: Comment
type: QuestionComment
has text: If the new items have an ID, you could use URL hash strings. Admittedly that's a bit clunky though.

http://stackoverflow.com/comment/39866338
comment on: http://stackoverflow.com/q/25532835
has text: @nojla - That part was understood. What others are asking you is what have you tried so far?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39885684
has text: @DaveA Thank you Dave, you obviously grasped the intent of my answer.
comment on: http://stackoverflow.com/a/25536431
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39873226
type: QuestionComment
has text: The 'error' function passed to $.ajax() receives 3 arguments: ( jqXHR jqXHR, String textStatus, String errorThrown ). Try adding those in and checking their values
score: 0
comment on: http://stackoverflow.com/q/25537634
type: Comment

http://stackoverflow.com/q/25421052
has body: I want to use jQuery datepicker in my Struts app <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags"%> My First JQuery Page <s:form> <s:textfield label="username" name="username" ></s:textfield> <s:password label="password" name="password" ></s:password> <s:textfield label="date" id="datepicker" name="date"></s:textfield> </s:form> Did I miss anything? Why datepicker is not loading?
answer count: 3
has answer: http://stackoverflow.com/a/25440938
downvote count: 1
tagged with: jsp
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39656057
has answer: http://stackoverflow.com/a/25421096
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25423437
has title: Can't get jQuery datepicker in Struts 2
has comment: http://stackoverflow.com/comment/39656298
has answer: http://stackoverflow.com/a/25423437
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39656962
upvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/39656247
accepted answer: http://stackoverflow.com/a/25440938
tagged with: javascript
score: -1
tagged with: struts2

http://stackoverflow.com/q/25401947
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39621018
tagged with: datepicker
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39620652
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25402042
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25402042
has title: document.ready is not working for newly created elements in angularjs
has answer: http://stackoverflow.com/a/25402691
has comment: http://stackoverflow.com/comment/39621619
has body: Following is my jQuery code in the controller which is working fine for the input elements which created when template loads. Now the problem is, I have a drop down and on the basis of option select I am showing a input box for date, however the datepicker is not showing in this case. Let me know what I need to do in this case. I tried and found some solution regarding directive implementation but I am not a seasoned and don't know whether it will going to solve my problem or not. My jQuery code in the controller - angular.module("app").controller("myCtrl", function($scope, userService, $http) { $(document).ready(function(){ /**** Datepicker ****/ if ($('.datepicker').length &amp;&amp; $.fn.datepicker) { $('.datepicker').each(function () { var datepicker_inline = $(this).data('inline') ? $(this).data('inline') : false; $(this).datepicker({ inline: datepicker_inline, formatDate:'Y-m-d' }); }); } /**** Datetimepicker ****/ if ($('.datetimepicker').length &amp;&amp; $.fn.datetimepicker) { $('.datetimepicker').each(function () { var datetimepicker_inline = $(this).data('inline') ? $(this).data('inline') : false; $(this).datetimepicker({ inline: datetimepicker_inline, formatDate:'Y-m-d' }); }); } }); });
accepted answer: http://stackoverflow.com/a/25402691

http://stackoverflow.com/comment/112563751
has text: promise don't give out value, instead you pass in the function that is going to use the value into the promise using `.then()`
score: 0
comment on: http://stackoverflow.com/q/25530263
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25484705
has comment: http://stackoverflow.com/comment/39774415
score: 1
answers question: http://stackoverflow.com/q/25484601
upvote count: 1
has comment: http://stackoverflow.com/comment/39774579
has comment: http://stackoverflow.com/comment/39774395
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25484601
type: Answer
has body: You can accomplish that by assigning a :hover to the table-row, but style the table-cell after it: table tr td { color: grey; } table tr:hover td { color: red; } DEMO

http://stackoverflow.com/q/25497362
tagged with: javascript
score: -4
has comment: http://stackoverflow.com/comment/39798644
has body: Is is possible to make it so that when a user goes on my site and right clicks to view the source code, they are not actually able to edit it. I have it set so that the site broadcasts scores to a php database and I don't want users to be able to edit their scores.
downvote count: 4
has comment: http://stackoverflow.com/comment/39798544
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39798580
has title: Making my source code Read Only
has comment: http://stackoverflow.com/comment/39798613
has comment: http://stackoverflow.com/comment/39798599
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/25497444

http://stackoverflow.com/a/25409269
has comment: http://stackoverflow.com/comment/39638724
has body: The ".onchange" event can only be applied to inputs, plus if you wanted to select the first instance of class name "class1" then you'd have to set your dctitle variable with [0] not [1]. The onchange event will be fired when the user interacts with the field. Here's a working example: HTML: &lt;input class="class1" /&gt; JavaScript: var dctitle = document.getElementsByClassName('class1')[0]; dctitle.onchange = function() { alert("catched"); console.log("catched"); }; Here's a link to JSFiddle: http://jsfiddle.net/Xanco/uzfLug8j/ If you want to read more about the onchange event, you can go to: http://www.w3schools.com/jsref/event_onchange.asp
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39634644
answers question: http://stackoverflow.com/q/25409121

http://stackoverflow.com/comment/39741885
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25466888
type: Comment
has text: there are a lot of scripts to do this, just use Google. If you want to learn the code, you can check theirs so you learn how to apply to your own, or simply use one of the many free available scripts

http://stackoverflow.com/a/25429473
downvote count: 1
has comment: http://stackoverflow.com/comment/134467385
type: Answer
score: 2
has body: Solved it myself using JQuery moment: Created a method to run each JSON date through: function parseJsonDate(jsonDateString) { return moment(jsonDateString).format("D-MMM-YY").toUpperCase(); } And called it when rendering the table: "&lt;td&gt; " + parseJsonDate(auditList[s].Date) + "&lt;/td&gt;" +
accepted answer of: http://stackoverflow.com/q/25426952
answers question: http://stackoverflow.com/q/25426952
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/comment/39735365
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25463466
has text: @soktinpk Can I add multiple files there? since I have a php file as well as html

http://stackoverflow.com/comment/39634580
type: Comment
type: QuestionComment
has text: Nono, they are letters and numbers. I'm in Canada lol
comment on: http://stackoverflow.com/q/25409307
score: 0

http://stackoverflow.com/comment/39738810
type: Comment
has text: @Gordon Do you want to add it as an answer? I will accept it.
type: QuestionComment
comment on: http://stackoverflow.com/q/25454889
score: 0

http://stackoverflow.com/a/25428659
answers question: http://stackoverflow.com/q/25427341
score: 0
type: Answer
has body: you could change the for loop to use the $.each function in jquery to break out from the loop by just returning false. e.g. var arr = ["one", "two", "three", "four", "five"]; $.each(arr, function (index, value) { $('.confirmToast').html("Can't filter your selection").fadeIn(400).delay(3000).fadeOut(400); return false; }); Hope this helps :)

http://stackoverflow.com/q/25489218
has answer: http://stackoverflow.com/a/25489248
has comment: http://stackoverflow.com/comment/39783087
tagged with: javascript
has comment: http://stackoverflow.com/comment/39783019
has answer: http://stackoverflow.com/a/25489254
accepted answer: http://stackoverflow.com/a/25489248
type: AnsweredQuestion
upvote count: 0
tagged with: jquery
favorite count: 0
type: Question
score: -2
has answer: http://stackoverflow.com/a/25489258
has body: $(document).on('click','.edit', function(){ var appid = $(this).getAttribute('value'); I have an img with the class edit, I was wondering how I can store the value of the "value" attribute?
possible better answer: http://stackoverflow.com/a/25489245
has answer: http://stackoverflow.com/a/25489245
downvote count: 2
has comment: http://stackoverflow.com/comment/39783065
has title: How to access value attr from click class
answer count: 4

http://stackoverflow.com/comment/39835429
score: 0
comment on: http://stackoverflow.com/q/25516908
type: Comment
type: QuestionComment
has text: thanks, good one, and very important lesson for the team! :)

http://stackoverflow.com/comment/39847669
score: 0
comment on: http://stackoverflow.com/q/25521552
type: Comment
type: QuestionComment
has text: You could always just use ` ` but then it won't be protocol-less.

http://stackoverflow.com/q/25427290
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1821702
has title: Image map coordinate recalculating
tagged with: imagemap
type: Question
has comment: http://stackoverflow.com/comment/39671682
has comment: http://stackoverflow.com/comment/39670251
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
has body: By developing a Phonegap app in jQuery and jQuery Mobile I ran into this: The app download an image from the server, and it puts into a div. The div's width and height varies depends on the orientation. In landscape mode the image is made smaller to fit into div, and in portrait mode is cut a piece from both side from it to fit into div. In both case the height property of the div is set to 100%, so this would be a fix point by recalculating the coordinates, and not the width of the div. In this topic I found a lib that works, but only for the first time in the program. When I change the orientation, the coordinates aren't good any more. The lib is based on this code: function mapRebuild(scaleValue) { var map = $("map"); map.find("area").each(function() { // select all areas var coords = $(this).attr("coords"); // extract coords coords = coords.split(","); // split to array var scaledCoords = ""; for (var coord in coords) { // rebuild all coords with scaleValue scaledCoords += Math.floor(coords[coord] * scaleValue) + ","; } scaledCoords = scaledCoords.slice(0, -1); // last coma delete $(this).attr("coords", scaledCoords); // set new coords }); } If I want to keep the aspect ratio of the image and want to recalculate the coordinates based on the div's height (in portrait mode 13.9em and in landscape mode 8.8em), what should I do? The original image dimension is 1000px*750px. Edit: I'm listening to the orientationchange event, and there I call the function: function isOrientationPortrait(){ if (screen.height &gt; screen.width){ return true; } else { return false; } } $(window).on('orientationchange', function () { if(isOrientationPortrait()){ //Portrait mode $("#navbarul li img").removeClass("lips_landscape"); $("#imgdiv").removeClass("imgdiv_landscape").addClass("imgdiv_portrait"); $(".ui-grid-c &gt; .ui-block-a, .ui-grid-c &gt; .ui-block-b, .ui-grid-c &gt; .ui-block-c, .ui-grid-c &gt; .ui-block-d").removeClass("navbar_landscape").addClass("navbar_portrait"); $("#ima…
tagged with: cordova
answer count: 0

http://stackoverflow.com/comment/39791528
has text: @MikeBrant Maybe this is the beginning of an auto-complete facility, it's just a WIP.
comment on: http://stackoverflow.com/q/25493492
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25445027
has body: I am using apache httpd server for hosting client side files http://ipaddress:8010/ and my Nodejs server is running on http://ipaddress:8087 when i am sending post request then it shows following error XMLHttpRequest cannot load http://ipaddress:8010/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://ipaddress:8087' is therefore not allowed access. my client side code is : $.ajax({ type: "POST", url: "http://ipaddress:8010", data: {name:"xyz"}, success: function(){ alert("success"); }, dataType: "json" }); my server side is: response.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); response.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type'); response.setHeader('Access-Control-Allow-Credentials', true); options allowed still it is not working can anybody suggest what exactly is the problem? i am receiving request on server side but not able to send any response. thanks in advance :)
upvote count: 6
tagged with: javascript
tagged with: jquery
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/25445211
score: 6
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39700100
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25445054
accepted answer: http://stackoverflow.com/a/25445054
tagged with: post
type: Question
possible better answer: http://stackoverflow.com/a/25445211
has title: XMLHttpRequest cannot load. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access

http://stackoverflow.com/q/25443723
answer count: 1
has title: PrimeFaces 5.0 javascript error - b.debug("PrimeFaces already load
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39699091
favorite count: 0
has answer: http://stackoverflow.com/a/29797458
has comment: http://stackoverflow.com/comment/45029196
tagged with: liferay-6
tagged with: jsf
upvote count: 3
type: UnansweredQuestion
has body: I have got the follow error. Here the source js code: (function(a){if(a.PrimeFaces){b.debug("PrimeFaces already loaded, ignoring duplicate execution.");return}var b={escapeClientId:function(c){return"#"+c.replace(/:/g,"\\:")}... And the error is: undefined is null or not is an object The error refers to debug function of "b" variable. Can anyone help me?
type: Question
score: 3
tagged with: primefaces
has comment: http://stackoverflow.com/comment/44842220
tagged with: jsf-2

http://stackoverflow.com/comment/39728213
has text: it gives TypeError : Number is not a function.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25459430
type: AnswerComment

http://stackoverflow.com/comment/39817609
type: AnswerComment
has text: Thank, Still using 1.7 in my project.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25506359

http://stackoverflow.com/comment/39858919
score: 0
type: Comment
type: QuestionComment
has text: I see the problem with changing from highlight to text colour. I'm having a go at sorting it out.
comment on: http://stackoverflow.com/q/25530182

http://stackoverflow.com/q/25476319
has answer: http://stackoverflow.com/a/25476382
linked to: http://stackoverflow.com/q/11571098
score: -1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25476357
tagged with: javascript
has body: My website is a parallax one page scrolling website, so all my nav links are directed to ids nested within that page... For example: Home Work About Contact So How would I tell my html that when someone clicks on one of these links and directs them to the corresponding ID on the page, to take on the class active? And the link that was active to turn back to the regular styling?
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has title: Apply the class "active" to nav links when clicked?
has answer: http://stackoverflow.com/a/25476430
has comment: http://stackoverflow.com/comment/39759439
tagged with: css
upvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39663215
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25424848
type: Comment
has text: Do you have access to [The Aven" "gers [720p, DVDRIP] as a string??

http://stackoverflow.com/comment/39789387
score: 1
has text: Use `onkeyup` event. http://stackoverflow.com/questions/3396754/onkeypress-vs-onkeyup-and-onkeydown
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25492395

http://stackoverflow.com/comment/39755110
score: 0
type: QuestionComment
type: Comment
has text: when i scroll down and the header becomes fixed it bounces around as I keep scrolling. Oddly enough, I don't have the same problem scrolling back up & down after I have scrolled past it as long as I have stopped the original scroll and started a new one. I should have mentioned that this doesn't happen in FireFox, just chrome.
comment on: http://stackoverflow.com/q/25473732

http://stackoverflow.com/q/25530800
linked to: http://stackoverflow.com/q/24074694
favorite count: 0
has comment: http://stackoverflow.com/comment/39862184
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39860128
has comment: http://stackoverflow.com/comment/39861543
score: 2
tagged with: frameset
downvote count: 0
tagged with: iframe
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/39860496
has comment: http://stackoverflow.com/comment/39869097
has comment: http://stackoverflow.com/comment/39862028
has body: I have a page that uses an iframe. Underneath that there is a frameset which has two frames. One of the frame id is myframeid. Here is the code snippet. This is working on IE 11 but not working on google chrome version 36. Working as in when I click on the button using IE 11 browser, the function works. but not in google chrome. I think the google chrome doesn't like the below code. window.myframeid.location.href = '/code/cgi/bin'; Any ideas why? Thank you!
tagged with: javascript
has answer: http://stackoverflow.com/a/25531291
upvote count: 2
has title: window.myframeid.location.href is not working on google chrome
answer count: 1
has comment: http://stackoverflow.com/comment/39860387

http://stackoverflow.com/comment/39796600
type: Comment
comment on: http://stackoverflow.com/a/25496243
has text: @canon Neither does your answer. The OP wants to target child elements with class `bar`.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39841900
type: AnswerComment
comment on: http://stackoverflow.com/a/25520658
type: Comment
has text: Is there any necessary to modify my function in the controller? I want to submit the form to save the post data without refresh my current page.
score: 0

http://stackoverflow.com/q/25429800
answer count: 1
favorite count: 0
has title: I am able to re-use the same tracking ID of Google Analytics on other website
accepted answer: http://stackoverflow.com/a/25429845
type: AnsweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25429845
has body: I am using Google Analytics to track traffic and page views on my website. The thing that is weird is that I copied the code (JS) to another website with another domain name and it started tracking that other website. When it is not supposed too... Is there a way to limit my Google Analytic tracking ID to only track only one website?
type: Question
tagged with: google-analytics
tagged with: javascript
upvote count: 2

http://stackoverflow.com/a/25459472
upvote count: 1
answers question: http://stackoverflow.com/q/25455737
has comment: http://stackoverflow.com/comment/39733422
downvote count: 0
type: Answer
has body: QtWebKit (part of Qt, which has Python bindings available - search for PySide or PyQt) has a very full-featured Web display engine that supports style sheets. You can display a web page within a python application and change its style sheet dynamically in response to user input.
score: 1

http://stackoverflow.com/a/25418120
score: 0
has body: There are a few ways to do it but this should be pretty easy. First I move your current validation process into a function that you can call like var validate = function (){ //... code goes here .... } then in your onclose: just call that function. Should be pretty straight forward
answers question: http://stackoverflow.com/q/25401695
type: Answer

http://stackoverflow.com/comment/39605288
comment on: http://stackoverflow.com/q/25393287
has text: It's just better practice since it limits the scope of your selector to the view's element instead of the entire page. You could try using the `on` method as it's used in this example: http://emberjs.com/guides/cookbook/user_interface_and_interaction/focusing_a_textfield_after_its_been_inserted/
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25397732
tagged with: javascript
tagged with: jquery
answer count: 6
possible better answer: http://stackoverflow.com/a/25397810
has answer: http://stackoverflow.com/a/25397787
has answer: http://stackoverflow.com/a/25398084
has comment: http://stackoverflow.com/comment/39613328
has comment: http://stackoverflow.com/comment/39613036
downvote count: 0
accepted answer: http://stackoverflow.com/a/25398052
favorite count: 0
tagged with: html-select
has comment: http://stackoverflow.com/comment/39613396
has answer: http://stackoverflow.com/a/25397810
has answer: http://stackoverflow.com/a/25398052
type: AnsweredQuestion
has title: how to find the latest selected item of a multiple select tag using jquery?
has answer: http://stackoverflow.com/a/25398803
has body: I have a &lt;select multiple="multiple" id="multi"&gt; in my website, and I have a script in jquery that has this function: $("#multi").on("change",function(){}) I want to access the latest selected item of the select in this function(the last one selected by user), how can I do that?
type: Question
score: 5
has answer: http://stackoverflow.com/a/25398216
upvote count: 5

http://stackoverflow.com/q/25477420
linked to: http://stackoverflow.com/q/1303646
has answer: http://stackoverflow.com/a/25477591
has comment: http://stackoverflow.com/comment/39761347
has body: So, I need a function to check if the rules I've made apply to the options I have in my form. The first box is a name box and it needs to have at least three letters and contain at least one whitespace to pass. The other box is age, it needs to have a number between 1 and 125, I can do that on my own but I'm thinking there might be a nice way to set all of the rules at once so I thought I'd include it. The third option is a set of three radio buttons of which one has to be selected and the fourth box is an info box that should consist of a text with at least 30 letters. These rules should be checked on the press of a button, this is how far I've gotten on my own: var sendButton = $("button:first").addClass("sendButton"); var age = document.getElementsByName('age')[0].value; sendButton.click(function(){ var infoName = document.getElementsByName('infoName')[0].value; if (infoName.length<3){ console.log("Your name must consist of at least three letters and contain a whitespace"); }; } }); Contact us Form Ditt namn: Din ålder: Choose your favorite HTML JavaScript CSS Info about you: Send
tagged with: forms
has comment: http://stackoverflow.com/comment/39761263
type: Question
has comment: http://stackoverflow.com/comment/39761392
has comment: http://stackoverflow.com/comment/39761307
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39761375
score: 0
tagged with: validation
answer count: 1
has comment: http://stackoverflow.com/comment/39761201
has title: Setting rules on a form
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39640756
type: Comment
has text: look at the reduce function, awesome for this use case.
type: QuestionComment
comment on: http://stackoverflow.com/q/25412438
score: 1

http://stackoverflow.com/a/25419111
answers question: http://stackoverflow.com/q/25418627
type: Answer
has body: Use this DOM &lt;input type='text' onkeypress='validate(event)' /&gt; And this script function validate(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /[0-9]|\./; if( !regex.test(key) ) { theEvent.returnValue = false; if(theEvent.preventDefault) theEvent.preventDefault(); } } Hope it Helps
score: 0

http://stackoverflow.com/q/25424602
has answer: http://stackoverflow.com/a/25424692
favorite count: 0
has comment: http://stackoverflow.com/comment/39663015
has answer: http://stackoverflow.com/a/25425992
answer count: 9
has title: How to generate two different random numbers?
has answer: http://stackoverflow.com/a/25424785
has answer: http://stackoverflow.com/a/25424788
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25424751
has answer: http://stackoverflow.com/a/25425190
linked to: http://stackoverflow.com/q/25272799
possible better answer: http://stackoverflow.com/a/25424785
has comment: http://stackoverflow.com/comment/39663022
downvote count: 1
type: Question
score: 14
tagged with: algorithm
has body: I need to generate two different random numbers, they can't be equal to each other or to a third number. I tried to use a lot of if's to cover every possibility but, it seems my algorithm skills are not that good. Can anyone help me on this? var numberOne = Math.floor(Math.random() * 4); var numberTwo = Math.floor(Math.random() * 4); var numberThree = 3; // This number will not always be 3 if((numberOne == numberThree) &amp;&amp; (numberOne + 1 &lt; 3)) { numberOne++; } else if ((numberOne == numberThree) &amp;&amp; (numberOne + 1 == 3)) { numberOne = 0; } if ((numberOne == numberTwo) &amp;&amp; (numberOne+1 &lt; 3)) { if (numberOne+1 &lt; 3) { numberOne++; } else if(numberThree != 0) { numberOne = 0; } } This is what I have so far, the next step would be: if (numberTwo == numberThree) { (...) } Is my line of thought right? Note: Numbers generated need to be between 0 and 3. Thanks in advance.
tagged with: javascript
upvote count: 15
tagged with: random
has comment: http://stackoverflow.com/comment/39662615
has answer: http://stackoverflow.com/a/25424770
has answer: http://stackoverflow.com/a/58657109
has answer: http://stackoverflow.com/a/25426091
has answer: http://stackoverflow.com/a/25424751
has comment: http://stackoverflow.com/comment/39815595

http://stackoverflow.com/a/25502256
upvote count: 2
has body: No need of saying each, just say .click it will apply for every button $('button').click(function(){ $('input[type="text"]').val(0); }); DEMO
answers question: http://stackoverflow.com/q/25502206
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/comment/39732553
has text: ember, backbone keep your your code clean and avoids spaghetti code (usually seen in javascript) through the mvc(mv*) pattern .jasmine is a unit testing framework that allows you to unit test whatever you develop using these frameworks.
comment on: http://stackoverflow.com/q/25461897
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25548501
downvote count: 0
has answer: http://stackoverflow.com/a/25548623
favorite count: 0
tagged with: regex
has comment: http://stackoverflow.com/comment/39892735
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25548670
score: 2
has answer: http://stackoverflow.com/a/25548721
has answer: http://stackoverflow.com/a/25548751
upvote count: 2
has title: javascript regular expression - removing comments
type: Question
has body: The example is from eloquent javascript book.Although There's a little explanation in the book it's really hard to follow, can anyone explain it from beginner perspective.I am having hard time to follow which slash is for what. function stripComments(code) { return code.replace(/\/\/.*|\/\*[^]*\*\//g, ""); }
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25548670
possible better answer: http://stackoverflow.com/a/25548623

http://stackoverflow.com/a/25435705
has body: Build your route like you currently are .when('/token/:token', {templateUrl : 'views/select-token.html', controller : 'selectToken' }) Then in your controller inject in $routeParams and you will be able to access your route parameter .controller('selectToken', function($scope, $routeParams){ $scope.token = $routeParams.token }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25434358
has comment: http://stackoverflow.com/comment/39684540

http://stackoverflow.com/comment/39631938
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25407880
has text: Also make sure you properly declare local variables (well, global ones too) with `var`. Add `"use strict";` as the very first line of "motion.js" and the browser will yell at you appropriately when you've forgotten to declare variables.

http://stackoverflow.com/comment/39805265
type: Comment
type: AnswerComment
has text: I am so sorry but I cannot understand that. I am not so programmer and just combining js codes from tutorials.
score: 0
comment on: http://stackoverflow.com/a/25500291

http://stackoverflow.com/a/25491878
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39788977
has comment: http://stackoverflow.com/comment/39818266
type: Answer
has body: ShaneQful's answer is good but it can be further simplified. Less code and no state. var result = path.split('/').reduce(function (result, key) { return key ? result[key] : result; }, table); Note Lo-Dash or Underscore can be used instead of the native reduce.
score: 2
has comment: http://stackoverflow.com/comment/39804538
answers question: http://stackoverflow.com/q/25491461

http://stackoverflow.com/q/25507023
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39816787
has comment: http://stackoverflow.com/comment/39816709
linked to: http://stackoverflow.com/q/18244696
has comment: http://stackoverflow.com/comment/39816356
has comment: http://stackoverflow.com/comment/39816336
tagged with: web-services
has comment: http://stackoverflow.com/comment/39816319
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25507136
accepted answer: http://stackoverflow.com/a/25508919
has answer: http://stackoverflow.com/a/25507148
score: 0
has answer: http://stackoverflow.com/a/25507136
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/8405458
has comment: http://stackoverflow.com/comment/39816678
tagged with: javascript
has comment: http://stackoverflow.com/comment/39821491
has body: I am trying to call webservice method from Jquery ajax. Here is my jquery code, function abc() { alert(""); $.ajax({ type: "Get", url: "abc.asmx/HelloWorld", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", error: function (errorThrown) { console.log(errorThrown.d); alert(errorThrown + "what's wrong?"); }, success: function (msg) { console.log(msg.d); alert(msg.d); return false; // Do something interesting here. } }); return false; } and my web method is following, [WebMethod] public string HelloWorld() { return "Hello World"; } the jquery error event is keep occuring. Not sure why it's happening any help will be appreciated thanks
answer count: 3
has comment: http://stackoverflow.com/comment/39816528
has answer: http://stackoverflow.com/a/25508919
has title: jquery ajax call to asp.net webservice
tagged with: jquery
tagged with: asp.net
linked to: http://stackoverflow.com/q/211348

http://stackoverflow.com/a/25458450
type: Answer
has body: Since you give us no information other than this one URL, you can do it very naively by simply: &gt; var uri = 'http://wallpapers.wapego.net/main.php?ses=SuNpnTR5PRYTkYXYN3syARtUHN7&amp;f=3153038' &lt; undefined &gt; var foo = uri.split('&amp;f=')[1] &lt; undefined &gt; foo &lt; "3153038"
score: 0
answers question: http://stackoverflow.com/q/25458379

http://stackoverflow.com/q/25439045
score: 6
has title: Regex - replace all odd numbered occurrences of a comma
accepted answer: http://stackoverflow.com/a/25441882
tagged with: regex
has comment: http://stackoverflow.com/comment/39689787
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25439115
has comment: http://stackoverflow.com/comment/39689696
upvote count: 7
has answer: http://stackoverflow.com/a/25439163
possible better answer: http://stackoverflow.com/a/25439115
downvote count: 1
has body: If I have a string formatted like this: "name", "bob", "number", 16, "place", "somewhere" And I want, instead, to have a string like this: "name": "bob", "number": 16, "place": "somewhere" Also, the test cases do have some examples of strings like this: "name", "bob", "hello, world", true That would need to be formatted like this: "name" : "bob", "hello, world" : true ...with every odd comma being replaced by a colon (so long as that comma falls outside of quotes), how on Earth would I do that via regex? I've found the following regex via Google: /(,)(?=(?:[^"]|"[^"]*")*$)/,':' , which matches the first comma instance. How do I alternate every other one from there on out? Edit for more info: What I'm trying to do is take this string where each value is delineated by a comma and format it like a JS object using .replace(). So, in this case, "name", "number" and "place" represent key values. They're not fixed, this is simply an example.
type: Question
has answer: http://stackoverflow.com/a/25440462
has comment: http://stackoverflow.com/comment/39689717
has comment: http://stackoverflow.com/comment/39689778
tagged with: javascript
has answer: http://stackoverflow.com/a/25440241
answer count: 6
has comment: http://stackoverflow.com/comment/39689706
has answer: http://stackoverflow.com/a/25441882
has answer: http://stackoverflow.com/a/25439108
has comment: http://stackoverflow.com/comment/39689702
has comment: http://stackoverflow.com/comment/39706388
has comment: http://stackoverflow.com/comment/39689822
favorite count: 0
has comment: http://stackoverflow.com/comment/39689691
has comment: http://stackoverflow.com/comment/39689705

http://stackoverflow.com/comment/39868500
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25413828
has text: @StickFigs, I tried Alex's Plunkr and was not able to paste any caps. Please take me through your work. The downside is it DOES NOT ALLOW any characters that are lower case to be pasted either. Can both of you confirm what I see? If so, LMK if this works for OP or not.

http://stackoverflow.com/comment/39895368
score: 0
has text: Are you using any library?
comment on: http://stackoverflow.com/q/25550170
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25536225
type: Answer
accepted answer of: http://stackoverflow.com/q/25536180
answers question: http://stackoverflow.com/q/25536180
has body: I'd check to see how big a memory hit this is with a real data set and see if it would tax the resources available to most mobile devices. My first thought would be 100 rows of data, with 100 columns each of 100 byte strings, would mean ~1MB of RAM per tab. Even my old phone would have enough RAM to handle that. "Dangerous"? What can they do to manipulate that data in harmful ways?
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25489937
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/39784566
tagged with: http://stackoverflow.com/tag/html
has body: I want to be able to run a grunt task in a directory of my site and be able to output the external CSS and JS (from CDN) directly in a new .html page. Basically, I want to quarantine the page from my other includes so I can move the file around or host it somewhere else. Is there a grunt task for this? Or will I have to WGET all the files and combine them manually or through a secondary grunt task?
type: Question
has comment: http://stackoverflow.com/comment/39784461
score: 0
tagged with: wget
answer count: 0
has title: Download contents of webpage, including external assets, with grunt
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/25530985
possible better answer: http://stackoverflow.com/a/25531083
accepted answer: http://stackoverflow.com/a/25553582
tagged with: css
type: AnsweredQuestion
tagged with: cookies
score: 0
has answer: http://stackoverflow.com/a/25553582
type: Question
answer count: 2
tagged with: javascript
has body: here is an interesting question. I have a navigation bar that looks like this: &lt; div id = "main_nav" &gt; &lt; ul &gt; &lt; li id = "Tab1" &gt; Home &lt; / li &gt; &lt; li id = "Tab2" &gt; Home1 &lt; / li &gt; &lt; li id = "Tab3" &gt; Home2 &lt; / li &gt; &lt; li id = "etc" &gt; etc etc &lt; / li &gt; ... &lt; / ul &gt; &lt; / div &gt; So the #main_nav has fixed width of 980px with overflow hidden and tabs are inline block. When the screen width decreased in size, the tabs are overflowing and are beyond the screen view, thous are hidden. To make it fun, I created a property to catch the last tab and see if it is overflowing, if it does, fire the event so the tab changes the from block to something else like responsive design. Here is the code: $( window ).on( 'resize', function(){ resize(); } ); function resize() { var pageWidth = $ ( "#main_nav" ).width(); var elementWidth = $ ( "#tab14" ).width(); var elementLeft = $ ( "#tab14" ).position().left; if ( pageWidth - ( elementWidth + elementLeft ) &lt; 0 ) { $ ( 'ul &gt; li' ) .css ( { 'float': 'left' } ); } else { $ ( 'ul &gt; li' ) .css ( { 'float': '' } ); } } The problem: The tabs starts flickering as it checks if #tab14 is overflown and on refresh you need to resize window to get to that state. The question: 1. Not related to the issue but, what is a good Jquery counter to find the number of the last tab automatically and fill in to the $("#tab NUMBER?").width(); To avoid flickering, I tried the Timer, none worked. Do any of you know how to Save a Cookie of the Screen Width when the Tab event (tab overflowing) fired? So I can fire the else event only after that screen width reached to return tab to its original shape. Your input is very appreciated! Thank you.
tagged with: jquery
has answer: http://stackoverflow.com/a/25531083
has title: JQuery - Responsive Navigation on tab Overflow using cookies and Window width
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25442415
tagged with: composer-php
tagged with: symfony
has body: With Composer I can simply autoload vendors, can I autoloading bower components in my HTML page like Symfony framework autoload with Composer? I need to autoload next dependencies from bower.json: "dependencies": { "jquery": "~2.1.1", "bootstrap": "~3.2.0", "ckeditor": "~4.4.4" }
tagged with: autoload
upvote count: 1
has title: How can I autoloading Bower dependencies like with Composer?
accepted answer: http://stackoverflow.com/a/25443065
tagged with: bower
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25443065

http://stackoverflow.com/q/25485885
has body: I'm using tinymce to edit some field in a web application. I need to have an html result (after editing) with some specification. For example: when I press enter tinymce create a new paragraph (that's ok, and I know this behaviour can be changed, but paragraph is ok). What I need is a specific style to the paragraph be applied. I saw there is the possibility to specify content_css, but this is a visual deformation of what is written in the edited html. my need is when I press enter a paragraph with specific style (margin, alignmnent, ..) must be written directly in the edited html text. e.g. &lt;P style="margin-top:2px; margin-bottom:10px"&gt; ...&lt;/P&gt; Is it possibile to define specific style to be applied to each html tags ? I need this because after editing, the html content is used in another part of application, where I can not add additional style configurations.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25487303
type: Question
answer count: 2
tagged with: javascript
has title: tinymce default applied (written) style
tagged with: tinymce
score: 0
has answer: http://stackoverflow.com/a/25486989
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39613325
type: QuestionComment
comment on: http://stackoverflow.com/q/25397901
has text: sorry i didn't get your question?
score: 0
type: Comment

http://stackoverflow.com/q/25439145
has answer: http://stackoverflow.com/a/25439519
tagged with: background-image
tagged with: scroll
type: Question
has answer: http://stackoverflow.com/a/25439201
has body: $('.arrow').backgroundImage="url('../img/arrow.png').style.display = 'none'"; I am using an animate.css plugin to hide the down arrow on scroll down. `$( document ).ready(function() { console.log( "ready!" ); $("h1").animate({color:"#ffffff"}, 600); $('.arrow').backgroundImage="url('../img/arrow.png')";` if (direction == "up") { $("h1").animate({color:"#ffffff"}, 600); $('.arrow').backgroundImage="url('../img/arrow.png')"; } else if (direction == "down") { $("h1").animate({color:"#444444"}, 600); $('.arrow').backgroundImage="url('../img/arrow.png').style.display = 'none'"; The arrow isn't working. Is my function written incorrectly? How do I hide backgroundImage? Is there a better/efficient way to work around this?
has answer: http://stackoverflow.com/a/25439169
tagged with: javascript
has title: Hide or display none for backgroundImage using jquery
accepted answer: http://stackoverflow.com/a/25439519
score: 0
possible better answer: http://stackoverflow.com/a/25439169
has comment: http://stackoverflow.com/comment/39689846
has answer: http://stackoverflow.com/a/25439193
tagged with: jquery
has comment: http://stackoverflow.com/comment/39689866
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/39689897
type: AnsweredQuestion

http://stackoverflow.com/comment/39820994
type: Comment
has text: There are multiple results in this example (property1, property2, and so on)... If you use `header('Location: ...');` the visitor gets redirected immediately... So in this case to the href of property1. You dont do anything with property2... Is that what you want?
comment on: http://stackoverflow.com/a/25508959
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39745362
has text: I read that $(document).ready(function (){ }); will be called after loading DOM. So it should work. why is not working?
comment on: http://stackoverflow.com/q/25468703
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39790010
score: 0
type: Comment
type: QuestionComment
has text: Can you show your `require` statement? Also, try `console.log(mc)` and see what it spits out in the console?
comment on: http://stackoverflow.com/q/25478462

http://stackoverflow.com/comment/39814702
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25505377
type: AnswerComment
has text: Been playing around with it, for some reason it broke the code, it isn't working no more :/

http://stackoverflow.com/q/25491641
has comment: http://stackoverflow.com/comment/39787980
has comment: http://stackoverflow.com/comment/39788760
type: Question
has answer: http://stackoverflow.com/a/25492041
has answer: http://stackoverflow.com/a/25492024
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39788701
has comment: http://stackoverflow.com/comment/39791346
possible better answer: http://stackoverflow.com/a/25492041
has comment: http://stackoverflow.com/comment/39788393
has title: jQuery.after won't accept to end an element after starting one
answer count: 3
has comment: http://stackoverflow.com/comment/39789400
has body: I have a table that is generated by some other software, each row contains 50 columns and I'm trying to break the columns by adding a &lt;/tr&gt;&lt;tr&gt; to the end of a &lt;td&gt; element. This is the code that is generated on the fly: &lt;tbody&gt; &lt;tr&gt; &lt;td class="col1" scope="col"&gt;08/22/2014&lt;/td&gt; &lt;td class="col2" scope="col"&gt;Share&lt;/td&gt; &lt;td class="col3" scope="col"&gt;Success&lt;/td&gt; &lt;td class="col4" scope="col"&gt;Some notes&lt;/td&gt; &lt;td class="col5" scope="col"&gt;8/23/2014&lt;/td&gt; ...etc &lt;td class="col51" scope="col"&gt;End column&lt;/td&gt; If I use this Jquery: $( ".col4").after('&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;'); It appends but doesn't respect the &lt;/tr&gt;....it ignores it and adds the &lt;tr&gt; on, resulting this code. &lt;td class="col3" scope="col"&gt;Success&lt;/td&gt; &lt;td class="col4" scope="col"&gt;Some notes&lt;/td&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;td class="col5" scope="col"&gt;etc...&lt;/td&gt; Wonder what the best way to get JQUERY to append that &lt;TR&gt; for me? When I modify the code in Firebug, breaking the rows gives me the desired output, just not sure how to get JQUERY to give me the &lt;/tr&gt;.
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/25492214
has comment: http://stackoverflow.com/comment/39788363
has comment: http://stackoverflow.com/comment/39788112
has comment: http://stackoverflow.com/comment/39788524
favorite count: 0
has comment: http://stackoverflow.com/comment/39794402
upvote count: 1
has comment: http://stackoverflow.com/comment/39790008
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39788469
accepted answer: http://stackoverflow.com/a/25492214

http://stackoverflow.com/a/25519275
has body: I think your difficulty (with a pure css solution) will be targeting your select element based on the attributes of a child element. I would use some javascript to check that selected item isn't disabled and then apply your css.
type: Answer
answers question: http://stackoverflow.com/q/25518776
score: 0

http://stackoverflow.com/a/25405022
type: Answer
accepted answer of: http://stackoverflow.com/q/25404830
answers question: http://stackoverflow.com/q/25404830
downvote count: 0
has body: The toggle() method was deprecated, you need to use an alternative, such as a flag to depict the 'toggled' state. A loose example: $('.myclass').click(function() { if ($(this).hasClass('toggle')) { doThis; $(this).removeClass('toggle'); } else { doThis; $(this).addClass('toggle'); } }); And encase all of your functions with $(document).ready() rather than doing it for each individual one.
has comment: http://stackoverflow.com/comment/39626157
score: 1
has comment: http://stackoverflow.com/comment/39626326
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/comment/39824250
has text: That is PHP code. PHP code *finishes* executing when the website is ready for user interaction, and only begins again when the website is *finished* user interaction. Not waht you want. The code I posted is jQuery (JavaScript) and **can** interact with the user. I will update the example code to show where/how to use it.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25497121

http://stackoverflow.com/comment/39879905
type: Comment
type: QuestionComment
has text: @sberry Yup, my bad. Meant ` `
score: 0
comment on: http://stackoverflow.com/q/25541651

http://stackoverflow.com/comment/39776708
has text: Please do. Otherwise you are exposed to SQL Injection attacks.
comment on: http://stackoverflow.com/a/25485702
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25476964
favorite count: 0
tagged with: line-breaks
tagged with: angularjs
upvote count: 1
has body: How can I add (programatically) multiple text rows in a ng-grid cell ? The ng-grid is created in the following way: HTML: JavaScript: $scope.gridOptions = { data: 'myArray', ... } where myArray is a JSON array created by me using something like this: function returnJsonArray(size){ var d = []; ... for ( var i = 0 ; i < size ; i++ ) { values = ['VALUE TO SPLIT', ...]; d.push(createJsonObject(keys, values); } return d; } According to the above example there is "VALUE TO SPLIT" in every cell that is in the first column. I want to have: +-------+-------+ | VALUE | | | TO | ? | | SPLIT | | +-------+-------+ | VALUE | | | TO | ? | | SPLIT | | +-------+-------+ instead of +---------------+-------+ | VALUE TO SPLIT| ? | +---------------+-------+ | VALUE TO SPLIT| ? | +---------------+-------+ I tried to use (in values = ['VALUE TO SPLIT',...];), but it is considered to be part of my text. By default, the resulted DOM contains a lot of divs: ... VALUE TO SPLIT ... I am not interested in how the new output will be in DOM (it can use + + or can be in the middle of the text).
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25486624
type: Question
tagged with: split
downvote count: 0
has comment: http://stackoverflow.com/comment/39773054
tagged with: javascript
has title: Add multiple rows in ng-grid cell programatically
tagged with: ng-grid
answer count: 1
has comment: http://stackoverflow.com/comment/39773160
has answer: http://stackoverflow.com/a/25486624

http://stackoverflow.com/comment/39667142
comment on: http://stackoverflow.com/a/25426145
type: Comment
has text: No just calling the redirect .... the reason I'm doing this is because the login does a bunch of stuff it is not feasible for me to redo I thought login the user by code and redirecting him/her should get that done easily
type: AnswerComment
score: 0

http://stackoverflow.com/a/25523344
has body: Try this (you don't need the / at the end of the meta tag anymore): if(screen.width &lt; 700) { $('head').append('&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;'); }
answers question: http://stackoverflow.com/q/25523284
type: Answer
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/25535383
has comment: http://stackoverflow.com/comment/39873939
has comment: http://stackoverflow.com/comment/39873816
type: Question
has title: Backbone Marionette Target Element in el with jQuery
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25538362
tagged with: backbone.js
tagged with: marionette
score: 1
upvote count: 1
has body: I'm working on creating a basic question app to better understand backbone marionette. I'm my free-text questions right now use the same "#question-number-range id for setting the range of numbers users can enter when taking a survey. Then I split up the range and assign the min/max values accordingly. This works great for the first free-text question view. But when I try to do the same thing on a second it ends up getting set to the first's min/max values because they have the same id. What I'm wondering - is there a way I can do something like $(@el &lt; '#question-number-range') to target just the input within the current view's el, rather than any input that has that id? Or am I completely going about this wrong and need to maybe dynamically create the ids?
accepted answer: http://stackoverflow.com/a/25538362
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39869289
has comment: http://stackoverflow.com/comment/39873830
tagged with: javascript

http://stackoverflow.com/q/25456260
tagged with: jquery
has body: I had an idea today, and I was wondering if it was possible to do, and if I could get any pointers on how to accomplish it. I own an e commerce website that dynamically loads a product's image upon page load. Here's the basic html structure for the image when it is loaded on the page: My idea is this: I would like to use a script to target the image #product_photo. This script would then set that targeted image as a background image for the div #container. I would then need to be able to set the following css for that dynamically added background image within the div #container in the script as well: #container {background-size: 100% auto; background-position: center top; opacity: 0.1;} Hopefully that made sense. Is this at all possible? Thanks guys - Much appreciated.
tagged with: css
type: UnansweredQuestion
has title: Using jQuery or Javascript - target an image, then set it as a background image for a div
has answer: http://stackoverflow.com/a/25456286
tagged with: javascript
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/39797276
type: QuestionComment
has text: Thanks for the fiddle. It doesn't crash on Chrome 36 either, the issue may be related to a specific version
score: 0
comment on: http://stackoverflow.com/q/25496564
type: Comment

http://stackoverflow.com/comment/39614445
score: 0
type: Comment
type: QuestionComment
has text: @C-linkNepal angular guy will know that what is $location .
comment on: http://stackoverflow.com/q/25397628

http://stackoverflow.com/q/25448807
linked to: http://stackoverflow.com/q/12513004
tagged with: jqgrid
tagged with: javascript
tagged with: jquery
has body: I have an array of 1000 records and i pass it javascript function. it take almost 20 sec to show data in jqgrid. I know that addDataRow method is very slow but i could not find any other alternative. Is there any way i can make it much faster ? Script: function GetCommodityGrid(array) { // alert("Methods"); // var rows = array; alert(rows.length); jQuery(document).ready(function () { jQuery("#list").jqGrid({ // url: 'TestGrid/GridData', datatype: 'local', // colNames: ['COM_NAME', 'COM_CODE', 'DELV_UNITS', 'LOT_SIZE', 'TICK_SIZE', 'TICK_VALUE'], colModel: [ { name: 'COM_NAME', index: 'COM_NAME', width: 90, editable: true }, { name: 'COM_CODE', index: 'COM_CODE', width: 100, editable: true }, { name: 'DELV_UNITS', index: 'DELV_UNITS', width: 80, align: "right", editable: true }, { name: 'LOT_SIZE', index: 'LOT_SIZE', width: 80, align: "right", editable: true }, { name: 'TICK_SIZE', index: 'TICK_SIZE', width: 80, align: "right", editable: true }, { name: 'TICK_VALUE', index: 'TICK_VALUE', width: 150, sortable: false, editable: true } ], rowList: ReturnRowList(), // loadonce: false, // hit only once on the server rownumbers: true, // show the numbers on rows pager: '#pager', sortname: 'COM_NAME', viewrecords: true, // show the total records on the end of the page editurl: "TestGrid/EditRecord", caption: "JSON Example" }); for (var x = 0; x &lt;= rows.length -1; x++) { $("#list").addRowData(x, rows[x]); } // jQuery("#list").setGridParam({ rowNum: 10 }).trigger("reloadGrid"); $("#list").jqGrid("navGrid", "#pager", { add: false }, { //the Edit options closeAfterEdit: true, afterSubmit: function (response) { // you should return from server OK in sucess, any other message on error alert("after Submit"); if (response.responseText == "OKK") { alert("Update is succefully") return [true, "", ""] } else { alert("Update failed") $("#cData").click(); return [false, "", ""] } } });
has title: jqGrid addRowData slowing the process
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25448955
score: 0
tagged with: asp.net-mvc-3
answer count: 1
has comment: http://stackoverflow.com/comment/39711827
accepted answer: http://stackoverflow.com/a/25448955

http://stackoverflow.com/comment/39844313
type: Comment
has text: check my answer and fiddle
score: 0
comment on: http://stackoverflow.com/q/25521858
type: QuestionComment

http://stackoverflow.com/comment/39814576
comment on: http://stackoverflow.com/q/25506143
has text: What's the Plugin URL?
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25532930
type: Answer
has body: Your question is more of a design spec than a question, so rather than try to design the whole layout for you, I'll point out why your jsbin doesn't work. Don't try to set left on body. If body is protruding offscreen, you're not going to be able to reliably stop scrolling. Instead, keep body stationary with 100% width and height, so it can serve as your visible window boundary. When you want to lock the scrolling, you can set overflow: hidden on body. Handle the slide-over and scrolling menu with separate divs inside body.
has comment: http://stackoverflow.com/comment/39873160
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25519508
has comment: http://stackoverflow.com/comment/39865433
accepted answer of: http://stackoverflow.com/q/25519508

http://stackoverflow.com/comment/39825646
has text: are you sure img[usemap] really exists in the page?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25511903
type: Comment

http://stackoverflow.com/a/72377168
type: Answer
score: 0
has body: I do this to get the indice of the SLide: Reveal.addEventListener('slidechanged', function (evt) { ind = Reveal.getIndices().h if (ind === 0) { ...... } if (ind === 1) { ..... } });
answers question: http://stackoverflow.com/q/25400428

http://stackoverflow.com/q/25493776
favorite count: 0
has body: I wrote, what I thought, was a straight forward if statement in JS but it is running incorrectly. function printLetter(LetterId) { var studentflag = $("#IsStudent").val(); if (studentflag) { //do option 1 } else { //do option 2 } } Everytime it runs, the studentflag var value is correct, but regardless of whether it is true or false, it goes into option 1. I am pretty sure I have done true/false checks like this before in JS, but do I need to spell it out (studentflag == true) instead?
answer count: 5
accepted answer: http://stackoverflow.com/a/25493839
has comment: http://stackoverflow.com/comment/39791959
upvote count: 1
has answer: http://stackoverflow.com/a/25494354
has answer: http://stackoverflow.com/a/25493836
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25493802
has comment: http://stackoverflow.com/comment/39791968
has answer: http://stackoverflow.com/a/25493839
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39791950
score: 0
possible better answer: http://stackoverflow.com/a/25493802
has answer: http://stackoverflow.com/a/25493826
has title: javascript if statement checking for true/false
has comment: http://stackoverflow.com/comment/39791992

http://stackoverflow.com/q/25465056
upvote count: 0
has answer: http://stackoverflow.com/a/25465208
favorite count: 0
accepted answer: http://stackoverflow.com/a/25465208
downvote count: 8
has answer: http://stackoverflow.com/a/25465162
has comment: http://stackoverflow.com/comment/39738479
score: -8
has comment: http://stackoverflow.com/comment/39738240
has title: Please check jQuery syntax
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39738280
possible better answer: http://stackoverflow.com/a/25465162
has comment: http://stackoverflow.com/comment/39738464
has comment: http://stackoverflow.com/comment/39738302
type: Question
tagged with: javascript
tagged with: jquery
has body: I will be very grateful is sb tells me whether code below has a correct syntax. jQuery(document).ready(function ($) { var sliderHeight = $(window).height() - $('.slider').position().top; $('.slider').css({'height': sliderHeight}); $('.landing-title').css({'top': $('.slider').height() / 2 - $('.landing-title').height() / 2}) ; $(window).resize(function() { sliderHeight = $(window).height() - $('.slider').position().top; $('.slider').css({'height': sliderHeight }); $('.landing-title').css({'top': $('.slider').height() / 2 - $('.landing-title').height() / 2}); }); }
has comment: http://stackoverflow.com/comment/39738461
answer count: 2

epub
type: Tag
tags question: http://stackoverflow.com/q/25526723
tag name: epub

http://stackoverflow.com/q/25513710
tagged with: javascript
has comment: http://stackoverflow.com/comment/39831616
has body: Having some trouble visualizing how to structure my browser based web app to have different behavior based on screen size and orientation. My app is built on angular and ui-router for my states, and bootstrap for my styles. Current functionality is the same on both phones and tables. It's basically: Show list of items Click on list item go to detail state However, if a user is using tablet I want the following functionality (based on orientation): Portrait Same as above Landscape List of items floats all the way left detail view becomes viewable to the right (IE any email app you've ever used on a tablet) clicking on a list item populates the detail view to the right. I guess I'm struggling with how to set that up with angular. Right now, clicking an item changes the state entierly (which re-renders the view). Would I just need to do something like this when clicking an item (sudo code): if (orientation === "portait" &amp;&amp; tablet) { $state.go("detailview"); } else if (orientation === "landscape" &amp;&amp; tablet) { $scope.details = getTheDeets(); } And then use media queries in my list view to hide / show the details section based on screen size and orientation? Open and appreciative of any suggestions regarding how one might set this up. Thanks!
upvote count: 1
answer count: 1
favorite count: 0
tagged with: angularjs
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26995314
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/39833863
downvote count: 0
has comment: http://stackoverflow.com/comment/39831971
score: 1
has title: angular js - code flow based on device orientation
has comment: http://stackoverflow.com/comment/39831007
type: Question
tagged with: ios

http://stackoverflow.com/a/66859703
has body: Use This function getMessages(letter) { var div = $('#messages'); $.get('msg_show.php', function (data) { div.html(data).animate({scrollTop: div.prop("scrollHeight")}); //use append() if msg_show.php returns single unread msg. }); } setInterval(getMessages, 100);
score: 0
answers question: http://stackoverflow.com/q/25505778
type: Answer

http://stackoverflow.com/q/25474346
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39755456
has title: AngularJS $http reading JSON data
upvote count: 1
tagged with: http
possible better answer: http://stackoverflow.com/a/25474620
type: AnsweredQuestion
score: 1
has body: How can i display data from an array of JSON data returned from the server in AngularJS? This is what i have, and for some reason i cannot display any data on my html page: &lt;script&gt; function placesCtrl($scope, $http) { $http.get("http://somedomain/api/places_JSON.php") .success(function(response){ $scope.names = response; }); $scope.display = $scope.names[2].City; } &lt;/script&gt; The JSON data that the $http.get is returning looks something like this: [{City: "Berlin", Country: "Germany"}, {City: "Portland", Country: "USA"}, {City: "Barcelona", Country: "Spain"}, {City: "Paris", Country: "France"}, {City: "Cowes", Country: "UK"}] Then the HTML code looks something like this: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;div ng-app="" ng-controller="placesCtrl"&gt; &lt;p&gt; {{display}}&lt;/p&gt; &lt;/div&gt; So instead of displaying "Barcelona" as the result, it just displays {{display}}. Any suggestions would be much appreciated.
has answer: http://stackoverflow.com/a/25474383
type: Question
accepted answer: http://stackoverflow.com/a/25474383
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25474620
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/25438712
answer count: 3
accepted answer: http://stackoverflow.com/a/25438815
possible better answer: http://stackoverflow.com/a/25438961
has body: Fiddle - http://liveweave.com/enRy3c Here's what I'm trying to do. Say my input number is 5. I want to dynamically append 5 divs to the class .enfants. However I haven't figured out how to do that. I been searching and searching and I haven't came across anything. jQuery/JavaScript: var counter = 1; // Value number = .enfants children $(".ajouter-enfants").on('keyup change', function() { var yourChildren = " " + counter++ + " "; var CallAppend = function() { $(".enfants").append( yourChildren ); }; // If 0 or empty clear container if ( $.inArray($(this).val(), ["0", "", " "]) > -1 ) { $(".enfants").html(""); // If only add/have 1 div in container } else if ($(this).val() === "1") { $(".enfants").html("").append( yourChildren ); // If > 0 add as many divs as value says } else { $(".enfants").html(""); CallAppend(); } }); HTML: Value number = .enfants children
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25438815
type: Question
has answer: http://stackoverflow.com/a/69491791
has comment: http://stackoverflow.com/comment/39689138
tagged with: javascript
tagged with: jquery
has title: Input number's value to append div's
has answer: http://stackoverflow.com/a/25438961
score: 0

http://stackoverflow.com/comment/39619912
type: Comment
comment on: http://stackoverflow.com/a/25400515
has text: As I remember don't put your full-path url there, instead put only the URI. e.g. `window.location.href = "/SI/hello"`
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39906003
score: 0
type: Comment
type: QuestionComment
has text: does this happen in both Chrome and Firefox?
comment on: http://stackoverflow.com/q/25549516

http://stackoverflow.com/a/25527276
has body: You can do this by searching for substrings before using slice. However you could use a regular expression instead: var regex = /width=([\d\.]*).*height=([\d\.]*)/ var dimensions = regex.exec(srcString); This expression searches for "width" and "height" and selects any digit or dot after them in dimensions[1] and dimensions[2].
type: Answer
accepted answer of: http://stackoverflow.com/q/25526880
score: 0
answers question: http://stackoverflow.com/q/25526880
type: AcceptedAnswer

http://stackoverflow.com/a/25513151
has body: Well, several options: a) Code that includes a trackback of some kind. Examples: css/html that references an image hosted on an external source.When the image is downloaded, it can be tracked javascript that includes a hidden link, or pings (ajax posts) to parent website. The javascript itself might be obfuscated. b) The charge is maybe for the support (developer feedback, customer support, access to source code and the like) and last but not least, c) The good heart/morals of the developer who will respect the terms of use, seeing that himself/herself would like to get paid for his/her work.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25512977
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25512977

http://stackoverflow.com/q/25524741
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/39848932
tagged with: video
has comment: http://stackoverflow.com/comment/39988639
score: 0
has comment: http://stackoverflow.com/comment/39848927
downvote count: 1
type: Question
answer count: 2
tagged with: mediaelement.js
has title: Play random video from a directory
tagged with: javascript
has answer: http://stackoverflow.com/a/25524923
has answer: http://stackoverflow.com/a/25524928
tagged with: random
favorite count: 0
has body: I am a newbie in javascript, and I want a video player (resize-able) to play randomly my videos that are located in a directory on the server. I know about Math.random but I don't know how to play a video based on the results generated by Math.random. Any help is more than welcome.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39868388

http://stackoverflow.com/q/25517811
type: Question
tagged with: angular-ui-router
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25517958
has answer: http://stackoverflow.com/a/25517958
answer count: 2
accepted answer: http://stackoverflow.com/a/25519342
downvote count: 0
linked to: http://stackoverflow.com/q/25191768
favorite count: 0
tagged with: angularjs
score: 2
has body: I'm new to angular and I'm trying to use angular ui router. When I navigate to / I get this abstract state as my $state.current: Object {name: "", url: "^", views: null, abstract: true}. Is there anyway around this so that my current state is files? Here is my code: (function() { 'use strict'; angular.module('carton', [ 'ui.router', 'carton.controllers', 'carton.services', 'carton.directives' ]). config([ '$stateProvider', '$urlRouterProvider', function( $stateProvider, $urlRouterProvider ) { $urlRouterProvider.otherwise('/'); $stateProvider. state('files', { url: '/', templateUrl: 'partials/files.html', //controller: 'FilesCtrl' access: { isFree: false } }). state('login', { url: '/login', templateUrl: 'partials/login.html', controller: 'loginCtrl', access: { isFree: true } }). state('register', { url: '/register', templateUrl: 'partials/register.html', //controller: 'RegisterCtrl' access: { isFree: true } }); } ]) .run(['$rootScope', '$state', 'UserService', function($root, $state, userSrv) { $root.$on( '$locationChangeSuccess', function(event) { console.log($state.current); if (!$state.current.access.isFree &amp;&amp; !userSrv.isLogged) { $state.go('login'); } } ) } ]); })();
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/25519342
has title: First state for angular ui router has `name: ""`

http://stackoverflow.com/comment/39639582
has text: I meant I don't want the border-top on the content to show up underneath the tab when it's active, if that makes sense. So it looks like the active tab is in front the other tabs? Maybe setting a z-index on the tab so that it shows up above the content box and blocks out the line between the content and the tabs?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25411648

http://stackoverflow.com/q/25534335
accepted answer: http://stackoverflow.com/a/25534502
linked to: http://stackoverflow.com/q/1099628
linked to: http://stackoverflow.com/q/15307243
has comment: http://stackoverflow.com/comment/39866610
favorite count: 0
has answer: http://stackoverflow.com/a/25534533
has comment: http://stackoverflow.com/comment/39866460
has comment: http://stackoverflow.com/comment/39866390
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39866655
has comment: http://stackoverflow.com/comment/39866362
downvote count: 0
tagged with: method-chaining
score: 1
type: Question
answer count: 2
has body: I've looked at various answers on SO that answer similar questions, but none have really answered what I'm looking for. Examples here: jQuery prototype and constructor function chaining How does basic object/function chaining work in javascript? I'd like to be able to chain methods from a function, but also use that function as a namespace. You can use the jquery object as a function like so: $('selector'); but you can also reach methods straight from the $ variable, like so: $.ajax( How is this achieved? I've tried looking into the jquery source but it's near impossible to follow.
upvote count: 1
possible better answer: http://stackoverflow.com/a/25534533
tagged with: javascript
has title: How can I create jQuery like method chaining while maintaining a namespace?
has answer: http://stackoverflow.com/a/25534502

http://stackoverflow.com/q/25517954
has comment: http://stackoverflow.com/comment/39837392
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39837445
answer count: 0
has comment: http://stackoverflow.com/comment/39837456
has comment: http://stackoverflow.com/comment/39837752
has comment: http://stackoverflow.com/comment/39837352
has comment: http://stackoverflow.com/comment/39837163
has comment: http://stackoverflow.com/comment/39837167
has comment: http://stackoverflow.com/comment/39837716
type: Question
tagged with: javascript
has title: Show and Hide issues
has comment: http://stackoverflow.com/comment/39837177
score: 0
has comment: http://stackoverflow.com/comment/39837142
has body: Here's the code: Javascript: function showHide(shID) { if (document.getElementById(shID)) { if (document.getElementById(shID+'-show').style.display != 'none') { document.getElementById(shID+'-show').style.display = 'none'; document.getElementById(shID).style.display = 'block'; } else { document.getElementById(shID+'-show').style.display = 'inline'; document.getElementById(shID).style.display = 'none'; } } } CSS: .more { display: none; } a.showLink, a.hideLink { text-decoration: none; color: #b266b2 ; background: transparent url(down.gif) no-repeat left; } a.hideLink { background: transparent url(up.gif) no-repeat left; } a.showLink:hover, a.hideLink:hover { color: #b266b2 ; } HTML: &lt;table width="68%" align="center"&gt; &lt;tr&gt; &lt;td bgcolor="#313131" background="graphics/backgrounds/tablebg1.png" width="50%"&gt; &lt;font size="4" color="#5be5e5"&gt; &lt;b&gt; - 7/17/2014 &lt;/font&gt; &lt;br&gt; &lt;a href="#" id="example-show" class="showLink" onclick="showHide('example');return false;"&gt;Click here to view the update log.&lt;/a&gt; &lt;div id="example" class="more"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font size="4" color="#b266b2"&gt;-&lt;/font&gt; &lt;font size="4"&gt; Completely updated to the new layout everything is functional, unless something broke if that happens please tell me.&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font size="4" color="#b266b2"&gt;-&lt;/font&gt; &lt;font size="4"&gt; Going to be working on rewording link names and anything else that needs it next.&lt;/font&gt; &lt;br&gt; &lt;a href="#" id="example-hide" class="hideLink" onclick="showHide('example');return false;"&gt;Click here to get rid of the update log and possibly never see it again.&lt;/a&gt; &lt;/div&gt; &lt;br&gt; &lt;font size="4" color="#5be5e5"&gt; &lt;b&gt; - 5/23/2014 &lt;/font&gt; &lt;br&gt; &lt;a href="#" id="example-show" class="showLink" onclick="showHide('example');return false;"&gt;Click here to view the update log.&lt;/a&gt; &lt;div id="example…
has comment: http://stackoverflow.com/comment/39837495
type: UnansweredQuestion

http://stackoverflow.com/comment/39681648
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [SyntaxError: Unexpected token ILLEGAL](http://stackoverflow.com/questions/12719859/syntaxerror-unexpected-token-illegal)
comment on: http://stackoverflow.com/q/25434205

http://stackoverflow.com/comment/39763460
comment on: http://stackoverflow.com/a/25478577
type: AnswerComment
score: 0
has text: You don't need the `""` there since digits are already strings.
type: Comment

http://stackoverflow.com/comment/39745663
has text: That's for the initial expand, I need to do it via code, adding expanded class at run time doesn't trigger the expand function.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25469026
type: Comment

http://stackoverflow.com/comment/77338780
type: QuestionComment
comment on: http://stackoverflow.com/q/25505336
type: Comment
score: 1
has text: Hallo @HardikChauhan can you explain how you did that? Or you can edit your question with your working code. I'm having the same problem. Thanks you.

http://stackoverflow.com/q/25429068
possible better answer: http://stackoverflow.com/a/25429093
has answer: http://stackoverflow.com/a/25429093
type: Question
has title: Get tag attribute in Onclick event
has answer: http://stackoverflow.com/a/25429129
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25429123
accepted answer: http://stackoverflow.com/a/25429129
type: AnsweredQuestion
has body: TEST1 TEST2 In that test code, if I click the label area, I can not get the data-id value, Is there any way I can get the data-id even I click the other element in that DIV tag?

http://stackoverflow.com/q/25514750
accepted answer: http://stackoverflow.com/a/25514854
type: Question
tagged with: javascript
has body: When running console.log("Express server listening on port " + port); in node.js on a deployed Azure website, I get the following string Express server listening on port \\.\pipe\d9797e42-9e1f-421c-91b9-3d86496eaeb8 What is this and how can I determine what port my site is really running on?
tagged with: azure
answer count: 1
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25514854
favorite count: 0
has title: process.env.PORT prints weird string
tagged with: port
upvote count: 1
tagged with: console.log
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39833277

http://stackoverflow.com/q/25451687
linked to: http://stackoverflow.com/q/5054560
tagged with: ios
tagged with: javascript
favorite count: 0
has title: Detect if client allows inline media playback for HTML5 video
has answer: http://stackoverflow.com/a/25520805
linked to: http://stackoverflow.com/q/8726290
tagged with: android
has comment: http://stackoverflow.com/comment/39759396
tagged with: http://stackoverflow.com/tag/html
has body: Is there a good way to detect if a client browser allows inline media playback for HTML5 video? Update I am not trying to simply detect video support. I am trying to detect if a video can only play fullscreen or also inline. Because on the iPhone safari iOS videos only play in fullscreen, but on iPad videos may be played inline. And by inline I mean in the page without switching to fullscreen.
answer count: 4
linked to: http://stackoverflow.com/q/12446990
type: UnansweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/39149267
score: 21
has comment: http://stackoverflow.com/comment/60318885
tagged with: html5-video
has answer: http://stackoverflow.com/a/39885697
has answer: http://stackoverflow.com/a/25544704
upvote count: 22

http://stackoverflow.com/comment/39868269
comment on: http://stackoverflow.com/q/25535334
score: 0
type: Comment
type: QuestionComment
has text: my form gets submitted evend if value of captcha.php is yes or no

http://stackoverflow.com/q/25497466
has comment: http://stackoverflow.com/comment/39798921
downvote count: 0
possible better answer: http://stackoverflow.com/a/25497546
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39798727
has answer: http://stackoverflow.com/a/25497571
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has body: I'm trying to make a vertical navigation bar inside a box with fixed height. How can I make the buttons dynamically change height equally to fit inside the box? Here's a jsfiddle to demonstrate what I mean. http://jsfiddle.net/0w3f2fm1/ So now if I am to add a sixth or a seventh button, they will be evenly stretched to fit nav container. Is it possible to make it with css only, or should javascript/jquery intervene? Note: They will be added using back-end php/mysql application, not by code. Also note, that the height I currently have is done using padding because I want the text to be centered inside the button. Thanks
has answer: http://stackoverflow.com/a/25499668
score: 1
upvote count: 1
type: Question
has title: Automatically stretching elements to fit in parent container using css
tagged with: javascript
has answer: http://stackoverflow.com/a/25497546
accepted answer: http://stackoverflow.com/a/25499668
answer count: 3

http://stackoverflow.com/comment/39822237
has text: Is there a shim for Q to set `this` within promises?
comment on: http://stackoverflow.com/q/25509977
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39806882
type: QuestionComment
has text: You've forgotten the snippet you've already tried. Please add it to your question.
comment on: http://stackoverflow.com/q/25502096
score: 0
type: Comment

http://stackoverflow.com/q/25500817
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: Can anyone help me on this, I have the json data that i want to convert into table using javascript or jquery. Here's my sample json data: {"company_name":"McDonalds","address":"John Street","city":"San Antonio","noemployee":"100"} I want the table output should look like this: Company Name Address City Noemployee McDonaldsJohn Street San Antonio 100 Just to clarify "company_name":"McDonalds" = Company Name McDonalds
has comment: http://stackoverflow.com/comment/39804803
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39804593
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39804620
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/25501131
has answer: http://stackoverflow.com/a/25500922
linked to: http://stackoverflow.com/q/17724017
tagged with: jquery
has comment: http://stackoverflow.com/comment/39804659
favorite count: 0
has comment: http://stackoverflow.com/comment/39804757
accepted answer: http://stackoverflow.com/a/25501131
possible better answer: http://stackoverflow.com/a/25500922
tagged with: http://stackoverflow.com/tag/html
has title: json to table in javascript/jquery
tagged with: php

http://stackoverflow.com/a/25500774
upvote count: 4
has body: Strictly speaking, you cannot sort a "dictionary" (JavaScript object), because JavaScript objects have no order. They are merely a "bag" of key/value pairs. If you want to find the n largest values in the object, then one way or another you need to convert the object into an array, whose elements are ordered, such as with @thefourtheye's solution. If you want to sort the keys, then well, sort them with Object.keys(object).sort() as another answer shows you how to.
answers question: http://stackoverflow.com/q/25500316
type: Answer
score: 2
downvote count: 2

http://stackoverflow.com/comment/39712478
comment on: http://stackoverflow.com/q/25451244
type: QuestionComment
type: Comment
has text: Try using this: `if(value.IsMenuLink !='0'){` .. maybe the value is a number and not a string
score: 0

http://stackoverflow.com/comment/39940313
type: Comment
has text: Updated with a sample json_obj. Thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/25516590
score: 0

http://stackoverflow.com/comment/39612721
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25397628
has text: $location.path = 'about' ????

http://stackoverflow.com/comment/39821122
type: Comment
has text: This is exactly what I want, thank you. Is this possible without JS though?
comment on: http://stackoverflow.com/a/25509168
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39840531
has text: is it possible to add a jsfiddle in your question so that we get the exact scenario to investigate
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25520102
type: QuestionComment

http://stackoverflow.com/comment/39634583
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25409305
score: 1
has text: If `button` is undefined, you're not including jQuery UI properly. Open the console and check for errors.

http://stackoverflow.com/comment/39705742
comment on: http://stackoverflow.com/q/25446672
type: Comment
type: QuestionComment
score: 0
has text: interfaces as *open ended* in typescript so yes partials is the way to go. See TrueBlueAussie's answer

http://stackoverflow.com/q/25411666
has title: Changing a label, using Query, when it has the form element inside
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39639400
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/25411758
tagged with: javascript
has comment: http://stackoverflow.com/comment/39639389
accepted answer: http://stackoverflow.com/a/25411758
has body: I am attempting to change the form label below using Jquery but found that changing the HTML removed the form element inside the label. Can anyone show me how I can change the lable text without removing the form element. Thanks! Yes Lets say I want to change above to 'Yes Sir!' So far all I have is: jQuery(document).ready(function($){ $(document).ready(function() { $("label[for='field_217-0']") }); });

http://stackoverflow.com/comment/39877581
has text: Adding a number would not auto increment it though would it? I need a way to increment it which I dont know how to do.
comment on: http://stackoverflow.com/a/25518471
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25508829
has title: variable is undefined when attached to callback function (Javascript / Dojo)
has comment: http://stackoverflow.com/comment/39821096
tagged with: global-variables
type: Question
has comment: http://stackoverflow.com/comment/39821233
tagged with: arcgis-js-api
has comment: http://stackoverflow.com/comment/39898031
has comment: http://stackoverflow.com/comment/39820037
tagged with: javascript
has comment: http://stackoverflow.com/comment/39821956
tagged with: callback
tagged with: scope
answer count: 1
has answer: http://stackoverflow.com/a/47417334
type: UnansweredQuestion
has body: I have this variable declared at global scope: var wait; then, inside of an event listener, I assign a function to this variable, then attach a callback function: (I am using Dojo, via the ArcGIS Javascript API) wait = doThis(); wait.addCallback(function (){ doNextThing(); }); doThis removes some layers from a map: doThis(){ var layer = map.getLayer("mapLayer"); if (layer) { map.removeLayer(layer); } ..but when I run it, I get an error saying 'wait' is undefined... I have similar syntax elsewhere in my code that works...is it because I am assigned the callback within an event listener? If so, is there a workaround? I really need doThis() to be completed before doNextThing() begins.
score: 0
has comment: http://stackoverflow.com/comment/39822492

http://stackoverflow.com/q/25413766
type: AnsweredQuestion
tagged with: performance
has body: I purchased a theme. Modified it. However , it was loading slow. I compressed the images, and used gzip. I read somewhere that deferring JS parsing may help even further. So, I deferred them using the following script added just below the body tag. Now, the page wont even load. List of scripts I use:
has comment: http://stackoverflow.com/comment/39643429
type: Question
accepted answer: http://stackoverflow.com/a/25413884
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39643441
score: 0
has comment: http://stackoverflow.com/comment/39643465
tagged with: seo
tagged with: css
has title: Deferring Javascript parsing giving error
has answer: http://stackoverflow.com/a/25413884
has comment: http://stackoverflow.com/comment/39643967

http://stackoverflow.com/q/25506647
has answer: http://stackoverflow.com/a/25509558
has answer: http://stackoverflow.com/a/25507975
accepted answer: http://stackoverflow.com/a/25507975
has title: How to call a javascript function in an opened child window
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39815820
tagged with: javascript
has body: I have a parent html file and want the user to click something which should then open a new window (or tab) containing the (dynamically generated) contents of a div in the parent (which is hidden in the parent). From my reading here and elsewhere something like this should work: parent.html Parent html from parent launch child child.html Child However, regardless of using the commented-out setTimeout (incase the child hadn't loaded yet before calling the child's function), I get this error (in Safari, similar in Chrome) immediately: 'undefined' in not a function (evaluating 'child.addHTML(html)') What am I doing wrong? Is there a better way to achieve my goals?
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25509558

http://stackoverflow.com/q/25409742
has body: I need to display an HTML form where user enters a value in a field. A textarea is displayed in the same form. Once user inputs text into the text field and clicks on submit, the values submitted should be appended and displayed in the textarea box. Something like: field 1: some text box field 2: text box Submit button field 3: When i click submit, display the texts entered in field 1 and field 2 together in this textarea. Any ideas on this will be very helpfull.
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39635574
has comment: http://stackoverflow.com/comment/39635430
has title: adding values entered by user in a separate text area
has comment: http://stackoverflow.com/comment/39635390
type: Question
has answer: http://stackoverflow.com/a/25410157
tagged with: http://stackoverflow.com/tag/html
score: 0
answer count: 1

http://stackoverflow.com/q/25513082
type: Question
has title: nested ng-repeats in angular
score: 0
answer count: 1
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/25514127
type: UnansweredQuestion
has body: I am trying to work with some nested repeats here with angular.js and can't seem to get it to work. I have structured my json like so - [ { "levels": [ { "targets": [ "one", "two", "three", "four" ], "response": "response", "instructions": "insturctions" } ], "name": "Name One", "form": [ { "pfade": "fade", "ptype": " type", "psection": "section", "lbehavior": "l behave", "options": "options", "tbehaviour": "t behave" } ] }, { "levels": [ { "targets": [ "one", "two", "three", "four" ], "response": "response", "instructions": "insturctions" } ], "name": "Name Two", "form": [ { "pfade": "fade", "ptype": " type", "psection": "section", "lbehavior": "l behave", "options": "options", "tbehaviour": "t behave" } ] }, { "levels": [ { "targets": [ "one", "two", "three", "four" ], "response": "response", "instructions": "insturctions" } ], "name": "Name Three", "form": [ { "pfade": "fade", "ptype": " type", "psection": "section", "lbehavior": "l behave", "options": "options", "tbehaviour": "t behave" } ] } ] also link here if you prefer : http://www.json-generator.com/api/json/get/bOyGmHavfS?indent=2 I am trying to loop through the sub arrays in a repeat, and I can't seem to (refer?) to them correctly. I found some other examples of ng-repeats nested and they seemed to have no problem doing it like this, so here it my stab at it {{parent.name}} {{sub}}sub I know the span is nasty - I was just trying to get it working before styling. It doesn't seem to like this argument, the reasons of which I cannot figure out. Also- in another section I am trying to just pull the information from the sub arrays (the form one), this I also cannot seem to get to work. I'm assuming its the same problem. So I'm doing And then inside that I'm trying to pull that data in the "forms" by doing this for example: Also to no success, I'm assuming both these problems are related to the same thing. Any input would be very helpful!! Thanks for reading.
has comment: http://stackoverflow.com/comment/39827839
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/39812519
comment on: http://stackoverflow.com/q/25505113
type: Comment
score: 0
has text: [http://stackoverflow.com/questions/10134963/prevent-page-scrolling-after-postback](http://stackoverflow.com/questions/10134963/prevent-page-scrolling-after-postback)
type: QuestionComment

http://stackoverflow.com/comment/39624011
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25403582
has text: I know that, but the callback will be executed with the service context. And in the service, we dont have $scope defined, so it causes an error "undefined is not a function" :/

http://stackoverflow.com/comment/39721949
type: AnswerComment
type: Comment
has text: It'd probably also be a good idea to do a `.hasOwnProperty()` check on the property of "x", or, better, use the return values already obtained by the calls to `Object.keys()` to do the iteration, since those will already be limited to "own" properties.
comment on: http://stackoverflow.com/a/25456134
score: 0

http://stackoverflow.com/a/25430167
score: 1
has body: Try checking that the string contains the word open, for instance... var x="[u&amp;#39;open&amp;#39;];" $('#isCheckedFormat').prop('checked', x.contains('open'));
accepted answer of: http://stackoverflow.com/q/25430079
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25430079
type: Answer

http://stackoverflow.com/comment/39770422
has text: I need to wait 5 min.:)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25482431
type: Comment

http://stackoverflow.com/a/25424660
type: Answer
upvote count: 0
has body: Not sure that it is best way, but it is my solution first come in to my head: HTML: &lt;span id="span1"&gt; thththt &lt;span id="span2"&gt;&lt;/span&gt; &lt;/span&gt; JS: var span = document.getElementById('span1'); var spanChilds = span.childNodes; var textIndex = -1; for(var i = 0; i &lt; spanChilds.length; ++i){ debugger; if(spanChilds[i].nodeType == 3){ textIndex = i; break; } } var nestSpan = document.getElementById('span2'); var nestSpanIndex = Array.prototype.indexOf.call(span.childNodes, nestSpan); if(nestSpanIndex &gt; textIndex){ alert('text first') }else{ alert('span first') } Example on jsFiddle
has comment: http://stackoverflow.com/comment/39663279
score: -1
has comment: http://stackoverflow.com/comment/39662810
downvote count: 1
has comment: http://stackoverflow.com/comment/39681740
answers question: http://stackoverflow.com/q/25423854

http://stackoverflow.com/q/25436042
has comment: http://stackoverflow.com/comment/40523409
has body: How can I make the softkeyboard come up with the bootstrap modal when auto focusing a field? It sounds easy, but I am unable to do so as of yet. The focus part works but not the keyboard. I am trying to save the user a tap. I can leverage 'shown.bs.modal' and set the focus but the softkeyboard will not show up automatically. The user still needs to retap the field. How can I force the softkeyboard to come up. The code I am currently playing with (pretty much): this.$container.on('shown.bs.modal', function () { console.log('shown.bs.modal'); setTimeout(function () { var $ctrl = $(jqselector); $ctrl.addClass('active').focus(); }, 500); }); this.$container.modal({ backdrop: (this.config.showModal ? 'static' : true) }) .on('hidden.bs.modal', function () { $(this).remove(); }); SE question related to just focus another question Edit: After looking at the bootstrap code a bit, it looks like it ads focus to the modal control after all of the processing. I assumed something like this was happening which is why I added the setTimeout, but even with a large delay, no luck. I will look at the bootsrap code a little more closely this weekend Bounty edit: Bootstrap code: Modal.prototype.show = function (_relatedTarget) { var that = this var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) this.$element.trigger(e) if (this.isShown || e.isDefaultPrevented()) return this.isShown = true this.checkScrollbar() this.$body.addClass('modal-open') this.setScrollbar() this.escape() this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) this.backdrop(function () { var transition = $.support.transition &amp;&amp; that.$element.hasClass('fade') if (!that.$element.parent().length) { that.$element.appendTo(that.$body) // don't move modals dom position } that.$element .show() .scrollTop(0) if (transition) { that.$element[0].offsetWidth // force reflow } that.$element .addClass('in') .attr('aria-hidden', false) that.enforceFocus() var e = $.E…
downvote count: 0
has comment: http://stackoverflow.com/comment/40502451
tagged with: soft-keyboard
tagged with: twitter-bootstrap
linked to: http://stackoverflow.com/q/12204571
linked to: http://stackoverflow.com/q/11634809
has comment: http://stackoverflow.com/comment/40376165
type: Question
has answer: http://stackoverflow.com/a/26269162
tagged with: javascript
score: 5
tagged with: mobile
has comment: http://stackoverflow.com/comment/40569932
has comment: http://stackoverflow.com/comment/40147495
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39684974
upvote count: 5
linked to: http://stackoverflow.com/q/14940423
type: UnansweredQuestion
has title: focus WITH SOFT-KEYBOARD with bootstrap modal
has comment: http://stackoverflow.com/comment/40459500
linked to: http://stackoverflow.com/q/6837543
has comment: http://stackoverflow.com/comment/40564592
has comment: http://stackoverflow.com/comment/40523320

http://stackoverflow.com/a/25490331
has comment: http://stackoverflow.com/comment/39820570
accepted answer of: http://stackoverflow.com/q/25489706
answers question: http://stackoverflow.com/q/25489706
score: 0
type: AcceptedAnswer
has body: I think you could fix this by adding width: 0; and overflow: hidden; to your div#plane. Otherwise, follow these steps: Step 1: Remove the img tag from the plane div, it is not needed. Add the id to the img tag itself. &lt;img id="plane" src="http://www.locanto.info/classifieds/images/airplane.png"&gt; Step 2: #plane{ position: fixed; right: -WIDTH OF IMAGE; } Step 3: $(document).ready(function() { $(window).scroll(function() { $('#plane').css({ 'right': $(this).scrollTop() - WIDTH OF IMAGE, }); }); });
type: Answer

http://stackoverflow.com/a/25395768
has comment: http://stackoverflow.com/comment/39632018
type: Answer
answers question: http://stackoverflow.com/q/25395427
has comment: http://stackoverflow.com/comment/39609632
upvote count: 1
has body: If you remove the .trigger('change') from your fiddle it logs Object {id: 1, label: "NEW VALUE"} (need to click twice since the logging is before the value change). Is that what you're looking for?
score: 1
downvote count: 0

http://stackoverflow.com/comment/39805110
score: 3
comment on: http://stackoverflow.com/q/25500316
has text: He said that he wanted to sort a dictionary by its keys. Dictionaries don't exist in JS, so we may build a key/value ordered structure to suit his needs, which can look like a 'dictionary'. No need to change his question. I think this is a common problem for people coming from other languages, so in my opinion this title should be kept as it is
type: QuestionComment
type: Comment

titanium
type: Tag
tags question: http://stackoverflow.com/q/25509277
tags question: http://stackoverflow.com/q/25486255
tag name: titanium
tags question: http://stackoverflow.com/q/25435731
tags question: http://stackoverflow.com/q/25448342

http://stackoverflow.com/q/25546302
has comment: http://stackoverflow.com/comment/39887899
tagged with: button
tagged with: javascript
score: 0
has title: How to limit enter key press to only one button in a form having two submit buttons
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39887999
accepted answer: http://stackoverflow.com/a/25546814
tagged with: form-submit
has body: I have an HTML form having two submit type input buttons with different actions attached. The form should get submitted on click of any of these buttons. But on enter key press, button-B should trigger the submit. Now as i have button-A on top of button-B in the order, button-A is getting triggered on enter press. Please note that changing the order of buttons is not possible in my case. My code goes like this, &lt;form method="POST" action="someAction"&gt; &lt;input type="text" name="fName"/&gt; &lt;input type="text" name="lName"/&gt; &lt;input type="submit" value="Action-A" name="button-A"/&gt; &lt;input type="submit" value="Action-B" name="button-B"/&gt; &lt;/form&gt;
has answer: http://stackoverflow.com/a/25546814
type: AnsweredQuestion
tagged with: forms
type: Question

http://stackoverflow.com/comment/39869689
has text: @VishnuPrasad if this works and your original didn't work then probably you have more than one element with `id="smileybutton"` and this confuses jquery (remember `id`'s must be unique)
comment on: http://stackoverflow.com/a/25524531
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25457911
has comment: http://stackoverflow.com/comment/39725407
has comment: http://stackoverflow.com/comment/39725153
has comment: http://stackoverflow.com/comment/39725772
type: Question
linked to: http://stackoverflow.com/q/111102
has answer: http://stackoverflow.com/a/25458007
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39725511
tagged with: prototype
score: 0
has answer: http://stackoverflow.com/a/25457994
has answer: http://stackoverflow.com/a/25457965
tagged with: http://stackoverflow.com/tag/svg
accepted answer: http://stackoverflow.com/a/25458007
possible better answer: http://stackoverflow.com/a/25457945
has comment: http://stackoverflow.com/comment/39725149
has title: How do I access an object via another object that contains an object which is a property of the object I want to have access to?
has answer: http://stackoverflow.com/a/25457945
has body: It was kinda hard to come up with the title for this one, hope it's understandable and makes sense. Well , maybe, the difficulty to come up with the title reflects some unnecessary complexity of this situation - if there's a simple way to do this I'd love to know. In this sample, there's a Car 'class', from which I can instance objects (Cars). It has a template (an SVG, which is not a car, actually, but who cares), and also public methods, used to modify the template, via jQuery. In the carContainerClick() function, how do I access the Car instance whose template is contained by the currently clicked carContainer element? Sample here $(function(){ var cars = []; for (var i = 0; i &lt; 2; i++) { var carContainer = $('&lt;div/&gt;', { class: 'car-container'}); var car = new Car(); cars[i] = car; carContainer.on('click', carContainerClick); carContainer.append(car.getTemplate()); $('.container').append(carContainer); } function carContainerClick() { // HERE - how do I access the Car instance whose template is contained by the currently clicked carContainer element? cars[0].changeColor(); } }); function Car () { this.template = $('&lt;svg viewBox="0 0 301 259"&gt; &lt;g class="svg-group"&gt;&lt;path class="stick-2" fill-rule="evenodd" clip-rule="evenodd" d="M74.192,27.447c2.589-2.042,4.576-3.188,6.991-5.093c0,0,1.753-1.11,0.416-2.945 c-1.13-1.546-3.242,0.014-3.242,0.014c-4.831,3.804-9.678,7.589-14.491,11.418c-2.335,1.861-4.335,4.009-7.954,3.233 c-2.136-0.458-3.892,1.798-3.913,4.021c-0.02,2.326,1.531,4.107,3.734,4.296c2.353,0.2,4.689-1.183,4.635-3.241 c-0.066-2.415,1.215-3.474,2.981-4.492c1.821-1.049,5.809-3.993,7.21-4.785C71.961,29.082,74.192,27.447,74.192,27.447z"/&gt;&lt;/g&gt;&lt;/svg&gt;'); } Car.prototype = { getTemplate: function() { return this.template; }, changeColor: function() { console.log('changeColor'); $('.svg-group', this.template).find("path, polygon, circle").attr("fill", "#aff"); } }; update i made a little test with the solutions provided here and tu…
tagged with: css
linked to: http://stackoverflow.com/q/750486
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/39745450
score: 1
has text: Did you see the wrapping of $(function() {}) ?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25468921

http://stackoverflow.com/q/25418222
has comment: http://stackoverflow.com/comment/39651357
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25418290
has title: Explanation for the Code
has comment: http://stackoverflow.com/comment/39651431
score: -1
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I asked a question a few days back, and the link below was the solution in JSFiddle: http://jsfiddle.net/vineetgnair/pnhxxcsw/11/ Later on, I got another answer that did the work of the previous solution in just 2 lines of code instead of 8-9. Since I'm new to coding, I'm unable to figure out how the new JSFiddle works. If someone could explain it to me, I would be appreciative. Here is the code and JSFiddle link from the second solution: var div = $('div').not(':first').hide().end(); $('button').on('click', function() { div.hide().eq($(this).index()).show() }) http://jsfiddle.net/adeneo/pnhxxcsw/13/ Thanks in advance
downvote count: 1
favorite count: 0

instantiation
type: Tag
tags question: http://stackoverflow.com/q/25514492
tag name: instantiation

http://stackoverflow.com/comment/39617637
score: 0
type: Comment
has text: @Noypi working like a charm. Thank you sir. I will look into providers and decorators
type: AnswerComment
comment on: http://stackoverflow.com/a/25400076

http://stackoverflow.com/q/25396592
tagged with: javascript
tagged with: express
has body: I'm trying to redirect all my routes ending with /api to a manager.js which will then route it to /me. So, a fully qualified request to /me should look like /api/me. Splitting routes up into separate files was easy in Express 3.x, but I'm having trouble in 4.0. app.js app.use('/api',require('./routes/manager')); manager.js var express = require('express'); var manager = express.Router(); module.exports = function() { manager.use('/me',require('../routes/me')); }; me.js var express = require('express'); var me = express.Router(); module.exports = function() { me.route('/') .get(function(req,res){ res.send("Welcome to Me"); }); }; When I go to localhost:8080/api/me, nothing happens, the page keeps loading. Thanks for any help!
has title: Unable to Split Routes into Separate Files in Express 4.0
has comment: http://stackoverflow.com/comment/39610972
accepted answer: http://stackoverflow.com/a/25396703
favorite count: 0
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25396703
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39626404
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25405033
score: 0
has text: Well ofcourse you can, but you shouldn't. Have you tried changing the id thru jquery? `$('#gf_top > form').attr('id', 'newid')` don't know if that works, but it fixes multiple issues if it does.

http://stackoverflow.com/comment/39839152
comment on: http://stackoverflow.com/q/25519023
type: QuestionComment
type: Comment
has text: @jfriend00 good points.. I am checking.
score: 0

http://stackoverflow.com/comment/39769839
type: Comment
type: QuestionComment
score: 0
has text: use Object.defineProperty(Array.prototype,"associate", function (keys) {... to fix it.
comment on: http://stackoverflow.com/q/25481908

http://stackoverflow.com/comment/39780228
comment on: http://stackoverflow.com/q/25487721
type: QuestionComment
type: Comment
has text: What do you mean by "occasionally"? I started the app 20 times and it always ran just fine. Maybe it is related to your hardware and/or the amount of heavily loaded tabs that you have started in your browser.
score: 0

http://stackoverflow.com/a/25461190
has comment: http://stackoverflow.com/comment/39732462
type: Answer
answers question: http://stackoverflow.com/q/25461061
has body: I don't think you can delete a dom node before dom has been parsed.use &lt;noscript&gt;&lt;/noscript&gt; if you are not using XHTML.
score: 0

http://stackoverflow.com/a/25441438
has body: In an HTML page you can use &lt;% %&gt; to access the serverside code of the page (ASP.NET). It is executed when the page is rendered. &lt;%= someTextIdontKnow %&gt; is short for &lt;% Response.Write(someTextIdontKnow) %&gt; and it writes the content of the variable (as a String) into the HTML code. The link to the Knowledgebase Example to write an error-text from a resource file into the HTML: &lt;div class="error"&gt; &lt;%= Resources.Com.ERR_failureAction_lbl%&gt; &lt;/div&gt;
answers question: http://stackoverflow.com/q/25441269
type: Answer
score: 0

http://stackoverflow.com/comment/39862028
has text: @Teemu It looks like the function can't reach myframeid. Isn't it?
comment on: http://stackoverflow.com/q/25530800
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25408532
type: AnsweredQuestion
tagged with: animated
has comment: http://stackoverflow.com/comment/39633363
accepted answer: http://stackoverflow.com/a/25707519
has comment: http://stackoverflow.com/comment/39633609
type: Question
tagged with: javascript
score: 0
answer count: 1
has body: I'd like to create this layering effect with a div popping up and floating above the original. https://d13yacurqjgara.cloudfront.net/users/22691/screenshots/1644434/gif_animation.gif Is there an animation framework that would work best for this? Is it best to do it with javascript? or maybe css?
has title: Animate a div layer popping up
tagged with: css
has answer: http://stackoverflow.com/a/25707519

http://stackoverflow.com/q/25518865
has title: Why doesn't my javascript regexp work with array items?
has body: var x = new Array('1','2','3'); var y = new Array('a','b','c'); var iLen = x.length; var s = 'abcdefgabcdefg'; for (var i=0;i&lt;iLen;i++) { var re = new RegExp(x[i],'g'); s = s.replace(y[i], re); } alert(s); I want the result to be 123defg123defg. Instead, I get /1/g/2/g/3/gdefgabcdefg.
downvote count: 3
type: Question
tagged with: javascript
score: -1
upvote count: 2
answer count: 1
tagged with: arrays
tagged with: variables
favorite count: 0
has answer: http://stackoverflow.com/a/25518899
tagged with: regex
accepted answer: http://stackoverflow.com/a/25518899
type: AnsweredQuestion

http://stackoverflow.com/a/25508585
has comment: http://stackoverflow.com/comment/39819349
has body: You can use .slideToggle() $(document).ready(function(){ $('.faq_desc').hide(); $('.faq li.faq_head').click(function(e){ $(this).siblings().find('.faq_desc').slideUp().removeClass('slided_down'); $(this).find('.faq_desc').slideToggle().toggleClass('slided_down'); e.preventDefault(); }); }); DEMO Update $(document).ready(function(){ $('.faq_desc').hide(); $('.faq li.faq_head').click(function(e){ var $i = $('ul.faq i.fa'); $i.not($(this).find('i.fa')).removeClass('fa-caret-up').addClass('fa-caret-down'); $(this).find('i.fa').toggleClass('fa-caret-down fa-caret-up') $(this).siblings().find('.faq_desc').slideUp().removeClass('slided_down'); $(this).find('.faq_desc').slideToggle().toggleClass('slided_down'); e.preventDefault(); }); }); DEMO
score: 2
accepted answer of: http://stackoverflow.com/q/25508453
answers question: http://stackoverflow.com/q/25508453
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25493155
has title: Menu (JS) and Calendar (JS) error
has comment: http://stackoverflow.com/comment/39791017
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25496824
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25493381
has body: I have a menu with JS, it works perfectly but I have a calendar page with the following code &lt;script type="text/javascript"&gt; $(function() { $("‪#‎fecha_nac‬").datepicker({dateFormat: "yy-mm-dd"}).val() }); &lt;/script&gt; if I put the above code that the menu is damaged. The menu will open and buttons with this code the menu, I can do die? I thought about using HTML5 date but this is not supported in Firefox. Code of Menu: $( document ).ready(function() { $('#cssmenu li.has-sub&gt;a').on('click', function(){ $(this).removeAttr('href'); var element = $(this).parent('li'); if (element.hasClass('open')) { element.removeClass('open'); element.find('li').removeClass('open'); element.find('ul').slideUp(); } else { element.addClass('open'); element.children('ul').slideDown(); element.siblings('li').children('ul').slideUp(); element.siblings('li').removeClass('open'); element.siblings('li').find('li').removeClass('open'); element.siblings('li').find('ul').slideUp(); } }); $('#cssmenu&gt;ul&gt;li.has-sub&gt;a').append('&lt;span class="holder"&gt;&lt;/span&gt;'); (function getColor() { var r, g, b; var textColor = $('#cssmenu').css('color'); textColor = textColor.slice(4); r = textColor.slice(0, textColor.indexOf(',')); textColor = textColor.slice(textColor.indexOf(' ') + 1); g = textColor.slice(0, textColor.indexOf(',')); textColor = textColor.slice(textColor.indexOf(' ') + 1); b = textColor.slice(0, textColor.indexOf(')')); var l = rgbToHsl(r, g, b); if (l &gt; 0.7) { $('#cssmenu&gt;ul&gt;li&gt;a').css('text-shadow', '0 1px 1px rgba(0, 0, 0, .35)'); $('#cssmenu&gt;ul&gt;li&gt;a&gt;span').css('border-color', 'rgba(0, 0, 0, .35)'); } else { $('#cssmenu&gt;ul&gt;li&gt;a').css('text-shadow', '0 1px 0 rgba(255, 255, 255, .35)'); $('#cssmenu&gt;ul&gt;li&gt;a&gt;span').css('border-color', 'rgba(255, 255, 255, .35)'); } })(); function rgbToHsl(r, g, b) { r /= 255, g /= 255, b /= 255; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; if(max =…
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39790915
answer count: 2

http://stackoverflow.com/a/25418446
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/25418368
has body: Small jQuery script written for the same. Its just a basic. http://jsfiddle.net/35cfzfv4/ HTML &lt;img src="http://imgsv.imaging.nikon.com/lineup/dslr/df/img/sample/img_01.jpg" class="swapimg"&gt; JS $( document ).ready(function() { var dimg = "http://imgsv.imaging.nikon.com/lineup/dslr/df/img/sample/img_01.jpg"; var imgswitch = false; $('.swapimg').click(function(){ if(imgswitch){ $(this).attr('src','http://imgsv.imaging.nikon.com/lineup/dslr/df/img/sample/img_01.jpg'); imgswitch = false; }else{ $(this).attr('src','http://imgsv.imaging.nikon.com/lineup/dslr/df/img/sample/img_02.jpg'); imgswitch = true; } }) });
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39882125
comment on: http://stackoverflow.com/q/25542071
has text: sure, since a browser cannot discover page dimensions before loading and rendering it...
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/25519194
has answer: http://stackoverflow.com/a/25519296
favorite count: 0
possible better answer: http://stackoverflow.com/a/25519296
has body: Is there a way to give each item that sits at the bottom of a masonry column a class to allow targeting with CSS? The number of columns changes with page width so the items that are at the bottom of the column will change and the page increases or decreases in size. To illustrate the problem I want to remove the border bottom from each item that sits at the bottom of a column in the 2 images below:
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/25598664
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25598664
type: Question
tagged with: jquery-masonry
tagged with: masonry
downvote count: 0
tagged with: javascript
answer count: 2
has title: Masonry target last item in each column

http://stackoverflow.com/q/25536147
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/39873376
has title: Backbone.js adding model retrieved from server to a collection
has comment: http://stackoverflow.com/comment/39870018
downvote count: 0
score: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39887009
has answer: http://stackoverflow.com/a/25538289
accepted answer: http://stackoverflow.com/a/25538289
has body: I would like to know if it possible to add a model to a collection in the following manner. I tried it and it doesn't work. If I add the JSON [] directly it does. I know this is a little strange but I am trying to get a better understanding of how BB works. Thanks. var UserModel = Backbone.Model.extend({ urlRoot: '/users', }); var UserModels = Backbone.Collection.extend({ url: '/users', model: UserModel }); var user = new UserModel({id:1}); user.fetch({ // get the model success: function (user) { var users = new UserModels(); users.add(user); // add the model to a collection } }); The following model is being echoed from the server: [{"name":"john","email":"john@bb.com"}]
upvote count: 1
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39893075
score: 0
type: Comment
type: QuestionComment
has text: If you need to display more data than the browser can handle, consider outputting to excel instead.
comment on: http://stackoverflow.com/q/25545373

http://stackoverflow.com/comment/39638882
type: Comment
has text: [***We Done Been ... Framed!***](http://blog.codinghorror.com/we-done-been-framed/)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25411452

http://stackoverflow.com/a/25438584
has body: You can't define strings like that. You can do multiline strings like this though var str = "Hello world\n\ This is a test.\n\ Multi-line."; Then this regexp will work for you str.replace(/[\r\n]+/g, "&lt;br&gt;"); Notice that regexp in JavaScript are not enclosed in quotes " like they are in langs like PHP. Per @alex's comment, you could create the regexp like this var re = new RegExp('[\r\n]+', 'g'); str.replace(re, "&lt;br&gt;"); In this case, you use a string, but no / delimiters.
type: Answer
has comment: http://stackoverflow.com/comment/39688909
accepted answer of: http://stackoverflow.com/q/25438569
answers question: http://stackoverflow.com/q/25438569
upvote count: 4
score: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39688907

http://stackoverflow.com/q/25502472
possible better answer: http://stackoverflow.com/a/25502603
has title: Strange Javascript Syntax for "repeating" a method call
has comment: http://stackoverflow.com/comment/39807743
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25502673
accepted answer: http://stackoverflow.com/a/25502673
tagged with: syntax
has body: I've just stumbled across the following javascript snippet in some production code. It works in Chrome &amp; IE but it's not a syntax that I've seen before. The specific snippet is using the jquery vegas plugin to rotate some image background on a timer and overlay a transparent pixel grid on the images. Here's the code in production. $(function () { $.vegas('slideshow', { delay: 10000, backgrounds: [ { src: '@Url.Content("~/Images/1.jpg")', fade: 3000 }, { src: '@Url.Content("~/Images/2.jpg")', fade: 3000 } ] })('overlay', { //&lt;&lt;&lt;----- LOOK AT THOSE TOUCHING PARENTHESES src: '@Url.Content("~/Content/Overlays/02.png")' }); }); And here's what it would seem to be equivalent to in more "readable" form. $(function () { $.vegas('slideshow', { delay: 10000, backgrounds: [ { src: '@Url.Content("~/Images/1.jpg")', fade: 3000 }, { src: '@Url.Content("~/Images/2.jpg")', fade: 3000 } ] }) $.vegas('overlay', { src: '@Url.Content("~/Content/Overlays/02.png")' }); }); So it appears that passing a second set of parameters in a second pair of parentheses, will re-execute the same method a second time with a second set of params, but I'm struggling to find the terminology to search for this type of javascript syntax as it's not something I've seen in other languages. Can anyone explain.
has comment: http://stackoverflow.com/comment/39807638
has comment: http://stackoverflow.com/comment/39807634
type: Question
has answer: http://stackoverflow.com/a/25502603
tagged with: javascript
has comment: http://stackoverflow.com/comment/39807639
score: 0
answer count: 3
tagged with: jquery
has comment: http://stackoverflow.com/comment/39807646
has answer: http://stackoverflow.com/a/25502606

http://stackoverflow.com/comment/39902251
type: Comment
has text: Don't do this - your modal will scroll off the top of the window as you scroll down the page, which is not what you want
type: AnswerComment
comment on: http://stackoverflow.com/a/25545509
score: 0

http://stackoverflow.com/comment/39866404
type: Comment
has text: I think you're short a step; why doesn't `[null].toString()` return `"null"`?
type: AnswerComment
comment on: http://stackoverflow.com/a/25531744
score: 1

http://stackoverflow.com/comment/39906284
score: 0
type: AnswerComment
type: Comment
has text: It looks Dropbox would prefer if /delta is not called more often than once every 5 minutes. If longpoll-delta reports changes before that time is up, should I still wait before calling it again? Or is it considered OK in this case because I know that changes have occurred?
comment on: http://stackoverflow.com/a/25533950

http://stackoverflow.com/comment/39725809
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25457996
has text: Sorry, forgot the last word in the name and the s in elements so it should be getElementsByClassName (solution edited to reflect this) XD though it was intended as a general direction rather than a hardset copy-paste.
type: AnswerComment

http://stackoverflow.com/a/25407150
has comment: http://stackoverflow.com/comment/39630583
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25406938
answers question: http://stackoverflow.com/q/25406938
has body: &lt;textarea id="area" class="textbox"&gt;&lt;/textarea&gt; var greekArr = "ΑΒΨΔΕΦΓΗΙ ΚΛΜΝΟΠ ΡΣΤΘΩ ΧΥΖ"; var map = {}; for (var i = 65; i &lt; 91; i++) { map[i] = greekArr.charAt(i - 65); } $('textarea').on('keydown', function (e) { if (e.keyCode in map) { var div = document.getElementById('area'); div.value = div.value + map[e.keyCode]; return false; } });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39630662

http://stackoverflow.com/q/25435066
favorite count: 0
tagged with: adsense
has title: How do I use reactjs with Google DFP/AdSense
accepted answer: http://stackoverflow.com/a/37261182
type: AnsweredQuestion
has body: I'm wanting to build a project with Facebook's reactjs framework (JSX), but given how it renders, how would I use this with Doubleclick for publishers? If I trigger adsense/urchin, how do I tell React not to change/update those items? Is there an alternative adwords script/interface I can use?
possible better answer: http://stackoverflow.com/a/25436675
has comment: http://stackoverflow.com/comment/46751408
score: 12
type: Question
has answer: http://stackoverflow.com/a/37261182
tagged with: reactjs
answer count: 2
upvote count: 12
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25436675
has comment: http://stackoverflow.com/comment/46748650

http://stackoverflow.com/a/77070796
has comment: http://stackoverflow.com/comment/140272595
downvote count: 0
answers question: http://stackoverflow.com/q/25532778
type: Answer
upvote count: 1
has body: The problem with debugging real (i.e. large) applications, is that when they fail, you can't just check the code and rerun the app on your machine. You have to read the (often massive) logs file, and hope you notice something that is out of place. To make this work easier, you use hierarchies of severety for your log messages. You start from the most severe error, then work backwards, looking at progressively more granular messages, until some message shows you what went wrong. The implementation for different logging functions may be practically the same, in that the messages end up in the same output. However, this doesn't make them "the same". The severety of the error is important. If your messages are annotated appropriately, you will be able to search through the logs, skipping the noise. Here's a possible interpretation of the levels in console Level Use Degug Low level info that is only relevant during development Info Details about what the program is doing Log High-level tracking about the state of the program Warn Something is wrong; nothing has failed yet Error The process didn't do what it was supposed to Assert The fundamental assumptions of the program have been broken. Anything after this can be garbage
score: 1

http://stackoverflow.com/comment/40007650
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25533192
has text: Could you add the HTML?

infinite-scroll
tag name: infinite-scroll
type: Tag
tags question: http://stackoverflow.com/q/25447168
tags question: http://stackoverflow.com/q/25457871

http://stackoverflow.com/q/25414778
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25414852
linked to: http://stackoverflow.com/q/32363511
accepted answer: http://stackoverflow.com/a/25414852
score: 26
type: Question
possible better answer: http://stackoverflow.com/a/36154164
has answer: http://stackoverflow.com/a/36154164
has title: JQuery .on('click') not working in DataTables 2nd page or rows past 11
tagged with: javascript
tagged with: jquery
favorite count: 0
upvote count: 26
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25414870
tagged with: datatables
answer count: 4
downvote count: 0
has body: I have a jQuery link that runs on a dynamic list for each row when the hyperlink is clicked. This works before datatables is applied, but once datatables is applied the 11th row (after changing display to higher than the default 10) or when on another page, the jQuery is no longer called. I tried throwing this in a jsFiddle and it works there, so I can't reproduce it in a jsFiddle for some reason. Any pointers in the right direction would be very much appreciated. PHP: echo " "; echo " Test1 Test2 "; foreach($array as $arr){ echo " " . $arr['test1'] . " "; echo "" . $arr['test2'] . ""; echo " "; } echo " "; jQuery $(function(){ $('.test').on('click', '.toggleTest', function(e){ var id = $(this).data('id'); $("#test-"+id).html("Done"); return false; }); }); $(document).ready(function() { $('#paginatedTable').dataTable(); } );
has answer: http://stackoverflow.com/a/41618111

http://stackoverflow.com/comment/39705161
has text: see if this helps you http://emberjs.com/guides/configuring-ember/embedding-applications/ Also i would not suggest using ember as only half of ur application, however if you still want to. Try to use the var that holds the application i.e. app = Ember.Application.Create and then use app.yourView.someFunction() and inside the someFunction have a this.get('controller').send('actionName',data); This should serve your purpose
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25441563

http://stackoverflow.com/comment/39795206
has text: Thanks for your response Dawid, I'll investigate further since I'm new in the world of Ajax and PHP.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25494032

http://stackoverflow.com/q/25466283
type: Question
has title: How to mimic scrolling with Apache's HttpClient library?
has body: Some webpage feature a limited amount of content to start with and only show more when scrolling, for example https://answers.yahoo.com/dir/index?sid=396545161&amp;tab=popular&amp;filter=lang&amp;sort=popular For humans, this does not pose a problem. However, when attempting to process this data automatically with Apache's HttpClient library, this does pose a problem. How can one ask HttpClient to fetch more topics on this Yahoo Answers page? Closer inspection of the javascript on the page shows subsequent calls to [GET] https://answers.yahoo.com/xhr-cat-popular.php?filter=lang&amp;sort=popular&amp;ct=1408831552&amp;cl=1408831552&amp;offset=21&amp;categoryId=396545161&amp;page=2&amp;_txnid=1408831555799&amp;crumb=TVGhgfkE0db [GET] https://answers.yahoo.com/xhr-cat-popular.php?filter=lang&amp;sort=popular&amp;ct=1408831552&amp;cl=1408831552&amp;offset=41&amp;categoryId=396545161&amp;page=3&amp;_txnid=1408831557894&amp;crumb=TVGhgfkE0db [GET] https://answers.yahoo.com/xhr-cat-popular.php?filter=lang&amp;sort=popular&amp;ct=1408831552&amp;cl=1408831552&amp;offset=61&amp;categoryId=396545161&amp;page=4&amp;_txnid=1408831823937&amp;crumb=TVGhgfkE0db [GET] https://answers.yahoo.com/xhr-cat-popular.php?filter=lang&amp;sort=popular&amp;ct=1408831552&amp;cl=1408831552&amp;offset=81&amp;categoryId=396545161&amp;page=5&amp;_txnid=1408831827678&amp;crumb=TVGhgfkE0db etc. when scrolling, which provides the desired contents for the subsequent pages. However, when opening these links in my browser window (or in HttpClient for that matter) I am simply redirected to the home page. Am I missing something, or how should I trick the server into thinking I'm just the javascript asking for the next page contents?
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25466325
score: 0
tagged with: apache-commons-httpclient
type: UnansweredQuestion
tagged with: scroll
tagged with: java

http://stackoverflow.com/comment/39748857
score: 0
type: AnswerComment
type: Comment
has text: @todddeece Your welcome, you can accept it as correct answer if it helped. Also post your another question in a new topic (not as an answer here).
comment on: http://stackoverflow.com/a/25468227

http://stackoverflow.com/a/25466817
accepted answer of: http://stackoverflow.com/q/25464562
type: AcceptedAnswer
downvote count: 0
has body: Method 1: using Ajax Every time a user clicks an image, you get the id from the clicked image and then you send an Ajax request to server in order to get the JSON object. HTML Kenneth Atkins [Description here] JavaScript (function($) { var infoModal = $('#myModal'); $('.thumbnail').on('click', function(){ $.ajax({ type: "GET", url: 'getJson.php?id='+$(this).data('id'), dataType: 'json', success: function(data){ htmlData = ' title: '+data.first_name+' age: '+data.age+' '; infoModal.find('.modal-body').html(htmlData); infoModal.modal('show'); } }); return false; }); })(jQuery); Method 2: using hidden div No need to any Ajax request, but you need to create a hidden div that contain all the information you want to display in the modal HTML Kenneth Atkins [Description here] title: Atkins Kenneth Age: 16 JavaScript (function($) { var infoModal = $('#myModal'); $('.thumbnail').on('click', function(){ htmlData = $(this).find('.profile').html(); infoModal.find('.modal-body').html(htmlData); infoModal.modal('show'); return false; }); })(jQuery);
answers question: http://stackoverflow.com/q/25464562
type: Answer
score: 11
upvote count: 11

http://stackoverflow.com/comment/39674069
has text: `$('#listbox-taskStatus option')` gets all of the `option` elements. You just want the selected one.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25430552
score: 0

http://stackoverflow.com/q/25439051
has answer: http://stackoverflow.com/a/30791181
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has title: Angular validation - outputting invalid fields in page order
possible better answer: http://stackoverflow.com/a/30800097
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/30800097
accepted answer: http://stackoverflow.com/a/30791181
has body: I'm trying to output invalid field names in a generic way. The below does this by looping through all the fields in the form and just appending to a string with the key name. It gets run when you click a submit button: for (var key in form) { if (key.indexOf("$") !== 0) { if (form[key].$invalid) { str += '- ' + key + '&lt;br /&gt;'; } } } My only issue with this is the order that the keys appear dont match the order that the fields appear on the page. I'm assuming it's related to how the fields themselves are created, since dynamically generated fields seem to appear before normal fields. I'd really like to maintain the order, but can't think of a good way to do this. Was hoping someone would have a suggestion?
tagged with: javascript
type: AnsweredQuestion
tagged with: validation
downvote count: 0

http://stackoverflow.com/a/25463215
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25463020
score: 3
answers question: http://stackoverflow.com/q/25463020
has comment: http://stackoverflow.com/comment/39735317
type: AcceptedAnswer
downvote count: 0
has body: You're "Users" object is a function, a constructor apparently. You can't get to methods of a constructor's prototype from the constructor directly like that. You can however create an instance and access the prototypes that way. var u = new Users(); u.find(whatever); edit &mdash; now, back in the module, you've got two "Users" symbols. One is that outer function, and the other is that "Users" function declared inside it. However, what you export is the outer one, and it doesn't have a "find" method on its prototype. You can solve this problem by calling the outer "Users" function to get to the proper one. That can be done either in the module or in the client context, though I suspect you probably want it in the module: module.exports = Users();
has comment: http://stackoverflow.com/comment/39735258
type: Answer

http://stackoverflow.com/q/25532901
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/39863757
tagged with: asp.net-mvc
has body: I'm developing an app which has a lot of client side javascript handling for navigation around a responsive app (which ultimately consists of one gigantic form). Basically, as the user progresses through the form (i.e. presses a button which is handled client side in javascript) I need to store the timestamp in which the user presses the button. I'm storing the timestamp in JavaScript variables when the button event is triggered. Now, when the user presses the submit button on the form and it sends the POST request to the server, I need to send the values of these variables. Any ideas how I can do this?
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25533079
has answer: http://stackoverflow.com/a/25537487
linked to: http://stackoverflow.com/q/6181822
answer count: 3
has answer: http://stackoverflow.com/a/25539000
possible better answer: http://stackoverflow.com/a/25533079
tagged with: asp.net
favorite count: 0
has title: Access client side variable on the server side
has comment: http://stackoverflow.com/comment/39866195
upvote count: 1
accepted answer: http://stackoverflow.com/a/25539000
type: AnsweredQuestion
score: 1

random
tags question: http://stackoverflow.com/q/25524741
tags question: http://stackoverflow.com/q/25424602
tags question: http://stackoverflow.com/q/25463160
tag name: random
tags question: http://stackoverflow.com/q/25389934
type: Tag
tags question: http://stackoverflow.com/q/25529714
tags question: http://stackoverflow.com/q/25391137

http://stackoverflow.com/a/25526225
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39881226
has body: Try this : $("#tlist").find("tr").eq(1).addClass("highlight"); $("#tlist").find("tr").eq(1).click(function(){ alert(); }); CSS : .highlight td{ background-color: #0f0; } OR $("#tlist tbody").find("tr").eq(0).addClass("highlight"); $("#tlist tbody").find("tr").eq(0).click(function(){ alert(); }); CSS: .highlight td{ background-color: #0f0; } DEMO :- http://jsfiddle.net/d1mhdhzm/
answers question: http://stackoverflow.com/q/25526162
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39689783
type: Comment
type: QuestionComment
has text: Are you trying to emulate AJAX or actually send a request to the server?
comment on: http://stackoverflow.com/q/25439099
score: 0

http://stackoverflow.com/comment/39639919
type: Comment
comment on: http://stackoverflow.com/a/25406327
has text: I know it does not get loaded due to the fact that I added an unload "alert('loaded')", which does not show up when I load the page inside my other page. How do I make sure it actually gets loaded?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39677446
type: Comment
has text: What is the "trouble" you are talking about?
comment on: http://stackoverflow.com/q/25432284
score: 0
type: QuestionComment

http://stackoverflow.com/q/25543241
type: Question
accepted answer: http://stackoverflow.com/a/25544855
answer count: 2
has answer: http://stackoverflow.com/a/25543459
score: 0
tagged with: http://stackoverflow.com/tag/json
tagged with: forms
possible better answer: http://stackoverflow.com/a/25543459
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25544855
has title: Convert forms with inputs that have same name to JSON
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39882953
has body: I have a form like so that collects information about a users car: Add another car When the user clicks the 'Add another car' link, my JS duplicates the 'carInfo' group of inputs and appends it to 'inputContainer'; creating a new set of form inputs like so: Add another car Once the user clicks submit, I want to parse the form into a JSON object and inject it into a hidden input field. JSON for two cars should look like this: [{ "Make" : "Mazda" , "Model": "Protege" , "Year" : "2002" , "Color" : "Red" } , { "Make" : "Toyota" , "Model": "Camery" , "Year" : "2012" , "Color" : "Blue" }] I am currently getting the input's name to serve as the key and the entered value as the value. I have the following function built: CreateJson: function () { $.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, function() { if (o[this.name] !== undefined) { if (!o[this.name].push) { o[this.name] = [o[this.name]]; } o[this.name].push(this.value || ''); } else { o[this.name] = this.value || ''; } }); return o; }; var carDataString = JSON.stringify($('.inputContainer input').serializeObject()); console.log(carDataString); $("input[name='AllCarData']").val(carDataString); } }; ********The only problem is that since the additional inputs that are duplicated when a user chooses to add another car use the same 'name', my JSON is only outputting one set of values insead of multiple (when multiple cars are added). http://jsfiddle.net/njacoy/jLopamk7/ Note: I am using the jQuery validate plugin to validate this form. It's set to look for input names. Thanks!
tagged with: parsing
has comment: http://stackoverflow.com/comment/39882715

http://stackoverflow.com/a/69010929
score: 0
answers question: http://stackoverflow.com/q/25467009
type: Answer
has comment: http://stackoverflow.com/comment/121966780
has body: This answer is cool! And I want to make some modifications. For chrome 93.0.4577.63 chrome.i18n.getMessage permalink, link-by-version chrome.i18n.getMessage(messageName, substitutions, {escapeLt}) So I want to make it support substitutions escapeLt Test Data // _locales/en/messages.json { "hello": { "message": "Hello $USER$ Welcoming $OUR_SITE$. $EMOJI$", "description": "Greet the user", "placeholders": { "user": { "content": "$1", // chrome.i18n.getMessage("hello", "variable 1") "example": "Carson" }, "our_site": { "content": "Example.com" }, "emoji": { "content": "$2", "example": "\uD83D\uDE42" // , } } }, "app": { "message": "My cool APP.", "description": "description" } } output Script // my-i18n.js /** * @param {string} msg "__MSG_Hello__para1,para2|1" or "__MSG_Hello__para1,para2|0" * */ function convertMsgAsFuncPara(msg) { const match = /__MSG_(?<id>\w+)__(? [^|]*)?(\|(?<escapeLt>[01]{1}))?/g.exec(msg) // https://regex101.com/r/OeXezc/1/ if (match) { let {groups: {id, para, escapeLt}} = match para = para ?? "" escapeLt = escapeLt ?? false return [id, para.split(","), Boolean(Number(escapeLt))] } return [undefined] } function InitI18nNode() { const msgNodeArray = document.querySelectorAll(`[data-i18n]`) msgNodeArray.forEach(msgNode => { const [id, paraArray, escapeLt] = convertMsgAsFuncPara(msgNode.getAttribute("data-i18n")) if (id) { msgNode.innerHTML = chrome.i18n.getMessage(id, paraArray, {escapeLt}) } // ↓ handle attr for (const attr of msgNode.attributes) { const [attrName, attrValue] = [attr.nodeName, attr.nodeValue] const [id, paraArray, escapeLt] = convertMsgAsFuncPara(attrValue) if (!id) { continue } msgNode.setAttribute(attrName, chrome.i18n.getMessage(id, paraArray, {escapeLt})) } }) } (() => { window.addEventListener("load", InitI18nNode, {once: true}) })()

http://stackoverflow.com/q/25530582
type: UnansweredQuestion
score: 1
has title: Show Current Database Value as Default in Dropdown
tagged with: javascript
type: Question
upvote count: 1
has body: I have a dropdown that a selection produces another dropdown with values. All of this writes to the database correctly. I can't figure out how to show the current database value (ie the last value submitted) to show up in the 'second' drop down ('first' dropdown works fine in recalling the database information). So when I select 'Masking Available' I would like that to show up when I open the webpage next time. function configureDropDownLists(main, second) { var masking1e = new Array('', 'Masking Available'); var permissivemode1e = new Array('', 'Permissive Mode Enabled'); switch (main.value) { case 'Masking': document.getElementById(second).options.length = 0; for (i = 0; i < masking1e.length; i++) { createOption(document.getElementById(second), masking1e[i], masking1e[i]); } break; case 'Permissive Mode': document.getElementById(second).options.length = 0; for (i = 0; i < permissivemode1e.length; i++) { createOption(document.getElementById(second), permissivemode1e[i], permissivemode1e[i]); } break; default: document.getElementById(second).options.length = 0; break; } } function createOption(first, text, value) { var opt = document.createElement('option'); opt.value = value; opt.text = text; first.options.add(opt); } Please Select Accommodation <option value="Masking" <?php if ($first== "Masking"){ echo "SELECTED"; } ?>>Masking <option value="Permissive Mode" <?php if ($first== "Permissive Mode"){ echo "SELECTED"; } ?>>Permissive Mode
favorite count: 0
answer count: 0
downvote count: 0

keypress
tags question: http://stackoverflow.com/q/25462528
tags question: http://stackoverflow.com/q/25464579
type: Tag
tag name: keypress

http://stackoverflow.com/q/25456683
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39723856
possible better answer: http://stackoverflow.com/a/25456778
has body: Im try to get a div to slide from the left hand side so it looks like it slides out. Currently i have it expanding out from the top left corner which is close but not what i am after. Fiddle here: http://jsfiddle.net/zangief007/yhdrfo4e/ html: &lt;div class="first"&gt;&lt;/div&gt; &lt;div class="second"&gt;&lt;/div&gt; js: $( ".first" ).click(function() { $( ".second" ).show( "slow" ); $( ".first" ).hide( 100 ); }); $( ".second" ).click(function() { $( ".second" ).hide( "slow" ); $( ".first" ).show( 100 ); }); CSS: .first{ width:100px; height:100px; background:red; display:block; } .second{ width:400px; height:100px; background:blue; display:none; }
has answer: http://stackoverflow.com/a/25456778
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/39722901
has comment: http://stackoverflow.com/comment/39722890
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/25456748
has answer: http://stackoverflow.com/a/25456767
has title: Animate div from left to right
tagged with: css
answer count: 4
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25456787
type: Question
accepted answer: http://stackoverflow.com/a/25456767

http://stackoverflow.com/comment/39824146
has text: atleast post the code whatever is working for you, doesn't matter if duplicate. No one is going to post by post and check what worked for you.
comment on: http://stackoverflow.com/q/25511066
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25456401
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39722332
has body: You are executing the clickHandler when you add (); you need to just specify the callback by name: button.onclick = clickHandler; You can all always find the element that fired the event by passing (e), so your clickHandler should do this: function clickHandler(e) { var originElement = e.target; }
downvote count: 0
answers question: http://stackoverflow.com/q/25456336
type: Answer

http://stackoverflow.com/a/25415766
has comment: http://stackoverflow.com/comment/39646921
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3
has body: With your code, every time .raid_building is clicked, you hook up a new handler for clicks on #startRaid. So that means, if .raid_building is clicked twice, you'll have two handlers for clicks on #startRaid, both of which start a new interval timer. Your frameStop variable will only contain the handle of one of them; the other will continue. And of course, a third click will compound the problem (you'll have three click handlers, each of which fires up a new interval timer). And so on... Move the code hooking click on #startRaid outside the click handler on .raid_building.
score: 3
accepted answer of: http://stackoverflow.com/q/25415722
answers question: http://stackoverflow.com/q/25415722
has comment: http://stackoverflow.com/comment/39646935

http://stackoverflow.com/comment/40243112
type: Comment
has text: Nevermind, I found out that a button appears anyway when the width < responsiveWidth.
score: 0
comment on: http://stackoverflow.com/a/25715844
type: AnswerComment

http://stackoverflow.com/a/27748480
answers question: http://stackoverflow.com/q/25409462
type: Answer
upvote count: 1
has body: I had to write unit tests for this algorithm last week. Here my explanation: // Approximate the step to the closest power of ten by transforming to the // commom log scale, truncating the mantissa, and transforming back. step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), // Calculate how closely the step covers the span of the domain. err = (m * step) / span; // Given the coverage of the current step against the domain span, multiply // (if necessary) by a constant to get closer to the desired tick count. if (err &lt;= 0.15) step *= 10; else if (err &lt;= 0.35) step *= 5; else if (err &lt;= 0.75) step *= 2;
score: 1
downvote count: 0

http://stackoverflow.com/comment/39602900
has text: you are using one of the preserved key words `switch`. Need to change that. And even though I have nothing against your solution I would not compare `src` to hardcoded `images/image2.jpg` what if the name of that image changes?
type: Comment
comment on: http://stackoverflow.com/a/25392279
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39685906
comment on: http://stackoverflow.com/a/25436716
has text: Interesting. I don't think its algorithmically the same since yours does lots of joins() while mine only does one at the very end. I will test it on some of our real world examples and see if it is as fast or faster than my current solution....it might be. (I'll wait a day or two to accept an answer, to see if anyone comes up with a super-crazy-fast one, but right now yours is the best one :) )
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/39857154
type: AnswerComment
type: Comment
has text: @workabyte - Thanks :) can you pls edit your code as you have explained !! so that i can understand better!!
comment on: http://stackoverflow.com/a/25528899
score: 0

http://stackoverflow.com/q/25477804
has comment: http://stackoverflow.com/comment/39761895
has body: Here is the fiddle. Ignore the styling, that's not important. Basically I needed to open the Fancybox with two links present, but I only want one gallery image. I figured that out easily enough. When the thumbnail is clicked it triggers the li anchor. To keep the galleries separate I did unique classes for each ol. The problem I have run into is I will be repeating myself. I attempted to do a loop (commented out), but the logic is beyond my grasp. What is the best way to attach a new click handler (I need to add 8 more) without repeating myself in my current fashion? I've also tried a function with a couple parameters, but I had trouble with the e.preventDefault(). I greatly appreciate any guidance, thanks!
type: AnsweredQuestion
has title: Attaching multiple click events without having to repeat myself
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25477868
has comment: http://stackoverflow.com/comment/39761859
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25477868

http://stackoverflow.com/comment/39879659
type: Comment
type: QuestionComment
has text: you have added required js files on your page???
comment on: http://stackoverflow.com/q/25541594
score: 2

http://stackoverflow.com/q/25540396
has title: adding custom parameters for highcharts using ajax
has body: I'm trying to add some parameters to my highcharts that are being called by ajax. I call all the necessary parameters in a separate php, then the success result would put it in the container for highcharts. My Code: $.ajax({ type: 'post', url: 'sdayresult.php', data: $("#FormName").serialize(), success: function(data) { //$("#anser").html(data); $('#container').highcharts({data}); } The value of the data: chart: { type: 'scatter' }, title: { text: 'Search by Airline' }, xAxis: { categories: ['none'] }, yAxis: { title: { text: '# of Crew' } }, series: [{ name: '# of Crew', URLs: ['#'], data: [0], point: { events: { click: function() { var someURL = this.series.userOptions.URLs[this.x]; // onclick get the x index and use it to find the URL if (someURL) window.open('http://'+someURL); }}} }] But when I run the script, the is a javascript error saying that I have an undefined "}". I tried pasting the value of the data to another test page of highcharts and it seems that the value of data is correct. What should I do to fix it?
answer count: 0
has comment: http://stackoverflow.com/comment/39877875
type: UnansweredQuestion
tagged with: php
type: Question
tagged with: highcharts
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39886717
score: 0

http://stackoverflow.com/q/25516769
has title: How to create dynamic meteor js buttons that will sync with whatever Collection is rendered
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: meteor-blaze
has body: My app has a list of products which can be sorted with buttons based on id (which is determined by their product type or class, see below). Foo Bar Sometimes the user will navigate to a different class of products, and I need update the buttons to reflect this. {{#each product }} {{ product.type }} Now the catch. My list contains duplicates, so I also have to loop through and pick out only unique product.type values. Is there a handy way to do this with the templates (Meteor Blaze)? Or does that require a helper, like... Template.filterbuttons.helpers({ product: function () { // ... // use _.uniq() to remove duplicates return {type: {['foo', 'bar']}} } });
score: 0
tagged with: meteor
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25517112
type: Question

http://stackoverflow.com/a/25424472
has body: Don't know PHP, but in C# this is how I determine if it is AJAX from jQuery: if (Request.Headers["X-Requested-With"] == "XMLHttpRequest"){ // this is AJAX } So you can avoid updating your db if above is true. I'm sure you know the equivalent in PHP.
answers question: http://stackoverflow.com/q/25423477
upvote count: 1
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/64403594
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25473583
has text: This doesn't seem to work if I pre-compile jade templates using `jade.compileFile` . Any idea how to get around this issue?
type: AnswerComment

http://stackoverflow.com/q/25530547
tagged with: forced-unwrapping
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39864135
tagged with: video
tagged with: tags
has comment: http://stackoverflow.com/comment/39864340
has comment: http://stackoverflow.com/comment/39864175
has answer: http://stackoverflow.com/a/25530709
type: Question
has title: unwrapping a video tag using jquery
has comment: http://stackoverflow.com/comment/39864151
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39859551
answer count: 1
has comment: http://stackoverflow.com/comment/39859754
has body: I have this: &lt;div class="vid"&gt; &lt;video&gt; bla bla bla &lt;/video&gt; &lt;/div&gt; I have to unwrap this video tag, so I tried: $( "video" ).unwrap(); The result in the console window is: TypeError: undefined is not a function message: "undefined is not a function" stack: (...) get stack: function () { [native code] } set stack: function () { [native code] } __proto__: Error Any clue? Tks a lot!

http://stackoverflow.com/comment/123096207
comment on: http://stackoverflow.com/a/53530097
type: AnswerComment
has text: good job, btw, use `items.forEach( function(v) { ... })` instead of `$.each(items, function(k, v) { ... })` for better compatibility in different version of JS engines
score: 4
type: Comment

http://stackoverflow.com/q/25460990
tagged with: iframe
upvote count: 1
has title: Calling a function in Iframe from parent window?
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39734296
tagged with: javascript
has comment: http://stackoverflow.com/comment/39748719
has comment: http://stackoverflow.com/comment/39734914
has comment: http://stackoverflow.com/comment/39745578
linked to: http://stackoverflow.com/q/251420
has answer: http://stackoverflow.com/a/25462928
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39745557
tagged with: jquery
favorite count: 0
has body: I want to call a function in Iframe from parent window . as var iframe = document.getElementById("myframe"); if (iframe) { var iframeContent = (iframe.contentWindow || iframe.contentDocument); iframeContent.targetFunction(); } but it doesn't work . Since the content of Iframe is added dynamically (All contents are added in iframe on demand even js file); I had followed this Invoking JavaScript code in an iframe from the parent page There is any way to solve this problem ?
has comment: http://stackoverflow.com/comment/39731328
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39730941
has comment: http://stackoverflow.com/comment/39734568
has comment: http://stackoverflow.com/comment/39734392

http://stackoverflow.com/comment/39608232
comment on: http://stackoverflow.com/a/25395019
score: 0
type: AnswerComment
has text: Glad to hear that. Have fun!
type: Comment

http://stackoverflow.com/q/25417583
has body: I'm trying to pass all the value from A page to B page, but once I submit form from B page it will link to A page in the pop up window screen. Which mean it will have 2 windows show A page, one is in normal window another 1 is in pop up window. Here are the sample of the code how they works. FILE A.jsp <% String NAME_1= common.setNullToString(request.getParameter("NAME_1")); String ETYPE = common.setNullToString(request.getParameter("ETYPE")); %> --Please Select-- Apple Orange Name : <%if(ETYPE.equals("E01")){%> <input type="text" name="name" value="<%=NAME%>"> <%}else{%> <input type="text" name="name" value="<%=NAME_1%>"> <%}%> Change In file A.jsp when i click on the "link" it will pop up a window for B.jsp FILE B.jsp <% String NAME 1= ""; String ETYPE = common.setNullToString(request.getParameter("TYPE")); %> <form name="mainform" method="post" action="A.jsp?ETYPE=<%=ETYPE%>"> Name : <input type="text" name="NAME_1" id="NAME_1" value="<%=NAME_1%>" > What i aiming for is, when i click submit on submit button in B.jsp, the pop up screen B.jsp will close and all the value in B.jsp will replace A.jsp value based on the condition.
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39650754
has comment: http://stackoverflow.com/comment/39650328
tagged with: java
tagged with: javascript
has comment: http://stackoverflow.com/comment/39650737
has comment: http://stackoverflow.com/comment/39650258
has comment: http://stackoverflow.com/comment/39650293
downvote count: 0
tagged with: jsp
has title: JSP Passing value from one page to another
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39650255
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39650517
answer count: 0
has comment: http://stackoverflow.com/comment/39650610

http://stackoverflow.com/q/25541769
has answer: http://stackoverflow.com/a/25541853
accepted answer: http://stackoverflow.com/a/25541933
has body: I have a few functions that do redirection on angularjs: $scope.a= function() { $location.url('/a'); return; } $scope.b= function() { $location.url('/b'); return; } $scope.c = function() { $location.url('/c'); return; } $scope.d= function() { $location.url('/d'); return; } $scope.e= function() { $location.url('/e'); return; } $scope.f= function() { $location.url('/f'); return; } These have been declared inside one controller but I want every other js controller to have access to it. I want to avoid having to copy and paste these functions in every other controller. How do I achieve this? angular routes: var hot_keys = [ ['. p','a','RedirectService.a()'], ['. o','b','RedirectService.b()'], ['. i','c','RedirectService.c()'], ['. f','d','RedirectService.d()'], ['. v','e','RedirectService.e()'], ['. a','f','RedirectService.f()'] ]; .when('/a', { templateUrl: 'templates/a', controller: 'aController', hotkeys: hot_keys }) what this does is if user presses ". a" it should call the RedirectService.a();
has title: I want these functions to be accessible to every js controller throughout my application. How do I achieve this?
tagged with: angularjs
answer count: 4
possible better answer: http://stackoverflow.com/a/25541802
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25541839
tagged with: javascript
has answer: http://stackoverflow.com/a/25541802
score: 0
has answer: http://stackoverflow.com/a/25541933

http://stackoverflow.com/q/25430224
accepted answer: http://stackoverflow.com/a/25432434
score: 0
answer count: 1
tagged with: jquery
tagged with: epoch
tagged with: datepicker
has body: I'm trying to get the epoch date from my datepicker. I have tried putting an altField with an altFormat on the datepicker via HTML but when trying to get the value back using JavaScript it's null: HTML - &lt;input onchange='Refresh()' name="logging_from" id="logging_from" type="date" data-role="datebox" data-options='{"mode": "calbox","overrideDateFormat":"%d-%b-%y", "showInitialValue":true, "altField": "#epochdate","altFormat": "@" }'&gt; JavaScript - var loggingfromactual = document.getElementById("epochdate").value; Any help would be appreciated, thanks!
has title: How to get epoch value from JQueryM datepicker?
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25432434
tagged with: jquery-mobile
tagged with: javascript

http://stackoverflow.com/q/25550476
tagged with: javascript
tagged with: jquery
score: 0
has body: am trying to pass a google areachart (svg) to a c# codebehind, have tried to add the svg html to a hidden field but so far when I add the html to the hidden field value the javascript that generates the chart is being added rather than the svg tag and the corresponding data. I have been using the javascript below to pass the the contents of the div containing the chart: &lt;script type="text/javascript"&gt; $(document).ready(function() { var chartsvg = document.getElementById('ctl00_Body_chartcontent'); var serializer = new XMLSerializer(); var str = serializer.serializeToString(chartsvg); $('input[name^="ctl00$Body$svgData"]').val(str); var test = $('input[name="ctl00$Body$svgData"]').val(); alert(test); }); &lt;/script&gt; Once I have passed it to the codebehind I plan on converting the svg to a png. The alert is for testing what has been added to the hidden field. Does anyone have any ideas on how I could do this? Thanks in advanced for any advice given.
has comment: http://stackoverflow.com/comment/39926324
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has title: passing svg google areachart to c# codebehind
has comment: http://stackoverflow.com/comment/39913396
answer count: 0
type: Question
tagged with: c#
tagged with: google-visualization

http://stackoverflow.com/q/25448254
answer count: 2
has title: targeting ALL inputs inside a div
accepted answer: http://stackoverflow.com/a/25448302
tagged with: javascript
type: AnsweredQuestion
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25448305
has comment: http://stackoverflow.com/comment/39706164
has answer: http://stackoverflow.com/a/25448305
has body: I am trying to target every checkbox inside a specific div, I have a few nested ul's that all have checkboxes in them and when you check off the most parent item I want everything inside to check off too I was trying to do something like $(this).closest("li").children('input[type=checkbox]').prop("checked", true); Where the this referring to the click of the checkbox. All the children nested inside the li (they are all children). I can't seem to get it to target everything inside. In short - I'm just trying to say target every single checkbox inside this div on this event (no matter how nested it is).
type: Question
has answer: http://stackoverflow.com/a/25448302
tagged with: http://stackoverflow.com/tag/html
score: 0

http://stackoverflow.com/a/25527667
answers question: http://stackoverflow.com/q/25527607
has comment: http://stackoverflow.com/comment/94930417
has body: You can use callback method. Use $scope.heroList = _.pluck($scope.heroes, function(elm){ return elm.name + '(' + elm.lname + ', ' + elm.fname + ')'; }); DEMO Also I would recommend you to use _.map() $scope.heroList = _.map($scope.heroes, function(elm){ return elm.name + '(' + elm.lname + ', ' + elm.fname + ')'; }); DEMO with map
has comment: http://stackoverflow.com/comment/39855139
type: Answer
score: 3
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25527607
downvote count: 0

http://stackoverflow.com/comment/39778310
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25486756
score: 1
has text: This shows you why inline event handlers are a bad idea.

http://stackoverflow.com/comment/40292105
type: Comment
type: QuestionComment
has text: Got what the problem was, it was happening due to cache on mailchimp. maybe the info i am writing is helpful to someone because i was unable to find out this anywhere that mailchimp may cause problem due to cache. Thanks by the way.
score: 1
comment on: http://stackoverflow.com/q/25546012

http://stackoverflow.com/q/25398407
tagged with: javascript
has body: I am trying to come up with a jVectorMap for South East Asian countries. I used following links as reference: http://techslides.com/creating-maps-for-jvectormap/ china jVectorMap - Kibana few more jVectorMaps - Kibana from the 1st link's example of South America, I understand that scaling of co-ordinates is needed. with China as reference, Following is my js code for SEAsia: $.fn.vectorMap('addMap', 'asean',{"insets": [{"width": 900.0, "top": 0, "height": 440.7063107441331, "bbox": [{"y": -12671671.123330014, "x": -20004297.151525836}, {"y": 3930392.025135122, "x": 10026572.394749384}], "left": 0}], "paths": { "MM": {"path": "M670.1,233.39l-1.46,1.11l-1.68,0.11l-0.26,0.19l-1.1,2.7l-0.95,0.42l-0.14,0.42l1.21,2.27l1.61,1.92l0.94,1.55l-0.82,1.99l-0.77,0.42l-0.13,0.39l0.64,1.35l1.62,1.97l0.26,1.32l-0.04,1.15l0.02,0.13l0.92,2.18l-1.3,2.23l-0.79,1.69l-0.1,-0.77l0.74,-1.87l-0.02,-0.26l-0.8,-1.42l0.2,-2.68l-0.06,-0.2l-0.98,-1.27l-0.8,-2.98l-0.45,-3.22l-1.11,-2.22l-0.45,-0.1l-1.64,1.28l-2.74,1.76l-1.26,-0.2l-1.27,-0.49l0.79,-2.93l0.0,-0.14l-0.52,-2.42l-1.93,-2.97l0.26,-0.8l-0.22,-0.39l-1.37,-0.31l-1.65,-1.98l-0.12,-1.5l0.41,0.19l0.42,-0.26l0.05,-1.7l1.08,-0.54l0.16,-0.34l-0.24,-1.0l0.5,-0.79l0.05,-0.15l0.08,-2.35l1.58,0.49l0.36,-0.15l1.12,-2.19l0.15,-1.34l1.35,-2.18l0.04,-0.17l-0.07,-1.35l2.97,-1.71l1.67,0.45l0.38,-0.33l-0.18,-1.46l0.7,-0.4l0.15,-0.32l-0.13,-0.72l0.94,-0.13l0.74,1.41l0.11,0.12l0.95,0.56l0.07,1.89l-0.09,2.08l-2.28,2.15l-0.09,0.19l-0.3,3.15l0.35,0.32l2.37,-0.39l0.53,2.17l0.2,0.21l1.3,0.42l-0.63,1.9l0.14,0.36l1.86,0.99l1.1,0.49l0.24,0.0l1.45,-0.6l0.04,0.51l-2.01,1.6l-0.56,0.96l-1.34,0.56Z", "name": "Myanmar"}, "SG": {"path": "M103.97,1.331L103.82,1.265L103.65,1.326L103.705,1.423L103.818,1.447L103.909,1.416L103.961,1.392L103.996,1.365L103.97,1.331z","name": "Singapore"} "TH": {"path": "M677.42,253.68l-1.7,-0.88l-0.14,-0.03l-1.77,0.04l0.3,-1.64l-0.3,-0.35l-2.21,0.01l-0.3,0.28l-0.2,2.76l-2.15,5.9l-0.02,0.13l0.17,1.83l0.28,0.27l1.45,0.07l0.93,2.1l0.44,2.15l0.08,0.1…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40582245
tagged with: http://stackoverflow.com/tag/svg
tagged with: jvectormap
answer count: 0
type: Question
tagged with: kibana
has comment: http://stackoverflow.com/comment/40583803
score: 0
has title: A vector map for South East Asia

http://stackoverflow.com/q/25476941
has comment: http://stackoverflow.com/comment/39760464
downvote count: 3
type: Question
has title: Modifying multiple results by class name?
has answer: http://stackoverflow.com/a/25476956
upvote count: 0
tagged with: javascript
score: -3
linked to: http://stackoverflow.com/q/3478942
answer count: 1
has body: How would I go about selecting each element in the script below, modifying the innerHTML by adding +5, and then re-writing the old number with the new one? The code below when the JavaScript runs would put out 15, 25, 35 when modified by +5. 10 20 30 Was able to do this with the help received. Using PHP I will write timestamps to template files and then using Javascript I will fetch each timestamp and then format the time and convert it to the users timezone. 1408917668 1378917668
has comment: http://stackoverflow.com/comment/39760310
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39760533
has comment: http://stackoverflow.com/comment/39760499
has comment: http://stackoverflow.com/comment/39760439

http://stackoverflow.com/q/25523498
accepted answer: http://stackoverflow.com/a/25523758
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How can I force in javascript to execute a line before moving to next one?
has body: I have few filters that show or hide table rows in a table and then checks if there are no rows visible then add a message to the table saying no row exists. This is how I am trying to do it, but fails miserably, maybe I am not aware of with the way JS executes lines, maybe asynchronous always ? HTML &lt;input ID="cbFreshFruits" Checked="true" onclick="ToggleFruits(this)" /&gt; Script function ToggleFruits(elm) { $target = $('#fruitTable tr[data-status="' + elm.id + '"]').filter(function () { var crates = $("#crateTable tr .selected").parent().map(function () { return $(this).data("crateID"); }).get(); return crates.indexOf($(this).data("crateID")) &gt;= 0; }); if (elm.checked) { $target.show("down"); } else { $('#fruitTable tr[data-status="' + elm.id + '"]').hide("up"); } CheckFruitExists(); } function CheckFruitExists() { $("#NoFilteredFruits").hide(); $("#fruitTable").show(); if ($("#fruitTable tr:visible").length &lt; 1) { $("#NoFilteredFruits").show(); $("#fruitTable").hide(); } } Problem When checked in developer tools, JS executes this statement if ($("#fruitTable tr:visible").length &lt; 1) before this one, else { $('#fruitTable tr[data-status="' + elm.id + '"]').hide("up"); } I mean it executes it, but it changes are not made, e.g. it doesn't hide any rows before excuting if statement. Please note, I am using CheckFruitExists at different places, so I would like to keep it separate.
has comment: http://stackoverflow.com/comment/39847254
has comment: http://stackoverflow.com/comment/39848619
has comment: http://stackoverflow.com/comment/39846829
has comment: http://stackoverflow.com/comment/39846867
upvote count: 3
has answer: http://stackoverflow.com/a/25523758
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/39848217
type: Question

http://stackoverflow.com/q/25461885
has comment: http://stackoverflow.com/comment/39733301
upvote count: 1
has body: I am trying to find an OnClick Function that will work inside of a table. When the page loads they content needs to be hidden, but given an option either but button or link to show it. &lt;div id="table-container"&gt; &lt;table id="maintable" border="1" cellspacing="0" cellpadding="1"&gt; &lt;thead&gt; &lt;th class="blk" nowrap&gt;Number&lt;/th&gt; &lt;th class="blk" nowrap&gt;Original Title&lt;/th&gt; &lt;th class="blk" nowrap&gt;Translated Title&lt;/th&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;td class="lgt"&gt;&lt;font size="4"&gt;2 Guns&amp;nbsp;&lt;/font&gt;&lt;/td&gt; &lt;tr&gt;&lt;td class="lgt"&gt;&lt;font size="4"&gt;Two Guns&amp;nbsp;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="lgt"&gt;&lt;font size="4"&gt;English, Spanish&amp;nbsp;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="lgt"&gt;&lt;font size="4"&gt;109&amp;nbsp;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; This is roughly what I am trying to do, is be able to hide &lt;tr&gt;&lt;td class="lgt"&gt;&lt;font size="4"&gt;Two Guns&amp;nbsp;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="lgt"&gt;&lt;font size="4"&gt;English, Spanish&amp;nbsp;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="lgt"&gt;&lt;font size="4"&gt;109&amp;nbsp;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; and or unhide them.. I have tried using the below input.. &lt;script language="javascript" type="text/javascript"&gt; function showHide(shID) { if (document.getElementById(shID)) { if (document.getElementById(shID+'-show').style.display != 'none') { document.getElementById(shID+'-show').style.display = 'none'; document.getElementById(shID).style.display = 'block'; } else { document.getElementById(shID+'-show').style.display = 'inline'; document.getElementById(shID).style.display = 'none'; } } } &lt;/script&gt; &lt;div id="wrap"&gt; &lt;a href="#" id="example-show" class="showLink" onclick="showHide('example');return false;"&gt;See more.&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="#" id="example-hide" class="hid…
has comment: http://stackoverflow.com/comment/39732407
has comment: http://stackoverflow.com/comment/39737478
type: Question
has answer: http://stackoverflow.com/a/25773930
has comment: http://stackoverflow.com/comment/39733091
has comment: http://stackoverflow.com/comment/39733141
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39732579
downvote count: 4
answer count: 3
has title: Html Show Hide Content
accepted answer: http://stackoverflow.com/a/25773930
favorite count: 0
has answer: http://stackoverflow.com/a/25463180
score: -3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39735929
possible better answer: http://stackoverflow.com/a/25462567
has answer: http://stackoverflow.com/a/25462567

http://stackoverflow.com/q/25392608
type: Question
has answer: http://stackoverflow.com/a/25392894
accepted answer: http://stackoverflow.com/a/25392894
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has body: I am trying to create a nav bar that is down 500px from the top of the page, but once you scroll down to it, it becomes fixed at the top, like this Originally I had the following code: $(window).scroll(function() { if ($(document).scrollTop() &gt; 500) { $nav.addClass('fixed'); } else { $nav.removeClass('fixed'); } }); and .fixed { position: fixed; top: 0; z-index: 1; } However, my page is responsive and the nav bar will not always be 500px down the page. Therefore, I used .offset().top to trigger the fixed class when scrolling reaches the top of my nav bar. $(window).scroll(function() { var $navTop = $nav.offset().top; if ($(document).scrollTop() &gt; $navTop) { $nav.addClass('fixed'); } else { $nav.removeClass('fixed'); } }); The issue is that the nav bar flickers terribly when you scroll. I tried replacing .offset() with .position(), which gets rid of the flicker, but it keeps the nav bar fixed for longer than it should when scrolling back up past its original position. Please, help!
has title: Fixed nav flickers when scrolling
has comment: http://stackoverflow.com/comment/39603595
type: AnsweredQuestion

http://stackoverflow.com/comment/39900441
has text: @ScottStroz hahaha. Well I mean with like some arcane combination of alerts() and tea leaves and wishful thinking.
comment on: http://stackoverflow.com/q/25545373
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39756677
type: QuestionComment
comment on: http://stackoverflow.com/q/25474937
type: Comment
has text: The problem most likely is the `TARGET` (like `_TOP` or `_BLANK`) and `METHOD` (`GET` vs `POST`) of the forms. One of the solutions might be using AJAX, another to create a hidden form on the fly, etc. It depends on what you are trying to achieve exactly, for that we need to see more code.
score: 0

http://stackoverflow.com/q/25441269
has comment: http://stackoverflow.com/comment/39693505
has comment: http://stackoverflow.com/comment/39693470
type: Question
has comment: http://stackoverflow.com/comment/39693877
tagged with: javascript
score: -1
downvote count: 2
has answer: http://stackoverflow.com/a/25441438
upvote count: 1
tagged with: string
has comment: http://stackoverflow.com/comment/39693477
favorite count: 0
has comment: http://stackoverflow.com/comment/39693662
has title: Need explanation on strings "<%= text %>"
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/25441383
has comment: http://stackoverflow.com/comment/39693555
has answer: http://stackoverflow.com/a/25441725
has body: Can anyone explain to me how this works? '&lt;%= someTextIdontKnow %>'. I've seen codes with strings looks like shown above. Need a thorough explanation on this please. Thanks :) P.S. I've seen it on a javascript file, I should have tag asp if it was.
has answer: http://stackoverflow.com/a/25441389

http://stackoverflow.com/a/25480113
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39799246
type: Answer
has body: If you want to check for strict mode support, consider: function supportsStrict() { 'use strict'; return typeof function(){return this;}() == 'undefined'; } console.log(supportsStrict()); // true if supports strict mode That way you can test independently and run different code branches depending on the result.
upvote count: 3
answers question: http://stackoverflow.com/q/25479453
accepted answer of: http://stackoverflow.com/q/25479453
score: 3
has comment: http://stackoverflow.com/comment/39799504

http://stackoverflow.com/a/25544130
accepted answer of: http://stackoverflow.com/q/25543835
answers question: http://stackoverflow.com/q/25543835
downvote count: 0
score: 3
upvote count: 3
type: AcceptedAnswer
has body: Apart from what arghbleargh said (which is also correct), you can also (alternatively) use events.forEach(function (i, v) { ev.push({ title: i.Message, start: i.StartDate, end: i.EndDate, id: i.EventsCalendarID }); }); Here's the fiddle http://jsfiddle.net/ymrsxh2h/ which i used Hope this also helps :)
type: Answer

http://stackoverflow.com/q/25512971
tagged with: javascript
has body: For the below code I want to test the if/else in someMethod, but I don't have access to that require'd component. Is there any tricks to testing this stuff with Browserify? I can set baz: Foo.bar() on the proto, but then I'd have to do that for every require'd component I need to override. var Foo = require('../foo/index.js'); var someClass = new SomeClass({ someMethod: function () { var baz = Foo.bar(); if (baz == 'hello') { return 1 } else { return 0 } } });
score: 0
tagged with: mocking
tagged with: browserify
answer count: 1
type: UnansweredQuestion
tagged with: unit-testing
has answer: http://stackoverflow.com/a/25703967
type: Question
has title: Unit testing with Jasmine and Browserify and stubbing out require()s

http://stackoverflow.com/a/25438428
has body: build the popup first, then call the popup by a link or button. see this fiddle: Be sure you have the right jquery resources: Code JS var webPage = "http://www.cbc.ca"; var $dialog = $(' ') .html(' ') .dialog({ autoOpen: false, modal: true, height: 650, width: 600, title: "Add Information to calendar" }); $("#popup").on("click", function(){ $dialog.dialog('open'); });
answers question: http://stackoverflow.com/q/25438129
has comment: http://stackoverflow.com/comment/39708485
type: Answer
has comment: http://stackoverflow.com/comment/39701353
has comment: http://stackoverflow.com/comment/39689049
has comment: http://stackoverflow.com/comment/39689850
has comment: http://stackoverflow.com/comment/39689386
score: 0

http://stackoverflow.com/a/25399773
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25398395
has body: This should do the trick. var x = "abcde#$@asbd#$^@$"; x.slice(0,x.search(/\W*$/)); This will only trim off the special characters at the end of the string. It will leave special characters that are in the body of the string.
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25398395

http://stackoverflow.com/comment/39943824
type: QuestionComment
has text: Indeed, @NathanFisher! Meet my pain :) But those are the constraints I must work within for this one, at least. I have a better/smaller scale proof of concept created(http://jsfiddle.net/vcbbg81/vv3zjag4/18/), but there are a few things I still need to fulfill some requirements, such as sorting based on a sortOrder value. Do you know a way to get the DOM element the viewModel is currently using? Or do I just need to track that as part of an external objectArray?
comment on: http://stackoverflow.com/q/25497193
score: 0
type: Comment

http://stackoverflow.com/comment/39683303
type: Comment
score: 3
comment on: http://stackoverflow.com/q/25435387
has text: You need to enable CORS on your web service.
type: QuestionComment

http://stackoverflow.com/comment/39921353
has text: Apache as a proxy doesn't help - for one I am using Node and do not wish to insert Apache even in my test environment. Also I'm not sure how to start/stop the proxy together with my test instances (Intern web server and REST API server). This could be relevant though to people using Apache anyway.
comment on: http://stackoverflow.com/a/25551543
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39642555
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25413129
has text: @FelixKling Thank you but I got a null value after doing this
score: 0

http://stackoverflow.com/a/25456787
score: 1
answers question: http://stackoverflow.com/q/25456683
has comment: http://stackoverflow.com/comment/39723021
upvote count: 1
has comment: http://stackoverflow.com/comment/39723897
has body: Edit: Ok, it was a blast: $( ".first" ).one('click' , function() { $( ".second" ).show().animate({width:400}, 800); $( ".first" ).animate({width:0,left:400}, 800 ).promise().done(function(){ $(this).hide( ); second(); }); }); function first() { $( ".first" ).one('click' , function() { $( ".second" ).show().animate({width:400}, 800); $( ".first" ).animate({width:0,left:400}, 800 ).promise().done(function(){ $(this).hide( ); second(); }); }); } function second() { $( ".second" ).one('click' , function() { $( ".second" ).animate({width:0}, 800 ).promise().done(function(){ $(this).hide( ); first(); }); $( ".first" ).show( ).animate({width:100,left:0}, 800); }); } CSS div { position:absolute; } What this does, is to make a switch with .one(), which is a once .on() (click here). http://api.jquery.com/one/ Fiddle: http://jsfiddle.net/yhdrfo4e/11/
has comment: http://stackoverflow.com/comment/39723040
type: Answer
has comment: http://stackoverflow.com/comment/39723910
has comment: http://stackoverflow.com/comment/39723955
has comment: http://stackoverflow.com/comment/39723892
downvote count: 0
has comment: http://stackoverflow.com/comment/39723046

http://stackoverflow.com/q/25539639
tagged with: leaflet
tagged with: prototypal-inheritance
type: Question
has comment: http://stackoverflow.com/comment/39876415
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39876574
score: 0
has answer: http://stackoverflow.com/a/25539714
answer count: 1
has body: I know with this question I am demonstrating my confusion with basic concepts of object-based programming, but I am hoping someone can help me with this, as I just can't seem to wrap my head around it: function MagnifyGlass(){ var magnifiedTiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png'); var magnifyingGlass = L.magnifyingGlass({layers: [ magnifiedTiles ]}); this.magnifyingGlass = magnifyingGlass; } MagnifyGlass.prototype.begin=function(){ $("#map_canvas").mouseenter(function(){ this.magnifyingGlass.addTo(map); }).mouseleave(function(){ map.removeLayer(this.magnifyingGlass); }); } MagnifyGlass.prototype.end=function(){ map.removeLayer(this.magnifyingGlass); $("#map_canvas").unbind(); } var mg= new MagnifyGlass(); mg.begin(); What I want to happen here is that MagnifyGlass creates an object that works as a layer in a leaflet map (located in the div map_canvas). Then by calling .begin or .end I toggle whether that layer appears or not. I am creating the layer correctly (magnifyingGlass) and .begin is being called, but somehow the magnifyingGlass object isn't making it to the prototypes and I am pretty sure I have screwed up the this's somehow. Thanks for any help.
has title: Inheritance of an object through prototype
has comment: http://stackoverflow.com/comment/39876499
accepted answer: http://stackoverflow.com/a/25539714
has comment: http://stackoverflow.com/comment/39876563
type: AnsweredQuestion

http://stackoverflow.com/a/25454619
has comment: http://stackoverflow.com/comment/39718855
score: 0
answers question: http://stackoverflow.com/q/25454475
type: Answer
has comment: http://stackoverflow.com/comment/39718752
has body: you are binding the event on document, and not on p elements. But you are trying unbind the p elements. change your original bind to this. $(function () { $('.bar').on('click', function() { alert('Bar'); }); $('.foo').on('click', function() { alert('Foo'); var $sibling = $(this).siblings('.bar'); $sibling.unbind(); }); });

http://stackoverflow.com/q/25393059
type: AnsweredQuestion
has title: JS that reads an XML file, writes HTML code for several divs, then repeats itself until it gets to the end of the list
has comment: http://stackoverflow.com/comment/39604454
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39606153
has comment: http://stackoverflow.com/comment/39605102
has answer: http://stackoverflow.com/a/25414790
has body: I’d like to update the following page so that it’s easier to maintain. http://jsfiddle.net/johanbak/129uq4ts/5/ (Tip: There are panels that contain up to nine squares. Click the gray bars on the left or right to get to the next panel.) Currently, if I want to add a form, I have to update the HTML and that gets messy. Instead I’d like to maintain an XML file that lists all of my forms. The HTML file would contain a script that writes the HTML code for me based on the contents of the XML. The HTML has a main div (called panel_wrap). The panel_wrap div contains previous/next navigation divs, and nine square divs (called square). I’d like the javascript to do the following: Create a panel_wrap div Populate the panel_wrap div with the previous/next divs. (I don't mind having to update these independently.) Populate the panel_wrap div with nine squares (items 1 through 9 in the XML file). Create a new panel_wrap div with a unique id. Repeat step 2. Repeat step 3, but with items 10 through 19 in the XML file. Continue until it reaches the end of the XML file. The skinny: So basically, I need the script to create a main div, populate that main div with nine other divs (from an XML file), then repeat the process until it reaches the end of the list. Is that possible? Here's a sample of what the XML list would look like: <?xml version="1.0" encoding="UTF-8"?> Form 1 Form1 Form 2 Form2 Form 3 Form3 Form 4 Form4 Form 5 Form5 Form 6 Form6 Form 7 Form7 Form 8 Form8 Form 9 Form9 Form 10 Form10 Form 11 Form11 Form 12 Form12 Form 13 Form13 Form 14 Form14 Form 15 Form15 Form 16 Form16 Form 17 Form17 Form 18 Form18 Form 19 Form19 Form 20 Form20 Form 21 Form21 Form 22 Form22 Here's a script I started on, but it doesn't create new panel_wrap divs when needed. It just continues through the XML list until it reaches the end. I end up with a bunch of squares in one panel. if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// c…
accepted answer: http://stackoverflow.com/a/25414790

http://stackoverflow.com/a/25490503
score: 1
has body: You will need to use the require property inside your directive. This will make the scope of the defined controllers available inside the link function as 4th argument. You can access the scopes as an array inside the link function then. Your code may look like: return { restrict: 'EA', template: "&lt;div ng-include='getState()'&gt;&lt;/div&gt;", transclude: true, scope: false, require:['^RootCtrl', '^ContactsCtrl'], controller: ['$scope', '$state', function($scope, $state) { //some logic to retrieve and return the correct header template html }], link: function(scope, element, attrs, requiredControllers){ console.log(requiredControllers[0].test); console.log(requiredControllers[1].test2); } } See the Angular documentation for Directives for some more examples (under the title Creating Directives that Communicate) and the explanation of the ^controller syntax.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25490438
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25490438
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39646051
score: 0
has text: I wanted to switch to querySelector cuz I started with xpath and was using it mostly for simply tasks (and tests said it's 2500% slower), so it's mostly theoretical to see what I'd be missing
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25400812

http://stackoverflow.com/q/25536180
has body: I'm going to build a SPA with Angular. The app will be composed of three tabs. Every tab will hold large amounts of data (basically 100-200 rows and various text fields, drop downs etc). I'm facing objections from my colleagues to build this as a real SPA - they would like to separate this into three completely independent angular applications, living in the same asp.net MVC website. My question is: Will holding such data on the client side cause browser or rendering issues? Are they right thinking this is dangerous?
tagged with: javascript
tagged with: asp.net
score: 0
tagged with: angularjs
has title: Handling large amounts of data in Angular
possible better answer: http://stackoverflow.com/a/25536593
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39870093
has answer: http://stackoverflow.com/a/25536225
accepted answer: http://stackoverflow.com/a/25536225
type: Question
has answer: http://stackoverflow.com/a/25536593
has comment: http://stackoverflow.com/comment/39928192
answer count: 2

http://stackoverflow.com/comment/39674886
type: Comment
comment on: http://stackoverflow.com/a/25429727
has text: I also added a fullscreen method (onclick) as requested in title, but it won't work in jsFiddle's iframe
type: AnswerComment
score: 0

http://stackoverflow.com/q/25526618
has comment: http://stackoverflow.com/comment/40394640
has answer: http://stackoverflow.com/a/25532422
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25526940
type: AnsweredQuestion
tagged with: internet-explorer
tagged with: jqgrid
possible better answer: http://stackoverflow.com/a/25526940
score: 4
has body: I am using jgGrid. Its working perfectly but when i pass about 90,000 records and open the page in google chrome it takes around 8 sec to create a grid which in my case it should be near 3-4 sec. and moreover when i run the same page on IE it became unresponsive. Any suggestion how can i reduce the time ? my script function GetCommodityGrid(array) { array = array.rows; // assign rows array to array object totalRows = array.length; jQuery(document).ready(function () { jQuery("#list").jqGrid({ datatype: 'local', data: array, colNames: ['COM_NAME', 'COM_CODE', 'DELV_UNITS', 'LOT_SIZE', 'TICK_SIZE', 'TICK_VALUE'], colModel: [ { name: 'COM_NAME', index: 'COM_NAME', width: 90, editable: true }, { name: 'COM_CODE', index: 'COM_CODE', width: 100, editable: true }, { name: 'DELV_UNITS', index: 'DELV_UNITS', width: 80, align: "right", editable: true }, { name: 'LOT_SIZE', index: 'LOT_SIZE', width: 80, align: "right", editable: true }, { name: 'TICK_SIZE', index: 'TICK_SIZE', width: 80, align: "right", editable: true }, { name: 'TICK_VALUE', index: 'TICK_VALUE', width: 150, sortable: false, editable: true } ], rowList: [50,100,200], rownumbers: true, // show the numbers on rows loadonce: true, pager: '#pager', sortname: 'COM_NAME', viewrecords: true, // show the total records on the end of the page editurl: "TestGrid/EditRecord", caption: "JSON Example", //new option gridview: true, autoencode: true, }); $("#list").jqGrid("navGrid", "#pager", { add: false }, { //the Edit options closeAfterEdit: true, afterSubmit: function (response) { // you should return from server OK in sucess, any other message on error alert("after Submit"); if (response.responseText == "OKK") { alert("Update is succefully") return [true, "", ""] } else { alert("Update failed") $("#cData").click(); return [false, "", ""] } } }); }); }
type: Question
upvote count: 4
answer count: 2
has title: jqGrid Taking Long Time For Large Records
accepted answer: http://stackoverflow.com/a/25532422
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39853564
has comment: http://stackoverflow.com/comment/39852313

http://stackoverflow.com/a/25440373
downvote count: 0
has comment: http://stackoverflow.com/comment/39692806
has comment: http://stackoverflow.com/comment/39691761
has comment: http://stackoverflow.com/comment/39691926
has comment: http://stackoverflow.com/comment/39692377
answers question: http://stackoverflow.com/q/25440005
type: Answer
upvote count: 1
has body: Instead of trying to wrap the text with an html tag, you can change its CSS with something like this: if (txt[i].value == "correct") { txt[i].style.fontWeight = "bold"; } If you wanted to do this the "correct" way, you would add a class to your CSS file, and then give the correct answers the CSS class. CSS: .correct { font-weight: bold; } Javascript: if (txt[i].value == "correct") { txt[i].className += " correct"; } By doing this, you can change the style of the correct answers however you want without having to mess with JS again. If you were on a team, for example, someone else that didn't know JS could just edit CSS instead. can i just ask where should I write the CSS part? You would write your CSS in a file. You could name it something like styles.css. You then link styles.css to your html document in the header just above where you link your script. &lt;link rel="stylesheet" type="text/css" href="styles.css"&gt; If your professor hasn't gone over CSS, then you probably don't need to worry about adding an extra CSS file. Just use the code at the very top of this answer if that is the case. Good luck :)
has comment: http://stackoverflow.com/comment/39691786
has comment: http://stackoverflow.com/comment/39692185
score: 1

http://stackoverflow.com/a/26250159
score: 0
answers question: http://stackoverflow.com/q/25475738
type: Answer
has body: I do not believe it is possible as of today. (October 8th 2014) If you use the latest stable version of chrome (37), the inspection tools do not show a shadow root for any scrollbars. We can use this as proof that it is not editable as a majority of the elements are now implemented and can be customized by shadow dom can be viewed having a shadow. this gives an example of styling the video player. example link shows them actually styling an input type="range" element. (in case that is of any use) This probably for 2 reasons. 1 scrollbar implementation and its look and feel is os dependent. The scroll bar on windows is a different size than the scroll bar on mac. 2 scrollbar user interaction is also dependent on the type of device. For example on macbook pro laptop the scroll bar is different upon having a mouse plugged in. Android does not even show a scrollbar at all except when actively scrolling. tl;dr as of right now the scroll bar world is too fragmented for native scrollbars to be styleable by html.

http://stackoverflow.com/comment/39862233
type: Comment
has text: @wonderwhy Yeah, its pure speculation at this point. Unless someone from Twitter comments, we may never know why "they" do it. =)
comment on: http://stackoverflow.com/q/25531903
type: QuestionComment
score: 0

http://stackoverflow.com/q/25550284
type: Question
has comment: http://stackoverflow.com/comment/39932224
has answer: http://stackoverflow.com/a/25550324
has comment: http://stackoverflow.com/comment/39895569
has comment: http://stackoverflow.com/comment/39895559
score: 0
has body: Hello is there someone who knows: How can I execute an AngularJs method from plain javascript. =) Thanks.!! myApp.controller("someController",["$scope",function($scope){ //Some code was here $scope.a = valueA; $scope.b = valueB }); and a bit later in the code want to execute a function that when valid could execute an IF and if thats the case will execute my AngularJS controller or what ever. function Clicked(){ if( was clicked correctly ){ //execute my Controller and send some data to add to the DOM }
answer count: 1
linked to: http://stackoverflow.com/q/25556340
tagged with: javascript
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39895618
linked to: http://stackoverflow.com/q/13743058
has title: Plain JavaScript to AngularJS
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39899526

http://stackoverflow.com/comment/39879782
has text: As per my response to your answer, I originally thought that it wasn't evaluated yet, but it threw vague errors at me that I couldn't (quickly) debug. I guessed that defining the prototype in this way would either not get evaluated until constructed OR do it in such a way that it defines everything 'at once'. It wasn't very scientific or thoroughly thought out. My initial intuition was correct, I just must have made a mistake somewhere early on.
comment on: http://stackoverflow.com/q/25541405
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25428787
type: Answer
downvote count: 0
score: 1
has body: For each of points in valuesArray you should set color property. Now each of columns will have that color. Highcharts doesn't have colorByMonth or anything like this in options. Another solution will be to set array of colors, and duplicate each color 12 times: var columnColors = ["#5179D6", "#5179D6", "#5179D6", "#5179D6", "#5179D6", "#5179D6", "#5179D6", "#5179D6", "#5179D6", "#5179D6", "#5179D6", "#5179D6", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#66CC66", "#EF2F41", ... ]; chart = new Highcharts.Chart({ colors: columnColors, ... });
has comment: http://stackoverflow.com/comment/39671935
upvote count: 1
answers question: http://stackoverflow.com/q/25428087
has comment: http://stackoverflow.com/comment/39670817

http://stackoverflow.com/q/25454184
has body: I am attempting to create a pie chart of data using highcharts-ng for angular. I can get the basic chart working, but so far I am unable to get it to recognize the 3D option. I have attempted to include it in the options section as the documentation says to do with top level config options but to no avail. Also I seem to have an odd bug where when you drill into a pie slice, then click the button to return to the main data set, you cannot click any of the other slices, only the one you clicked before. I am not sure what the deal with that is, but it's kind of odd. Here is a JSfiddle showing both of my problems. Any feedback/assistance is much appreciated. Thank you! http://jsfiddle.net/9bxx9tf2/ Also, here is a version of the code you can just copy and paste.
answer count: 2
tagged with: highcharts
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39806653
tagged with: highcharts-ng
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25455115
has answer: http://stackoverflow.com/a/28858921
score: 1
upvote count: 1
has title: Highcharts-Ng and Broken Drilldown
type: Question

http://stackoverflow.com/a/25445352
has body: After much searching around and trying approaches from various places, I was able to come up with the following. The tryAnchorDownload() approach should work on modern versions of FireFox and Chrome, and is a cleaned-up version of code provided in this forum post. The trySaveAsDownload() approach should theoretically work on any major modern browser, though Safari may not respect the specified file name. It requires the FileSaver.js library and some browsers may need the Blob.js polyfill. You can call the main function here like this: initiateFileDownload(bytes, "myFile.txt"); where bytes is a Uint8Array of the file's bytes. function byteArrayToBase64(bytes) { var chArray = Array.prototype.map.call(bytes, function (byte) { return String.fromCharCode(byte); }); return window.btoa(chArray.join("")); } var octetStreamMimeType = "application/octet-stream"; function tryAnchorDownload(fileBytes, fileName) { var aElement = document.createElement("a"), event; if ("download" in aElement) { aElement.setAttribute("download", fileName); aElement.href = "data:" + octetStreamMimeType + ";base64," + byteArrayToBase64(fileBytes); document.body.appendChild(aElement); event = document.createEvent("MouseEvents"); event.initMouseEvent("click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); aElement.dispatchEvent(event); document.body.removeChild(aElement); return true; } return false; } function trySaveAsDownload(fileBytes, fileName) { var blob; if (window.saveAs) { blob = new Blob([fileBytes], { type: octetStreamMimeType }); saveAs(blob, fileName); return true; } return false; } // fileBytes is a Uint8Array function initiateFileDownload(fileBytes, fileName) { return tryAnchorDownload(fileBytes, fileName) || trySaveAsDownload(fileBytes, fileName); } A more thorough (and probably more efficient) alternative to the byteArrayToBase64() function above can be found on MDN.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25445351
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/25445351

http://stackoverflow.com/a/25432719
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25431620
has comment: http://stackoverflow.com/comment/39678612
has comment: http://stackoverflow.com/comment/39678851
has body: I think your question isn't so clear but maybe you mean that when click on the scrollToTop button it doesn't disappear until the scroll reach to top of page, it's because when your animation function is running the .scroll can't runs so fast that disappear button when reach to 675px but you can fadeout button as soon as click on it using this code: jQuery: $(document).ready(function() { var isClicked = false; $('.scrollToTop').css("display","none"); $(window).scroll(function() { if (isClicked == false){ if ($(this).scrollTop() &gt; 675) { $('.scrollToTop').fadeIn(500); } else { $('.scrollToTop').fadeOut(500); } } }); $('.scrollToTop').click(function() { isClicked = true; $('.scrollToTop').fadeOut(500); $('html, body').animate({ scrollTop : 0 }, 800, function(){ isClicked = false; }); }); }); The isClicked variable is added to prevent blinking button (you can remove it to figure out what i'm saying). Also i add this line: $('.scrollToTop').css("display","none"); because it seems that you don't need a "Scroll To Top" button when page load for first time and you are on the top of page. Check JSFiddle Demo
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39679148
accepted answer of: http://stackoverflow.com/q/25431620

http://stackoverflow.com/comment/39789691
comment on: http://stackoverflow.com/q/25492501
type: QuestionComment
has text: Any reason you're not using a `switch` statement?
type: Comment
score: 0

http://stackoverflow.com/q/25497238
tagged with: javascript
has body: Color Picker Fiddle - http://jsbin.com/panajiforuza/1/edit Fiddle (trying to turn into a plugin) - http://jsbin.com/reyewefovepe/1/edit I made a basic HSLA Color Picker, and I'm trying to convert it over to a plugin. NOTE: I've only made simple/basic plugins before that had little to no functionality. This is my first usable plugin, or at least that's the goal. I want to use it on any input[type=text] it's selected on, and also keep it's previous values (have a color picker appended for each new input and have the plugin do all the work for the color picker for it's selector) My problem is when I'm adjusting the sliders I have it set to $(this) (defining the users selector). However it's values are not changing and I can't figure out why. (function($) { $.fn.HSLAColorPicker = function() { $(".hsla-cpick-container").remove(); $("body").append(' '); var FontColorPick = function() { if ( $(".colorpick-a-text").val() === "1" ) { $(this).val( "hsl(" + $(".colorpick-hue").val() + ", " + $(".colorpick-s").val() + "%, " + $(".colorpick-l").val() + "%)"); } else { $(this).val( "hsla(" + $(".colorpick-hue").val() + ", " + $(".colorpick-s").val() + "%, " + $(".colorpick-l").val() + "%, " + $(".colorpick-a").val() + ")"); } if ( $(".colorpick-a-text").val() === "0" ) { $(this).val("transparent"); } // Alpha Saturation $(".colorpick-s-bg").css({ "background": "linear-gradient(to right, #7f7f80 0%," + "hsl(" + $(".colorpick-hue").val() + "," + $(".colorpick-s").val() + "%," + $(".colorpick-l").val() + "%)" + " 100%)" }); // Alpha Lightness $(".colorpick-l-bg").css({ "background": "linear-gradient(to right, #000000 0%," + "hsl(" + $(".colorpick-hue").val() + "," + $(".colorpick-s").val() + "%,50%) 50%,#ffffff 100%)" }); // Alpha Preview $(".colorpick-a-bg").css({ "background": "linear-gradient(to right, rgba(255,255,255,0) 0%," + "hsl(" + $(".colorpick-hue").val() + "," + $(".colorpick-s").val() + "%," + $(".colorpick-l").val() + "%)" + " 100%)" }); }; $(this).on('mousedown touchs…
answer count: 1
accepted answer: http://stackoverflow.com/a/25498474
downvote count: 0
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
score: 2
upvote count: 2
has title: jQuery color picker plugin experiment
tagged with: color-picker
has answer: http://stackoverflow.com/a/25498474
type: Question

http://stackoverflow.com/a/26532942
has comment: http://stackoverflow.com/comment/62921947
type: Answer
score: 31
has comment: http://stackoverflow.com/comment/90750174
upvote count: 31
downvote count: 0
has body: It is possible to have one main gulpfile.js from which to call tasks from other gulp files.js using the require-dir module. From the projects README use it like this: Split tasks across multiple files If your gulpfile.js is starting to grow too large, you can split the tasks into separate files by using the require-dir module. Imagine the following file structure: gulpfile.js tasks/ ├── dev.js ├── release.js └── test.js Install the require-dir module: npm install --save-dev require-dir Add the following lines to your gulpfile.js file. var requireDir = require('require-dir'); var dir = requireDir('./tasks');
answers question: http://stackoverflow.com/q/25518870

http://stackoverflow.com/comment/39825839
type: Comment
comment on: http://stackoverflow.com/a/25509980
type: AnswerComment
has text: The `<!--[if lte IE 9]>` in your HTML code is not JS, I was saying if you are able to find out within your JS if the browser is less than IE9 (perhaps using a library, I'm not sure), you could do the conditional import in your brocfile.
score: 0

http://stackoverflow.com/a/25470772
upvote count: 1
answers question: http://stackoverflow.com/q/25468504
has comment: http://stackoverflow.com/comment/39876670
type: AcceptedAnswer
downvote count: 0
score: 1
has body: Typically you don't give a callback in &amp; return what you get/unless its coffee script. client.zrevrangeSync = Meteor._wrapAsync(client.zrevrange.bind(client)); return client.zrevrangeSync(['players:' + playerId, 0, 3, 'WITHSCORES']);
type: Answer
has comment: http://stackoverflow.com/comment/39878272
accepted answer of: http://stackoverflow.com/q/25468504

http://stackoverflow.com/q/25436691
tagged with: javascript
has answer: http://stackoverflow.com/a/28924657
accepted answer: http://stackoverflow.com/a/28924657
has comment: http://stackoverflow.com/comment/44281065
linked to: http://stackoverflow.com/q/13995414
has title: Trigger ng-model.$formatters to run programmatically
downvote count: 0
answer count: 1
favorite count: 0
has body: I'd like a custom control that uses ngModel.$formatters to be able to format data as soon as a server dependency loads in. In my case, it needs to load a lookup table to go from one kind of id to another. $modelValue stores one thing $viewValue displays another. Pretty straight-forward stuff. The trick is that if my lookup table isn't loaded, I can't do the formatting into a $viewValue. Once my data loads, I need to do the following: ngModel.$formatters.push(myFormatter) Tell ngModel to start the pipeline from $modelValue -&gt; $formatters -&gt; $viewValue $render() doesn't work, this just moves the value from $viewValue into the UI control. $rollbackViewValue() looks promising, but that's only in an unstable version (1.3.0-beta.18). Code Sample: mappingTable.load().then(function(data){ mappingData = data; ngModel.$formatters.push(myFormatter); // needs mappingData in order to function // TODO: Tell ngModel to run the existing $modelValue through $formatters to calculate a new $viewValue and $render it //ngModel.$render() // doesn't work, only puts the $viewValue in the DOM element. });
tagged with: angularjs
upvote count: 8
score: 8
type: AnsweredQuestion
type: Question
tagged with: angular-ngmodel
has comment: http://stackoverflow.com/comment/39686100

http://stackoverflow.com/comment/39744045
has text: Thank you so much, you made my day! appreciate it!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25468142
type: Comment

http://stackoverflow.com/q/25399852
tagged with: ajax
upvote count: 1
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: Synchronize Ajax Calls and executeQueryAsync SharePoint JS CSOM
tagged with: csom
score: 1
type: Question
has answer: http://stackoverflow.com/a/44564479
tagged with: javascript
tagged with: jquery
tagged with: sharepoint
has body: I have a problem synchronizing calls using Rest Api and JavaScript Object Model. I'm currently working with Client Side Rendering to customize a view for a Document Library and add some functionalities in this custom UI. I have a small collection of id's, and I'm looping through this collection and make some ajax calls with each of this items. The results of this operation is to perform some tasks and to update my UI when all these operations are completed to refresh my UI and display some icons. What I expect is to have 3 icons displayed only for my three first items. The problem is that sometimes it displays all the icons, sometimes the two first... randomly. I know that there is some problems with the synchronization of my executeQueryAsync calls, I've learned about jQuery Deferred object, I've tried to use them but without results. Below you'll find screenshots of what I expect. Expected : https://onedrive.live.com/redir?resid=E2C3CC814469DA54!3070&amp;authkey=!AEf_C0XGDwfuFRY&amp;v=3&amp;ithint=photo%2cpng What would be the good way of using deferred ? Could anyone help ? Thanks a lot Elhmido This is my main function for overriding the display : (function () { var accordionContext = {}; accordionContext.Templates = {}; // Be careful when add the header for the template, because it's will break the default list view render accordionContext.Templates.Item = itemTemplate; // Add OnPostRender event handler to add accordion click events and style accordionContext.OnPreRender = []; accordionContext.OnPreRender.push(function () { $(function () { IsCurrentUserMemberOfGroup("TEST Owners"); **$.when(IsUserApprover(arrayOfIDS).done(function () { displayIcons(); }));** }); }); accordionContext.OnPostRender = []; accordionContext.OnPostRender.push(function () { $(function () { accordionOnPostRender(); fixColumns(); audit.relativeUrl = _spPageContextInfo.webAbsoluteUrl; }); }); SPClientTemplates.TemplateManager.RegisterTemplateOverrides(accordionContext); })(); The function …

http://stackoverflow.com/q/25533668
score: 0
has title: Why does JavaScript interprets numbers with 16 decimal places as "integer"?
tagged with: integer
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39865025
tagged with: modulus
duplicate of: http://stackoverflow.com/q/588004
answer count: 0
has comment: http://stackoverflow.com/comment/39865015
has comment: http://stackoverflow.com/comment/39873058
type: Question
has body: Calculating if the modulus of a number is 0 to find if the number is whole works up until 15 decimal places is exceeded. What makes 0.9999999999999999 diferent from 0.99999999999999999 function isInteger(n) { return n % 1 === 0; } isInteger(0.9); //false isInteger(0.99999999999999999); //true? Here's a jsFiddle example Why is this?
tagged with: javascript
linked to: http://stackoverflow.com/q/588004

http://stackoverflow.com/comment/39808593
type: Comment
comment on: http://stackoverflow.com/a/25502772
type: AnswerComment
score: 0
has text: Format your href differently, just as a string, then you can use jquery to get the value from the anchor tag. So, if you change your anchor tag href to something like href="Account/ChangePassword", the jquery something like $('#A4').attr('href') as the data.

http://stackoverflow.com/q/25476547
has body: Here's my jsfidde: http://jsfiddle.net/9SUqX/74/ Original Code: var comments = [ {name:"Full Name",comment:"Quote",timestamp:1332045720}, ]; $(document).ready(function() { $("ul#feed").append("&lt;li&gt;\ &lt;blockquote&gt;"+comments[0].comment+"&lt;/blo‌ckquote&gt;\ &lt;cite&gt;-"+comments[0].name+", "+comments[0].timestamp+" &lt;/cite&gt;\ &lt;/li&gt;"); });
type: Question
duplicate of: http://stackoverflow.com/q/847185
tagged with: javascript
score: 0
has title: How to get a date out of UNIX timestamp with javascript?
tagged with: datetime
answer count: 1
tagged with: unix-timestamp
has answer: http://stackoverflow.com/a/25476573
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25476573
linked to: http://stackoverflow.com/q/847185

http://stackoverflow.com/comment/39895792
has text: Try keeping track of the last hash and registering the hash handler to also be the click handler: http://jsfiddle.net/Lgyagand/3/
comment on: http://stackoverflow.com/a/25550073
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39743076
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25467371
has text: Your question is still not clear! You are asking about the jQuery.ajax ... itself or what?
score: 0

http://stackoverflow.com/comment/39798382
type: AnswerComment
comment on: http://stackoverflow.com/a/25485753
score: 0
type: Comment
has text: ? is for non greedy match.or else the whole string will be consumed by .*..* is greedy ..*? is non greedy.

http://stackoverflow.com/comment/39808465
comment on: http://stackoverflow.com/a/25502551
has text: The sample does set to root position 0deg. It is included within the function in the setTimeout.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25440686
has body: Is there any way in Javascript or jquery using which we can internally click the "Delete" button to delete some text in HTML web pages? I don't want my users to click the "Delete" button physically but I want to give them interface where when they click I will apply the "Delete" button functionality there.
has comment: http://stackoverflow.com/comment/39692336
type: Question
has title: Press "Delete" key using javascript?
has answer: http://stackoverflow.com/a/25441443
tagged with: javascript
has answer: http://stackoverflow.com/a/25440783
has comment: http://stackoverflow.com/comment/39692406
has comment: http://stackoverflow.com/comment/39692428
score: 2
possible better answer: http://stackoverflow.com/a/25440871
downvote count: 0
tagged with: web
tagged with: jquery
has answer: http://stackoverflow.com/a/25440871
favorite count: 0
has comment: http://stackoverflow.com/comment/39692553
has answer: http://stackoverflow.com/a/25440845
accepted answer: http://stackoverflow.com/a/25441443
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39692472
answer count: 4
type: AnsweredQuestion
upvote count: 2
linked to: http://stackoverflow.com/q/596481
linked to: http://stackoverflow.com/q/702585

http://stackoverflow.com/comment/39818288
score: 0
type: QuestionComment
type: Comment
has text: To answer your question directly, by "occasionally" I mean: after a fresh reboot it works great. If I let the app run for a while and do other stuff, the performance will degrade, say, after 5 runs. Never made it to 20 without seeing issues.
comment on: http://stackoverflow.com/q/25487721

http://stackoverflow.com/comment/39880731
comment on: http://stackoverflow.com/q/25542074
score: 0
has text: Please split your two question to two actual questions on the site. One question per question please.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25531321
upvote count: 2
has body: it('no name', function(done) { done has to be an argument of the function passed to it()
answers question: http://stackoverflow.com/q/25530992
score: 2
downvote count: 0
type: Answer

http://stackoverflow.com/q/25523761
tagged with: javascript
tagged with: jquery
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25523972
has title: jQuery settimeout() not working correctly
favorite count: 0
has comment: http://stackoverflow.com/comment/39847162
has answer: http://stackoverflow.com/a/25523829
has answer: http://stackoverflow.com/a/25523912
upvote count: 1
possible better answer: http://stackoverflow.com/a/25523829
type: AnsweredQuestion
tagged with: settimeout
score: 1
has body: I've been trying to make a extended usage of Masonry. The idea is that when users hover over a box (div) and wait on that div for 2 seconds, the script should call a function that will expand the div. It all works except that the script doesn't wait for 2 seconds, but executes the function instantly. I've looked for more information about the setTimeOut() function. But I believe I have implemented it correctly. Can someone please help me? HTML: Masonry - animate item size with jQuery JS: var timer = 0; var delay = 2000; var $container = $('.masonry').masonry({ columnWidth: 60 }); $(function() { $container.on( 'mouseenter', '.item-content', function() { timer = setTimeout( ToggleExpansion( $( this ) ), delay); }); $container.on('mouseleave', '.item-content', function () { clearTimeout(timer); }); $container.on( 'click', '.item-content', function () { if ( $( this ).parent('.item').hasClass('is-expanded') ) { ToggleExpansion ( $( this ) ); } else { $container.children().removeClass('is-expanded'); ToggleExpansion ( $( this ) ); } }); }); function ToggleExpansion ( thisObj ) { if ( !$( this ).parent('.item').hasClass('is-expanded') ) { $container.children().removeClass('is-expanded'); thisObj.parent('.item').toggleClass('is-expanded'); } $container.masonry(); } CSS: * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } body { font-family: sans-serif; } .masonry { background: #EEE; max-width: 640px; } .masonry .item { float: left; } /* item is invisible, but used for layout */ .item, .item-content, .grid-sizer { width: 60px; height: 60px; } .item { border: none; background: transparent; } /* item-content is visible, and transitions size */ .item-content { width: 60px; height: 60px; background: #D26; border: 2px solid #333; border-color: hsla(0, 0%, 0%, 0.5); border-radius: 5px; -webkit-transition: width 0.4s, height 0.4s; -moz-transition: width 0.4s, height 0.4s; -o-transition: width 0.4s, height 0.4s; transition: width 0.4s, height …
type: Question
accepted answer: http://stackoverflow.com/a/25523912
tagged with: jquery-masonry
downvote count: 0

http://stackoverflow.com/a/25432318
type: Answer
has comment: http://stackoverflow.com/comment/39677442
has comment: http://stackoverflow.com/comment/39677573
answers question: http://stackoverflow.com/q/25432061
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39713722
has body: The following regex will work to match consecutive identical characters - (\w)\1{1,}
downvote count: 0
has comment: http://stackoverflow.com/comment/39677764

http://stackoverflow.com/comment/39760530
score: 0
has text: Close, only problem is it doesnt close the other div once new one is clicked?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25477013

http://stackoverflow.com/q/25486451
score: 0
has comment: http://stackoverflow.com/comment/39777857
answer count: 1
tagged with: jquery
has title: slider function doesn't add up
has body: i created two sliders with an value between 100 and 1000. the thing where im struggling now is how to add them together in another input in html. i tried a couple of things bud none of them worked properly. here is what i got so far: html code: &lt;div class="box1"&gt; &lt;input type="range" min="100" max="1000" value="0" step="100" onmousemove="showValue1(this.value)"/&gt; &lt;p id="tbox1"&gt; &lt;input type="text" id="value1"&gt; &lt;/div&gt; &lt;div class="box2"&gt; &lt;input type="range" min="100" max="1000" value="0" step="100" onmousemove="showValue2(this.value)"/ onchange="updateInput(.value)"&gt; &lt;p id="tbox2"&gt; &lt;input type="text" id="value2"&gt; &lt;/div&gt; &lt;div class="box3"&gt; &lt;input type="text" id="value3" value="0"&gt; &lt;/div&gt; javascript: var value11 = document.getElementById("value1").value; var value22 =document.getElementById("value2").value; var answerG = (+value11 + +value22) function showValue1(newValue) { document.getElementById("value1").value=newValue; } function showValue2(newValue) { document.getElementById("value2").value=newValue; } $('#value3').val(answerG); function updateInput(answerG){ document.getElementById("value3").value = answerG; } the thing im trying to do is add the two slider values together and let it work like it should. it is not working now because i have to refresh the page to get the right value. i want when i slide the slider that the value changes the way it should. thanks in advance.
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25486869
accepted answer: http://stackoverflow.com/a/25486869
tagged with: javascript

handlebars.js
tags question: http://stackoverflow.com/q/25502687
tags question: http://stackoverflow.com/q/25503626
tags question: http://stackoverflow.com/q/25430096
tags question: http://stackoverflow.com/q/25430864
tags question: http://stackoverflow.com/q/25395355
tags question: http://stackoverflow.com/q/25490556
tags question: http://stackoverflow.com/q/25415380
tags question: http://stackoverflow.com/q/25530175
tags question: http://stackoverflow.com/q/25501870
type: Tag
tag name: handlebars.js
tags question: http://stackoverflow.com/q/25543654
tags question: http://stackoverflow.com/q/25514510
tags question: http://stackoverflow.com/q/25448929
tags question: http://stackoverflow.com/q/25493950
tags question: http://stackoverflow.com/q/25524854
tags question: http://stackoverflow.com/q/25493595

http://stackoverflow.com/comment/39819186
has text: considering you saying "filtering by parent" could be like - $('#uiDivWorkGroupMainNn input[name|="WorkGroupID"]').change(some function); would this work?
comment on: http://stackoverflow.com/q/25508122
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/39945432
comment on: http://stackoverflow.com/q/25543938
type: Comment
type: QuestionComment
score: 0
has text: Anyone else has any other input on this?

http://stackoverflow.com/q/25410365
has comment: http://stackoverflow.com/comment/39642410
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25413711
score: 0
has title: jQuery Fancybox on page load, content in iFrame
tagged with: http://stackoverflow.com/tag/html
tagged with: fancybox
has answer: http://stackoverflow.com/a/25410561
type: UnansweredQuestion
tagged with: iframe
has body: I would like to load a fancybox when the document is ready, but in a specific DIV and the content of the fancybox will be from a different page, displayed as an iFrame. This is what I currently have: $(document).ready(function () { $.fancybox({ 'href' : "#div", 'content' : "content.jsp", 'type' : "iframe", }); }); HTML: &lt;div id="div"&gt; &lt;/div&gt; Nothing is loading in.
type: Question
answer count: 2

http://stackoverflow.com/comment/39684415
has text: What is `replacements`? Where is it defined?
comment on: http://stackoverflow.com/q/25435844
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25450154
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25450319
has title: Back to History not working properly
tagged with: php
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/25450319
has body: I have page with cart in which items are added and on clicking Place Order button Customer is landed to checkout page 1. Then after filling email on Page1 as Guest, he is redirected to Page 2. On page 2 i have button like Go Back On Clicking Go back button, the page appearing is the page having cart. In Nutshell, no checkout page is being shown to user on clicking Go Back button. I am using PHP header on cart page as below: header('Cache-Control: max-age=3600'); Is this causing the issue? I tried removing this header but no luck
tagged with: javascript
has answer: http://stackoverflow.com/a/25450303
accepted answer: http://stackoverflow.com/a/25450303

http://stackoverflow.com/a/25429780
score: 1
has comment: http://stackoverflow.com/comment/39672898
upvote count: 1
type: AcceptedAnswer
has body: The Url parameter for $.ajax is a string, not an object so change that line to read like so: url: "@Url.Action("UpdateCommodityList", "ProductLine")",
has comment: http://stackoverflow.com/comment/39673981
has comment: http://stackoverflow.com/comment/39672744
has comment: http://stackoverflow.com/comment/39674401
accepted answer of: http://stackoverflow.com/q/25429146
type: Answer
answers question: http://stackoverflow.com/q/25429146
has comment: http://stackoverflow.com/comment/39680997
downvote count: 0

http://stackoverflow.com/comment/39809104
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25503010
has text: I am not getting any error simply it does not shows anything until I remove player.js or document.ready line

http://stackoverflow.com/a/25475042
answers question: http://stackoverflow.com/q/25459798
type: Answer
has body: Check this Fiddle(this needs a lot of work to be put in) You could create a custom Dropdown control as shown but there are a lot of things to be kept in mind and are to be handled such as to hide the dropdown on clicking anywhere outside it. Just pasting the HTML for your reference London (England) London (England) Sidney (Australia) Amsterdam (Netherlands)
score: 0

http://stackoverflow.com/a/25457452
has comment: http://stackoverflow.com/comment/39725565
has body: If you are attempting to call this from an HtmlService, it would look something like this: Code.gs file // render initial html page function doGet(event){ return HtmlService.createTemplateFromFile('index').evaluate(); } // call from click on page (or if using UiApp) function addLoad(){ try{ // get the html content from the truckload.html page and return it to the showModal function return HtmlService.createHtmlOutputFromFile('truckload').getContent(); }catch(err){ Logger.log(err.lineNumber + ' - ' + err); } } index.html file &lt;div id='popup'&gt; Click Me &lt;/div&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $("#popup").click(function(){ // call to script runner google.script.run.withSuccessHandler(showModal).addLoad(); }); }); function showModal(htmlContent){ var $dialog = $('&lt;div style="border:2px solid black;background-color:#B6B6B4;"&gt;&lt;/div&gt;') .html(htmlContent) .dialog({ autoOpen: false, modal: true, height: 350, width: 600, title: "truckload" }); $dialog.dialog('open'); } &lt;/script&gt; Finally the truckload.html file (whatever html you are looking to render) here's a crude example: Truckload modal
answers question: http://stackoverflow.com/q/25438129
score: 0
type: Answer

http://stackoverflow.com/q/25416578
type: Question
tagged with: javascript
tagged with: mobile-safari
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25419318
accepted answer: http://stackoverflow.com/a/25419318
has body: I have a project with angularjs and bootstrap where I'm trying to replicate iOS's navigationController. The problem is speed. It seems like one of the biggest issues is scrolling up/down when doing the transition between views. It just doesn't feel right. My question is: how can I improve the speed of scrolling up/down and left/right in mobile safari iOS? I know it's doable (ionic is one good example, but we can't use them since they are mobile only). This is my current code: /* View animations */ .view-animate-container { position: relative; width: 100%; } .view-animate { -webkit-backface-visibility: hidden; } .view-animate.ng-leave { z-index: 1054; } .view-animate.ng-enter { z-index: 1053; } .view-animate.ng-enter, .view-animate.ng-leave { -webkit-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.3s; transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.3s; position: absolute; width: 100%; display: block; } .rtl .view-animate.ng-enter { -webkit-transform: translate3d(100%, 0, 0); -webkit-transition-delay: 0.1s; opacity: 0; } .rtl .view-animate.ng-enter.ng-enter-active { -webkit-transform: translate3d(0, 0, 0); opacity: 1; } .rtl .view-animate.ng-leave.ng-leave-active { -webkit-transform: translate3d(-100%, 0, 0); opacity: 0; } .ltr .view-animate.ng-enter { -webkit-transform: translate3d(-100%, 0, 0); -webkit-transition-delay: 0.1s; opacity: 0; } .ltr .view-animate.ng-enter.ng-enter-active { -webkit-transform: translate3d(0, 0, 0); opacity: 1; } .ltr .view-animate.ng-leave.ng-leave-active { -webkit-transform: translate3d(100%, 0, 0); opacity: 0; } /* End of View animations */ &lt;div class='view-animate-container' ng-class='direction'&gt; &lt;div id='mApp' ng-view class='view-animate' autoscroll='false'&gt;&lt;/div&gt; &lt;/div&gt; // Random scrollHeight fix. Moves the scroll position up during the transition. function scrollToTop() { var ua = $('html')[0].className; var diff = document.body.scrollHeight; var delay = ((ua.indexOf('ua-mobile') &gt; -1 …
tagged with: angularjs
has title: Better/Faster scrolling in mobile safari?
type: AnsweredQuestion

http://stackoverflow.com/a/25472850
has comment: http://stackoverflow.com/comment/39764001
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25469287
downvote count: 0
has body: Windows doesn't use meteorite and the meteorite package manager doesn't gitignore your files. This can be convenient since an app can be dropped onto another windows pc and very nearly run. Its a bit different with meteorite and ubuntu. When you add a package in, the other ubuntu instance has to downloaded these packages since the aliased folders are gitignored. Meteorite stores the packages in ~/.meteorite and aliases them into packages in your app. So it wont transfer to the other ubuntu machine. Meteor 0.9.0 addresses this issue. Not very long from now you can just develop your app like normal and you can expect it to run on another machine without any issues like this.
type: Answer

http://stackoverflow.com/comment/39797868
type: QuestionComment
comment on: http://stackoverflow.com/q/25496896
has text: [Error:Unknown provider: aProvider <- a](https://www.google.com/search?q=Error%3A+%5B%24injector%3Aunpr%5D+Unknown+provider%3A+aProvider+%3C-+a&oq=Error%3A+%5B%24injector%3Aunpr%5D+Unknown+provider%3A+aProvider+%3C-+a&aqs=chrome..69i57j69i58.501j0j4&sourceid=chrome&es_sm=122&ie=UTF-8)
type: Comment
score: 1

http://stackoverflow.com/comment/39732462
comment on: http://stackoverflow.com/a/25461190
score: 0
type: Comment
has text: How does Google interpret links inside ` `?
type: AnswerComment

http://stackoverflow.com/comment/39764172
type: AnswerComment
comment on: http://stackoverflow.com/a/25475209
type: Comment
has text: There's just an array of values ​​that indicate a directory?
score: 0

http://stackoverflow.com/q/25448725
type: Question
accepted answer: http://stackoverflow.com/a/25486496
tagged with: javascript
has title: Html anchor link in android
answer count: 2
possible better answer: http://stackoverflow.com/a/25448829
has body: Can anybody tell me about inner HTML link without loading whole page in Android WebView? My code is here: view.loadUrl("javascript:window.location='" + this.anchor + "'");`
has answer: http://stackoverflow.com/a/25448829
favorite count: 0
tagged with: android
has answer: http://stackoverflow.com/a/25486496
type: AnsweredQuestion
upvote count: 2
score: 1
tagged with: webview
downvote count: 1

http://stackoverflow.com/comment/39671043
has text: Hmm. Did this work for you? It doesn't seem to make any difference at all... (p.s. thanks a lot for your help, in any case! ;-) )
comment on: http://stackoverflow.com/a/25429144
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25422415
downvote count: 0
has answer: http://stackoverflow.com/a/30516003
favorite count: 0
tagged with: visual-studio-2013
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39694170
linked to: http://stackoverflow.com/q/3792065
has comment: http://stackoverflow.com/comment/39694312
has comment: http://stackoverflow.com/comment/39659266
type: Question
upvote count: 15
tagged with: debugging
answer count: 2
has title: How to disable JavaScript debugging in Visual Studio 2013
tagged with: javascript
score: 15
has body: Is there a way to turn off javascript debugging in VS 2013 when using Internet Explorer? I have already unchecked the option Debugging -&gt; Just-In-Time Debugging -&gt; Script, but whenever I start/debug my ASP.NET project (using IE), VS loads all script documents (js files) and shows them in the solution explorer.
has comment: http://stackoverflow.com/comment/39659411
has comment: http://stackoverflow.com/comment/39663308
has answer: http://stackoverflow.com/a/69673563

http://stackoverflow.com/comment/39652056
comment on: http://stackoverflow.com/a/25418540
score: 0
type: AnswerComment
type: Comment
has text: I don't think I can use different IDs for copies of the object, they are rendered using the same partial so I am just thinking of jumping the `id` ship and use `data-id` from now on. However it is possible to have multiple id on the page without much issues, this makes HTML not valid.

http://stackoverflow.com/a/25535580
has comment: http://stackoverflow.com/comment/39869075
type: Answer
has comment: http://stackoverflow.com/comment/39870420
has comment: http://stackoverflow.com/comment/39868817
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25535400
has body: You can use the profiler of Firebug. Go to the console tab and click Profile. The profiler starts and all the javascript actions are "logged" till you click Profile again. Then you get the list of javascript functions that were executed in this interval. A similar feature is available in most modern browsers' consoles. Source: See/Log which javascript function is being executed by the browser
upvote count: 2

http://stackoverflow.com/a/25401820
type: Answer
downvote count: 0
score: 1
has body: The HTML spec says that a form field should only be considered valid if its paired with a name attribute so a browser should not submit a form field with no name (it can't anyway as there is no way to parse it into a query string). This is not really related to an MITM attack; you would always want to serve your page over HTTPS to reduce the possibility of someone intercepting the request and modifying the payment page to harvest details and send them elsewhere.
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25395520
answers question: http://stackoverflow.com/q/25395520

http://stackoverflow.com/q/25408423
type: AnsweredQuestion
score: 3
has title: Javascript regex to match word with slash
has comment: http://stackoverflow.com/comment/39632908
possible better answer: http://stackoverflow.com/a/25408710
has answer: http://stackoverflow.com/a/25408710
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25408671
tagged with: javascript
favorite count: 0
tagged with: regex
has comment: http://stackoverflow.com/comment/39632991
upvote count: 3
accepted answer: http://stackoverflow.com/a/25408671
has body: I'm trying to remove 2 char words and using this regex: /\b[\w\/]{2}\b/ given a string like: aa bb b/ http://regex101.com/r/dK6qF7/2 Can anyone explain why 'b/' doesn't get matched and removed? Thanks
type: Question

http://stackoverflow.com/q/25425780
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/39743457
has title: Google bar chart remove bar when 0
type: Question
tagged with: google-visualization
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: I want to be able to remove the spacing that is added when the value is 0 - in the example below there is a max of 4 answers so when the value is 0 removing the spacing will not stretch the graph so much. // Load the Visualization API and the piechart package. google.load('visualization', '1.0', { 'packages': ['corechart'] }); // Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawChart); // Callback that creates and populates a data table, // instantiates the pie chart, passes in the data and // draws it. function drawChart() { // Create the data table. var data = new google.visualization.DataTable(); data.addColumn('string', 'Course'); data.addColumn('number', 'Excellent'); data.addColumn('number', 'Adequate'); data.addColumn('number', 'Limited'); data.addColumn('number', 'None'); data.addColumn('number', 'Very Confident'); data.addColumn('number', 'Fairly Confident'); data.addColumn('number', 'Somewhat Confident'); data.addColumn('number', 'Not at all'); data.addRows([ ['Knowledge level', 1, 8, 30, 0, 0, 0, 0, 0], ['Assessment skills', 1, 9, 18, 11, 0, 0, 0, 0], ['Planning skills', 2, 7, 20, 10, 0, 0, 0, 0], ['Confidence', 0, 0, 0, 0, 5, 6, 7, 8] ]); // Set chart options var options = { 'title': 'Statewide Count across all courses', 'width': 700, 'height': 900 }; // Instantiate and draw our chart, passing in some options. var chart_div = document.getElementById('chart_div'); var chart = new google.visualization.BarChart(document.getElementById('chart_div')); //Wait for the chart to finish drawing before calling the getImageURI() method. /*google.visualization.events.addListener(chart, 'ready', function(){ chart_div.innerHTML = '&lt;img src="' + chart.getImageURI() + '"&gt;'; console.log(chart_div.innerHTML); })*/ chart.draw(data, options); } Picture here
favorite count: 0
has comment: http://stackoverflow.com/comment/39679218

innerhtml
tags question: http://stackoverflow.com/q/25431648
tags question: http://stackoverflow.com/q/25440454
type: Tag
tags question: http://stackoverflow.com/q/25396846
tag name: innerhtml

http://stackoverflow.com/q/25454518
tagged with: ng-hide
has answer: http://stackoverflow.com/a/25454664
possible better answer: http://stackoverflow.com/a/25454634
type: AnsweredQuestion
tagged with: javascript
has title: ngHide on model change
type: Question
accepted answer: http://stackoverflow.com/a/25454664
score: 0
answer count: 2
has body: I have the following spinner, In my controller I have set $scope.ajaxrequest = false; so the spinner is correctly hidden (if I set it ajaxrequest=true it appears, so I suppose there is no problem on that). Inside my controller I have a function that makes an ajax request, I want to show the spinner when the request starts and hide it when the request finishes. So I have: $( document ).ajaxStart(function() { $scope.ajaxrequest = true; console.log($scope.ajaxrequest); }); $( document ).ajaxStop(function() { $scope.ajaxrequest = false; console.log($scope.ajaxrequest); }); As I can see from the console the ajaxrequest value is changing correctly before and after the request. The problem is that the spinner does not appear. Did I miss something?
tagged with: ajax
tagged with: angularjs
has answer: http://stackoverflow.com/a/25454634
tagged with: ng-show

http://stackoverflow.com/q/25417667
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/39650619
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/500431
score: -4
has comment: http://stackoverflow.com/comment/39650735
has comment: http://stackoverflow.com/comment/39650411
type: Question
linked to: http://stackoverflow.com/q/500431
has comment: http://stackoverflow.com/comment/39650506
has comment: http://stackoverflow.com/comment/39651112
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39650488
has comment: http://stackoverflow.com/comment/39650436
has comment: http://stackoverflow.com/comment/39651133
has answer: http://stackoverflow.com/a/25417756
has title: lexical scope, what about side by side?
has body: Articles I've read on scope in javascript address what happens when you have nested variables/objects/functions defined in its parent scope. However, what happens if you have something like this: function x(){ function y(){var u = 3;} function z(){//is u available here?} }

http://stackoverflow.com/a/25506479
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25480858
has body: the below link tells how to add the data gathered from the db into jQuery Grid and display it on a webpage http://www.codeproject.com/Articles/317145/Bind-jQuery-Grid-to-MySql-Database-using-PHP

http://stackoverflow.com/q/25495564
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39795461
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25510907
has answer: http://stackoverflow.com/a/26599263
has body: I have a drop down box and I want to check that "x" value is displayed by default.
has comment: http://stackoverflow.com/comment/39798001
score: 0
has comment: http://stackoverflow.com/comment/39797242
has comment: http://stackoverflow.com/comment/39812666
has comment: http://stackoverflow.com/comment/39797325
has title: How to check by default visible value in drop down in protractor tool?
has answer: http://stackoverflow.com/a/25510907
type: AnsweredQuestion
tagged with: protractor
accepted answer: http://stackoverflow.com/a/26599263

http://stackoverflow.com/q/25462917
has answer: http://stackoverflow.com/a/25495113
tagged with: javascript
has comment: http://stackoverflow.com/comment/39785111
answer count: 1
downvote count: 0
favorite count: 0
tagged with: poltergeist
has comment: http://stackoverflow.com/comment/39793026
has comment: http://stackoverflow.com/comment/39792909
linked to: http://stackoverflow.com/q/25218984
has title: Multi-step page interaction and snapshots using Rails and PhantomJS?
has body: Our Rails app needs to take snapshots of multiple URLs from a given domain. For the moment these will just be simple GET requests but in the future users will be able to input more complex instructions such as clicking on page elements, filling out forms etc. before a snapshot is taken. I've settled on PhantomJS as a backend, but I'm not clear on the best way to interact with it. PhantomJS's site has excellently clear docs and examples of how to control it using pre-written JS scripts and arguments. This seems to work great if your interactions can all be captured in a rigid script: create the page instance, load a URL, do some things, then call phantom.exit();. But in our case, we want to be able to send a variety of instructions to a persistent browser session, in the way Capybara does. For example, a given user-defined script may call for loading a URL, clicking on an element by ID, then rendering a screenshot with a parameter-defined browser width. Then click on a link or load another URL and take more actions, etc. So while our immediate need (load a URL and take a screenshot) can easily be handled as a 10-line JS script, it seems that pretty soon we'll need to be able to send commands more modularly, to a persistent PhantomJS browser open that stays open between commands until we explicitly close it. Is there a way to "modularize" my communications with PhantomJS? From looking through the Poltergeist code, I see that they use web sockets to send individual requests to PhantomJS. Do I need to learn how to do that? Should I just use Capybara? Is there some simpler solution that I'm missing? Thanks in advance. Just trying to figure out how to get started here.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25495113
score: 1
upvote count: 1
tagged with: ruby-on-rails
type: Question
tagged with: phantomjs

http://stackoverflow.com/a/25532099
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25530992
type: Answer
answers question: http://stackoverflow.com/q/25530992
has body: When creating async tests with mocha you need to let him know when it is done describe('an asynch piece of code', function() { var foo = new bar(); it('should call the callback with a result', function( done ) { foo.doAsynchStuff( function( result ) { result.should.be.ok; done(); }); }); }); If done is present as an argument on the it then mocha will wait for the done to be called. It has a timeout of 2 seconds, that if exceeded fails the test. You can increase this timeout: it('should resolve in less than 10 seconds', function( done ) { this.timeout( 10000 ); foo.doAsynchStuff( function( result ) { result.should.be.ok; done(); }); }
score: 4
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/40161426
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25673618
type: Comment
has text: If you believe it is a caching error, then try to clear your browsers cache.

http://stackoverflow.com/q/25391152
has answer: http://stackoverflow.com/a/25426389
has comment: http://stackoverflow.com/comment/39601975
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39600665
has comment: http://stackoverflow.com/comment/39600750
has comment: http://stackoverflow.com/comment/39600721
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25433923
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25410727
type: UnansweredQuestion
has body: I'm building an ajax upload with an editing function (rotate, zoom and crop), and I'm using guillotine by matiasgagliano (https://github.com/matiasgagliano/guillotine) for this. My problem is that after upload the user get redirected to the editing page through ajax, but when landing on that page I always have to refresh the page in browser for the image to load. I've tried auto-reloading, both through js and php, but that doesn't help, neither does adding a button to load the same url again. Only refresh from browser button (tested in several browsers) works. I've tried implementing jquery.turbolinks, but that stopped guillotine functions from working. I'm loading the guillotine.js in head section after jQuery, and have the function in bottom before body tag. Any tip or help would be appreciated. Thx Here is some of the code: HTML: <img id="id_picture" src="identifications/<?php echo $id_url; ?>" alt="id" /> <a href='javascript:void(0)' id='rotate_left' title='<?php echo $word_row[434]; ?>'> <a href='javascript:void(0)' id='zoom_out' title='<?php echo $word_row[436]; ?>'> <a href='javascript:void(0)' id='fit' title='<?php echo $word_row[438]; ?>'> <a href='javascript:void(0)' id='zoom_in' title='<?php echo $word_row[437]; ?>'> <a href='javascript:void(0)' id='rotate_right' title='<?php echo $word_row[435]; ?>'> Js:
has title: jQuery not executed on page load
has comment: http://stackoverflow.com/comment/39600954

http://stackoverflow.com/comment/39635673
has text: I have updated my code above to what you suggested. The scrolling works perfectly in Netbeans, but Firefox is still giving a single "$ is not defined" error.
type: Comment
comment on: http://stackoverflow.com/a/25407007
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39675720
score: 0
comment on: http://stackoverflow.com/q/25431390
type: QuestionComment
type: Comment
has text: you could write your own binding or use an animated class.

transclusion
type: Tag
tags question: http://stackoverflow.com/q/25489225
tag name: transclusion

http://stackoverflow.com/comment/39842794
type: Comment
type: QuestionComment
has text: try putting the tags on the same physical line. browsers interpret whitespace, including line breaks, differently
score: 0
comment on: http://stackoverflow.com/q/25520747

http://stackoverflow.com/comment/39842101
has text: For sure, the problem here is, that I change the color dynamically in the code
comment on: http://stackoverflow.com/a/25520907
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39808380
has text: @Déjàvu how about ajax?
comment on: http://stackoverflow.com/a/25502290
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/119059087
score: 1
type: AnswerComment
has text: This took me out of a debugging frenzy! Thank you!
type: Comment
comment on: http://stackoverflow.com/a/25549377

http://stackoverflow.com/comment/39822813
type: QuestionComment
comment on: http://stackoverflow.com/q/25510281
has text: @dystroy nope. first you must go through parent
score: 0
type: Comment

http://stackoverflow.com/comment/39794604
has text: Should check out ui-view
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25494971

http://stackoverflow.com/a/25508057
accepted answer of: http://stackoverflow.com/q/25507910
answers question: http://stackoverflow.com/q/25507910
score: 1
has body: Okey you should do function compute_active_users(n, b) { // Write your code here var s = b /100 *n; var b = Math.floor(n - s); console.log(b); }
upvote count: 1
has comment: http://stackoverflow.com/comment/39818718
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39897308
comment on: http://stackoverflow.com/a/25545630
type: AnswerComment
has text: my canvas url is already correctly formatted : `http://subdomain.domain.com/folder1/folder2/`
score: 0
type: Comment

http://stackoverflow.com/a/25455706
type: Answer
answers question: http://stackoverflow.com/q/25455399
score: 0
has body: Give id to your link_to &lt;%= link_to("Load This One", show_path(1), remote: true, id: 'my-button') %&gt; Then just use this link id to change its color in your js.erb file $('#my-button').css('color', 'blue')

http://stackoverflow.com/q/25536203
tagged with: google-maps-api-3
linked to: http://stackoverflow.com/q/16761042
tagged with: meteor
favorite count: 0
has title: Google Maps v3 with MeteorJS loading sync issue
upvote count: 2
possible better answer: http://stackoverflow.com/a/25536484
has answer: http://stackoverflow.com/a/25536484
score: 2
type: AnsweredQuestion
has body: My app is running on MeteorJS framework and using google maps (javascript api v3). Google maps loading scheme is similar to one explained in this post, and it's pretty analogous to the official tutorial. But sometimes on it's loading the app throwing a repeated exception: Uncaught TypeError: Cannot read property 'lat' of null the following piece of code cause it (unfortunately, minified): function $H(a, b, c, d) { var e = c[B], f = new jB(d); f[p]("title", e); b[p]("draggableCursor", e, "cursor"); var g = e.Nb; Q("click dblclick rightclick mouseover mouseout mousemove mousedown mouseup".split(" "), function(d) { S[z](b, d, function(e, q, s) { var v = a[Wp](e, !0); e = new U(v.lat(), v.lng()); //here, v is probably null }) }) } I'm pretty sure that's loading synchronization issue: a) the app is working fine and the errors are thrown in only first seconds of loading. b) this happens much frequently in production, naturally the loading times there are longer. P.S. I can link to my app if it'll help.
has answer: http://stackoverflow.com/a/25581629
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25581629
tagged with: google-maps
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39726600
comment on: http://stackoverflow.com/a/25446654
score: 0
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59840/discussion-between-user2309862-and-jake745).
type: AnswerComment

http://stackoverflow.com/comment/39691786
type: Comment
comment on: http://stackoverflow.com/a/25440373
score: 0
type: AnswerComment
has text: @RobG Fair enough. I wasn't considering best practices since it is just a homework assignment. I'll update the answer

http://stackoverflow.com/a/25477148
has body: That's because you are binding the same event over and over. Each time that you add an item another handler is bound for the click event. When you have added an even number of items there is an even number of event handlers added. When you click an item the second handler will undo what the first handler did. When you have for example ten items, the event handler will be called ten times. As the end result is the same as if the event handler was called zero times, it appears as nothing is happening. Just bind the event handler once, not every time that you add an item.
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25477025
type: Answer

http://stackoverflow.com/q/25538172
has comment: http://stackoverflow.com/comment/39874053
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25552886
has body: I am currently making a scatterplot matrix in D3. My data point structure looks like this: function plot(p) { var cell = d3.select(this); x.domain(domainByTrait[p.x]); y.domain(domainByTrait[p.y]); // Data points cell.selectAll("circle") .data(data) .enter().append("circle") .attr("cx", function (d) { return x(d[p.x]); }) .attr("cy", function (d) { return y(d[p.y]); }) .attr("r", 3) .style("fill", function (d) { return color(d.species); }); } I also have a javascript function: function create(columnsplit) { cell = svg.selectAll(".cell") .data(cross(traits, traits)) .enter().append("g") .attr("class", "cell") .attr("transform", function (d) { return "translate(" + (n - d.i - 1) * size + "," + d.j * size + ")"; }) .each(plot); cell.call(brush); } where plot is assigned. However, I would like to replace the hardcoded d.species with the columnsplit argument that I have in my create function (unless d.species doesn't work like I originally thought). How exactly would I do this? Here is how I the traits for the datum d are being created, from what I can understand: domainByTrait = {}, traits = d3.keys(data[0]).filter(function (d) { return d !== columnsplit; }), n = traits.length; traits.forEach(function (trait) { domainByTrait[trait] = d3.extent(data, function (d) { return d[trait]; }); }); I am using this as my template: http://bl.ocks.org/mbostock/4063663 Thanks
type: Question
score: 0
has answer: http://stackoverflow.com/a/25552886
answer count: 1
has title: Passing a javascript argument into D3
tagged with: javascript
has comment: http://stackoverflow.com/comment/39900525
tagged with: d3.js

http://stackoverflow.com/a/25415235
has comment: http://stackoverflow.com/comment/39646063
accepted answer of: http://stackoverflow.com/q/25415146
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25415146
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: No. =( The answer in your link still stands today. The knowledge that something was even capable of handling the event is way to much information to give to a browser.

http://stackoverflow.com/comment/67738184
type: Comment
has text: [below link may help you ](http://stackoverflow.com/questions/19548395/jquery-ajax-post-request-with-special-characters) http://stackoverflow.com/questions/19548395/jquery-ajax-post-request-with-special-characters
comment on: http://stackoverflow.com/q/25466560
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39895254
has text: Find out the countries latitude, add the whole lot into an array of object literals containing the country names and their latitude, then you will be able to calculate which one belongs where and produce an output array of just the country names.
type: QuestionComment
comment on: http://stackoverflow.com/q/25550041
score: 0
type: Comment

http://stackoverflow.com/q/25411282
has body: I have a small script on my e-commerce site checkout page. It is simply moving a div to another location on the page, as the HTML code of the checkout page is locked. Here is the script: &lt;script&gt; $(document).ready(function() { $("#div_articleContainer_116").insertAfter("#table_checkout_cart0"); }); &lt;/script&gt; This bit of code successfully moves the div in Chrome, but in Firefox and IE it is not functioning. You can see this in action at: https://www.yandasmusic.com/one-page-checkout.asp Any tips? I'm very much a jquery novice. Thanks!
has title: Small jQuery script working in Chrome, not in firefox or IE
answer count: 0
has comment: http://stackoverflow.com/comment/39639039
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39638814
has comment: http://stackoverflow.com/comment/39639199
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39638493
has comment: http://stackoverflow.com/comment/39638957
has comment: http://stackoverflow.com/comment/39638834
score: 0

http://stackoverflow.com/a/25416428
has body: If you're already using jQuery, why would you bother with the low level event coordinates? Just use the jQuery .offset() and .position() functions, in the knowledge that jQuery already did all the browser-inconsistency solving.
downvote count: 1
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/25414704
type: Answer
has comment: http://stackoverflow.com/comment/58721319

http://stackoverflow.com/comment/39856159
has text: it's all about scope ;)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25528816

http://stackoverflow.com/q/25508453
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25508585
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: how to slide up current div
accepted answer: http://stackoverflow.com/a/25508585
tagged with: css
type: AnsweredQuestion
score: 0
has body: i want to slideUp the current div that is open(that doesn't work), but when i open another div, the div before must slideup (that works). Maybe anyone can help me. Here is a jsfiddle with the problem: http://jsfiddle.net/Evolutio/xbsm734f/ my jQuery code looks like this: $(document).ready(function(){ $('.faq_desc').hide(); $('.faq li.faq_head').click(function(e){ var $i = $('ul.faq i.fa'); $i.removeClass('fa-caret-up').addClass('fa-caret-down'); $(this).find('i.fa').removeClass('fa-caret-down').addClass('fa-caret-up'); if($(this).siblings().hasClass('slided_down')==false) { $('ul.faq .slided_down').removeClass('slided_down'); } var $faq_desc = $(this).find('.faq_desc'); if($faq_desc.hasClass('slided_down')) { $faq_desc.removeClass('slided_down').slideUp(); } else { $faq_desc.addClass('slided_down').slideDown(); } $(this).siblings().find('.faq_desc').slideUp(); e.preventDefault(); }); }); my html: &lt;ul class="faq"&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;li class="faq_head"&gt; &lt;h4 class="ff_os_b"&gt;asdaasdasd&amp;nbsp;&amp;nbsp;&lt;i class="fa fa-caret-down"&gt;&lt;/i&gt;&lt;/h4&gt; &lt;div class="faq_desc fs_14 lh_14" style="display: none;"&gt; &lt;p&gt;asdasdasdadasdasdasdasdassdasd&lt;/p&gt; &lt;/div&gt; &lt;/li&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;li class="faq_head"&gt; &lt;h4 class="ff_os_b"&gt;asdadasdasdasdasd&amp;nbsp;&amp;nbsp;&lt;i class="fa fa-caret-down"&gt;&lt;/i&gt;&lt;/h4&gt; &lt;div class="faq_desc fs_14 lh_14" style="display: none;"&gt; &lt;p&gt;asdsadadasdasdasdasdadasd&lt;/p&gt; &lt;/div&gt; &lt;/li&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;li class="faq_head"&gt; &lt;h4 class="ff_os_b"&gt;asdasdasdasdsa&amp;nbsp;&amp;nbsp;&lt;i class="fa fa-caret-down"&gt;&lt;/i&gt;&lt;/h4&gt; &lt;div class="faq_desc fs_14 lh_14" style="display: none;"&gt; &lt;p&gt;dadsadadaassdasdasdasd&lt;/p&gt; &lt;/div&gt; &lt;/li&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;li class="faq_head"&gt; &lt;h4 class="ff_os_b"&gt;asdasdasdasdasdasasdasdasdasdas&amp;nbsp;&amp;nbsp;&lt;i c…
type: Question

http://stackoverflow.com/comment/39954847
comment on: http://stackoverflow.com/a/25544779
has text: Solution to my issue is to build the map in a factory under the success method and get the parameters from a controller up river to the factory and thus influiencing how the map looks like according to different events.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39872134
type: Comment
type: QuestionComment
has text: I've found http://youmightnotneedjquery.com/ to be a helpful reference in these cases.
comment on: http://stackoverflow.com/q/25536993
score: 0

http://stackoverflow.com/a/25518939
has body: First break out your code to this: !![] which returns true (!! is to convert to boolean) and now + converts to number so +!![] returns 1. ![] converts to false so +![] returns 0. ~[] returns -1 and ~![] also returns -1. ~!![] returns -2. Now, -~!![] returns 2 and -~![] returns 1. So, combining them all returns 10162014. All about you to know is ~, !, +, &amp; -
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25518886
score: 3
type: AcceptedAnswer
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/25518886

http://stackoverflow.com/comment/39690544
type: QuestionComment
has text: I doubt if the OP meant no CSS, more likely he meant no jQuery.
score: 0
comment on: http://stackoverflow.com/q/25439268
type: Comment

http://stackoverflow.com/q/25394936
type: UnansweredQuestion
score: 1
tagged with: compression
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/44401853
tagged with: javascript
has answer: http://stackoverflow.com/a/25395356
has title: Javascript Lossy PNG image compression library
answer count: 2
downvote count: 0
favorite count: 0
has body: I have a (mostly) offline webapp where users can sign off with a digital signature (using this library: https://github.com/szimek/signature_pad) The image size of a signature is about 50K, and is sent to the server as a base64 encoded json string. Since this data is sent over satellite, I am looking to minimize the bandwidth used for each signature. Is there any JavaScript library to do a lossy compression of the PNG to reduce the file size?
has comment: http://stackoverflow.com/comment/39608488

reveal.js
tags question: http://stackoverflow.com/q/25492134
tag name: reveal.js
tags question: http://stackoverflow.com/q/25409227
tags question: http://stackoverflow.com/q/25400428
type: Tag

http://stackoverflow.com/q/25521975
has body: I would like to create a select with options dynamically at the starting page on function document.ready. Can i to do that? I try, but it doesn't works. $('#form').append(' /select>'); $('#myselect').append(' GREEN '); Thank you.
has answer: http://stackoverflow.com/a/25522009
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/6601952
possible better answer: http://stackoverflow.com/a/25522009
answer count: 3
has title: jquery create select append document.ready
has comment: http://stackoverflow.com/comment/39843841
has answer: http://stackoverflow.com/a/25522018
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
type: Question
has answer: http://stackoverflow.com/a/25522170
accepted answer: http://stackoverflow.com/a/25522170
score: -1

http://stackoverflow.com/comment/39665449
score: 0
comment on: http://stackoverflow.com/q/25426242
type: Comment
type: QuestionComment
has text: Are you trying to create some lightbox

http://stackoverflow.com/q/25400751
downvote count: 1
has body: For example, I have fallowing code: News Reviews Videos Is here any way how i can get nth-child (1 or 2 or 3) with Mootools in click event? EDIT: I apologize for the wrong question. May be this code help.
has comment: http://stackoverflow.com/comment/39629842
has title: how can i get which nth-child event click with mootools
tagged with: mootools
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25421791
tagged with: javascript
has comment: http://stackoverflow.com/comment/39620293
linked to: http://stackoverflow.com/q/8123650
score: 0
tagged with: mootools-events
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39636992
has answer: http://stackoverflow.com/a/25446522
has comment: http://stackoverflow.com/comment/39644843
has comment: http://stackoverflow.com/comment/39621229
upvote count: 1

http://stackoverflow.com/comment/39880135
has text: What do you mean by "these asserts fail"? Do you mean the condition they are checking fails, or do you mean the function calls themselves are somehow failing?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25541849
type: QuestionComment

http://stackoverflow.com/comment/41955037
comment on: http://stackoverflow.com/a/25514854
type: AnswerComment
score: 0
type: Comment
has text: It was running on port 80. Thanks

mootools-events
tags question: http://stackoverflow.com/q/25400751
tag name: mootools-events
type: Tag

http://stackoverflow.com/q/25431114
tagged with: javascript
has comment: http://stackoverflow.com/comment/39689935
has comment: http://stackoverflow.com/comment/39716376
has title: Yesod sanitizing quotation marks in Javascript / Julius
score: 1
has comment: http://stackoverflow.com/comment/39691388
favorite count: 0
has comment: http://stackoverflow.com/comment/39679279
answer count: 0
type: UnansweredQuestion
tagged with: yesod
upvote count: 1
has body: I'm having a little bit of trouble including Javascript into my Yesod application. The issue is that everything that I try to include with toWidget is getting HTML-sanitized. Here is how my edited Foundation.hs looks: defaultLayout widget = do master &lt;- getYesod mmsg &lt;- getMessage pc &lt;- widgetToPageContent $ do $(widgetFile "default-layout") toWidget someJs where in another imported module someJs = [julius| "foo stuff"; |] which generates code that looks like &lt;script&gt;&amp;quot;foo stuff&amp;quot;;&lt;/script&gt; I'm pretty confused as to why this is happening. Is there a Julius-specific toWidget I could use? Is it PageContent's fault? Any help with this would be tremendous. Thank you!
tagged with: sanitization
tagged with: haskell
has comment: http://stackoverflow.com/comment/39687672
has comment: http://stackoverflow.com/comment/39689163
type: Question
downvote count: 0

http://stackoverflow.com/comment/90453918
type: Comment
has text: Thanks, that helped me a lot - I had to stop jquery BlockUI from working and here was the right place to add `$.unblockUI()`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/35359560

http://stackoverflow.com/q/25428691
has answer: http://stackoverflow.com/a/25428963
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25429282
has title: Floated div with SlideToggle
has body: I have a Wordpress Site with multiple floating div`s. behind every div is a slideToggle that open some more content. My problem is now, that all div`s should stay in position and only the opened should expand. Now the divs switch position and all others in a row grow bigger. html A Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. A Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. A Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. A Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. css .span4 { float:left; margin-right: 2%; width: 32%; margin-bottom: 40px; } .span4{width: 32%;} .span4:nth-child(3n) {margin-right: 0;} js $(document).ready(function(){ //hide the all of the element with class msg_body jQuery(".event_body").hide(); //toggle the componenet with class msg_body jQuery(".event_head").click(function(){ jQuery(this).next(".event_body").slideToggle(); }); }); Here is a Fiddle of what i have so far. fiddle And here is an image of what i want. http://www.rhodesign.ch/slidetoggle.…
type: UnansweredQuestion
tagged with: slidetoggle
tagged with: css-float
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25400069
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39617225
type: Question
has comment: http://stackoverflow.com/comment/39618941
linked to: http://stackoverflow.com/q/6229961
has comment: http://stackoverflow.com/comment/39617494
tagged with: javascript
has comment: http://stackoverflow.com/comment/39617532
has comment: http://stackoverflow.com/comment/39618724
upvote count: 2
has body: On an HTMl i have a textarea (a comment box) (id = #comment") that can contain multiple lines. When I send it through with ajax i have no problems. Although when retrieve this data, the JSON-data is no longer valid(below a minor extract of json: "items" : [ { ...<<other values>>..., "comment": "Approved!!!! Or Not Or Did I Approve this....." ,...<<other values>>...} So i assumed I'd had to convert the value of my textarea when sending it to the server. But when i tried using JSON.Parse I got an error: $.ajax({ type: "POST", url: "updateitem.aspx", data: { myId: $("body").attr("id"), comment: JSON.parse($("#comment").val()), } ... }) But this results an error: SyntaxError: JSON.parse: unexpected keyword at line 1 column 1 of the JSON data comment: JSON.parse($("#comment").val()), So my question really is: How can send the data from an textarea to the server. While preserving any non-JSON characters & linebreaks. The solution is probably simple but the only this i seem to find are: Past JSON in textarea, ReplaceAll (which could work but i'm searching for a better solution) Tried the following solution but to no avail. how-can-i-pass-textarea-data-via-ajax-that-contains-ampersands-and-or-linebreaks
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39619090
has comment: http://stackoverflow.com/comment/39617332
favorite count: 0
has answer: http://stackoverflow.com/a/25400348
accepted answer: http://stackoverflow.com/a/25400348
has comment: http://stackoverflow.com/comment/39623127
linked to: http://stackoverflow.com/q/42068
has comment: http://stackoverflow.com/comment/39617259
has comment: http://stackoverflow.com/comment/39617279
type: AnsweredQuestion
score: 2
has title: JSON: Handle linebreaks (and other invalid JSON-Chars)in textArea
downvote count: 0

http://stackoverflow.com/comment/39706690
type: Comment
type: QuestionComment
has text: You might compare height of the including container against viewport height. If the first is larger => scroll is needed/possible.
score: 1
comment on: http://stackoverflow.com/q/25448477

http://stackoverflow.com/comment/40057857
type: AnswerComment
comment on: http://stackoverflow.com/a/25549971
score: 0
type: Comment
has text: see my edit. the line defining `x` was missing. now it is definitely working :-)

http://stackoverflow.com/comment/63017444
comment on: http://stackoverflow.com/a/25422842
score: 0
type: Comment
has text: I was using ng-controller="MyController as ctrl"... and then ctrl.doSomething(). Removing the ctrl thing and using the method directly, as you did, worked. Thanks.
type: AnswerComment

http://stackoverflow.com/comment/39778314
comment on: http://stackoverflow.com/a/25486604
type: Comment
has text: @PanagiotisIliakopoulos: at least in Chrome the new line after the ` ` element creates a new text node, which means that the ` ` element is not the last child of the `` element.
score: 0
type: AnswerComment

jsoup
tags question: http://stackoverflow.com/q/25550616
type: Tag
tag name: jsoup

http://stackoverflow.com/q/25496896
accepted answer: http://stackoverflow.com/a/25496917
has comment: http://stackoverflow.com/comment/39797868
favorite count: 0
tagged with: angularjs
upvote count: 2
tagged with: yeoman
has body: I am having an issue with angular and yeoman when running grunt serve which minifies and outputs my angular app to my dist directory for production. When running my app in my local host everything seems to work fine but after doing a build something is happening that is not clear to me at the moment. Any help would be greatly appreciated. This is the controller that I introduced to my project that is causing the issue: var myPlayer angular.module('myapp') .controller('ShowCaseTabCtrl', function ($scope) { $scope.tabs = [ { title:"Video", content:'templates/showcased-video.html', }, { title:"Gallery", content:'templates/showcased-gallery.html', } ]; // here I am firing this method on ng-include onload to ensure video js // is being properly instantiated $scope.initVideo = function() { videojs('showcase-video', { 'controls': true, 'autoplay': false, 'preload': 'auto', 'poster': 'images/posters/poster.jpg' }, function(){ myPlayer = this; myPlayer.dimensions(900, 600); myPlayer.poster('images/posters/poster.jpg'); myPlayer.src([ { type: 'video/mp4', src: 'video/myvideo.mp4' }, { type: 'video/ogg', src: 'video/myvideo.ogv' } ]); }); } }); This my view of the controller above: &lt;section ng-controller="ShowCaseTabCtrl"&gt; &lt;div class="mod-wrap full-bleed"&gt; &lt;tabset&gt; &lt;tab ng-repeat="tab in tabs" heading="{{tab.title}}" content="{{tab.content}}" active="tab.active"&gt; &lt;ng-include src="tab.content" onload="initVideo()"&gt;&lt;/ng-include&gt; &lt;/tab&gt; &lt;/tabset&gt; &lt;/div&gt; Error I am getting after running grunt serve from yo-angular generator: Error: [$injector:unpr] Unknown provider: aProvider &lt;- a
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39797697
score: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25496917
type: Question
has title: Angular unknown provider error
tagged with: javascript
answer count: 1

http://stackoverflow.com/comment/39727969
type: Comment
score: 0
type: AnswerComment
has text: I actually did not tried this despite of seeing this. This is correct.
comment on: http://stackoverflow.com/a/25458741

http://stackoverflow.com/q/25481587
answer count: 1
downvote count: 0
tagged with: angular-ui
favorite count: 0
type: UnansweredQuestion
has body: I am using angular-ui bootstrap to set calendar. My question is how to set the is-open property in the ngRepeat iteration with the $index? If set all the same, when user click the calendar, all the calendar would pop up. But the is-open="newTestDateOpened + $index" does not work. So how can I do it? then in the setNewTestDate($event,$index) function i am able to set it as true.
has answer: http://stackoverflow.com/a/25496709
score: 1
upvote count: 1
type: Question
tagged with: indexing
has title: How to use $index to set angular ui bootstrap calendar is-open attribute?
tagged with: expression
tagged with: javascript

http://stackoverflow.com/comment/39735600
has text: You could just add the slider.html content to your main php file
comment on: http://stackoverflow.com/a/25463661
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39881697
comment on: http://stackoverflow.com/q/25542603
score: 0
has text: The above "collision" code does not work, character does not hide when collides with GRASS: Here is my code in action: http://www.retroinvaders.net/tileCollisions.html
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25491557
has comment: http://stackoverflow.com/comment/39787815
has comment: http://stackoverflow.com/comment/39788122
type: Question
has comment: http://stackoverflow.com/comment/39787796
has title: Regex capturing nonexistent grouping when using `.split`
tagged with: javascript
has body: I'm trying to split a string using regex. Here's what I'm doing so far: 'a.b.c.e[2].z'.split(/(?:\.)|\[(\d+)\]/g); I'm getting a result of ["a", undefined, "b", undefined, "c", undefined, "e", "2", "", undefined, "z"] I expected and want a result of ["a", undefined, "b", undefined, "c", undefined, "e", undefined, 2, undefined, "z"] Or even: ["a", undefined, "b", undefined, "c", undefined, "e", "2", undefined, "z"] I just don't want that empty string in the results list, other than manually removing this (which I can't do because this is part of a larger regex), is there a way to modify this regex to not have that empty string? EDIT It may be unclear as to what I'm exactly trying to do, here's a snippet of the relavant program: var rawParts = path.split(/\.|\[(\d+)\]|\[(")((?:[^"]|(?:\\.))*)"\]|\[(')((?:[^']|(?:\\.))*)'\]/g); var rawPart; var parts = []; var i, l; for (i = 0, l = rawParts.length; i < l; i++) { rawPart = rawParts[i]; if (rawPart !== undefined) { if (rawParts[i - 1] === '"') { rawPart = rawPart.replace(/\\"/g, '"'); } else if (rawParts[i - 1] === "'") { rawPart = rawPart.replace(/\\'/g, "'"); } parts.push(rawPart); } } I simplified the problem I had above but the idea is I want to remove the empty string when I'm matching a [0] case. I can't remove all empty string because in a case of a.b[''].c the blank string is valid
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
downvote count: 2
score: -2
tagged with: regex
has answer: http://stackoverflow.com/a/25491841

http://stackoverflow.com/q/25395341
has comment: http://stackoverflow.com/comment/39608827
tagged with: javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/39608804
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: How to fire an event after a multi-dimensional for loop with $.get() requests?
has comment: http://stackoverflow.com/comment/39608781
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25395445
type: Question
has body: I have two arrays chosen1 & chosen2. The items in these arrays are my $.get() properties that I send. I am trying to render a Highcharts chart (called using the renderChart()) function once the loop is complete. I tried multiple solutions and ended up with the code below. How do I listen for when all the $.get() requests are done so I can fire the Highcharts function on the page? var chosen1 = [], chosen2 = [], computedSeries = [], XHRs = []; function getData() { var rebuildingChart = ' Crunching Data '; $('#cc-chart').children().remove(); $('#cc-chart').html(rebuildingChart); $(chosen1).each(function() { var fruits = this; $(chosen2).each(function() { var veggies = this; XHRs.push($.get("/fetchData", {fruit: fruits, veggie: veggies}, function(data) { var chartJSON = data, selectedKPI = veggies, singleSeries = {}, KPIData = []; for (var i = 0; i < chartJSON.length; i++) { var point = []; point.push(chartJSON[i]['utc_time']); point.push(Math.round(chartJSON[i]['kpi_value'])); KPIData.push(point); }; singleSeries["name"] = selectedKPI; singleSeries["data"] = KPIData; computedSeries.push(singleSeries); })); }); }); $.when(XHRs).then(function() { renderChart(); }); }

log4js-node
tags question: http://stackoverflow.com/q/25522594
tags question: http://stackoverflow.com/q/25522538
type: Tag
tag name: log4js-node

http://stackoverflow.com/comment/39660102
type: AnswerComment
has text: I want %20 for a space not %2520.
comment on: http://stackoverflow.com/a/25421199
type: Comment
score: 0

http://stackoverflow.com/comment/39670784
score: 0
type: Comment
has text: Okay, create a new question for that.
comment on: http://stackoverflow.com/a/25427576
type: AnswerComment

http://stackoverflow.com/q/25548999
has answer: http://stackoverflow.com/a/25549030
favorite count: 0
has comment: http://stackoverflow.com/comment/39892877
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39892983
has answer: http://stackoverflow.com/a/25549093
answer count: 4
linked to: http://stackoverflow.com/q/5043235
downvote count: 2
type: Question
has title: Change class with jQuery/JS in specific case
score: -2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25549192
tagged with: class
tagged with: html-table
has answer: http://stackoverflow.com/a/25549230
upvote count: 0
has body: For this case, I work with table. (Follow up architecture) By default "tr.classified" is display none. I want to add a button who display "tr.classified" when needed. I'm not a web developer. I started with this; &lt;script&gt; $( "buttonchange" ).click(function() { $( this ).switchClass( "tr.classified", "tr.classified2"); }); &lt;/script&gt; &lt;div class="buttonchange"&gt;Display Archives&lt;/button&gt; Not working at all :( Can you give a look at this ?

http://stackoverflow.com/q/25432603
type: UnansweredQuestion
upvote count: 1
has body: I had an app that I had already built using Backbone and now have decided to use Angular for its "Controller" Module. I'm trying to find a way to bind angulars ng-repeat events to the collections reset event but can't seem to have an idea what to do. I am not verse in AngularJS but do know my way around the Backbone framework. Can someone enlighten me on this scenario?
score: 1
type: Question
has title: Binding events between BackboneJS and AngularJS
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: backbone.js
tagged with: angularjs
answer count: 0

http://stackoverflow.com/a/25407482
has comment: http://stackoverflow.com/comment/39644694
accepted answer of: http://stackoverflow.com/q/25406342
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39645074
score: 1
has body: slice returns an array, which means that: potentialName is an array, not a string, and therefore will never be equal (===) to name. textWord is also an array, and since g is always e + 1, we can further infer that it is always an array containing a single element, which the current word. I repeat: textWord is an array containing the word, not the word itself, as you seem to expect. Let's run your program step by step starting at the first line of the loop, on the first iteration: e is 0. g is e + 1 which is 0 + 1 which is 1. textWord is textWords.slice(e, g) which is ['etiam', 'accumsan', ...].slice(0, 1) which is ['etiam'] (an array). potentialName is textWord.slice(0, name.length) which is ['etiam'].slice(0, 6) which is ['etiam']. I guess the third step is not what you want. I guess you want to get the e-th word. What you need to do that is not slice but [], like this: textWords[e]. Using this, on the first iteration, textWord will be 'etiam' instead of ['etiam']. Then you can safely compare textWord to name and see if they are equal using ===. There is no need for the strings to have the same length. I hope this will help. Of course, they are simpler ways of counting words in a text, but I'm guessing this is a learning exercise, so it's fine for that purpose.
answers question: http://stackoverflow.com/q/25406342

http://stackoverflow.com/comment/39742627
type: Comment
type: QuestionComment
has text: Create [jsfiddle](http://jsfiddle.net/)
comment on: http://stackoverflow.com/q/25467352
score: 0

http://stackoverflow.com/comment/39789714
type: Comment
has text: @Sparky Yes, you are right, on both counts. I missed the bit about the jQuery validation plugin though...
comment on: http://stackoverflow.com/a/25492545
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39853386
type: Comment
has text: Use your developer console to see which classes need to be modified. Chrome you right click on the widget and select "inspect element". After that it's fairly self explanatory. If you need more help please post additional code.
type: AnswerComment
comment on: http://stackoverflow.com/a/25527202
score: 0

http://stackoverflow.com/q/25487160
has title: Export React mixin in a separated file
score: 1
type: Question
has body: I am trying to separate the SetIntervalMixin into a different file that the component class file. Maybe I am not fully understand how module.export works but... If I do like this: module.exports = { componentWillMount: function() { this.intervals = []; }, setInterval: function() { this.intervals.push(setInterval.apply(null, arguments)); }, componentWillUnmount: function() { this.intervals.map(clearInterval); } }; inside a SetIntervalMixin.js, then it works fine using from the component: var SetIntervalMixin = require('../util/mixins/SetIntervalMixin') But if I write it like this: var SetIntervalMixin = { componentWillMount: function() { this.intervals = []; }, setInterval: function() { this.intervals.push(setInterval.apply(null, arguments)); }, componentWillUnmount: function() { this.intervals.map(clearInterval); } }; module.export = SetIntervalMixin; It doesn't work (undefined when trying to call setInterval()). I think something is missing after: SetIntervalMixin = ... Like when you define a component, you use: var yourComponent = React.createClass(... Is there is something similar like a React.createMixin(.. ? Or how would be the best way to do this. Thanks.
tagged with: reactjs
tagged with: mixins
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: reactjs-flux
has answer: http://stackoverflow.com/a/25488149
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/25488149
type: AnsweredQuestion

http://stackoverflow.com/comment/39691008
has text: Please see my updated answer. To know how to open console in your browser to view the object, see this: http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers
comment on: http://stackoverflow.com/a/25439790
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25437504
answers question: http://stackoverflow.com/q/25417020
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25417020
type: AcceptedAnswer
has body: $(document).ready(function() { $(".producthandler").click(function() { var ctx = $(this); var productboxId = ctx.children().eq(0).attr("id"); ctx.toggleClass('active'); $("#" + productboxId + "box").stop().slideToggle(1000); $(".producthandler").each(function() { var ctx = $(this); var producthandlerId = ctx.children().eq(0).attr('id'); if (productboxId !== producthandlerId) { ctx.removeClass('active'); $("#" + producthandlerId + "box").slideUp(1000); } }); }); });

http://stackoverflow.com/comment/39705439
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25436242
type: QuestionComment
has text: Oh... just thought of this... does Dexter need _only_ the function name as the second arg? Maybe this: `Dexter.fake( window.$, 'getLocation', function() { ...});`

http://stackoverflow.com/comment/39790514
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25491742
has text: How can I close it with mouse out?
type: AnswerComment

http://stackoverflow.com/comment/39794443
comment on: http://stackoverflow.com/q/25494991
type: Comment
type: QuestionComment
has text: @MarkReed While it is correct that the OP is not accessing a JSON object, if the JSON did not have a property starting with a number, the problem wouldn't exist :p
score: 1

http://stackoverflow.com/q/25485650
has answer: http://stackoverflow.com/a/25485733
type: UnansweredQuestion
tagged with: datetime
has comment: http://stackoverflow.com/comment/39776009
has title: javascript convert datetime to local with specific format
has body: I m having a date time text which i m converting to local dateTime using the javascript date time function toString(); var txt = $(e).html(); var date = new Date(txt); $(e).html (date.toString('yyyy-mm-dd')); Now the toString method of javascript does not accept any parameters. It always comes up with this format - Tue Aug 26 2014 03:30:34 GMT+0530 (India Standard Time) I could not change the date format and had to go with a library date.js as here Any help without any js frameworks. Regards
linked to: http://stackoverflow.com/q/1056728
type: Question
has answer: http://stackoverflow.com/a/25485760
has comment: http://stackoverflow.com/comment/39776041
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39776089

http://stackoverflow.com/q/25453959
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39717714
possible better answer: http://stackoverflow.com/a/25454196
has comment: http://stackoverflow.com/comment/39718332
has comment: http://stackoverflow.com/comment/39717575
has answer: http://stackoverflow.com/a/25454196
tagged with: formatter
type: Question
has body: My form data is returned from a REST call. Example data is: { id: 4 version: 3 code: "ADSFASDF" definition: "asdflkj" value: "1234" active: "false" formula: false validTo: "2014-12-31T05:00:00" validFrom: "2010-12-31T10:00:00" } I'm running into trouble using input[number] and input[date] fields as they require the data to be a number or a date respectively and not a string. Similar problems occur for booleans (check boxes), etc. I thought I could get around it using a $formattter, but the value passed to the formatter is always "". I presume this means the that $formatter is called after Angular has already tried to parse the data model. Without having to initially cast everything in my controller, is there a way to cast the data via a directive, or within the HTML tag directly? Ex: &lt;input type="number" class="form-control" ng-model="charge.value" jk-numeric id="chargeValue"/&gt; $formatter: app.directive( 'jkNumeric', function() { return { restrict: 'A', require: 'ngModel', link: function(scope, element, attrs, ngModelCtrl) { var stringToNum = function(text) { if( angular.isNumber(text) ) return text; else return parseInt( text, 10); } // assign the parser and the formatter to the model ngModelCtrl.$formatters.unshift(stringToNum); } }; });
accepted answer: http://stackoverflow.com/a/25454552
has comment: http://stackoverflow.com/comment/39717741
has comment: http://stackoverflow.com/comment/39717775
has comment: http://stackoverflow.com/comment/39718248
has comment: http://stackoverflow.com/comment/39717816
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39717748
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/25454552
has title: input[number] field does not display string value while binding in angular
has comment: http://stackoverflow.com/comment/39717617

http://stackoverflow.com/comment/39636590
comment on: http://stackoverflow.com/q/25410332
score: 0
type: Comment
type: QuestionComment
has text: Maybe the answer to my question involves that, but our questions are pretty much not at all the same.

http://stackoverflow.com/comment/39748172
type: Comment
type: QuestionComment
has text: There are a lot of ways to accomplish this, one is to provide a unique ID and pass it into the functions you are calling (See this [JSFiddle](http://jsfiddle.net/wjp4pqw6/)). I would normally recommend something that is more [unobtrusive](http://en.wikipedia.org/wiki/Unobtrusive_JavaScript) though.
score: 0
comment on: http://stackoverflow.com/q/25470213

http://stackoverflow.com/comment/39845063
type: Comment
comment on: http://stackoverflow.com/q/25522543
type: QuestionComment
score: 0
has text: `Everything is OK` No, it's not. By simply looking at the highlight syntax in the question I already saw the problem.

http://stackoverflow.com/a/25546782
upvote count: 1
answers question: http://stackoverflow.com/q/25546583
has body: I fixed my issue using this: Static content {{tab.content}} Alert! I've got an HTML heading, and a select callback. Pretty cool! more about this go for this link
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/a/25403130
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25402904
upvote count: 2
has body: I think you're missing (),+,append method and escaping " incorrectly, try with this: $('&lt;div/&gt;').append('&lt;img src="' + text(message.image) + '"/&gt;').appendTo($('#msgDiv')); Hope this helps,

http://stackoverflow.com/q/25540260
tagged with: javascript
has comment: http://stackoverflow.com/comment/39881929
has comment: http://stackoverflow.com/comment/39882535
score: 0
answer count: 1
tagged with: string
tagged with: meteor
favorite count: 0
has title: Hashtags, How to replace text in a string with a link/route
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25543880
type: AnsweredQuestion
tagged with: hashtag
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25543880
has body: How do I replace a bit of text (that looks similar to this #tag") in a string with a link/route. I am trying to make a Twitter or Instagram like hash-tagging system. I know how to find the text I want to be the tag and check if it is a already a tag and create one if its not and make the route, but I have no idea how to make a small amount of text in the post a link/route call. Thanks in advanced.

http://stackoverflow.com/comment/42004711
type: AnswerComment
comment on: http://stackoverflow.com/a/26406972
type: Comment
has text: Sorry to hear that. I'm not sure, if I understand what you mean by "isolate magnetometer data". Is the source of the compass heading really important to you, or are you unsatisfied with the precision that you get? Did you try the JavaScript-Example given in the Apendix (A.1 Calculating compass heading) to calculate the compass heading? Did it work? What is your issue with the result? I mean, just that the same Event provides you with "head tilt controls" does not spoil it for heading calculations, does it?
score: 0

http://stackoverflow.com/comment/39846326
has text: You can check the script.js file in plunker. It is not alerting. http://plnkr.co/edit/1IC3SzOkEuArq3vrDeEs?p=preview I want to use ng-bind-html that binds a button to the div. Button has an onclick event that invokes MyClick() function. But the click event is not triggered because it is dyanamically generated. I think we need to use $watch and $compile, but I am not sure how to use it.
comment on: http://stackoverflow.com/a/25502102
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39636944
score: 3
has text: Is that an input element closed with `` ?
comment on: http://stackoverflow.com/q/25410492
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25416515
has body: This worked for me, the example didn't use wildcards though, that did the trick. Since I had the control on datarows, each one had a different ID.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25415637

http://stackoverflow.com/comment/39772553
type: Comment
type: QuestionComment
has text: like i told ,have to display it in a page before uploading
comment on: http://stackoverflow.com/q/25480858
score: 0

http://stackoverflow.com/a/25491533
downvote count: 1
has comment: http://stackoverflow.com/comment/39787647
has body: var str = "{\n active: \"something\",\n codes: [\n 48348,\n 28923,\n 39080\n ],\n city: \"London\"\n}"; str = str.replace(/\\/g, ""); console.log(str); This will remove \n and all the whitespace from the JSON and output will be like : { active: "something", codes: [ 48348, 28923, 39080 ], city: "London" } JSFiddle : http://jsfiddle.net/rahulrulez/jq1ot5j5/
score: 0
has comment: http://stackoverflow.com/comment/39788998
answers question: http://stackoverflow.com/q/25491460
type: Answer
has comment: http://stackoverflow.com/comment/39788886
upvote count: 1

http://stackoverflow.com/comment/39655943
score: 0
has text: Is there any javascript error at the console?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25420948

http://stackoverflow.com/a/25472492
accepted answer of: http://stackoverflow.com/q/25452443
answers question: http://stackoverflow.com/q/25452443
type: AcceptedAnswer
score: 0
type: Answer
has body: While I found some very weird behaviour during debugging this, it's as simple as substracting one pixel from the height of the section: t &gt;= val &amp;&amp; t &lt; (val + sec.eq(i).outerHeight(true) -1) ? ... The rounding now happens directly inside var arr: return Math.floor($(this).offset().top) What's really weird here is that even though I rounded everything down in the end the less than condition got returned true even though it mathematically wasn't... For example this would return true (which apparently isn't): 1824 &gt;= 912 &amp;&amp; 1824 &lt; (912 + 912) So I had to substract 1px to make this true after all. To me it seems as if jQuery's .outerHeight() prints no significant digits, but does include them. As in the documentation it says: "The numbers returned by dimensions-related APIs, including .outerHeight(), may be fractional in some cases. Code should not assume it is an integer." Which gets weird when rounding down doesn't work on it. In my fiddle I put the height of the sections to 912.453125px and .outerHeight() returned 912 but rounding it down with Math.floor() still seemed to return the fractions although it wouldn't print. (See this fiddle, where, when you go to section two and press the debug button, the calculation would be the above example) So yeah, whatever. I'd like to have a more logical solution but substracting a pixel works.

http://stackoverflow.com/q/25433079
has answer: http://stackoverflow.com/a/25434088
has title: pagination with jquery logical issue with css
type: Question
has body: Please help me to find I have HTML Code rendered page shows like this 1 2 3 4 5 6 7 My requirement is that, the above code is used for pagination. When we click on link it loads entire page. with url having request parameter. of pageNo. I want to change the style of clicked href, example if i clicked on 7 then 7 should change to 7 remaining should be anchors. same process to other tags too. by reading the url i am getting pageNo thru javascript. but i want to replace as above(anchor tag with strong tag) from the anchor tags loop.(Actually coded using itemrepeater in DOTNET). Forgive my poor english. instructions is, i should not use Ids and class tags in html code.
tagged with: javascript
tagged with: replace
score: 0
has comment: http://stackoverflow.com/comment/39678613
tagged with: find
has comment: http://stackoverflow.com/comment/39678736
accepted answer: http://stackoverflow.com/a/25434088
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39680448
type: AnsweredQuestion

http://stackoverflow.com/q/25401223
tagged with: ajax
has answer: http://stackoverflow.com/a/25403194
favorite count: 0
has comment: http://stackoverflow.com/comment/39619610
has comment: http://stackoverflow.com/comment/39620297
has comment: http://stackoverflow.com/comment/39621857
tagged with: django
upvote count: 1
tagged with: python
has comment: http://stackoverflow.com/comment/39619850
accepted answer: http://stackoverflow.com/a/25403194
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39619287
score: 1
has title: No POST-Data from Ajax in Django
has comment: http://stackoverflow.com/comment/39620071
has body: I want to post a array of data in AJAX to a Django-Site. Code from Javascript: var arr = {}; arr["first"] = "first"; arr["second"] = "second"; arr["third"] = "third"; var success = "" 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) { var rawtext = xmlhttp.responseText; document.getElementById("myDiv").innerHTML= jsonToHTMLTable(rawtext); } } xmlhttp.open("POST","/AJAX?modus=create"); xmlhttp.setRequestHeader("X-CSRFToken", getCookie('csrftoken')); alert(JSON.stringify(arr)); xmlhttp.send({data:JSON.stringify(arr)}); But when i debug (with Eclipse) i don't see an array or other useful fields. This is the code from django: def AJAX(request): if request.method == 'POST': method = request.REQUEST.get("modus","") if method == 'create': test = request.POST['data'] More informations Traceback from Django-Debug Environment: Request Method: POST Request URL: http://localhost:8000/AJAX?modus=create Django Version: 1.6.5 Python Version: 3.4.1 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware') Traceback: File "C:\Python34\lib\site-packages\django\core\handlers\base.py" in get_response 112. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "C:\Users\Lee\web\reportingTool\ReportingTool\TempDosage\views.py" in AJAX 14. test = request.POST['d…
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39620341

http://stackoverflow.com/q/25454179
has comment: http://stackoverflow.com/comment/39718131
has comment: http://stackoverflow.com/comment/39718142
has comment: http://stackoverflow.com/comment/39718004
has comment: http://stackoverflow.com/comment/39718103
type: Question
tagged with: javascript
tagged with: visual-studio-2012
tagged with: visual-studio-2010
has body: I came across this link that allows you to define collapsible sections in javascript, without any Visual Studio Extensions or Macros. Although you automatically get outlining while defining functions, but the link discusses a shortcut to make any javascript code, collapsible. By using Ctrl+M+H, while selecting javascript code, you can get the collapsible section. The question is, how do you undo that? Ctrl+M+U does not work. You can remove all the outlining for the entire document using Ctrl+M+P, but how can you undo the outlining for a single section only?
score: 3
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25454417
favorite count: 0
has title: Collapsible section/region in Javascript (Visual Studio 2010 / 2012)
has comment: http://stackoverflow.com/comment/39718050
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39718384
upvote count: 3
accepted answer: http://stackoverflow.com/a/25454417

http://stackoverflow.com/q/25453181
tagged with: jquery
answer count: 0
type: UnansweredQuestion
has title: How can I keep jQueryUI sortable list sorted?
type: Question
has body: I have several related lists that are managed by jQueryUI's Sortable module. At startup, each list is sorted lexically, and I would like to keep that order as items are moved between the lists. Right now I'm just resorting each list as things are dropped into them, but I'd to add some animation to the process. Here's a fiddle showing what I'd doing right now: http://jsfiddle.net/samwyse/khezu7xh/ I want to replace the following code with something that uses animations: // Update code for the actual sortable lists $(this).sortChildren(); I'm guessing that I need to check the dropped item and if it's less than the preceding item, float it up the list, or if it's greater than the following item, float it down. I've not done any animations before, so I'm unsure how to proceed. The only code I've found that does anything similar doesn't actually reorder the list, it just changes to top attribute of the items so they look right.
has comment: http://stackoverflow.com/comment/39716154
tagged with: jquery-ui
tagged with: javascript
has comment: http://stackoverflow.com/comment/39734818
score: 0
linked to: http://stackoverflow.com/q/4928002
has comment: http://stackoverflow.com/comment/39716629
linked to: http://stackoverflow.com/q/4911124

http://stackoverflow.com/comment/39643247
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25408988
has text: So if, for example, I use a simple `for` and copy one value at a time it should work?

http://stackoverflow.com/comment/39631298
comment on: http://stackoverflow.com/a/25407563
type: Comment
has text: i try it doesn't work.. already get result empty array: `array(0) {}`
score: 0
type: AnswerComment

http://stackoverflow.com/q/25499539
has comment: http://stackoverflow.com/comment/39802331
type: Question
score: 3
has title: How to get checkbox inside table row cell
has answer: http://stackoverflow.com/a/25499940
has answer: http://stackoverflow.com/a/25499953
downvote count: 0
has body: I'm very noob in javascript. I'm trying to alert the id of a checkbox inside table view row cell. I tried: var checkBox = grid.rows[i].cells[0].firstChild; alert(checkBox.id); but the alert box shows "undefined".
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25499875
has comment: http://stackoverflow.com/comment/39802190
tagged with: checkbox
has comment: http://stackoverflow.com/comment/39802603
has answer: http://stackoverflow.com/a/63067293
has answer: http://stackoverflow.com/a/70020058
answer count: 5
upvote count: 3
type: UnansweredQuestion

http://stackoverflow.com/comment/39667312
comment on: http://stackoverflow.com/q/25426544
score: 0
has text: So this should happen in the client sided js code or is any server sided stuff involved? Preventing client sided code from being hacked and manipulated is very hard. Server sided code, as in the answer from @Utkarsh, is a lot more convenient for such an issue.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/43341444
type: AnswerComment
has text: I put console.log('this is a hack/pause'); in the controller just before the controller's return, and Chrome started displaying data from my factory. I could have spent days on this weirdness. Thanks.
comment on: http://stackoverflow.com/a/25476678
type: Comment
score: 0

http://stackoverflow.com/comment/39805420
type: AnswerComment
comment on: http://stackoverflow.com/a/25466761
score: 0
type: Comment
has text: @ScottMiles if you want to add that as an answer I'd accept that instead, that definitely seems like the intended way forward.

http://stackoverflow.com/q/25485546
tagged with: php
score: 0
has comment: http://stackoverflow.com/comment/39775918
answer count: 1
accepted answer: http://stackoverflow.com/a/25485702
has body: I am uploading images with jquery and in the jquery ui dialog, images and for their caption textboxes are shown, the result like this: &lt;ul id="image-list"&gt; &lt;li class="image-uploaded"&gt;&lt;img src="www.site.com/gallery/e119f2-41dffd-678293-57c6db-7c665e-938481.png" class="thumb" rel="e119f2-41dffd-678293-57c6db-7c665e-938481.png"&gt; &lt;input id="ee773a0fee4669064560ad260cbfa2e8" name="title[]" class="input" style="width: 390px;" rel="e119f2-41dffd-678293-57c6db-7c665e-938481.png" type="text"&gt;&lt;/li&gt; &lt;li class="image-uploaded"&gt;&lt;img src="www.site.com/gallery/2658bc-992627-b4a698-f4e6f3-5719dd-d6b991.png" class="thumb" rel="2658bc-992627-b4a698-f4e6f3-5719dd-d6b991.png"&gt; &lt;input id="c8ca272704576fb747c5c2d76e582a4c" name="title[]" class="input" style="width: 390px;" rel="2658bc-992627-b4a698-f4e6f3-5719dd-d6b991.png" type="text"&gt;&lt;/li&gt; &lt;li class="image-uploaded"&gt;&lt;img src="www.site.com/gallery/813474-8551a5-896321-f2d8a1-bc5535-925d95.png" class="thumb" rel="813474-8551a5-896321-f2d8a1-bc5535-925d95.png"&gt; &lt;input id="288b465ab28b29f31889aea530e51bb3" name="title[]" class="input" style="width: 390px;" rel="813474-8551a5-896321-f2d8a1-bc5535-925d95.png" type="text"&gt;&lt;/li&gt; Now, I want to get images' names and their caption in textboxes, send with $.post method and in the ajax.php page I want to insert them into the database. My jQuery code part like this: var array = []; $.each($("input[name='title[]']"), function(index, value) { array.push($(this).attr('rel'), $(this).val()); }); $.post('ajax.php', {ImgSave:1, images: array, gallery_id : 5}, function(result) { $("#msg").html(result); }); And finally, the PHP part in the ajax.php like this: $no = $_POST["gallery_id"]; $images = $_POST["images"]; foreach ($images as $image =&gt; $title): $sql = "INSERT INTO gallery (gal_id, image, title) VALUES ('$no', '$image', '$title')"; mysqli_query($connection,$sql); endforeach; But it did not work. I am sending one image b…
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39775884
has title: Two dimensional array dynamically in javascript and foreach loop in php
type: Question
tagged with: multidimensional-array
has answer: http://stackoverflow.com/a/25485702
has comment: http://stackoverflow.com/comment/39776729

http://stackoverflow.com/comment/39695543
has text: I hope you will get scroll bars if the font is much bigger. check this http://jsfiddle.net/s74cprb7/
comment on: http://stackoverflow.com/q/25442352
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39812965
comment on: http://stackoverflow.com/q/25505384
type: Comment
has text: you forgot a semi-colon
type: QuestionComment
score: 1

readonly
tag name: readonly
tags question: http://stackoverflow.com/q/25456578
type: Tag

http://stackoverflow.com/q/25541651
answer count: 1
has answer: http://stackoverflow.com/a/25541782
tagged with: python
has comment: http://stackoverflow.com/comment/39879750
type: AnsweredQuestion
score: 0
tagged with: stdout
tagged with: cgi
accepted answer: http://stackoverflow.com/a/25541782
has title: How to print formatted python output for javascript?
type: Question
has body: I am trying to capture the stdout when I print on shell. I get output like this: ************* STARTING healthmonitor *********************** Aug 28, 2014 5:17:58 AM org.rzo.yajsw.os.posix.PosixService getPid INFO: wrapper pid file: /var/run/wrapper.healthmonitor.pid Aug 28, 2014 5:17:58 AM org.rzo.yajsw.os.posix.PosixService startProcess INFO: calling "/usr/bin/java" "-Dwrapper.pidfile=/va/run/wrapper.healthmonitor.pid" Aug 28, 2014 5:17:58 AM org.rzo.yajsw.os.posix.PosixService getPid INFO: wrapper pid file: /var/run/wrapper.healthmonitor.pid Aug 28, 2014 5:18:00 AM org.rzo.yajsw.os.posix.PosixService getPid INFO: wrapper pid file: /var/run/wrapper.healthmonitor.pid However, when I use the same output to print on a webpage, the format gets jumbled like this: ********* STARTING healthmonitor ******************* Aug 28, 2014 4:48:23 AM org.rzo.yajsw.os.posix.PosixService getPid INFO: wrapper pid file: /var/run/wrapper.healthmonitor.pid Aug 28, 2014 4:48:23 AM org.rzo.yajsw.os.posix.PosixService startProcess INFO: calling "/usr/bin/java" "-Dwrapper.pidfile=/var/run/wrapper.healthmonitor.pid" "-Dwrapper.service=true" "-Dwrapper.visible=false" "-Djna_tmpdir=/app/sterling/jsw/healthmonitor/bin/../tmp" "-jar" "/app/sterling/jsw/healthmonitor/wrapper.jar" "-c" "/app/sterling/jsw/healthmonitor/conf/wrapper.conf" Aug 28, 2014 4:48:23 AM org.rzo.yajsw.os.posix.PosixService getPid INFO: The python script which prints this is called in a java script file using cgi python way of calling. And in the python script, this is how its printed. import cgi, cgitb print("Content-type: text/html\n\n") print """ &lt;html&gt;&lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;br&gt; """ print nova.servers.get_console_output(VMID) print """ &lt;/body&gt;&lt;/html&gt; """ The "print nova.servers.get_console_output(VMID)" is the one that produces the console output. Thanks for any help you can offer.
has comment: http://stackoverflow.com/comment/39879905
tagged with: javascript
has comment: http://stackoverflow.com/comment/39879848

http://stackoverflow.com/q/25477300
tagged with: javascript
has comment: http://stackoverflow.com/comment/39769264
type: AnsweredQuestion
tagged with: spotify
accepted answer: http://stackoverflow.com/a/26263612
type: Question
tagged with: facebook
score: 0
has title: Why is "Log in with facebook" button hidden in spotify Auth example
answer count: 1
has body: I was trying out a simple Spotify Web API authorization code example. Later i noticed that when the login page opens, the "Login with Facebook" button is not being display on the page. The same can be found on the actual example code they have posted on jsfiddle at Playlist Demo Does any one know how to enable the "Login with facebook" button again?
has answer: http://stackoverflow.com/a/26263612
has comment: http://stackoverflow.com/comment/39782325

http://stackoverflow.com/q/25424783
has answer: http://stackoverflow.com/a/25427230
downvote count: 0
answer count: 1
tagged with: menu
favorite count: 0
has body: I made this "slide-out" menu: SASS Slide-out Menu. It's ok, but I want that when the menu have slid, on window click the menu returns back(remove the class "nav-open"). I tried this on the codepen demo, but it doesn't work: window.on("click", function(e) { if(wrapper.hasClass("nav-open") &amp;&amp; e.target != nav &amp;&amp; e.target.parent() != nav) { wrapper.removeClass("nav-open"); } });
accepted answer: http://stackoverflow.com/a/25427230
tagged with: css
type: AnsweredQuestion
score: 3
upvote count: 3
has title: Close off-canvas menu on window click
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39747383
score: 1
type: AnswerComment
has text: Thx for the answer, but you're wrong about the first line you wrote : I do (and did) look at docs but it was not all clear to me because of the popupbox for saving. Apart from that, if every question that has been asked before and documented would never be asked again I guess the world would be a quiet place. Now I have it running, but I still have a problem with comparing blobs in order to update content if required and not creating a new file if already present.
type: Comment
comment on: http://stackoverflow.com/a/25455716

http://stackoverflow.com/q/25409135
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/39635248
tagged with: angularjs
has body: I have two object arrays. One array is a list of permissions groups objects, the other is a list of user groups. I'm trying to figure out how to compare the Group Owner (ie. 70) with the list of Users for the matching ID. The Groups array (ReportModel.report) is structured like this: [{ name: Admin, id: 71, description: Important Group, owner: 70, ownerIsUser: True }] The User array (ReportModel.users) is structured like this: [{ name: All Users (windows), id: 70, domain: c:0!.s|windows, email: , isAdmin: False }] Using the group object array, I'm displaying all the groups in a table. HTML: <tr ng-repeat="group in ReportModel.report" on-finish-render {{group.id}} {{group.description}} {{group.owner}} {{getOwner(group.owner)}} //I'm trying to get this cell to display "All Users (windows)" {{group.ownerIsUser}} I found a function that does the ID lookup and returns the correct user object from which I can pull the name, but I can't figure out how to call this function in the view within ng-repeat and returns the correct name This is my controller: function loadUsers(){ UserService.loadUsers().then(function (data){ console.log('getting users'); $scope.ReportModel.users = data; }) } function findById (source, id) { return source.filter(function( obj ) { // coerce both obj.id and id to numbers // for val & type comparison return +obj.id === +id; })[ 0 ]; } $scope.getOwner = function (ownerID) { console.log('get owner called', ownerID); var owner = findById($scope.ReportModel.users, ownerID); console.log(owner.name); return owner.name; }
possible better answer: http://stackoverflow.com/a/25409873
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25412072
accepted answer: http://stackoverflow.com/a/25412072
has title: Using functions in Ng-Repeat
type: Question
has comment: http://stackoverflow.com/comment/39634278
has comment: http://stackoverflow.com/comment/39640044
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/39639842
has answer: http://stackoverflow.com/a/25409873

http://stackoverflow.com/a/25531300
answers question: http://stackoverflow.com/q/25531138
score: 0
has body: If you bind the input via JQuery, it will automatically detect any changes to the value of "#searchInput". Here's the JavaScript: $(function () { $("#searchInput").bind("change paste keyup", function() { if ($(this).val() == '') { //Check to see if there is any text entered //If there is no text within the input ten disable the button $('.enableOnInput').prop('disabled', true); } else { //If there is text in the input, then enable the button $('.enableOnInput').prop('disabled', false); } }); }); So now, if there the user has autofill on, or has previously search for something then double clicks on the input the selects a value, the code will check the value of "#searchInput" - so; if the users pastes, if there's a keyup event or if the value changes, the code inside of the bind() will be ran. Here's the JSFiddle
type: Answer

http://stackoverflow.com/comment/39603817
type: QuestionComment
comment on: http://stackoverflow.com/q/25392427
has text: @Pointy: Both of us are right, according to the HTML 3.2 Reference (where tables were introduced) it is said "Tables [...] can be used to markup tabular material or for layout purposes." :)
score: 0
type: Comment

http://stackoverflow.com/comment/39794498
score: 0
has text: voted to close - see help: Include just enough code to allow others to reproduce the problem. For help with this, read How to create a Minimal, Complete, Valid Example. can't do much without a working example.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25494776

http://stackoverflow.com/a/25530883
answers question: http://stackoverflow.com/q/25528816
has body: JavaScript function CountOnFormSubmitEvent(form_id, _callback_) { var that = this, count = 0, callback = _callback_; var form = document.getElementById(form_id); if(form === null) { return null; } var reset = function(){ count = 0; }; form.addEventListener("submit", function(evt){ callback(evt, ++count, reset); }, false); } var counter = new CountOnFormSubmitEvent("myForm", function(event, count, reset_callback){ event.preventDefault(); if(count &gt;= 4) { alert("Too many clicks !"); reset_callback(); } }); http://jsfiddle.net/3snmg7bt/ I hope it will help you ;)
score: 1
downvote count: 0
upvote count: 1
type: Answer

http://stackoverflow.com/comment/39872560
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25510380
type: AnswerComment
has text: Was hoping to be able to go through steps 1-4, where step 3 actually takes you to an entirely different page, but this may not even be feasible. I think I'm going to give up and redesign things entirely. Voted up your answer though, thanks.

http://stackoverflow.com/q/25477984
score: 1
tagged with: wordpress
upvote count: 1
type: Question
tagged with: javascript
has title: wp_localize_script() works only on localhost
has body: I'm trying to work with leafletjs in a my wordpress pluglin. Here is the code where i register script. add_action( 'wp_enqueue_scripts', 'ea_map_load_scripts' ); function ea_map_load_scripts(){ wp_register_script( 'ea_map_leaflet_js', plugins_url('js/leaflet.js', __FILE__), array('jquery'),false,true); wp_register_script( 'ea_map_js', plugins_url('js/map.js', __FILE__), array('jquery'),false,true); // ^^ //I need to use this parameter otherwhise the leafletjs map is not charged------------------| wp_enqueue_script('jquery'); wp_enqueue_script( 'ea_map_leaflet_js' ); wp_enqueue_script( 'ea_map_js' ); ... } Here by do_action() on my theme, i call that function where i try to pass some php variable to my javascript plugin: add_action('wp_ea_map','wp_ea_map'); function wp_ea_map() { $ea_params = Array( 'id' =&gt; get_the_ID(), 'latitudine' =&gt; 'xx.xxx', 'longitudine' =&gt; '-xx.xxx', ); wp_localize_script( 'ea_map_js', 'marker', $map_params ); } The problem is that the same code whit the same database, on my localhost works well but on the live server marker variable is not setted. Here the js code where i use the passed variable: jQuery(document).ready(function($){ var map = L.map('map').setView([marker.latitudine, marker.longitudine], 11); .... }); And yes, i'am sure that i have the same code in both server and that there is no cache.
has answer: http://stackoverflow.com/a/25478355
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: php
accepted answer: http://stackoverflow.com/a/25478355
type: AnsweredQuestion

http://stackoverflow.com/comment/39859020
type: AnswerComment
has text: Fwiw, if you put `data: {}` in your `app-globals` prototype, that tells Polymer you expect an object, and Polymer will do the JSON.parse for you. http://jsbin.com/tejolekokige/3/edit
type: Comment
comment on: http://stackoverflow.com/a/25512433
score: 0

http://stackoverflow.com/q/25508957
type: Question
has answer: http://stackoverflow.com/a/25509077
accepted answer: http://stackoverflow.com/a/25509077
tagged with: canvas
tagged with: javascript
has comment: http://stackoverflow.com/comment/39820696
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am trying to learn to use Chartjs and I am running into an issue when I am trying to grab the canvas element by its ID. For some reason it is not being defined. Is this because I am calling document.getElementByID and the this is not being run within the HTML file? I was trying to use an external file to host all of my JS as opposed to cluttering my HTML file. Error Message: Uncaught TypeError: undefined is not a function Found at line 2 in charts-option.js: var ctx = document.getElementByID("sessions-graph").getContext("2d"); index.html Google Super Proxy Test chart-options.js // Get the context of the canvas element var ctx = document.getElementByID("sessions-graph").getContext("2d"); var sessionsGraph = new Chart(ctx).Bar(data); //Create a chart with "data" array var data = { labels: ["January", "February", "March", "April", "May", "June", "July"], datasets: [ { label: "My First dataset", fillColor: "rgba(220,220,220,0.5)", strokeColor: "rgba(220,220,220,0.8)", highlightFill: "rgba(220,220,220,0.75)", highlightStroke: "rgba(220,220,220,1)", data: [65, 59, 80, 81, 56, 55, 40] }, { label: "My Second dataset", fillColor: "rgba(151,187,205,0.5)", strokeColor: "rgba(151,187,205,0.8)", highlightFill: "rgba(151,187,205,0.75)", highlightStroke: "rgba(151,187,205,1)", data: [28, 48, 40, 19, 86, 27, 90] } ] }; Chart.defaults.global = { //Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value scaleBeginAtZero : true, //Boolean - Whether grid lines are shown across the chart scaleShowGridLines : true, //String - Colour of the grid lines scaleGridLineColor : "rgba(0,0,0,.05)", //Number - Width of the grid lines scaleGridLineWidth : 1, //Boolean - If there is a stroke on each bar barShowStroke : true, //Number - Pixel width of the bar stroke barStrokeWidth : 2, //Number - Spacing between each of the X value sets barValueSpacing : 5, //Number - Spacing between data sets within X values barDatasetSpacing : 1 }
has title: Uncaught TypeError When Trying to get Canvas
type: AnsweredQuestion
tagged with: chart.js

http://stackoverflow.com/q/25466345
downvote count: 0
tagged with: javascript
answer count: 1
tagged with: batman.js
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has body: I'm trying to use Batman.js with on a framework that isn't Ruby on Rails. Right now, I've been able to render views while settings the HTML content directly into the view class, such as this: class App.ContextMenuView extends Batman.View html: 'hello world' However, I've been completely unable to render a view using a remote HTML template. From what I've understood, it should be possible using the attribute 'source': however, nothing happens when I use this attribute. Here's the full code of my very short application: class window.App extends Batman.App @root 'home#index' @route '/home', 'home#index"' class App.HomeController extends Batman.Controller routingKey: 'home' index: (params) -> console.log 'poil' class App.ContextMenuView extends Batman.View source: '_context_menu' $(window).ready -> Batman.config.pathToHTML = '/templates' # The template can be found at //localhost/templates/_context_menu.html App.run() Somewhere in the page's HTML, there's an element with a [data-view="ContextMenuView"] attribute, which is properly detected by Batman, the view is properly instantiated, but still: nothing happens. There are no request made to the web server, the 'source' attribute seems to have been completely ignored... and nothing in the documentation gives anymore details on that topic. What have I done wrong ? EDIT: For those interested, I worked around the issue by overloading Batman.View: class App.View extends Batman.View @template_cache: {} constructor: -> super @template_cache = App.View.template_cache @update_source() @observe 'source', (@update_source.bind @) update_source: -> @get_template_from_source() if @source? get_template_from_source: () -> if @use_cache and @template_cache[@source]? @set 'html', @template_cache[@source] else @fetch_template() fetch_template: () -> $.ajax { async: not QUnit? # async should be false in the test environment dataType: 'html' url: "#{Batman.config.pathToHTML}/#{@source}.html" success: (@template_received.bind @) error: (erro…
score: 2
has answer: http://stackoverflow.com/a/25466998
tagged with: coffeescript
type: Question
has title: How to load a remote HTML remplate into a view using Batman.js
linked to: http://stackoverflow.com/q/9661204

http://stackoverflow.com/a/25432327
accepted answer of: http://stackoverflow.com/q/25432281
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/39677288
score: 3
has body: I don't know if there is native way of stopping, but what you can do is just put static png/jpeg picture which is starting point of your gif picture. Then when you hit play, replace that static image with animated gif one. Update: &lt;script&gt; window.document.onload = function(e){ var myVid=document.getElementsByTagName('img'); var gifPath=myVid.src; myVid.src='/static/image/path.png'; // now you can use your gif depending on business logic } &lt;/script&gt; PS: the code was not tested... this is for just showing a pseudo code.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25432281

http://stackoverflow.com/q/25510037
answer count: 1
tagged with: three.js
tagged with: line
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25534713
score: 0
has title: Draw and position "Line" in canvas by modifying the Properties of "Line" in Three.JS
type: Question
has answer: http://stackoverflow.com/a/25510769
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25510769
has body: I have created a cube and lines using Three.js. I am trying to position the lines so it appears around the cube as guidelines shown below: But I don't understand these properties of line: var lengthVertArray = lengthLineGeometry.vertices; lengthVertArray.push(new THREE.Vector3(-240, 50, 0), new THREE.Vector3(30, 120, 0)); I randomly changed some values and i was able to position the "line" for "length". But I want to understand exactly what these properties are, so I can accuratly change them and position the lines for height and width. Here is the Fiddle of my cube with guideline: http://jsfiddle.net/boquqL84/3/ Let me know if you need any other information. Please suggest.

http://stackoverflow.com/comment/39618941
has text: @Marc. I'm using Firebug to debug it and at the point i'm getting my `$("#comment").val()` I don't see any `\n`. This could be due to the fact of faulty Firebug configuration. But then I would expect the `\n` to occur in our database(after inserting it). Which it doesn't. So that still raises the questions how the linebreaks are actually encoded/coded. I'm still searching for the why/how of this (which is probably very simple, I just haven't found it yet)
score: 0
comment on: http://stackoverflow.com/q/25400069
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25487332
has body: create obj as jquery object. var obj = $("#img01"); ShowTips(obj);
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25487252

undefined
tags question: http://stackoverflow.com/q/25499245
tags question: http://stackoverflow.com/q/25443936
tags question: http://stackoverflow.com/q/25438470
tags question: http://stackoverflow.com/q/25391508
tag name: undefined
tags question: http://stackoverflow.com/q/25497658
tags question: http://stackoverflow.com/q/25404241
tags question: http://stackoverflow.com/q/25429471
type: Tag
tags question: http://stackoverflow.com/q/25404063
tags question: http://stackoverflow.com/q/25541482
tags question: http://stackoverflow.com/q/25475172
tags question: http://stackoverflow.com/q/25421233

http://stackoverflow.com/q/25530617
downvote count: 2
has comment: http://stackoverflow.com/comment/39859736
has answer: http://stackoverflow.com/a/25530669
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39859790
favorite count: 0
type: AnsweredQuestion
has title: Can't find a bug in my small JS code (for loop and a function inside)
has comment: http://stackoverflow.com/comment/39860000
has comment: http://stackoverflow.com/comment/39859752
type: Question
has body: Here is my code. Console says :Uncaught SyntaxError: Unexpected token } var em = document.getElementsByClassName("rot"); for (var i = 0, len = em.length; i &lt; len; i++) { em[i].addEventListener("click", function() { this.classList.toggle("rotate"); } }
has comment: http://stackoverflow.com/comment/39859830
accepted answer: http://stackoverflow.com/a/25530669
tagged with: javascript
score: -1

http://stackoverflow.com/q/25421222
has comment: http://stackoverflow.com/comment/39656833
has comment: http://stackoverflow.com/comment/39658244
has comment: http://stackoverflow.com/comment/39658093
type: Question
tagged with: javascript
has title: Menu with slidable submenu container
has answer: http://stackoverflow.com/a/25422436
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25422112
type: UnansweredQuestion
has body: I have menu defined with UL, LI... up to max one submenu: ul li: item 1 li: item 2 ul li: item 2.1 li: item 2.2 li: item 3 ul li: item 3.1 li: item 3.2 li: item 3.3 What I would like to achieve is to show submenu in a way that "sub menu item container" will slide to the next submenu when clicked. In example above this would mean: when user clicks item 2, container with sub items will show when user clicks item 3, container with somehow slide/animate/transition from item 2 to item 3, changing sub items This transition should only happen if sub menu container is already visible... if not, it just shows up next to clicked menu item. I am not sure how to approach this problem and would like your help on it. Thank you! EDIT: This is hover enabled sample, no JS (I know onclick is not supported in CSS, but I can handle this later): http://codepen.io/anon/pen/HDinB This shows a bottom aligned main menu items. Each main menu item can have sub items (this is only one level deep menu, there will be no more sublevels). Submenu will contain no more than max 9 items which will fit into a box (black box you see). What I want is that subitems apear "in" that box, but when new main item with submenu items is selected this box will slide (if already visible) to the new position and kind of be wrapper for new subitems. Will this be a floating box, or real container, or something 3rd, I don't know because I don't realy know what would be best way to handle this.
has comment: http://stackoverflow.com/comment/39658402
tagged with: css

http://stackoverflow.com/a/25525823
has comment: http://stackoverflow.com/comment/39850499
has comment: http://stackoverflow.com/comment/39852131
has comment: http://stackoverflow.com/comment/39850915
answers question: http://stackoverflow.com/q/25525782
score: 0
has body: Try 'paddingLeft' instead of 'padding-left'.
type: Answer
has comment: http://stackoverflow.com/comment/39850552

http://stackoverflow.com/q/25548313
accepted answer: http://stackoverflow.com/a/25549231
has comment: http://stackoverflow.com/comment/39893382
has answer: http://stackoverflow.com/a/25548895
has comment: http://stackoverflow.com/comment/39891808
type: Question
has comment: http://stackoverflow.com/comment/39891648
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25549231
has comment: http://stackoverflow.com/comment/39893572
possible better answer: http://stackoverflow.com/a/25548702
has body: I have a html table with three columns [Title, Category, Sub-Category] and multiple rows . And I want to read the entire table content and make it categorized as below output. My &lt;html&gt; table content is like this. Title Category Sub T1 C1 S1 T2 C2 S2 T3 C2 S3 T3 C1 S1 T2 C1 S3 T1 C2 S3 Here is the output format what I really need. I just want to print the above html table content in the below out put format. T1 : C1 : S1 C2 : S3 T2 : C2 : S2 C1 : S3 T3 : C2 : S3 C1 : S3 [Title] [Category] :[Sub-Category] Please help me.
tagged with: html-table
has comment: http://stackoverflow.com/comment/39892114
has comment: http://stackoverflow.com/comment/39893644
upvote count: 1
tagged with: arrays
has answer: http://stackoverflow.com/a/25548772
tagged with: javascript
tagged with: jquery
has title: How to read HTML and sort the table content?
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/39892236
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has comment: http://stackoverflow.com/comment/39892225
has answer: http://stackoverflow.com/a/25548702
answer count: 4
has comment: http://stackoverflow.com/comment/39892039

http://stackoverflow.com/comment/39711622
type: AnswerComment
has text: this is great, thanks. Just for my education: why is it canvas#race instead of just #race? I think I tried this with just #race and it actually didn't work? Why?
type: Comment
comment on: http://stackoverflow.com/a/25418584
score: 0

http://stackoverflow.com/comment/39828124
comment on: http://stackoverflow.com/a/25512208
has text: Thanks +1 for your help anyway
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25484324
tagged with: javascript
type: Question
score: 0
has body: i am starting documenting my java-script + typescript website with jsDuck I've documented my class very well , but my problem is interfaces - they don't compile from the ts file over to the java-script. here is my output, as u can see the page doesn't know who is IComboBoxScope of course it understandable due to the fact it doesn't generated to the java-script https://i.sstatic.net/PIVKe.jpg is there a proper way to workaround this in jsDuck? IF NOT, is there other products or solutions for documenting js with typescript out there?, maaybe jsDoc? ,typeDoc? sorry for the poor sample/photo, i am working on a private network.
answer count: 2
accepted answer: http://stackoverflow.com/a/25525308
tagged with: jsduck
tagged with: interface
possible better answer: http://stackoverflow.com/a/25493919
has answer: http://stackoverflow.com/a/25493919
has title: typescript documentation generator
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25525308

http://stackoverflow.com/q/25536755
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39871103
upvote count: 0
tagged with: siblings
has answer: http://stackoverflow.com/a/25536916
type: Question
score: -2
has body: Title CLICK HERE Here's my HTML, what would be the proper combination for me to click (a.ex) and be able to modify the img scr of (div.result img)?
tagged with: javascript
has title: jQuery Parent Sibling source
downvote count: 2
tagged with: jquery-selectors
answer count: 1

http://stackoverflow.com/comment/39790337
type: AnswerComment
score: 0
has text: Thanks, hmmm. i thought you were referring to the .validate(), cuz i already had `.validate` in my js file , but i didn't knew about `.valid`. Also i checked the documentation link u gave for ajax, Thank-you its a nice info and i will try that also.
type: Comment
comment on: http://stackoverflow.com/a/25492626

http://stackoverflow.com/a/29539904
answers question: http://stackoverflow.com/q/25476630
type: Answer
has body: UglifyJS2 from sbt-rjs 1.0.7 already has some other usefull option: uglify: { drop_console: true } uglify2: { compress: { drop_console: true } } it removes all console.log messages from minified script.
score: 0

http://stackoverflow.com/q/25441102
accepted answer: http://stackoverflow.com/a/25441343
has body: I am trying to delete the TR from the table using JavaScript and I don't know for some reasons when I click on delete button its not deleting the complete TR instead its just deleting the img file. function remove(rowid) { var row = document.getElementById(rowid); var table = row.parentNode; while ( table &amp;&amp; table.tagName != 'TABLE' ) table = table.parentNode; if ( !table ) return; table.deleteRow(row.rowIndex); } Please check the JS Fiddle for reference http://jsfiddle.net/h09wsrox/ Thanks
has title: Delete TABLE row TR with JavaScript
possible better answer: http://stackoverflow.com/a/25441386
favorite count: 0
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25441343
linked to: http://stackoverflow.com/q/5468350
has answer: http://stackoverflow.com/a/25441386
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39854111
has text: What do you mean by `server side JS`? Please post relevant code here.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25527720
score: 0

http://stackoverflow.com/a/25625844
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40058160
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40058972
has comment: http://stackoverflow.com/comment/40055516
answers question: http://stackoverflow.com/q/25485376
has body: Sorry if I got you wrong but due to missing reputation I am not able to comment yet. Can't you use the @JavaScript Annotation? See: https://vaadin.com/api/7.2.6/com/vaadin/annotations/JavaScript.html https://vaadin.com/wiki/-/wiki/Main/Integrating+a+JavaScript+component+
accepted answer of: http://stackoverflow.com/q/25485376
type: Answer

http://stackoverflow.com/q/25452572
has comment: http://stackoverflow.com/comment/39714757
has answer: http://stackoverflow.com/a/25452633
has answer: http://stackoverflow.com/a/25452604
score: 0
answer count: 3
has body: This is my code: function displayimage(x,target){ x.success(function(realData){ var content = $(realData); var imageurl = content.find('img').eq(1)[0].outerHTML; var urlTrimmed= String(imageurl).substr(37); var result = $urlTrimmed.substr(0,$urlTrimmed.length-34); console.log(result); document.getElementById("item1").style.backgroundImage = "url('result')"; Result gives me a working image url taken from another site. However it doesn't load... when I replace "result" with the link, it works.. however, it needs to be dynamicly... Any ideas?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25452623
type: Question
tagged with: javascript
has title: Using javascript to load an image from another site

http://stackoverflow.com/a/72458752
upvote count: 0
has comment: http://stackoverflow.com/comment/128004434
answers question: http://stackoverflow.com/q/25430552
has body: var optionAttr1 = $('#listbox-taskStatus').find('option:selected').attr("status"); var optionAttr = $('#listbox-taskStatus option:selected').attr("status");
type: Answer
downvote count: 1
score: -1

http://stackoverflow.com/comment/39681024
comment on: http://stackoverflow.com/q/25434191
has text: @collimarco Yes, I did. I believe the correct encoding should be `"\u2713"` -- that renders fine.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39741495
has text: Looks like ember is doing it's job. Bootstrap is setting .modal to display:none. Set it to block and it appears as expected
score: 1
comment on: http://stackoverflow.com/q/25465503
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25411576
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39639125
has comment: http://stackoverflow.com/comment/39643051
type: Question
has comment: http://stackoverflow.com/comment/39646583
tagged with: javascript
has comment: http://stackoverflow.com/comment/39639121
score: 0
has body: Hello guys i was messing around with javascript trying to create a countdown timer ! However i think the javascript in the head section doesnt load because even the alert message doesnt show up ! I am a newbie, guys what am i doing wrong ? also how can i put my variables on the html so they will show up ? Thanks for your time ... This is my code : Countdown Timer Date/Month/Year January February March April May June July August September Octomber November December Hour(0-23)/Minutes/Seconds
has title: Javascript script doesnt load ? What am i doing wrong?
tagged with: load
answer count: 0

http://stackoverflow.com/a/25396422
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25396006
has comment: http://stackoverflow.com/comment/68939371
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25396006
has body: It seems that adding the "checked" class to div of class "icheckbox_minimal" is what I was looking for. Is directly modifying this div considered to be the correct way to do this? Or should I be another way? I'll leave my question unanswered for a little while, to give someone a chance to supply a better answer (if one exists). I feel like marking my own answer is cheating :p
score: -1
upvote count: 0

flux
tag name: flux
tags question: http://stackoverflow.com/q/25396914
type: Tag

http://stackoverflow.com/a/25547881
type: Answer
answers question: http://stackoverflow.com/q/25547830
score: 0
has body: Try this: Example $(document).ready(function(){ var pole = [11,22,31,4,5,6]; $.each(pole, function(i, val){ $('table td').eq(i).html(pole[i]); }); });

http://stackoverflow.com/comment/39648178
has text: Both of the pages make server call. It seems the problem is caused by not making the server call in both IE and Firefox. Chrome is ok.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25412222

http://stackoverflow.com/comment/39672891
has text: @11684 Thats why I am doing this because it is challenging and takes effort to do it.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25429706
type: QuestionComment

http://stackoverflow.com/comment/39644126
score: 0
comment on: http://stackoverflow.com/q/25414152
type: Comment
type: QuestionComment
has text: `$resource` defines many routes automatically for you, so I think you would have to define at least six methods for `$http` for it to be similar.

http://stackoverflow.com/comment/39765221
comment on: http://stackoverflow.com/q/25479427
score: 0
type: Comment
type: QuestionComment
has text: why dont you use jquery?

http://stackoverflow.com/q/25512808
answer count: 1
tagged with: backbone.js
tagged with: browserify
has body: I am having a gulp based project, and use browserify and debowerify to build the application. The application Depends on Backbone - installed as bower component. Has some additional domain classes which requires backbone. I build 1 above as vendor.js and 2 above as app.js ,and include both these files in the html file, which runs fine Now I am about to set up testing using tape, and I started off with testing the model class: var todoModel = require('../../libs/todo/model/todo.js').Todo; var test = require('tape'); var aTodo = new todoModel(); test('todo model test',function(t){ eyes.inspect(atodo, "one"); t.equal(1,one.valueOf(),'one should be equal to one'); t.end(); }); libs/todo/model/todo.js: var Backbone = require('backbone'); var Storage = require('../helpers/storage.js'); var Todo = Backbone.Model.extend({ ... }) When I run this test as tape test/model-test.js, I am getting an (expteced) error as Error: Cannot find module 'backbone'. So now, how do I make the bower candidate backbone be available to my node.js test script Note: A simple workaround is to add the backbone as a node dependency, but what if a hypothetical library is available only in bower?
type: UnansweredQuestion
tagged with: node.js
score: 0
has answer: http://stackoverflow.com/a/25512958
type: Question
has title: Including backbone installed through bower in a node.js test script
has comment: http://stackoverflow.com/comment/39844610
tagged with: javascript
tagged with: node.js-tape

http://stackoverflow.com/q/25441563
has comment: http://stackoverflow.com/comment/39706039
downvote count: 0
has comment: http://stackoverflow.com/comment/39697291
type: Question
has answer: http://stackoverflow.com/a/25448787
accepted answer: http://stackoverflow.com/a/25448787
has body: I am working in Ember with my existing jQuery. Now I need to call a action handler in my Router from my jQuery method. My Route: App.ApplicationRoute: Ember.Route.extend({ actions: { updateFolder: function(obj){ //Need to update my model using the obj. } } }); My JavaScript method: // Native Javascript code. function updateFolderModel(obj){ // Need to call the action handler in my application route. How to call from here. } How can I call Ember action handlers from normal native JavaScript methods.
has comment: http://stackoverflow.com/comment/39697351
type: AnsweredQuestion
has title: Ember call a action handler from normal Javascript
has comment: http://stackoverflow.com/comment/39696383
score: 1
has comment: http://stackoverflow.com/comment/39697235
has comment: http://stackoverflow.com/comment/39697418
has comment: http://stackoverflow.com/comment/39709896
has comment: http://stackoverflow.com/comment/39697230
has comment: http://stackoverflow.com/comment/39696902
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39697718
tagged with: ember.js
has comment: http://stackoverflow.com/comment/39705161

http://stackoverflow.com/q/25503055
has answer: http://stackoverflow.com/a/25503116
score: 1
has answer: http://stackoverflow.com/a/25503110
has answer: http://stackoverflow.com/a/25503081
downvote count: 0
has body: How do i change data-src value of li? Im using lightgallery jquery plugin and want to change the data-src of the thumbnail this one works for the img src but not the li document.getElementById("imageBig").src = oFREvent.target.result;
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25503097
favorite count: 0
has answer: http://stackoverflow.com/a/25503097
accepted answer: http://stackoverflow.com/a/25503081
answer count: 4
has title: Change data-src value of li
type: AnsweredQuestion
upvote count: 1
type: Question

http://stackoverflow.com/a/25522574
has body: You are missing a single quote: onblur="$('#postcode').val($('#postcode').val().toUpperCase()); // here ^^^
answers question: http://stackoverflow.com/q/25522543
accepted answer of: http://stackoverflow.com/q/25522543
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39847675
type: Answer

http://stackoverflow.com/comment/39840530
comment on: http://stackoverflow.com/q/25519290
has text: You can do that in HTML using a gallery slider.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25450277
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39710247
tagged with: css
has title: SVG Dashed line for circle created with path
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/39710129
type: Question
has comment: http://stackoverflow.com/comment/39711450
has body: I have the following issue. I have to draw a circle from a lot of points which are too close enough. You could see it in the jsfiddle link below: http://jsfiddle.net/L6e5oz3L/ &lt;path style="" stroke-dasharray="10 5" fill="#0000ff" stroke="#0000ff" d="M181.8181818181818,225L181.8181818181818,225M181.8181818181818,225L181.7933822865362.... I am using path for the case. Now I have to put stroke-dasharray style on it but actually the points are too close and the dashes are not rendered as expected here: Do you have some ideas how could I achieve that effect?
has comment: http://stackoverflow.com/comment/39767239
has answer: http://stackoverflow.com/a/25481817
accepted answer: http://stackoverflow.com/a/25481817
score: 0
has comment: http://stackoverflow.com/comment/39738475
has comment: http://stackoverflow.com/comment/39768761

http://stackoverflow.com/q/25422961
favorite count: 0
has comment: http://stackoverflow.com/comment/39659624
tagged with: ajax
score: 0
downvote count: 1
has title: Multiple radio fields and jQuery AJAX POST
type: UnansweredQuestion
has body: I have a list of files that have been uploaded by users. The administrator of the website uses this list to approve/deny user avatar uploads that have been uploaded to a family friendly web application. In the left column of the table we have the avatar, in the right column we have a unique radio group per row with three options: <input type="radio" name="<?php echo $uploadId ?>" value="ignore" checked="" /> Ignore <input type="radio" name="<?php echo $uploadId ?>" value="approve" /> Approve <input type="radio" name="<?php echo $uploadId ?>" value="deny" /> Deny The form is submitted using a jQuery AJAX post: $.ajax({ type: 'POST', url: 'avatar-decision.php', data: "MY-PROBLEM-IS-THIS-BIT", dataType: 'json', success: function(htmldata) { if (htmldata.result === "success") { $('#requestMsg').html(htmldata.msg); $('#requestListing').get("avatar-listing.php"); } else { $('#requestMsg').html(htmldata.msg); } }}); I would like to set the value of the data field above to capture all the names and values of the radio groups submitted. For example, if I have 5 radio groups with the names of 1, 2, 3, 4, 5 I would like to capture the value of each radio set and set them in the data value of my ajax post like a query string: 1=approved&2=ignore&3=deny&4=approve&5=approve which follows the structure of: [radio-group-name]=[radio-group-value] Which means I can then collect them in request-listing.php, loop through them and act on them according to their value. Many thanks, Arbiter
has comment: http://stackoverflow.com/comment/39659677
has comment: http://stackoverflow.com/comment/39659757
tagged with: radio-group
tagged with: forms
has comment: http://stackoverflow.com/comment/39659613
type: Question
has answer: http://stackoverflow.com/a/25424430
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39659901
tagged with: javascript
has answer: http://stackoverflow.com/a/25423556
tagged with: jquery

phpgrid
tags question: http://stackoverflow.com/q/25404680
type: Tag
tag name: phpgrid

http://stackoverflow.com/a/25408469
has comment: http://stackoverflow.com/comment/39685289
has comment: http://stackoverflow.com/comment/39641655
accepted answer of: http://stackoverflow.com/q/25406601
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39669556
has comment: http://stackoverflow.com/comment/39690126
has comment: http://stackoverflow.com/comment/39639773
has comment: http://stackoverflow.com/comment/39709285
downvote count: 0
has comment: http://stackoverflow.com/comment/39685675
has comment: http://stackoverflow.com/comment/39684796
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39685146
has comment: http://stackoverflow.com/comment/39708056
has body: You can do this by creating a array of all paths to the target with a distance less than the maximum allowable distance minus distance of the shortest path to the target. I would do this in two steps: First, go through and compute the shortest path from every node to the target. Save each shortest path, along with its distance, on the node. With all of the shortest paths computed, you can then start creating a array of possible partial paths, and a array of possible paths. To be a possible partial path, the total distance of the path plus the distance of the shortest path from the last node in the path to the target is less than the maximum path length. Possible paths are paths from a to @ that are less than the maximum path length. You can iterate through your array of possible partial paths, at each step removing the first possible partial path and for all nodes you can travel to from the current node, check if adding that node to your current path would be a possible partial path. If so, add it to your possible partial path array . 'Nodes you can travel to' would mean nodes that you haven't already visited that are connected to your current node. Right now, it looks like you have all the nodes connected to all of the other nodes. This could be problematic, since it gives you a maximum of 4.0329146e+26 (a.k.a 26!) possible paths from a to @. Generally, for these types of problems, you limit nodes to only be connectable to nearby nodes to avoid that much of a scaling problem, but you will still potentially be generating huge numbers of paths. ALL possible paths is potentially a large number. I would recommend against recursion since you're generating a list of lots of things. Just create an array of possibilities and keep removing things from it/adding things to it until it's empty. EDIT: Since all of your nodes are connected to all of the other node, from any possible potential path, you can create a path by adding the target node. This simplifies things as far as…
has comment: http://stackoverflow.com/comment/39647039
type: Answer
answers question: http://stackoverflow.com/q/25406601

http://stackoverflow.com/q/25485475
has answer: http://stackoverflow.com/a/25486000
type: Question
has comment: http://stackoverflow.com/comment/39776520
tagged with: javascript
has comment: http://stackoverflow.com/comment/39776319
has title: Clicking on Links and Buttons shows focus outline
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39777799
has body: I am trying to fix a problem in an existing application that uses jQuery. The issue is that whenever I click on any link or button on the page, I see that element take a focus outline (e.g. blue glow in case of Chrome/Safari), as if that element has focus. I have to get rid of that outline after click. I do not think this is a default behavior since I am not able to replicate it on any other site. For that matter, I am not able to replicate it on a simple HTML page that has just one link. I can not use outline:none since I have to show the outline in case of focus using tab keys. I have tried using document.activeElement.blur() and $(element).blur() to no luck since some of the event handlers are using event.stopPropagation() and I can not go and change the code for every event handler. Can anyone please help me with this? What could be the reason a link is retaining focus after clicking? There is nowhere in the code this is being done programmatically since its happening on every single link and button and also some li elements. Appreciate your help in this regard.
tagged with: jquery
has answer: http://stackoverflow.com/a/25485786
tagged with: focus
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39776293
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39775767
has comment: http://stackoverflow.com/comment/39775676
has comment: http://stackoverflow.com/comment/39776350

google-maps-api-3
tags question: http://stackoverflow.com/q/25499935
tags question: http://stackoverflow.com/q/25488545
tags question: http://stackoverflow.com/q/25442446
tags question: http://stackoverflow.com/q/25496625
tags question: http://stackoverflow.com/q/25542795
tags question: http://stackoverflow.com/q/25453409
tags question: http://stackoverflow.com/q/25428973
tags question: http://stackoverflow.com/q/25474341
tags question: http://stackoverflow.com/q/25500381
tags question: http://stackoverflow.com/q/25448556
tags question: http://stackoverflow.com/q/25508049
tags question: http://stackoverflow.com/q/25533537
tags question: http://stackoverflow.com/q/25536203
tags question: http://stackoverflow.com/q/25411714
tags question: http://stackoverflow.com/q/25529966
tags question: http://stackoverflow.com/q/25447698
tags question: http://stackoverflow.com/q/25484488
tags question: http://stackoverflow.com/q/25495657
tags question: http://stackoverflow.com/q/25546576
tags question: http://stackoverflow.com/q/25493259
tags question: http://stackoverflow.com/q/25438355
tags question: http://stackoverflow.com/q/25447541
tags question: http://stackoverflow.com/q/25419809
tags question: http://stackoverflow.com/q/25472198
tags question: http://stackoverflow.com/q/25502549
tags question: http://stackoverflow.com/q/25547817
tags question: http://stackoverflow.com/q/25431214
tags question: http://stackoverflow.com/q/25533192
tags question: http://stackoverflow.com/q/25408667
tags question: http://stackoverflow.com/q/25500371
tag name: google-maps-api-3
tags question: http://stackoverflow.com/q/25393961
type: Tag
tags question: http://stackoverflow.com/q/25503316
tags question: http://stackoverflow.com/q/25416318
tags question: http://stackoverflow.com/q/25525572
tags question: http://stackoverflow.com/q/25447770
tags question: http://stackoverflow.com/q/25471315
tags question: http://stackoverflow.com/q/25425364
tags question: http://stackoverflow.com/q/25466169
tags question: http://stackoverflow.com/q/25428879
tags question: http://stackoverflow.com/q/25511114
tags question: http://stackoverflow.com/q/25481960
tags question: http://stackoverflow.com/q/25398378
tags question: http://stackoverflow.com/q/25549709
tags question: http://stackoverflow.com/q/25428546
tags question: http://stackoverflow.com/q/25410874
tags question: http://stackoverflow.com/q/25534584
tags question: http://stackoverflow.com/q/25391193

http://stackoverflow.com/q/25532475
has title: Adding a @grant value breaks my Greasemonkey+jQuery script?
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25546993
upvote count: 6
has body: When I add the @grant for GM_xmlhttpRequest, I get: Error: Permission denied to access property 'call' in the jQuery file. If I remove the grant, it works fine. // ==UserScript== // @name Dimi Test // @namespace Dimi // @include about:addons // @version 1 // @grant GM_xmlhttpRequest // @include http://*.myDomain.*/* // ==/UserScript== var $J = unsafeWindow.jQuery; $J(unsafeWindow.document).ready(function(){ alert('Hello'); });
has comment: http://stackoverflow.com/comment/39887205
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/24719256
type: Question
has answer: http://stackoverflow.com/a/25546993
tagged with: greasemonkey
tagged with: javascript
score: 6
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39819859
score: 3
has text: Wow. Thanks so much for takin the time to explain this. I also spent 30mins reading up on Deps in the manual. Knowing how Deps works really helps my overall understanding of Meteor.
type: AnswerComment
comment on: http://stackoverflow.com/a/25487888
type: Comment

http://stackoverflow.com/q/25457955
tagged with: javascript
has comment: http://stackoverflow.com/comment/39725258
has comment: http://stackoverflow.com/comment/39725234
score: 0
has title: How to Get text from table cell
accepted answer: http://stackoverflow.com/a/25457996
has answer: http://stackoverflow.com/a/25458235
type: AnsweredQuestion
has body: This is what i have right now: This is the table: Employee Code FirstName LastName Address E100 Alex Stone 33 Wave Place E200 Alex Stone 33 Wave Place -----> etc... This is the javascipt The JavaScript gets E100 when its the first row is clicked which is correct but when E200 row is clicked it still shows E100, how would i get E200 and so on when there is more data? Is there a javascript only solution
possible better answer: http://stackoverflow.com/a/25458235
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25457996

http://stackoverflow.com/q/25505157
has comment: http://stackoverflow.com/comment/39812598
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25505423
answer count: 1
has body: I have deployed a website in IIS 7.5 on windows server 2008 R2. The javascript runs fine when i run the application from my local machine , but when deployed on IIS 7.5 , it fails to run the javascript part of my menu . please help me solve this problem. onclick="ShowSubMenuUser(); Above is the code which doesn't fires when i click on my menu item . The function contains the following code : function ShowSubMenuUser() { document.getElementById("ctl00_trsubViewUser").style.display = "block"; document.getElementById("ctl00_trsubRegisterUser").style.display = "block"; document.getElementById("ctl00_trSubMenuItemFooterUser").style.display = "block"; document.getElementById("ctl00_trPOReport").style.display = "block"; } This code runs fine on Local Machine as well as in Visual Studio , but on Server when i click on the menu , nothing happens .
tagged with: asp.net
has title: Javascript not working inside a website on IIS7.5 - Windows Server 2008 R2
favorite count: 0
has comment: http://stackoverflow.com/comment/39812562
tagged with: iis
upvote count: 1
tagged with: iis-6
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25505423
has comment: http://stackoverflow.com/comment/39812490
has comment: http://stackoverflow.com/comment/39812625
type: Question

http://stackoverflow.com/comment/39882235
type: QuestionComment
comment on: http://stackoverflow.com/q/25543006
has text: Open the developer tool and check the response in netowrk section. from that you can make sure backend called and get the right data. It can be a cache issue. add cache: false, to ajax request and check.
score: 0
type: Comment

http://stackoverflow.com/a/25544703
score: 1
has body: You have to connect the DOM elements and the data structure in some way. If you have an input element, you know that you can access it's current value via the value-attribute. You now have to add a click- or change- listener to the input (DOM element) element to update your data structure. Because this is always the same for input elements you may write a generic code that does that. register(inputElement, function(value) { myDataStructure.value1 = value; }); register will that add the events to inputElement and calls the function(value) with the updated value.
upvote count: 1
has comment: http://stackoverflow.com/comment/39885308
type: Answer
answers question: http://stackoverflow.com/q/25544516
downvote count: 0

http://stackoverflow.com/a/25475406
score: 1
has body: I solved the problem by adding the download attribute to my a tag: Download I noticed that I was getting this message when starting the download: Resource interpreted as Document but transferred with MIME type application/octet-stream After googling around I found the solution, which was to add the download attribute. Turns out that the ga request is no longer cancelled with that in place. The browser must have been confused by that error and cancelled all ongoing requests (or something). I did some testing now and out of about 20 ga calls all of them were successful.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25471596
type: Answer
accepted answer of: http://stackoverflow.com/q/25471596
upvote count: 1

http://stackoverflow.com/comment/39609912
type: Comment
comment on: http://stackoverflow.com/a/25395788
has text: Thanks! Removing that line did it perfectly. :) I thought the values wouldn't be stored if the form wasn't submitted, but I'm glad that I was wrong.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25423854
has answer: http://stackoverflow.com/a/25424660
favorite count: 0
has comment: http://stackoverflow.com/comment/39661734
has comment: http://stackoverflow.com/comment/39661913
has answer: http://stackoverflow.com/a/25431173
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25431521
accepted answer: http://stackoverflow.com/a/25431521
has comment: http://stackoverflow.com/comment/39661275
tagged with: textnode
has comment: http://stackoverflow.com/comment/39661261
tagged with: dom
type: Question
has title: How to determine if there exists text at the beginning or end of a parent element? HTML DOM & JavaScript
possible better answer: http://stackoverflow.com/a/25431173
tagged with: javascript
upvote count: 2
answer count: 3
has body: Let's say we have a nested span: And we want to know whether or not text exists here or here Let's say we have reference to the parent element node. Please note that text text text or text text are two entirely possible cases.

http://stackoverflow.com/comment/39872451
has text: can you go in firebug, put a breakpoint inside this function, and step through to see if it executes the ajax call correctly and that the data object is what you expect?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25536771

http://stackoverflow.com/q/25411101
tagged with: javascript
score: 0
answer count: 4
has body: I want to call child object method form prototype object: function Hamster() { this.sleep = function(){ console.log('sleep'); } } Hamster.prototype = new function(){ var _self = this; this.test = function(){ this.sleep(); //_self.sleep(); //not working } } lazy = new Hamster(); lazy.test(); Why when I use this.sleep() everything works fine, but when I use _self.sleep() (_self variable has this value) I get error? Why _self and this inside the test() function are not same?
has title: How can I call prototype child method from parent
possible better answer: http://stackoverflow.com/a/25411147
has answer: http://stackoverflow.com/a/25411180
has answer: http://stackoverflow.com/a/25411301
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25411386
accepted answer: http://stackoverflow.com/a/25411386
tagged with: prototype
type: Question
has answer: http://stackoverflow.com/a/25411147

http://stackoverflow.com/comment/39670168
type: Comment
comment on: http://stackoverflow.com/a/25404785
has text: I don't think you are understanding me. Your issue is a code one - not one related to Cordova. You are not using anything that requires you to *test* on Cordova. You can test w/ a normal desktop web browser and THEN send it to Cordova when done. Does that make sense now?
score: 0
type: AnswerComment

http://stackoverflow.com/a/25517934
has comment: http://stackoverflow.com/comment/39837125
downvote count: 0
has comment: http://stackoverflow.com/comment/39837182
type: AcceptedAnswer
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25517892
answers question: http://stackoverflow.com/q/25517892
score: 1
has body: Use this code $("#picture").attr("src", imageName[0]).fadeIn(200); Instead of $("#picture").attr("src", imageName[0]); Live Demo Hope It helps you

http://stackoverflow.com/a/25411648
has comment: http://stackoverflow.com/comment/39639847
has body: Taking a cue from Bootstrap's tabs, we can apply table layout properties with CSS: li.tab {display: table-cell; width: 1%;} http://jsfiddle.net/isherwood/fun6faos/15 This example results in uniform tab widths. To have tabs sized somewhat proportionately to their text labels, remove the width property: http://jsfiddle.net/isherwood/fun6faos/17 A note on your use of classes... A class, by definition, is a set of properties applied to multiple elements. When you're incrementing classes, you're using them wrongly. You should never have a list of elements in your CSS that have indexed numbers. I've stripped all such craziness out of your code.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39639582
score: 0
has comment: http://stackoverflow.com/comment/39639772
has comment: http://stackoverflow.com/comment/39640022
accepted answer of: http://stackoverflow.com/q/25411508
has comment: http://stackoverflow.com/comment/39639356
type: Answer
answers question: http://stackoverflow.com/q/25411508
has comment: http://stackoverflow.com/comment/39639358
has comment: http://stackoverflow.com/comment/39639488

http://stackoverflow.com/comment/39710176
comment on: http://stackoverflow.com/a/25440711
type: AnswerComment
has text: Doh! See. "missing something simple." Sorry to have to call in the troops for that one, but sometimes, it's good to have a fresh set of eyes. But that reminds me I should make the link dynamic. Thanks
score: 0
type: Comment

http://stackoverflow.com/comment/39817003
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25506359
has text: Do not use `.live()` as it has been removed from jQuery. Version deprecated: 1.7, removed: 1.9 - http://api.jquery.com/live/

http://stackoverflow.com/comment/39717552
type: AnswerComment
has text: For some reason the `layout: 'border'` option prevents anything from loading, whenever I include it.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25433617

http://stackoverflow.com/q/25408401
tagged with: javascript
score: 0
answer count: 1
has title: How to pass multiple headers and override content type?
has answer: http://stackoverflow.com/a/25409280
linked to: http://stackoverflow.com/q/5258977
type: AnsweredQuestion
has body: I have the following function which I can not override: getHtml:function(aURL,aPostData,aHeaders,aMethod){ this.xhr = new XMLHttpRequest(); var tmp=this; this.xhr.onreadystatechange=function(){ tmp.onStateChange(); }; if(aPostData||aPostData==""){ this.xhr.open(aMethod?aMethod:"POST", aURL, true); this.xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); }else this.xhr.open(aMethod?aMethod:"GET", aURL, true); if(aHeaders){ for(var t in aHeaders){ this.xhr.setRequestHeader(t,aHeaders[t]); } } try{ this.xhr.send(aPostData); }catch(e){ this.doNext(""); } } How should I pass several headers (aHeaders) to this function? If I pass Content-Type as the header, will it override default value (application/x-www-form-urlencoded) there? I would like to pass two headers: x-myheader-value: zzz1111bbb content-type: application/javascript
type: Question
accepted answer: http://stackoverflow.com/a/25409280
has comment: http://stackoverflow.com/comment/39632851
tagged with: function
tagged with: arrays

http://stackoverflow.com/comment/39789964
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25492699
score: 0
has text: is there a way after first time the code runs, it stead by for another action in same function?

http://stackoverflow.com/a/25488585
has comment: http://stackoverflow.com/comment/39818443
has comment: http://stackoverflow.com/comment/39803168
has comment: http://stackoverflow.com/comment/39809543
answers question: http://stackoverflow.com/q/25487556
type: AcceptedAnswer
score: 4
accepted answer of: http://stackoverflow.com/q/25487556
has comment: http://stackoverflow.com/comment/39803363
has comment: http://stackoverflow.com/comment/39803549
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/39854762
has comment: http://stackoverflow.com/comment/39803369
has body: The DOM of the new window is accessible via window.document. The window here isn't the window passed to the chrome.app.window.create callback function (call it createdWindow), but rather createdWindow.contentWindow. So, the DOM you're looking for is createdWindow.contentWindow.document. Modify that DOM however you like and then call createdWindow.contentWindow.print(). UPDATE -- Here's the code following what I said above: window.onload = function() { chrome.app.window.create('printwindow.html', {}, function (createdWindow) { var win = createdWindow.contentWindow; win.onload = function () { win.document.querySelector('#content').innerHTML = ' Here is something to print. '; win.print(); } } ); }; printwindow.html is: WindowToPrint I have tested this code and it works. I understand that the OP has gone another way, but it would be nice for others looking at this question if this could be marked as the answer.
has comment: http://stackoverflow.com/comment/39841133
has comment: http://stackoverflow.com/comment/39827338
downvote count: 0
has comment: http://stackoverflow.com/comment/39814821

http://stackoverflow.com/comment/39602664
type: Comment
type: QuestionComment
has text: and i'm telling you it's not a problem. cluster doesn't go round-robin, it goes on needs and surpluses and determined mainly by the OS. think of it like the Northstar engine that shuts down un-needed pistons when coasting in the city.
comment on: http://stackoverflow.com/q/25391551
score: 0

http://stackoverflow.com/comment/39679924
has text: The AJAX call might actually end up getting the data from the browser’s cache, depending on the cache instructions that came back with the original response.
comment on: http://stackoverflow.com/q/25433541
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39686713
type: QuestionComment
comment on: http://stackoverflow.com/q/25437246
has text: Aren't you getting an error in the Javascript console? Didn't that help you figure out the reason?
score: 0
type: Comment

http://stackoverflow.com/q/25510365
tagged with: jquery
tagged with: meteor
has body: I am trying to make a following feature when I try to use the follow button I get "Uncaught RangeError: Maximum call stack size exceeded" If I add .val() to the end of Meteor.users.update(Meteor.userId(), {$addToSet: {'profile.following': usern}}); It returns " " to profile.following where it should return the username of the profile the user is on. Thanks in advanced here is the code. Template.user_profile.events({ 'click #follow':function () { var usern=$("#username"); Meteor.users.update(Meteor.userId(), {$addToSet: {'profile.following': usern}}); return Meteor.user().profile.following; } }) html {{username}} {{profile.followingnumber}} {{profile.followedbynumber}} {{profile.bio}} Follow server side Accounts.onCreateUser(function(user) { user.profile.following=[]; user.profile.followingn=0; user.profile.followed=[]; user.profile.followedn=0; return user; });
has title: Why do I get the Maximum call stack size exceeded error. Without .val()
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25512410
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25512410
answer count: 1

http://stackoverflow.com/a/25482871
has comment: http://stackoverflow.com/comment/39771013
has comment: http://stackoverflow.com/comment/39771026
has body: setInterval( "searchm()", 3000 ); should be setInterval( searchm, 3000 ); Another error, in your PHP: $query = mysqli_query($userdb, "SELECT * FROM messages WHERE p2=$uid AND `read`='n' LIMIT 3") should be: $query = mysqli_query($userdb, "SELECT * FROM messages WHERE p2=".$uid." AND `read`='n' LIMIT 3") Lastly $fromResult = mysqli_query($userdb, "SELECT * FROM users WHERE id = '$from'"); to $fromResult = mysqli_query($userdb, "SELECT * FROM users WHERE id = ".$from);
has comment: http://stackoverflow.com/comment/39770968
has comment: http://stackoverflow.com/comment/39770958
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39770983
answers question: http://stackoverflow.com/q/25482829

http://stackoverflow.com/comment/39640486
score: 0
has text: When I tested on the Desktop (you aren't really doing anything that needs Cordova), I can confirm it made a network request every N seconds. Are you sure the image is supposed to change? I just tested the image and it looks similar to what I saw this morning. I've reloaded a few times too.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25404785

http://stackoverflow.com/q/25427933
has comment: http://stackoverflow.com/comment/39668835
accepted answer: http://stackoverflow.com/a/25461927
tagged with: ajax
has title: Wordpress - Targeting Individual POST, rather than POST Type. AJAX/PHP
type: Question
tagged with: php
score: 0
has comment: http://stackoverflow.com/comment/39670207
has body: I am trying to load the individual post information on click into the page when clicking the post title. I have managed to get my script to loop through the titles in the post array and on click load the post titles once more into a div. I want this to load the individual post information instead on click. PHP Post Array Functions - add_action( "wp_ajax_success_stories", "sa_get_paginated_posts" ); add_action( "wp_ajax_nopriv_success_stories", "sa_get_paginated_posts" ); function sa_get_paginated_posts(){ $args = array( 'posts_per_page' => -1, 'post_type' => 'success-stories', 'orderby' => 'post_date', 'order' => 'DESC' ); $the_query = new WP_Query( $args ); $queryitems = $the_query->get_posts(); $alldata = array(); if ($queryitems){ foreach ($queryitems as $query_item){ $success_story = array(); $success_story["ID"] = $query_item->ID; $success_story["title"] = $query_item->post_title; $alldata[] = $success_story; } } $encoded_data = json_encode($alldata); echo $encoded_data; die(); } function sa_get_posts($post_amount, $post_type){ $args = array( 'posts_per_page' => $post_amount, 'post_type' => $post_type, 'offset' => 0, 'orderby' => 'post_date', 'order' => 'ASC' ); Using this function to loop through - <? if ($success_stories): //success story posts ?> <? foreach ($success_stories as $success_story): $title = $success_story->post_title; ?> <a data-id="<? echo $success_story->ID; ?>" class="success-extra" href="#" title=""><? echo $title; ?> <? endforeach; ?> CLOSE <? endif; ?> Javascript/ AJAX Call var $json_response_box = $("#success-list"); function get_ajax_success_posts() { //this line gets the id attribute from the link var current_story = $(this).attr("data-id"); console.log(current_story); jQuery.ajax({ type: "GET", url: "WORDPRESSDIRECTORY/admin-ajax.php", cache: true, data: { action: "success_stories" }, dataType: "JSON", success: function(data) { var arrayLength = data.length; for (var i = 0; i < arrayLength; i++) { var success_id = data[i].ID; var succe…
tagged with: wordpress
answer count: 1
has comment: http://stackoverflow.com/comment/39669372
tagged with: javascript
has answer: http://stackoverflow.com/a/25461927
type: AnsweredQuestion

http://stackoverflow.com/q/25511666
type: Question
tagged with: javascript
has body: I am actually trying to change the color of a div on click. I have sixteen divs. On click, a Javascript function is called which switch cases for each box. While changing the color, I call another function where I match the previous color and the current color. I have made the Color variable as global, and it changes for each click for each box. I don't know how to compare it. Following is my code. Color = "#FFF"; Score = 0; function showCard(mynum) { switch(mynum) { case 1: Color="#000000"; break; case 2: Color="#FF0000"; break; case 3: Color="#000000"; break; case 4: Color="#FF0000"; break; default: } document.getElementById(mynum).style.backgroundColor=Color; getScore(Color); } function getScore(clr){ if(Color==clr) Score++; else Score--; document.getElementById("score").innerHTML= Score; }
accepted answer: http://stackoverflow.com/a/25511734
score: 0
answer count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25511734
has title: How to compare two event results? (Maybe by using local or global variables?)

http://stackoverflow.com/a/25395503
upvote count: 1
score: 1
has body: DEMO The following code should fix it. It's basically an outer .each() with an inner .map(). $(function() { var AoA = []; $('#mytable').find('tr').each(function(i,tr) { var BoB = $(tr).find('td').map(function(j,td) { var thisTD = {}; thisTD[ $(td).attr('name') ] = $(td).html(); return thisTD; }).get(); AoA.push( BoB ); }); $('body').append( JSON.stringify( AoA ) ); });
downvote count: 0
answers question: http://stackoverflow.com/q/25395171
type: Answer

http://stackoverflow.com/comment/39667143
comment on: http://stackoverflow.com/q/25427067
has text: There's a lot of possible ways to do this - to get the best advice, you should be clearer as to what your actual goal is.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25515631
accepted answer: http://stackoverflow.com/a/25519860
score: 0
has comment: http://stackoverflow.com/comment/39833177
tagged with: javascript
type: AnsweredQuestion
has title: D3js - Smooth transition between 2 paths
tagged with: http://stackoverflow.com/tag/svg
type: Question
tagged with: d3.js
has answer: http://stackoverflow.com/a/25519860
answer count: 1
has body: I am 2 very different path and I'd like to smoothly change one to make it look like the other one. I have tried using the .transition() method applied on the "d" attribute but it gives very poor results. Here is an example: http://jsfiddle.net/yya0m0s0/1/ The d3 code I used is the following: var svg = d3.select("body") .append('svg') .attr('width', '375px') .attr('height', '490px'); svg.append('path').attr('d', d_t0); svg.selectAll('path').transition() .duration(3500).delay(1000) .attr('d', d); What is the best way to create the kind of transformations? Many thanks
has comment: http://stackoverflow.com/comment/39833140

http://stackoverflow.com/q/25438407
has answer: http://stackoverflow.com/a/25438516
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39688685
has answer: http://stackoverflow.com/a/25438467
has comment: http://stackoverflow.com/comment/39688614
has title: .on('click') not playing well with dynamic content?
accepted answer: http://stackoverflow.com/a/25438467
score: 1
has body: So I have some code here that dynamically generates a bootstrap navbar by prepending it to anything with a class of header_default. My problem is that I now want to do some .on('click') events to the dynamic navbar, although it's not really working. Specifically I've been trying to toggle some lorem ipsum when I press the brand part of the navbar. For some reason an on('click') alert will work fine this way, but nothing else will. I've tried .toggle(), .hide(), and console.log() but none of those work. I have tested the same click event code on the same navbar when it isn't generated by javascript and it works fine. I am still very new to using jquery/javascript, so I'm certain I've made a fairly obvious mistake here. My HTML: Document Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellat autem dolorum, earum adipisci magni rem. Deserunt sed aut, ad neque cum nulla rem vitae quos ducimus esse voluptatibus maxime! Vel. My Javascript: // Header $(document).ready(function() { if($('#page').hasClass("header_default")) { $(' Brand About Contact Privacy Policy ') .prependTo( $('#page') ) } // append navbar }); //document.ready //Click event $(document).on('click', '.navbar-brand', function() { $('p').toggle("slow"); }); The .prependTo() is simply: Brand About Contact Privacy Policy
favorite count: 0
tagged with: twitter-bootstrap
upvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25438516

http://stackoverflow.com/a/27650928
score: 0
answers question: http://stackoverflow.com/q/25415320
type: Answer
has body: This should help you url: 'http://64.182.231.116/~spencerf/union_college/Upperclass_Sample_Menu.xml', // name of file you want to parse dataType: "xml", // type of file you are trying to read success: parse, // name of the function to call upon success error: function(){alert("Error: Something went wrong");}

http://stackoverflow.com/comment/39871083
comment on: http://stackoverflow.com/a/25494032
type: AnswerComment
has text: You have marked my post as an answer. Does it mean, that you have solved that?
score: 0
type: Comment

http://stackoverflow.com/a/25532996
upvote count: 6
answers question: http://stackoverflow.com/q/25529000
score: 6
has body: You can use instanceof like this: MyModel.prototype instanceof Backbone.Model This works because while there no instantiated instance of MyModel, you don't really care about it, you care about its prototype chain anyway, so you can just check its prototype inheritance. Note, this will not work for the specific check of MyModel.prototype instanceof MyModel That might be fine depending on your use-case, but it you do want that to work, you have two options: MyModel === MyModel &amp;&amp; MyModel.prototype instanceof MyModel // OR Object.create(MyModel.prototype) instanceof MyModel
has comment: http://stackoverflow.com/comment/39864396
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39870605
accepted answer of: http://stackoverflow.com/q/25529000
type: Answer

http://stackoverflow.com/q/25395588
downvote count: 0
has answer: http://stackoverflow.com/a/38311498
favorite count: 0
has comment: http://stackoverflow.com/comment/39609424
type: AnsweredQuestion
tagged with: typescript
has answer: http://stackoverflow.com/a/25395804
score: 1
has body: I am new to typescript and am trying to get a simple class going. I have the below code and when I run, I keep getting a syntax error. I tried even an empty class and nothing. I am using ASP.NET MVC5 (note, if I just have a function in the code, it works fine). Inside Site.ts I have: class Facebook { constructor() { } open() { window.open("http://www.facebook.com"); } } var social = new Facebook(); I am calling the code by a link open I don't even get to click, right away, when loading I get JavaScript critical error at line 1, column 1 in http://localhost:20870/Scripts/site.ts\n\nSCRIPT1002: Syntax error It seems to work in the playground: <a href="http://www.typescriptlang.org/Playground#src=class%20Facebook%20%7B%0A%20%20%20%20constructor()%20%7B%20%7D%0A%0A%20%20%20%20open()%20%7B%0A%20%20%20%20%20%20%20%20window.open(%22http%3A%2F%2Fwww.facebook.com%22)%3B%0A%20%20%20%20%7D%0A%7D%0A%0Avar%20social%20%3D%20new%20Facebook()%3B%0A%0Avar%20button%20%3D%20document.createElement('button')%3B%0Abutton.textContent%20%3D%20%22Say%20Hello%22%3B%0Abutton.onclick%20%3D%20function()%20%7B%0A%20%20%20%20social.open()%3B%0A%7D%0A%0Adocument.body.appendChild(button)%3B%0A" rel="nofollow">Click here to see my workout Any ideas?
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39609471
tagged with: asp.net-mvc
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25395804
has comment: http://stackoverflow.com/comment/39609373
answer count: 2
has title: Typescript causing syntax error
possible better answer: http://stackoverflow.com/a/38311498

http://stackoverflow.com/a/54421613
upvote count: 1
type: Answer
has body: One-liner in javascript: phoneStr.replace(/./g, x =&gt; '22233344455566677778889999'[(x.charCodeAt()-65)%32] || x ); You can do [x.toLowerCase().charCodeAt()-97] if you want to be clearer. Demo (stick above in appropriate-named function): &gt; phoneToKeypad('+1-800-abc-WXYZ') "+1-800-222-9999" You can also use Array.from(phoneStr, x =&gt; x) to work with an Array representation if you need, then .join('') it later back into a string. Strip dirty inputs (e.g. hyphens, parentheses, etc.) as appropriate by preprocessing: phoneStr.replace(/[^0-9*#+a-zA-Z]/g, '').replace( ... etcetc Of course, you will need to do sanitize such on the server side, so you can't only rely on client-side javascript (unless your server is also in javascript). The layout of a keypad is referred as ISO/IEC 9995-8. Do note however that (according to my very cursory research) there are a plethora of international standards, such as the 184-page ETSI ES 202 130 standard in Europe.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25412594

http://stackoverflow.com/q/25399978
answer count: 2
possible better answer: http://stackoverflow.com/a/29845625
has comment: http://stackoverflow.com/comment/62861128
has answer: http://stackoverflow.com/a/29845625
has title: RequireJS build error [RangeError: Maximum call stack size exceeded]
favorite count: 0
tagged with: backbone.js
score: 2
has answer: http://stackoverflow.com/a/25412541
type: AnsweredQuestion
upvote count: 3
has body: I'm trying to build my Grunt/RequireJS app with the requirejs:production task, and I'm getting the following output: Running "requirejs:production" (requirejs) task >> Tracing dependencies for: ../bower_components/almond/almond >> RangeError: Maximum call stack size exceeded >> In module tree: >> main >> models/session >> views/root >> navigation >> permissions >> text { [Error: RangeError: Maximum call stack size exceeded In module tree: main models/session views/root navigation permissions text ] originalError: { [RangeError: Maximum call stack size exceeded] moduleTree: [ 'text', 'permissions', 'navigation', 'views/root', 'models/session', 'main' ], fileName: '/Users/zensavona/softwaredev/projects/haze/t3-web/web-admin/src/main/bower_components/text/text.js' } } I think the code it's talking about is: define(["backbone", "models/permissions", "text!/ducks/api/Permissions/Current"], function(Backbone, Permissions, permissionJSON) { if (permissionJSON.indexOf(" Login ") > -1) { return new Permissions(); } else { var data = JSON.parse(permissionJSON); return new Permissions(data); } }); My first instinct was a circular dependency of some kind (?) but I can't see one. Is this to do with my code or the text module?
tagged with: requirejs
downvote count: 1
tagged with: bower
type: Question
has comment: http://stackoverflow.com/comment/39669390
tagged with: javascript
tagged with: gruntjs
accepted answer: http://stackoverflow.com/a/25412541

http://stackoverflow.com/a/25414563
has comment: http://stackoverflow.com/comment/39670522
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: Here is how to fix your controller: .controller('NewCtrl', ["$scope", "Restangular", function($scope, Restangular) { var passages = Restangular.all('passages'); var allPassages = passages.getList(); // Initialise $scope.passage: $scope.passages = { book: null }; $scope.add = function() { passages.post({ book: $scope.passages.book }); }; }]) and the markup: Add New Passage Book: Required!
has comment: http://stackoverflow.com/comment/39685441
accepted answer of: http://stackoverflow.com/q/25404617
answers question: http://stackoverflow.com/q/25404617

http://stackoverflow.com/q/25511019
type: Question
has answer: http://stackoverflow.com/a/25511681
has comment: http://stackoverflow.com/comment/39824088
has title: including images into JS object and sending through Ajax
score: 0
answer count: 1
has body: I have a JS object that collects form values and store them into arrays. var myJSObject = { names = [], images = [], .... } The problem I have is that my form contains images and I tried to store them in the JS object and send the whole thing through Ajax. But my images` array is always empty. Update: Sorry for the delay as I was busy with other projects. Here is my JS Classes: HTML: &lt;div class="form-section"&gt; &lt;div class="form-element"&gt; &lt;input class="upl-img" type="file" /&gt; &lt;/div&gt; &lt;div class="form-element"&gt; &lt;/div&gt; &lt;div class="form-element"&gt; &lt;input class="upl-img" type="file" /&gt; &lt;/div&gt; &lt;/div&gt; JS: var formElement = function(options){ var defaults = { elemID : 0, elemText : " ", elemnOrder : 0, mandatory : false, elemType : 0, elemImage : null, formFields : [] } //Some methodes this.construct(options); } var formSection = function(options){ var defaults = { sectionID : null, sectionTitle : " ", sectionOrder : 0, formElements : [] } //Some methodes this.construct(options); } So my formSection contains an array of formElement. Each formElement could contain an image that the end user may upload. When the end user hits submit button a function will create a new formSection object and inject in all the formElements objects. The final formSection object needs to be posted through Ajax. I tried to used a FormData object to collect files without success. Thank you
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39824140
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39825091

http://stackoverflow.com/comment/39693734
has text: The problem is indeed with the identifier `remove`, which is treated as predefined for some reason. Replacing it by any suitable identifier fixes the problem. I would rather use a more natural identifier like `removeRow`.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25441386
type: Comment

http://stackoverflow.com/a/25505696
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25505550
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25505550
has body: Try this. Suisse Sales My desktop JQuery: $(document).ready(function(){ if (window.location.href.indexOf("Suisse") > -1) { $('#switch-univers li a.bilgroup').css('background-color', 'green'); } else if window.location.href.indexOf("Sales") > -1) { $('#switch-univers li a.sales').css('background-color', 'blue'); } else if (window.location.href.indexOf("My%20desktop") > -1) { $('#switch-univers li a.lifebil').css('background-color', 'pink'); } });
type: Answer

http://stackoverflow.com/a/25539558
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25532339
upvote count: 1
score: 1
has body: Not too bad, here is a way: $('.question').click( function() { $(this).next('p').show(); });

http://stackoverflow.com/q/25416853
score: 0
has body: I have seen many posts about iOS traditionally not supporting scrolling iFrames, like most desktop browsers, however most of the posts are quite old. They reference iOS 4 and iOS 6. With iOS 7 and iOS 8, is there any way to embed an iFrame (lets say as an example, a PDF, into a web-page that would be loaded by the native webkit, rendering engine)? Here are the techniques which I have tried, but have not worked: Adding -webkit-overflow-scrolling:touch into the iFrame Setting the iFrame's overflow to auto or scroll Embedding the iFrame within a div (the problems here are that the div scrolls to the height of the iFrame, but the iFrame height has to be exactly the height of the document for this to work perfectly) Sample HTML: &lt;iframe src="file.pdf"&gt;&lt;/iframe&gt; Any ideas?
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/14183647
type: UnansweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/39653675
tagged with: css
has comment: http://stackoverflow.com/comment/39668994
answer count: 0
type: Question
has title: iOS 7 iFrame Scroll Disabled
tagged with: javascript

http://stackoverflow.com/comment/39681669
score: 0
type: Comment
type: QuestionComment
has text: Haven't you tried yet?
comment on: http://stackoverflow.com/q/25434612

http://stackoverflow.com/a/25500779
accepted answer of: http://stackoverflow.com/q/25500394
score: 0
answers question: http://stackoverflow.com/q/25500394
type: AcceptedAnswer
type: Answer
has body: Update to qooxdoo 4.0 which added touch support to the desktop ui. This should also solve another set of problems like drag &amp; drop or scrolling issues in the 3.5 release running on tables.

http://stackoverflow.com/a/25472028
answers question: http://stackoverflow.com/q/25466257
has body: As per the documentation function( date, jsEvent, view ) { } date holds a Moment for the clicked day This means that FullCalendar uses Moment.js to manipulate all things related to dates. As you may see from the documentation of Moment.js, it has several methods available. If you set your dayClick function to something like this, it will work: dayClick: function(date, allDay, jsEvent, view) { var dt = date.toDate(); // OR, if you want a specific format //var dt = date.format("YYYY-MM-DD HH:mm:ss"); console.log(dt); dt2 = date.add(1, 'day'); console.log(dt2.toDate()); }
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25466257

http://stackoverflow.com/q/25528301
type: Question
answer count: 2
has body: How would I alter the JS functions below so that the option selected on the dropdown menu reverts back to 'Australia' upon closing the overlay window. Javascript $(document).ready(function(){ // show popup when selecting a country from the drop-down var money = 0; $(".target").change(function () { var optionSelected = $("option:selected", this); money = optionSelected.attr("data-price"); $("input[name='shipping']").val(money); $('.overlay-bg').show().css({'height' : docHeight}); $('.overlay-content').css({'top': scrollTop+20+'px'}); }); // hide popup when user clicks on close button $('.close-btn').click(function(){ $('.overlay-bg').hide(); // hide the overlay }); // hides the popup if user clicks anywhere outside the container $('.overlay-bg').click(function(){ $('.overlay-bg').hide(); }) // prevents the overlay from closing if user clicks inside the popup overlay $('.overlay-content.').click(function(e) { e.preventDefault(); var $this = $(this); var horizontalPadding = 30; var verticalPadding = 30; var iframe_popup = $(' '); iframe_popup.dialog( { title: ($this.attr('title')) ? $this.attr('title') : '', autoOpen: true, width: 600, height: 450, modal: true, autoResize: true, overlay: { opacity: 0.5, background: "black" } }).width(600 - horizontalPadding).height(450 - verticalPadding); }); }); HTML Drop Down Menu Please Select a Country Afghanistan Åland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Armenia Aruba Australia Austria I'm presuming that I need to alter this segment of code: // hides the popup if user clicks anywhere outside the container $('.overlay-bg').click(function(){ $('.overlay-bg').hide(); && // hide popup when user clicks on close button $('.close-btn').click(function(){ $('.overlay-bg').hide(); // hide the overlay }); So the function needs to set the selected option in the drop down back to the default which is 'Australia' when the user closes the overlay window. Please see Fiddle for th…
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39855358
has answer: http://stackoverflow.com/a/25528542
has title: How to change Selected Option to specific value on close of Overlay window?
has answer: http://stackoverflow.com/a/25528530
has comment: http://stackoverflow.com/comment/39855472
possible better answer: http://stackoverflow.com/a/25528530
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25528542

concurrency
tag name: concurrency
tags question: http://stackoverflow.com/q/25543052
type: Tag

http://stackoverflow.com/comment/39631376
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25407527
has text: How do I do that? How to fix it?
score: 0

http://stackoverflow.com/comment/39810737
type: QuestionComment
comment on: http://stackoverflow.com/q/25504071
has text: I am not going to fix your code for you, but I wouldn't use `top`. Use `bottom` instead, have a play with that. Try it with `position:fixed;` too. [non-animated example](http://jsfiddle.net/f5yg2rvz/)
score: 0
type: Comment

http://stackoverflow.com/comment/39794461
score: 0
type: Comment
type: QuestionComment
has text: I don't understand what you want to achieve. How do the landings pages differ and what assets do they share? What is your route setup (both on the webserver and in Angular)?
comment on: http://stackoverflow.com/q/25494971

http://stackoverflow.com/q/25483078
tagged with: express
tagged with: busboy
type: Question
has answer: http://stackoverflow.com/a/25483405
score: 0
answer count: 1
tagged with: node.js
type: UnansweredQuestion
has title: Unable to use connect-busboy in node js
tagged with: javascript
has body: I want to upload image using connect-busboy in node.js. Using reference https://www.npmjs.org/package/connect-busboy , I wrote the code: router.post('/upload', function(req, res) { req.pipe(req.busboy); console.log('1') req.busboy.on('file', function(fieldname, file, filename) { console.log('2') var fstream = fs.createWriteStream('../uploads/' + filename); file.pipe(fstream); fstream.on('close', function () { res.redirect('back'); }); }); console.log('4') }); But when I try to upload an image, most of the times the image is uploaded in the given path but sometimes, due to asynchronous nature of js calls, code inside req.busboy.on is skipped and console.log('4') get executed durectly after console.log('1'). I am not able to understand why it is happening as I think req.busboy.on is implemented using callback feature and so code should be executed every time. PLease help me out here? Edit 1: Okk...My above problem is solved but now, I am not able to get other fields of the form using req.body . It is coming empty json. I have tried multer too, but I am not able to run it properly.

http://stackoverflow.com/q/25455567
linked to: http://stackoverflow.com/q/985272
possible better answer: http://stackoverflow.com/a/25455627
type: AnsweredQuestion
tagged with: textselection
type: Question
accepted answer: http://stackoverflow.com/a/25456308
linked to: http://stackoverflow.com/q/2044616
has comment: http://stackoverflow.com/comment/39723038
tagged with: javascript
has title: Select a paragraph with JavaScript (on click)?
tagged with: dom
has answer: http://stackoverflow.com/a/25456308
score: 9
answer count: 2
downvote count: 1
has body: Is it possible to select all the text of an element (e.g., a paragraph &lt;p&gt;) with JavaScript? A lot of people think jQuery .select() would do this, but it does not. It merely triggers an event. Note that DOM objects for &lt;input&gt; elements have a native select() method, but most other elements (such as &lt;output&gt; and &lt;p&gt;) do not. (Do I need to use content-editable to get this to work?)
tagged with: jquery
has comment: http://stackoverflow.com/comment/39722242
has comment: http://stackoverflow.com/comment/39720824
favorite count: 0
has answer: http://stackoverflow.com/a/25455627
upvote count: 10
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/20805512

http://stackoverflow.com/q/25415500
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25415531
score: 2
has answer: http://stackoverflow.com/a/25415531
accepted answer: http://stackoverflow.com/a/25415526
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39646665
linked to: http://stackoverflow.com/q/359494
tagged with: while-loop
has comment: http://stackoverflow.com/comment/39646705
has comment: http://stackoverflow.com/comment/39646571
has answer: http://stackoverflow.com/a/25415526
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39646669
has body: The course is asking me to form a while loop and I keep getting errors or infinite loops. What am I doing wrong? var understand = true; while(understand= true){ console.log("I'm learning while loops!"); understand = false; }
has title: While Loops Syntax Errors

http://stackoverflow.com/a/25417874
score: 11
upvote count: 11
accepted answer of: http://stackoverflow.com/q/25417547
answers question: http://stackoverflow.com/q/25417547
has comment: http://stackoverflow.com/comment/39652506
has comment: http://stackoverflow.com/comment/39651679
type: AcceptedAnswer
downvote count: 0
has body: Yes, they are distinct. I will explain by examples from real life, based on a typical single-page web application scenario. I am assuming your web page follows typical Model-View-XXX pattern, therefore you would have "views" on it. By view I understand a javascript component responsible for visual representation and associated logic of some part of your page - header, image list, breadcrumbs are all typical views. Observer Best used for single objects with great impact on overall site functionality. Typical example would be user settings or site configuration. var settings = { fonts: "medium", colors: "light", observers: [], addObserver: function (observer) { this.observers.push(observer); }, update : function(newSettings) { for (k in newSettings) this[k] = newSettings[k]; this.fire(); } fire: function() { var self = this; observers.forEach(function() { this.update(self); }); } } where each view would behave somewhat like this: var view = { init: function() { //... attach to DOM elements etc... settings.addObserver(this); }, update: function(settings) { //... use settings to toggle classes for fonts and colors... } } Mediator Best used when multiple parts of your site need to be orchestrated by certain logic. If you end up tracing a single user action through multiple callbacks and end up passing state via events, it probably makes sense to introduce mediators. There would be one mediator per workflow. A concrete example would be a photo upload. var uploadMediator = { imageUploading: false, actors: {}, registerActor: function(name, obj) { actors[name] = obj; }, launch: function() { if (imageUploading) error('Finish previous upload first'); actors['chooser'].show(); actors['preview'].hide(); actors['progress'].hide(); } selected: function(img) { actors['preview'].show(img); } uploading: function(progressNotifier) { imageUploading = true; actors['progress'].show(progressNotifier); } uploaded: function(thumbUrl) { //show thumbUrl in the image list imageUploading = fals…
type: Answer

http://stackoverflow.com/comment/39830689
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25511684
has text: I believe [this fiddle](http://fiddle.jshell.net/w94z8vf1/7/) does what you want. If you make your question clearer I can post it as an answer. Although, it may fail the case of the ` Dashing Company &reg; ` because it is indeed invalid HTML and cannot be parsed correctly in the DOM.

http://stackoverflow.com/a/25395995
has body: Probably the styling is set to show no cursor. And try below examples: Cursor examples in CSS
has comment: http://stackoverflow.com/comment/138834325
type: Answer
upvote count: 0
score: -2
downvote count: 2
answers question: http://stackoverflow.com/q/25395932

http://stackoverflow.com/a/25397737
answers question: http://stackoverflow.com/q/25396846
type: Answer
has body: try this solution: $('td.validationFailed').contents().filter(function() { return this.nodeType == 3 &amp;&amp; this.wholeText.indexOf('*') &gt; -1; }) .remove(); Working Demo Via user3558931
score: 0

http://stackoverflow.com/q/25443420
possible better answer: http://stackoverflow.com/a/25443486
has comment: http://stackoverflow.com/comment/39697591
favorite count: 0
has answer: http://stackoverflow.com/a/25443615
accepted answer: http://stackoverflow.com/a/25443615
tagged with: angularjs
has body: I know it might be insanely easy but being new to angular I do not understand how to load a particular template as soon as the website is opened. I have a template: Which is linked to the following button on the nav bar: Home How can I allow the website to load this particular template as soon as the URL of the website is entered Angular: myApp.config(['$routeProvider', function ($routeProvider, $routeParams) { $routeProvider.when('/home', { templateUrl: 'home.html', controller: 'HomeCtrl' }) }]);
upvote count: 1
has comment: http://stackoverflow.com/comment/39697407
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25443486
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39697654
has comment: http://stackoverflow.com/comment/39697489
has title: How to load a particular page when the website opens in angular js

http://stackoverflow.com/comment/39809516
comment on: http://stackoverflow.com/q/25503142
type: Comment
score: 1
has text: How did you round that it gave you a negative time? Which rounding function did you use?
type: QuestionComment

http://stackoverflow.com/comment/39844613
has text: This is very helpful, thank you. I can fiddle around a bit and see if I can include the special character edits myself.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25522208
type: AnswerComment

textbox
tags question: http://stackoverflow.com/q/25540554
tags question: http://stackoverflow.com/q/25396269
tag name: textbox
type: Tag
tags question: http://stackoverflow.com/q/25408353
tags question: http://stackoverflow.com/q/25455971

http://stackoverflow.com/comment/39825637
score: 1
comment on: http://stackoverflow.com/q/25511708
type: Comment
type: QuestionComment
has text: _"executing the python script in PHP and accessing it over AJAX [..] is too slow"_ How slow? What is your intended response time?

http://stackoverflow.com/comment/39821158
comment on: http://stackoverflow.com/q/25509408
type: Comment
has text: http://www.mccaskill.fmwebd.com/watches/watches-watch-brands/watches-rolex.html This is the page that will display the iframe. And up above, you will see the "Watches" dropdown. Right now I have the dropdown randomizing the 4 Watch Brands. So Rolex's will show up on occasion.
score: 0
type: QuestionComment

http://stackoverflow.com/a/25534353
has body: It is hard to tell exactly what you are trying to do without more code, but the javascript version of the pop-up is below. var actwin=window.open(location,'mywindow', 'width=706,height=630,status=no,location=no,menubar=no,scrollbars=no,resizable=yes'); actwin.focus(); This is some javascript code for a confirmation message. var x=window.confirm("Question?"); if (x){ ///code } else{}
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25532800

http://stackoverflow.com/comment/39866409
has text: the order of attributes doesn't matter. The `//` at the beginnen helps sources work on `http` and on `https`
type: QuestionComment
comment on: http://stackoverflow.com/q/25534409
score: 0
type: Comment

http://stackoverflow.com/q/25529936
has answer: http://stackoverflow.com/a/25531748
tagged with: http://stackoverflow.com/tag/html
has body: I found this code: (result of the script): HTML Each word will be wrapped in a span. A second paragraph here. Word: JAVASCRIPT // wrap words in spans $('p').each(function() { var $this = $(this); $this.html($this.text().replace(/\b(\w+)\b/g, "$1")); }); // bind to each span $('p span').hover( function() { $('#word').text($(this).css('background-color','#ffff66').text()); }, function() { $('#word').text(''); $(this).css('background-color',''); } ); I would like something similar. What I need to do is to obtain the same result but instead of highlighting the word (span tag) under the cursor I need to highlight a word (span tag) given the coordinates in pixels. Does anyone know if this is possible and how can I do it? Or is there another way? Thank you!
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39859082
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39859667
has answer: http://stackoverflow.com/a/25532627
score: 1
has comment: http://stackoverflow.com/comment/39859549
tagged with: coordinates
type: Question
tagged with: javascript
tagged with: jquery
has title: how to highlight a word given coordinates
has comment: http://stackoverflow.com/comment/39858469
answer count: 2

http://stackoverflow.com/comment/39698267
has text: session_start() should be used in every page using SESSION
score: 0
comment on: http://stackoverflow.com/q/25443895
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25414285
has comment: http://stackoverflow.com/comment/39644739
has body: You don't want to do this for every a element on your page, so I suggest you add a selector to the code below where appropriate. The following code uses your selector, and replaces ( with &lt;br&gt;(. Very simple. $( "a:contains('(')" ).each(function() { jQuery(this).html( jQuery(this).html().replace('(', '&lt;br&gt;(') ); });
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25414226
upvote count: 2
has comment: http://stackoverflow.com/comment/39644622

http://stackoverflow.com/comment/39891493
type: QuestionComment
comment on: http://stackoverflow.com/q/25548173
score: 1
has text: Sure, keep a reference to the marker and update its cordinates.
type: Comment

http://stackoverflow.com/comment/39880021
has text: Why are you looping through all of the cells to get at just one of them?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25541164
type: Comment

http://stackoverflow.com/comment/39678482
type: Comment
type: QuestionComment
score: 0
has text: @JennyTong I just edited space above with the code for setting the priority. Also, I tried getting the priority. I'm new to AngularFire and Firebase ( about a week or two), so please forgive if i totally messed up in getting the priority.
comment on: http://stackoverflow.com/q/25428069

http://stackoverflow.com/comment/39626966
has text: Nope. Not a single one.
comment on: http://stackoverflow.com/a/25392904
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25689392
has comment: http://stackoverflow.com/comment/40184675
score: 0
type: Answer
has body: I don't think there's a way for selecting which camera to use directly from the BarcodeScanner plugin. The way I resolved this issue was to edit the ZXING library that this plugin uses for the scanning functionality. Unfortunately, the ZXING library that comes when you install the BarcodeScanner plugin is already compiled so you can't edit any of the files. Please make a backup of your Android project before you make any changes. This is how I got my app to use the front facing camera: The first thing you need to do is to download the BarCodeScanner library from GitHub (https://github.com/wildabeast/BarcodeScanner), the Android ZXING library is located under the /src/android/LibraryProject/src directory. Next, delete the current ZXING library your Android project is using, in my case it was under the "Android Private Libraries" (please note the name of your package as you will need it for the next step) Next copy into your project libraries the ZXING library you downloaded and make sure to name it the same as the one you deleted in the previous step Once the library has been imported, you only need to change one line of code for your project to use the front facing camera. The file is in the package com.google.zxing.client.android.camera.open and in my case it was named "GingerbreadOpenCameraInterface.java". There is an if statement around line 48: if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK) Simply change the "CAMERA_FACING_BACK" to "CAMERA_FACING_FRONT" and your application should use the front facing camera by default. If you get any errors related to the lines containing "import com.google.xzing.client.android.R" just commented them out and the errors should go away.
has comment: http://stackoverflow.com/comment/40175846
answers question: http://stackoverflow.com/q/25488284
has comment: http://stackoverflow.com/comment/40195835
has comment: http://stackoverflow.com/comment/40194951

http://stackoverflow.com/comment/39651762
has text: I asked what happens if you put the alert inside `RaiseEvent`.
comment on: http://stackoverflow.com/q/25418334
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39704424
score: 0
type: AnswerComment
has text: Hi there @Notável, this helped a HUGE amount, and really I modified it a little for further reuse. I declared `latitude`, and `longitude` outside the function so that the values can be passed around a bit easier, and thn created a position variable `var myPOS = new google.maps.LatLng(latitude, longitude)` and then reused myPOS in the map options.
type: Comment
comment on: http://stackoverflow.com/a/25429139

http://stackoverflow.com/a/25533672
accepted answer of: http://stackoverflow.com/q/25523161
type: Answer
answers question: http://stackoverflow.com/q/25523161
has body: In the edge version of underscore (on github), reject has this behaviour as of #1582. This does essentially the same as below (delegates to matches). This is currently in the controversial 1.7 release (the release may be removed) _.reject(arr, {id: 2}); // =&gt; [{id:1}, {id:3}] In previous versions this is possible via matches _.reject(arr, _.matches({id: 2})); // =&gt; [{id:1}, {id:3}]
has comment: http://stackoverflow.com/comment/87870181
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25547634
type: Answer
has comment: http://stackoverflow.com/comment/39890599
downvote count: 2
upvote count: 1
score: -1
answers question: http://stackoverflow.com/q/25547567
has body: a = "1/2/3" a =a.split("/").join("")
has comment: http://stackoverflow.com/comment/39890184
has comment: http://stackoverflow.com/comment/39890213

http://stackoverflow.com/comment/39821173
score: 0
has text: If you don't need the handler you can remove it: `$(window).off('resize');`
type: Comment
comment on: http://stackoverflow.com/a/25508583
type: AnswerComment

http://stackoverflow.com/comment/39864973
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25533569
has text: the content is returned from the previous function. that function returns the content (the information for the added file) to prepend onto the list of current files, and then calls this function to make the new file active

http://stackoverflow.com/a/25453619
answers question: http://stackoverflow.com/q/25408005
downvote count: 0
score: 1
has body: Here is the solution. Add a time variable to the request: params: { 'foobar': new Date().getTime() } .factory('Clients', ['$resource', function ($resource) { return $resource(pathApi, {}, { query: { method: 'GET', isArray: false, params: { 'foobar': new Date().getTime() } } }); }])
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25408005
type: Answer

http://stackoverflow.com/q/25496199
type: Question
has comment: http://stackoverflow.com/comment/39796480
has title: JS alert when n objects are placed in container
has body: My Javascript is pretty basic and I'm hoping someone can put me on the right path. I'm only building a prototype, so basic is better. (I'm not looking to use jQuery in this project) Question: I have some drag and drop functionality and I want to create a warning when too many objects are dragged into the container. I don't want the container itself to be limited with max objects, I want to create some tool-tips for the following examples. Example 1 (need more): // alert "I recommend two more objects" Example 2 (need less): // alert "Warning: 4 objects is a full list" EDIT: Example code from library I'm using. Can I use this? rd.event.dropped = function () { // message text var msg; // if the DIV element was placed on allowed cell then if (rd.td.target.className.indexOf(rd.mark.exception[rd.obj.id]) !== -1) { // make it a unmovable rd.enableDrag(false, rd.obj); // increase counter num++; // prepare and display message if (num < 6) { msg = 'Number of successfully placed elements: ' + num; } else { msg = 'Well done!'; } document.getElementById('message').innerHTML = msg; } };
tagged with: javascript
score: 0
tagged with: max
answer count: 1
tagged with: drag-and-drop
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39796558
has answer: http://stackoverflow.com/a/25496271
tagged with: alert

http://stackoverflow.com/comment/39869613
score: 0
comment on: http://stackoverflow.com/q/25534638
type: Comment
type: QuestionComment
has text: Then, yes, my technique below should work for you.

http://stackoverflow.com/comment/39848308
type: AnswerComment
type: Comment
has text: @Leo have a look to this to see the difference: http://stackoverflow.com/a/25179299/827168
comment on: http://stackoverflow.com/a/25524396
score: 0

http://stackoverflow.com/comment/39734504
type: Comment
type: QuestionComment
has text: can't you do something like `$("#home").height($(window).height()-$("header").height()-$("footer").height())`?
comment on: http://stackoverflow.com/q/25461877
score: 0

http://stackoverflow.com/comment/39658252
type: Comment
comment on: http://stackoverflow.com/a/25422158
score: 0
type: AnswerComment
has text: @ChathuraLakmal..try using innerhtml instead of value

http://stackoverflow.com/comment/39834002
comment on: http://stackoverflow.com/q/25516139
score: 0
type: QuestionComment
has text: really I am a beginner to developemnt..!
type: Comment

http://stackoverflow.com/comment/39663413
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25424279
score: 0
has text: @voodoosnares if your code doesn't have thousands of lines, you can create fiddle with full code, because otherwise it's impossible to figure out what is wrong with you code.

http://stackoverflow.com/a/25430820
score: 0
type: Answer
has body: (^[A-Z]{2}\d+$)|(^K[1-2]E\d+$) This should work.
answers question: http://stackoverflow.com/q/25430748

http://stackoverflow.com/comment/39857679
has text: Thank you! This is precisely what I'm looking for.
type: Comment
comment on: http://stackoverflow.com/a/25525545
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39638845
comment on: http://stackoverflow.com/a/25411301
type: Comment
score: 0
type: AnswerComment
has text: actually, when i concole.log(_self), it shows the function itself, not a prototype object.

http://stackoverflow.com/comment/39839367
comment on: http://stackoverflow.com/a/25519296
type: Comment
score: 0
type: AnswerComment
has text: Ok, so lets go with each element has a class of item. The CSS in your answer would remove the border bottom from ALL items, not just the ones at the bottom of the column. There is no class that exists for items at the bottom of the column so will need to write some javascript to add an a class to the items at the bottom of the column. That's what I'm asking if anyone knows how to do.

http://stackoverflow.com/a/25483683
accepted answer of: http://stackoverflow.com/q/25483501
answers question: http://stackoverflow.com/q/25483501
type: Answer
downvote count: 0
score: 6
has body: You are doing it right.. Just add &lt;div id="overlay"&gt;&lt;/div&gt; in body somewhere. Add your required style in stylesheet. In toastr.options.onShown callback, add show overlay $("#overlay").show(); and in toastr.options.onHidden callback hide it.. $("#overlay").hide(); Toaster has id toast-container which has z-index 999999. So in order to move overlay below toastr, set z-index below 999999.. Which is the default case in your stylesheet.. You should be good to go :-)
upvote count: 6
has comment: http://stackoverflow.com/comment/57171764
type: AcceptedAnswer

http://stackoverflow.com/comment/39807165
has text: Thank you. I get "Uncaught RangeError: Maximum call stack size exceeded". Btw. in line 3 you should repleace msg with el.
type: Comment
comment on: http://stackoverflow.com/a/25502090
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39638048
score: 0
has text: Note that the "show/hide" functionality could be accomplished in the template with good old fashioned ngShow wrapping each child node.
type: Comment
comment on: http://stackoverflow.com/a/25411083
type: AnswerComment

http://stackoverflow.com/comment/39895159
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25549709
has text: A quick google search shows up this: http://stackoverflow.com/questions/6522484/google-maps-v3-check-if-point-exists-in-polygon which brings me to this: https://github.com/tparkin/Google-Maps-Point-in-Polygon I suggest you calculate an array of points around the circle and use the above plugin to see if they're inside the polygon using a forloop. I know it's not an answer but I hope this helps
type: Comment

http://stackoverflow.com/comment/40440669
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25639331
has text: @Nouphal.M It is valid, and it is working, http://jsfiddle.net/8nqk6qrr/. Also If you can't make it work I use a [gist](https://rawgit.com/eguneys/4223852de054ff356862/raw/5db030c5b67aa7fb141cf17557a67af60b3bfcf8/typeahead.bundle.js), try it in your jsfiddle and it will work. You could've just told me that before, and I am looking forward for that bounty.

http://stackoverflow.com/a/25408297
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25408080
score: 1
answers question: http://stackoverflow.com/q/25408080
has body: In your .replaceWith function, you are doing $('.more-required').html(). .html will return the html of the first element in the stack, so "Field 1" in your case. You can use a function inside .replaceWith and benefit from the this keyword : $('.more-required').replaceWith(function(){ return $(this).html() + asterisk; });

http://stackoverflow.com/comment/39606019
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25393331
has text: @JeremyJStarcher, I see. Doesn't it still make sense to declare a variable at the top before going into the if blocks, if the variable is scoped and used throughout the function?
type: Comment

http://stackoverflow.com/q/25413067
type: Question
score: 0
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26185028
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25672771
tagged with: dojox.grid
tagged with: dojo.gridx
has title: Adding cell Tooltip that has values of cells on the same row
tagged with: dojo
tagged with: dgrid
has answer: http://stackoverflow.com/a/25755947
has body: Using Dojo 1.9.3 and Gridx version 1.0. (Declarative&Programmatic) I'm stuck trying to add a tooltip over each username cell in my UName Column that will show values for Last and First name in that row. PURPOSE: I'd like to hide the First & Last Name column to create space. Smart right? Well, if I only knew how. I am learning JS and dojo as I move along. So far Grid is populating and Buttons are working fine. Quick fiddle: http://jsfiddle.net/ysabz/17v7po76/ userColumns = [ {id:'uuid', field: 'uuid', name: 'User UUID', width: 'auto'}, {id:'user_name', field: 'user_name', name: 'UName', width: '7%', **// I think I need to add a function call that will get the row Index with mouseOver etc..Just not sure how to go about dong this.** }, {id:'first_name', field: 'first_name', name: 'FName', width: '0px'}, {id:'last_name', field: 'last_name', name: 'LName', width: '0px'}, {id:'start_date', field: 'start_date', name: 'Start', width: '0px'}, {id:'end_date', field: 'end_date', name: 'End', width: '10%'}, {id:'subj_info', field: 'subj_info', name: 'Subject Info', width: 'auto'}, {id:'issuer_info', field: 'issuer_info', name: 'Issuer Info',width: 'auto'}, {id:'UpdateBtn', field: 'action', name: '', width: '6%', widgetsInCell: true, decorator: function(){ return " Update "; }, // setCellValue call etc.... );}}], userGrid = new Grid({ id: 'userGrid', cacheClass: Cache, store: userStore, structure: userColumns, modules: [Resizer, Sort, Pagination, Filter, Bar, "gridx/modules/CellWidget", "gridx/modules/Edit", "gridx/modules/select/Row", "gridx/modules/select/Cell", ]}, 'usersNode'),

http://stackoverflow.com/q/25523693
has comment: http://stackoverflow.com/comment/39846944
answer count: 0
type: Question
has body: I want to know when a user clicks on my textarea. Using the following code: document.getElementById("boxtextarea").onclick = function (e) { alert('clicked'); } Works fine in all browsers except for safari on iOS. Any ideas how to capture when a user enters / leaves the textarea?
tagged with: javascript
has title: iOS onclick not firing
has comment: http://stackoverflow.com/comment/39847418
has comment: http://stackoverflow.com/comment/39847668
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39847684
has comment: http://stackoverflow.com/comment/39847217
has comment: http://stackoverflow.com/comment/39847432

http://stackoverflow.com/comment/39879771
score: 0
has text: Okay problem solved. My Typescript had not compiled to Javascript correctly after I made some changes. Thanks for the answer about the value returned.
type: Comment
comment on: http://stackoverflow.com/a/25541518
type: AnswerComment

http://stackoverflow.com/comment/39697718
type: Comment
has text: @Wishy , I agree with you, but only part of my application is in Ember. The other part which is depends on other modules are in jQuery. So I am not in a situation to migrate all the code to Ember.
comment on: http://stackoverflow.com/q/25441563
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39687208
comment on: http://stackoverflow.com/a/25436848
has text: I didn't specify that the text field would also be receiving non decimal input as well. 12000 12,000 12.000...all translate to 12000
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39677968
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25432441
type: Comment
has text: no the extension already has launched and it has users installed it, so i won't change it code i want to write a code on my website to make it work on

http://stackoverflow.com/a/25484415
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/79948524
has comment: http://stackoverflow.com/comment/39774541
has body: You're asking 2 separate questions: (1) send canvas data to server, (2) send email. Question 2 is everywhere on the internet. Question 1 can be solved as below: HTML: &lt;canvas id="myCanvas" width="800" height="450"&gt;&lt;/canvas&gt; JS: //get base64 data var canvas = $("#myCanvas").get(0); var data = canvas.toDataURL(); //send to server var request = $.ajax({ type: "POST", url: "canvas-data-receiver.php", data: { base64Data:data } }); request.done(function(response) { alert("Data posted to server!"); }); request.fail(function(){ alert("Failed to send data to server!"); });
answers question: http://stackoverflow.com/q/25484085
downvote count: 0
type: Answer

http://stackoverflow.com/q/25512943
tagged with: javascript
type: Question
score: 0
has title: automaticlly running your JavaScript against someone else's site (in your browser only)
has comment: http://stackoverflow.com/comment/39827566
has body: I've written some custom analytics JS code. Nothing too fancy, mostly for learning purposes. Now I'm testing it against sites that I have no server level access to like banks, airlines, etc. of course running in my browser only. I'm just copying and pasting the code in console, the having the script output the collected analytics data to the console. Its getting annoying copying and pasting, and having to redo it when i navigate to a new page, site, etc. Is there a way to get Firefox or Chrome to automatically inject my script in to any site i visit. Does anyone know of a tool that does this, plugin or extension? I suppose i could try to write an extension myself but figured i'd ask to see if anyone knows of any existing tools to do such a thing. thanks in advance
has comment: http://stackoverflow.com/comment/39828177
answer count: 0
type: UnansweredQuestion
tagged with: testing

http://stackoverflow.com/comment/39843323
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25521579
has text: What's that to do with Facebook? It seems to be an issue with neo4j which seems not to have a _connect_ method. https://github.com/thingdom/node-neo4j
score: 0

http://stackoverflow.com/a/25489742
score: 0
has comment: http://stackoverflow.com/comment/39785966
answers question: http://stackoverflow.com/q/25489412
type: Answer
has body: I seemed to have solved this issue by changing the href tag to say href='#'

http://stackoverflow.com/a/25442611
score: 5
downvote count: 0
answers question: http://stackoverflow.com/q/25442566
type: Answer
has body: This will work for you Filter _.filter(arr,function (value) { return value!==null; }) Reject _.reject(arr,function (value) { return value===null; })
upvote count: 5
has comment: http://stackoverflow.com/comment/54484669

http://stackoverflow.com/comment/39690287
type: AnswerComment
comment on: http://stackoverflow.com/a/25414908
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59781/discussion-between-user3796151-and-fpscolton).
score: 0

http://stackoverflow.com/a/46088960
downvote count: 0
type: Answer
has body: Why not? No reason, it just hadn't been done. And here in 2017, it has been done in ES2017: async functions can use await to wait, non-blocking, for the result of a promise. You can write your code like this if getSomething returns a promise (note the await) and if this is inside an async function: try { var foo = await getSomething(); var bar = doSomething(foo); console.log(bar); } catch (error) { console.error(error); } (I've assumed there that you only intended getSomething to be asynchronous, but they both could be.) Live Example (requires up-to-date browser like recent Chrome): function getSomething() { return new Promise((resolve, reject) =&gt; { setTimeout(() =&gt; { if (Math.random() &lt; 0.5) { reject(new Error("failed")); } else { resolve(Math.floor(Math.random() * 100)); } }, 200); }); } function doSomething(x) { return x * 2; } (async () =&gt; { try { var foo = await getSomething(); console.log("foo:", foo); var bar = doSomething(foo); console.log("bar:", bar); } catch (error) { console.error(error); } })(); The first promise fails half the time, so click Run repeatedly to see both failure and success. You've tagged your question with NodeJS. If you wrap the Node API in promises (for instance, with promisify), you can write nice straight-forward synchronous-looking code that runs asynchronously.
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25446353
has comment: http://stackoverflow.com/comment/79391567
answers question: http://stackoverflow.com/q/25446353
type: AcceptedAnswer

http://stackoverflow.com/comment/39725712
type: Comment
has text: Drop your contact no. 'll call you and help you...!!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25458087

http://stackoverflow.com/a/25393462
has body: Replace your slideUp/down with slideToggle Here: http://jsfiddle.net/8nLvh1ez/ //Set default open/close settings $('.acc_container').hide(); //Hide/close all containers //On Click $('.acc_trigger').click(function () { if ($(this).next().is(':hidden')) { //If immediate next container is closed... $('.acc_trigger').removeClass('active').next().slideToggle(); //Remove all .acc_trigger classes and slide up the immediate next container $(this).toggleClass('active').next().slideToggle(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container } return false; //Prevent the browser jump to the link anchor });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25393363

http://stackoverflow.com/comment/39696566
score: 0
type: Comment
type: QuestionComment
has text: This might help you: http://api.jquery.com/jquery.unique/
comment on: http://stackoverflow.com/q/25442744

http://stackoverflow.com/comment/39616191
comment on: http://stackoverflow.com/q/25399495
type: Comment
type: QuestionComment
score: 2
has text: Images and resources probably haven't loaded yet. Replace `document.ready` with `$(window).on('load')` instead

http://stackoverflow.com/comment/39708387
comment on: http://stackoverflow.com/q/25449246
type: Comment
type: QuestionComment
has text: @Douglas I'm not sure what browser RAD is based upon. The default browser is shown a 'Internal browser'.
score: 0

http://stackoverflow.com/comment/80930416
has text: I was getting the same error, and switched to OAUTH 1.0. It works now.
type: Comment
comment on: http://stackoverflow.com/a/25476467
score: 0
type: AnswerComment

http://stackoverflow.com/a/25418972
has comment: http://stackoverflow.com/comment/39664007
type: Answer
has body: This happens because getJSON is asynchronous function. You may use $.ajax with async: false instead of getJSON, like: $.ajax({ dataType: "json", url: loadUrl, async: false, success: function(response) { ... } }); But I would suggest to use callback instead, like: var str =''; function myFormatter(cellvalue, options, rowObject, callback) { if(rowObject.name== 'test'){ $.getJSON(loadUrl, function(jsnResponse) { if(typeof(callback) === 'function'){ callback(jsnResponse.address); } }); } else { str = 'No value'; } return str; } And then call it like: myFormatter('...', '...', rowObject, function(str) { // Here you will receive the value asynchronously. });
accepted answer of: http://stackoverflow.com/q/25418942
answers question: http://stackoverflow.com/q/25418942
type: AcceptedAnswer
score: 0

http://stackoverflow.com/q/25394608
has comment: http://stackoverflow.com/comment/39607730
has comment: http://stackoverflow.com/comment/39608193
has comment: http://stackoverflow.com/comment/39607910
has body: I have recently built a feature on our web application that uses AngularJS and I am having some issues with IE 11 not properly $apply()ing data changes to the DOM. For some reason this only occurs sometimes and never occurs when I try to debug the problem which makes it seem like a timing issue. Here is the function that gets called when the problem occurs. $scope.createThrottling = function (sources) { MYAPP.modals.Throttling('New', sources, API, function () { $scope.isLoading = true; $scope.$apply(); API.Migrations.getThrottles({ id: jQuery.getUrlVar('id') }, function (data) { $scope.Throttles = data.Throttles; $scope.isLoading = false; // THE PROBLEM IS RIGHT HERE }); }); } The comment above shows where the problem seems to be stemming from. At this point in the execution of the code, Angular should automatically be checking for a change in $scope.Throttling and then make a change to the DOM accordingly, however, for some reason in IE 11, on the first visit to the page the binding is not occurring. Subsequent refreshes of the page cause the binding to work however which seems very strange. It is as if $scope.$apply() is needed after API.Migrations.getThrottles is finished, but I cannot do that because Angular throws a JS error saying that it is already digesting. Some things to note: This only happens in IE This only happens on the first visit to a page per load of the browser (I can hit F5 and try the same exact thing and it will work) Could this be occurring because my API.Migrations.getThrottles call is inside a callback function for the MYAPP.modals.Throttling module which is outside of Angular completely? When I try to debug the JS function above, everything works just fine which makes it seem like a timing issue Any help to finding out what is causing this bug would be much appreciated! Thanks
has comment: http://stackoverflow.com/comment/39607679
has answer: http://stackoverflow.com/a/29955495
has comment: http://stackoverflow.com/comment/39607981
has comment: http://stackoverflow.com/comment/39607549
type: Question
score: 5
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/39607747
upvote count: 5
has answer: http://stackoverflow.com/a/25395298
tagged with: javascript
has title: 2 way data binding issue using IE 11 with AngularJS
has comment: http://stackoverflow.com/comment/39607531
has comment: http://stackoverflow.com/comment/39607905
answer count: 2
has comment: http://stackoverflow.com/comment/39607472
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39608150
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39607643
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39607719

http://stackoverflow.com/comment/39630358
type: Comment
has text: Very interesting, I will get back to you on that. Does each individual link need that bit of jQuery to work, just with the "#newsButton" and "#News" changed out?
comment on: http://stackoverflow.com/a/25407007
type: AnswerComment
score: 0

http://stackoverflow.com/q/25458293
has comment: http://stackoverflow.com/comment/39725954
type: Question
has body: I override paste event on document object, now i want to fire onchange, oninput and other input events in event handler for paste event. document.addEventListener('paste', function (e) { e.preventDefault(); var copiedText = e.clipboardData.getData("text/plain"); if (e.srcElement.type === 'text' || e.srcElement.type === 'textarea') { var startPosition = e.srcElement.selectionStart; var endPosition = e.srcElement.selectionEnd; var len = e.srcElement.value.length; var sel = e.srcElement.value.substring(startPosition, endPosition); e.srcElement.value = e.srcElement.value.substring(0, startPosition) + copiedText + e.srcElement.value.substring(endPosition, len); } $(e.srcElement).trigger("change"); $(e.srcElement).trigger("input"); $(e.srcElement).trigger("propertychange"); }); How can I fire change, input or propertychange event for input element? This part of code dose not work. $(e.srcElement).trigger("change"); $(e.srcElement).trigger("input"); $(e.srcElement).trigger("propertychange");
tagged with: javascript
tagged with: onchange
answer count: 1
downvote count: 0
tagged with: events
has answer: http://stackoverflow.com/a/25458411
favorite count: 0
type: UnansweredQuestion
has title: javascript how to fire change or input event in paste event handler
tagged with: paste
score: 1
upvote count: 1

http://stackoverflow.com/q/25542227
possible better answer: http://stackoverflow.com/a/25542475
accepted answer: http://stackoverflow.com/a/25542629
has title: Mobile Safari and Android Chrome don't return correct screen resolution
has answer: http://stackoverflow.com/a/25542475
upvote count: 1
has body: on iPHONE5s(640*1136), mobile safari returns 320*568. window.innerWidth and innerHeight return 981*1409 on Compaq 8 1400(768*1024), Android Chrome returns 768*976.window.innerWidth and innerHeight return 980*1103. 1.How can i correctly detect the correct screen resolution with mobile safari and chrome? 2.Why window.innerWidth and innerHeight return values which are much larger than screen resolution? ===================================
tagged with: dom
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25542629
score: 1
favorite count: 0
type: Question
answer count: 2
tagged with: css

http://stackoverflow.com/a/25565763
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25522694
upvote count: 1
has body: The answers shown at How to test two interacting browsers (e.g. chat app) might be of use if you try to go the Casper/Phantom/SlimerJS route. I'm not marking it as a duplicate as your question is more general, whereas that one is about exactly how to synchronize two CasperJS instances; it is also not specifically about socket.io. Note: if using Phantom to test Web Sockets you will need to get Phantom 2.x (which is still experimental, and does not have an easily downloadable beta yet), as Phantom 1.x uses an old WebKit. SlimerJs always uses a recent Gecko (i.e. Firefox) engine, so is fine. Each instance of PhantomJS can have its own cookies. This answer (and the other answer on that question) explains your choices well. SlimerJS cookies are similar, but persistent cookies are stored in the Mozilla profile, so if you wanted to run multiple instances, you would want to specify an explicit profile for each instance. (Though your chat application may only be using session cookies, in which case this does not matter.) Anyway, as cookies are used I would definitely run two instances of CasperJS, rather than try to use two tabs, or two frames.
type: Answer

http://stackoverflow.com/comment/39715867
has text: You mean you want it to end up like `D`? Just add `.attr("id", "whateverValueYouWant")` after `.addClass("active")`. As a reminder, be careful to make sure your ID's are always unique.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25434278

http://stackoverflow.com/comment/39831718
comment on: http://stackoverflow.com/a/25501844
type: Comment
has text: @KraigBrockschmidt-MSFT right about the WinRT async operations. Now, do you have a solution to the problem? Checked your book already of course ;)
score: 0
type: AnswerComment

http://stackoverflow.com/q/25446401
accepted answer: http://stackoverflow.com/a/25454016
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39708180
tagged with: javascript
answer count: 1
downvote count: 0
has body: Many subdomains are forwarded to subdomain X where my meteor app is working. I'm using code which doesn't work: WebApp.connectHandlers.use(function(req, res, next) { console.log(req.connection.domain); // is null console.log(req.server.domain); // is null next(); }); Trying also to use IronRouter on server: Router.map(function () { this.route('testRoute', { where: 'server', path: '*', action: function () { console.log(this.request.connection.domain); // null } }); }); I know that FastRender injects headers and it works , but the question is : How can I get subdomain from which user accesses meteor app using WebApp.connectHandlers or IronRouter ?
tagged with: meteor
favorite count: 0
has answer: http://stackoverflow.com/a/25454016
type: AnsweredQuestion
has title: Multiple subdomains connected to meteor app
score: 1

http://stackoverflow.com/comment/39803828
comment on: http://stackoverflow.com/q/25500316
type: Comment
type: QuestionComment
has text: Since objects (dictionaries) in javascript has no order, sorting such a thing makes no sense. As such I'd strongly suggest you change the title to "How do I get the top 5 biggest values" to avoid people closing this question.
score: 1

http://stackoverflow.com/comment/39598787
has text: GET [BOOTSTRAP](http://getbootstrap.com/) ;)
comment on: http://stackoverflow.com/q/25390022
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/49174091
type: AnswerComment
score: 0
has text: Also, it will not create a new property if the inherited one is a setter.
type: Comment
comment on: http://stackoverflow.com/a/25450810

http://stackoverflow.com/q/25503032
tagged with: coffeescript
answer count: 1
tagged with: javascript
has body: getValue = ( url, callback) -&gt; $.getJSON url, (json) -&gt; value = json.last callback value $(window).load -&gt; btsx_btc = getValue "http://data.bter.com/api/1/ticker/btsx_btc", (data) -&gt; $('#v_btsx_btc').html data btc_usd = getValue "http://data.bter.com/api/1/ticker/btc_usd", (data) -&gt; $('#v_btc_usd').html data $('#v_btsx_usd').html btsx_btc*btc_usd I'm pretty new to JavaScript and Coffeescript. I can succesfully retrieve 2 values (btsx_btc &amp; btsc_USD). I want to multiply those 2 variables and show it in the middle one. But its not working, the console is not showing any errors. I presume that the 2 variables are empty somehow. I hope you guys can help This is the output javascript (function() { var getValue; getValue = function(url, callback) { return $.getJSON(url, function(json) { var value; value = json.last; return callback(value); }); }; $(window).load(function() { var btc_usd, btsx_btc; btsx_btc = getValue("http://data.bter.com/api/1/ticker/btsx_btc", function(data) { return $('#v_btsx_btc').html(data); }); btc_usd = getValue("http://data.bter.com/api/1/ticker/btc_usd", function(data) { return $('#v_btc_usd').html(data); }); return $('#v_btsx_usd').html(btsx_btc * btc_usd); }); }).call(this);
score: 0
accepted answer: http://stackoverflow.com/a/25503137
linked to: http://stackoverflow.com/q/14220321
has answer: http://stackoverflow.com/a/25503137
type: Question
has title: Multiply variables retrieved from API
type: AnsweredQuestion

http://stackoverflow.com/comment/39635132
type: AnswerComment
has text: Images for clarity: The error: http://i.imgur.com/8ySmAxX.png The object contents: http://i.imgur.com/NVrolxT.png
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25409526

http://stackoverflow.com/a/25475625
score: 0
answers question: http://stackoverflow.com/q/25475543
type: Answer
has body: What you're asking for is not possible without a function. What you want to do is this: var key = getKey(); //some means of determining a key dynamically var val = getVal(); //some means of determining a value dynamically var obj = {}; obj[key] = val; this.doSomething(obj); What you need is another method that assembles the object based on the dynamic key/value. this.doSomething(_.object(getKey(), getVal()));

http://stackoverflow.com/q/25546747
has comment: http://stackoverflow.com/comment/39889752
has comment: http://stackoverflow.com/comment/39889653
has comment: http://stackoverflow.com/comment/39889912
has comment: http://stackoverflow.com/comment/39888939
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25547637
has comment: http://stackoverflow.com/comment/39890034
has comment: http://stackoverflow.com/comment/39888999
has title: Minification error with django compressor
answer count: 1
has comment: http://stackoverflow.com/comment/39888931
has body: I'm using an automatic minification tool called django compressor. However django compressor minification seems to introduce errors. Updated script with semicolons: Before: var app = angular.module('loginApp', [ "ngRoute", "ngAnimate", "ngTouch", "mobile-angular-ui", "ui.router", "app.factories.storage", "app.controllers.login", "angular-loading-bar" ]); app.config(function ($stateProvider, $urlRouterProvider) { // For any unmatched url, send to /route1 $urlRouterProvider.otherwise("/"); $stateProvider .state('login', { url: "/", templateUrl: "/static/html/profile/login.html", controller: "loginController" }) .state('register', { url: "/register", templateUrl: "/static/html/profile/register.html", controller: "loginController" }); }); After: var app=angular.module("loginApp",["ngRoute","ngAnimate","ngTouch","mobile-angular-ui","ui.router","app.factories.storage","app.controllers.login","angular-loading-bar"]);app.config(function(e,t){t.otherwise("/");e.state("login",{url:"/",templateUrl:"/static/html/profile/login.html",controller:"loginController"}).state("register",{url:"/register",templateUrl:"/static/html/profile/register.html",controller:"loginController"})}) Error: Error: $injector:modulerr Module Error Module 'loginApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. Error URL: <a href="https://docs.angularjs.org/error/$injector/modulerr?p0=loginApp&amp;p1=Error:%20%5B$injector:nomod%5D%20http:%2F%2Ferrors.angularjs.org%2F1.2.19%2F$injector%2Fnomod%3Fp0%3DloginApp%0A%20%20%20%20at%20Error%20(native)%0A%20%20%20%20at%20http:%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.19%2Fangular.min.js:6:450%0A%20%20%20%20at%20http:%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.19%2Fangular.min.js:20:466%0A%20%20%20%20at%20http:%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.19%2Fangular.min.js:21:469%0A%20%20%20%20at%20http…
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39889134
has comment: http://stackoverflow.com/comment/39890119
tagged with: python
has comment: http://stackoverflow.com/comment/39888854
has answer: http://stackoverflow.com/a/25547637
has comment: http://stackoverflow.com/comment/39890275
has comment: http://stackoverflow.com/comment/39890525
type: AnsweredQuestion
score: 0
tagged with: django
has comment: http://stackoverflow.com/comment/39889441
type: Question
has comment: http://stackoverflow.com/comment/39889084

http://stackoverflow.com/q/25442960
has comment: http://stackoverflow.com/comment/39696644
type: UnansweredQuestion
has body: I have a canvas element attached to the body of the document under the View (separate from it). I would like to append that canvas element to a div inside the View. It works on click, but when I put it inside the render function, it doesn't. This is how the code looks like: NOT WORKING: render : function() { var that = this; $(this.el).html(this.template()); $('canvas').appendTo('.container3'); return this; } WORKING: events : { 'click .qgaz': 'blabla' }, blabla : function() { $('canvas').appendTo('.container3'); } Why is this happening and how can I make it work on its own when the page loads? Edit - here goes the complete view: window.printView = Backbone.View.extend({ tagName : 'div', className : 'print-menu-view', initialize : function() { var that = this; // tu wybierz template z templates/main.tpl this.testowaZmienna = "test"; this.template = _.template($("#print-view").html()); console.log(this); return this; }, events : { }, render : function() { var that = this; $(this.el).html(this.template()); $('canvas').appendTo('.container3'); console.log(this); return this; } });
has comment: http://stackoverflow.com/comment/39697626
type: Question
has answer: http://stackoverflow.com/a/25447709
has title: Script works under "click" event but not alone (Backbone.js)
has comment: http://stackoverflow.com/comment/39696578
has comment: http://stackoverflow.com/comment/39704202
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: backbone.js
score: 0
has comment: http://stackoverflow.com/comment/39697135
has comment: http://stackoverflow.com/comment/39696821
has comment: http://stackoverflow.com/comment/39697271
has comment: http://stackoverflow.com/comment/39697452
has comment: http://stackoverflow.com/comment/39703631

http://stackoverflow.com/comment/39696632
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25440695
has text: Suggest you add a nodejs tag? Suggest you use JSON.parse and try and access the resulting elements directly and then sort out the map function, once you are sure it is coming through correctly.
score: 0

http://stackoverflow.com/comment/39637092
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25410318
has text: You're using angular 1.3 beta along with ng-route 1.2. Not sure if this is the issue but you should use the same version.
type: QuestionComment

file
type: Tag
tags question: http://stackoverflow.com/q/25533152
tag name: file
tags question: http://stackoverflow.com/q/25462167
tags question: http://stackoverflow.com/q/25455475
tags question: http://stackoverflow.com/q/25520546

http://stackoverflow.com/comment/39690179
score: 1
type: Comment
type: QuestionComment
has text: So what's your question? Where are you stuck?
comment on: http://stackoverflow.com/q/25439363

http://stackoverflow.com/a/25444407
has comment: http://stackoverflow.com/comment/39729119
type: Answer
has comment: http://stackoverflow.com/comment/39729079
has body: The other answers will help you on here - let me explain them format.js When you use format.js to filter the mime types, opening brackets basically tells Rails that you want to perform some custom functionality (and hence it won't load the [action].js.erb as default) If you want to just invoke [action].js.erb, you'll have to call the following: respond_to do |format| format.js #-&gt; will just call [action].js.erb end You'll want to read up more about Rails mime types (how to determine XHR requests) &amp; the respond_to block @instance_variables Secondly, you need to consider the role of @instance variables in your application, and consequently, the method in question. The main issue you have is you're calling @user in a method which doesn't define it - hence you'll likely see the error undefined method ___ for nil:NilClass or similar You must remember that Rails is just a gem - a series of classes which runs on the Ruby language. This means that each time you wish to perform a method on an "object" / piece of data, you'll have you to declare / create the object in your Rails application: def xyz @user = User.find params[:id] #-&gt; sets the variable for the duration of the "instance" ... end Please take note of the name of the variable -- an instance variable. By setting @user (instance variables are always defined with an @), you basically give Rails the ability to access the data inside it for as long as the class which defines the variable is invoked. Basically means that if you set @user = User.find, it will be available through your view &amp; other helper methods called from the instance of the class Fix Finally, to address your question directly: I want to an ajax request to call user controller's xyz action with the passed parameter stage and then append it on #the_box so that I can perform conditional operation like for stage x append @user.age, for stage y append @user.age+1 and for stage z append @user.age-1. How should I do? #config/routes.rb resources …
downvote count: 0
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/39708816
answers question: http://stackoverflow.com/q/25443273

http://stackoverflow.com/a/25543880
type: AcceptedAnswer
type: Answer
has body: Example: http://jsfiddle.net/t5moz67o/
accepted answer of: http://stackoverflow.com/q/25540260
answers question: http://stackoverflow.com/q/25540260
score: 0

http://stackoverflow.com/comment/39886900
type: Comment
has text: According to the [ASCII Table](http://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/ASCII-Table-wide.svg/1280px-ASCII-Table-wide.svg.png) the displayed buffer's values are correct with theses values. @andrew +1
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25545631

http://stackoverflow.com/q/25492623
has comment: http://stackoverflow.com/comment/39789811
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25492708
tagged with: promise
has comment: http://stackoverflow.com/comment/39790014
has title: Node.js Q Promises Multiple Parameters
upvote count: 3
has comment: http://stackoverflow.com/comment/39789839
has comment: http://stackoverflow.com/comment/39789783
has comment: http://stackoverflow.com/comment/39790210
tagged with: node.js
has answer: http://stackoverflow.com/a/25492708
type: AnsweredQuestion
score: 3
has body: Trying to cleanup my callback spaghetti code using the Q promise library in my nodejs express app, but I'm having trouble translating some parts of it. Having trouble passing multiple arguments to functions and dealing with the scope. Here's a simplified "synchronous" version to show my logic: function updateFacebook(req, res) { var user = getUserFromDB(userid); var profile = getUserProfileFromAPI(accessToken); var success = updateUserDB(user, profile); res.json({ result: success }); } So I convert the callback functions to return promises function getUserFromDB(userid) { var deferred = Q.defer(); // somewhere in here there's a deferred.resolve(user object); queryMongo()... return deferred.promise; } function getUserProfileFromAPI(accessToken) { var deferred = Q.defer(); // somewhere in here there's a deferred.resolve(profile object); request()... return deferred.promise; } function updateUserDB(user, profile) { var deferred = Q.defer(); // somewhere in here there's a deferred.resolve(updated user object); updateMongo()... return deferred.promise; } function handleResponse(res, user) { var deferred = Q.defer(); // was thinking about putting the res.json here // i have no way of passing in the res // and res is out of scope... res.json({}); return deferred.promise; } Now the problem is linking them up, I tried... Q.when(getUserFromDB(userid), getUserProfileFromAPI(accessToken)) .spread(updateUserDB) .done(handleResponse); Q.all([getUserFromDB(userid), getUserProfileFromAPI(accessToken)]) .spread(updateUserDB) .done(handleResponse); Super confused. Any direction would be much appreciated.
type: Question

http://stackoverflow.com/q/25453243
has answer: http://stackoverflow.com/a/25457805
has comment: http://stackoverflow.com/comment/39717019
answer count: 2
has comment: http://stackoverflow.com/comment/39716741
downvote count: 0
has title: Share in-memory objects in Chrome extension content scripts?
tagged with: javascript
favorite count: 0
has body: I am new to both JavaScript and Chrome development, and am trying to create an extension that injects content/CSS in certain web pages. Simple enough, but the catch is that to do so it requires looking through a significant amount of data in local storage. From what I've read so far, the correct way to do this would be either: Reading the required data (JSON serialized) from storage directly from the content script every time the page is visited, or Maintaining the state in the extension background page and transferring the required data (also JSON serialized) to the content script environment using message passing. Either of these approaches, however, would be extremely inefficient due to large amounts of data being needlessly serialized and deserialized on every page load. So, I want to know: Is it in any way possible to maintain a shared memory cache in Chrome that content scripts injected in all tabs can access? If not, is an alternate approach possible where the background page listens for the chrome.tabs.onUpdated event and somehow modifies the target DOM itself?
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/25453295
upvote count: 3
type: UnansweredQuestion
tagged with: google-chrome
type: Question
score: 3
tagged with: google-chrome-devtools

http://stackoverflow.com/comment/39749385
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25471033
has text: Sorry, but I have edited my answer. I don't want to centerize items. I just want to add next to the bottom of first ul.

http://stackoverflow.com/comment/39796330
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25495153
has text: If you put together a fiddle or plunker, it would be a lot easier to help you. It could me any number of things, or just a different way of thinking about the process.
score: 0

http://stackoverflow.com/comment/39841952
type: Comment
type: QuestionComment
score: 2
has text: there are no `id` attributes in teh `div`
comment on: http://stackoverflow.com/q/25520842

http://stackoverflow.com/comment/39892816
type: Comment
comment on: http://stackoverflow.com/a/25514897
score: 0
type: AnswerComment
has text: The controller is for the "view" and not really for the state. You need the view to render for the controller to be invoked. Declaring a controller on a state is identical to declaring the controller on an unnamed view inside that state.

http://stackoverflow.com/comment/39608653
comment on: http://stackoverflow.com/q/25395096
has text: you can make a literal string expression using JSON.stringify(hardCodedChar)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39747818
has text: the problem is, I can't do much modifications inside the iframe (aside from layout, etc) since I just have access to a limited back office. i was thinking about using javascript to use the credentials typed before on my website and do an auto login in the iframe as well. would that be an option?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25469839

http://stackoverflow.com/q/25536162
has answer: http://stackoverflow.com/a/25536406
tagged with: javascript
has answer: http://stackoverflow.com/a/25536359
answer count: 4
has title: print a range of numbers with different colors in JavaScript
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25536406
has comment: http://stackoverflow.com/comment/39870082
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25536276
has body: How should you print a range of numbers with different colors in an HTML page? E.g.: 1-10 red, 11-20 blue. I tried this, but it doesn't work. &lt;html&gt; &lt;body&gt; &lt;script&gt; for(i=0;i&lt;=100;i++) { document.write(i); if(i&gt;30 &amp;&amp; i&lt;50) { document.write(i,'&lt;FONT COLOR="red"&gt;'); } } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
has answer: http://stackoverflow.com/a/25536462
score: 0
has comment: http://stackoverflow.com/comment/39870130
accepted answer: http://stackoverflow.com/a/25536276

http://stackoverflow.com/a/25436890
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39690395
has body: Check the Fiddle example here. the code is a bit messy but the main issue was that when you execute document.getElementsByName("Testing") this gives you a collection of the elements with that name, so you need to iterate them and perform whatever actions you want on each one individually like so: var imgElements = document.getElementsByName("Testing"); for (var i = 0, max = imgElements.length; i &lt; max; i++) { imgElements[i].disabled = false } Other than that you are doing fine.
answers question: http://stackoverflow.com/q/25436556

http://stackoverflow.com/a/25458891
type: Answer
has comment: http://stackoverflow.com/comment/39727034
has comment: http://stackoverflow.com/comment/39727087
has comment: http://stackoverflow.com/comment/39728680
has comment: http://stackoverflow.com/comment/39727081
has comment: http://stackoverflow.com/comment/39727066
has comment: http://stackoverflow.com/comment/39727240
has comment: http://stackoverflow.com/comment/39727053
accepted answer of: http://stackoverflow.com/q/25458806
has comment: http://stackoverflow.com/comment/39727158
answers question: http://stackoverflow.com/q/25458806
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39727121
has comment: http://stackoverflow.com/comment/39727019
has comment: http://stackoverflow.com/comment/39728152
has comment: http://stackoverflow.com/comment/39727112
has comment: http://stackoverflow.com/comment/39727294
has body: This might help you out a bit: for(var i=99; i&gt;0; i--){ document.getElementById("output").innerHTML += i + "Bottles on the wall take one down, pass it around." + "&lt;br&gt;"; } http://jsfiddle.net/a0knrxzs/ EDIT: We don't need a while loop, a for loop will just stop when it is no longer greater than 0. While loops are for stopping the loop after a something has been changed.

http://stackoverflow.com/q/25530576
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ember.js
possible better answer: http://stackoverflow.com/a/49265840
upvote count: 6
has title: Ember.JS Integration Testing Issues with andThen and click helpers
score: 6
has answer: http://stackoverflow.com/a/49265840
has answer: http://stackoverflow.com/a/25531067
accepted answer: http://stackoverflow.com/a/25531067
type: AnsweredQuestion
has body: I'm getting odd results with Ember's test helpers andThen and click. According to Ember's documentation: the andThen helper will wait for all preceding asynchronous helpers to complete prior to progressing forward. However, I'm finding this doesn't always seem to be the case. In the example below, there are 3 console.debug statements. I would expect them to be logged in the order A -> B -> C. Yet I consistently get this order: A -> C -> B. I can only get the expected ABC order when I use only 1 of the two click helpers. There are no event listeners (actions) associated with the &lt;div&gt; element referenced within the click helpers. Can anyone explain this unexpected behavior? Is there an error in my usage of the helpers? Or a bug with Ember's testing framework? andThen(function() { console.debug('mark A'); click('div:first'); // with just 1 click helper, debug order is ABC click('div:first'); // with this second click helper, debug order is ACB andThen(function() { console.debug('mark B'); }); }); andThen(function() { console.debug('mark C'); }); Edit: Based on the answer given by Kingpin2k, I ended up pursuing the following solution to get at the testing style I was seeking. First, I created an asynchronous test helper named next. Second, I replaced all the andThen helpers in my code with the custom next helpers. This allowed my code to run in the order I was expecting. // test-helper.js Ember.Test.registerAsyncHelper('next', function(app, fn) { fn(); }); // my-integration-test.js next(function() { console.debug('mark A'); click('div:first'); click('div:first'); next(function() { console.debug('mark B'); }); }); next(function() { console.debug('mark C'); });
tagged with: integration-testing
type: Question

http://stackoverflow.com/q/25454501
has title: JavaScript trigger multiple events but handle once
upvote count: 1
tagged with: eventtrigger
has body: I don't know if I'm the first one to hit this issue and not wanting to move on but it seems to me that it should have been experienced by others. Also, don't mind the code because I'm writing it up for this example. The actual application is similar in idea. Let's say you have the following object that controls a certain model: var model = $({ name: 'user', age: 30, sex: 'male' }); model.on( 'namechange agechange sexchange', function ( event ) { console.log( 'Model experienced a ' + event.type ); }); model.triggerHandler( 'namechange' ); The output of the above code would be Model experienced a namechange. If I wanted to trigger multiple events, the code would look like: model.triggerHandler( 'namechange' ); model.triggerHandler( 'agechange' ); model.triggerHandler( 'sexchange' ); And the output would be repeated accordingly. But what I really want is to have the handler be triggered once when the trigger method triggers one or more of the events to which the handler is bound. model.triggerHandler( 'namechange agechange' ); // hander is bound to both but called once model.triggerHandler( 'agechange' ); // hander is bound to one and called once model.triggerHandler( 'namechange carchange agechange' ); // hander is bound to two of the three but called once I do understand the technical limitations due to the way even subscription works. The implementation would have to figure out who is subscribed to all of those events, join the result, and post the event. More so, event.type is not designed to represent a single event name. Yet I am convinced that there are use cases for such requirements. In my case, it is a dynamic metrics widget dashboard. There is a metrics structure that represents various metrics. Different metrics update on different intervals. Different widgets rely on multiple metrics. When a metric(s) are fetched from the server, I want to trigger an event for each metric change. Widgets will refresh their data. However, I don't want a widget that relies o…
score: 1
has answer: http://stackoverflow.com/a/41679879
has comment: http://stackoverflow.com/comment/39719706
type: Question
has comment: http://stackoverflow.com/comment/39720260
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: event-handling
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25455324
tagged with: events
type: UnansweredQuestion

http://stackoverflow.com/q/25452107
downvote count: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25452722
favorite count: 0
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25452722
upvote count: 1
type: Question
has title: window.getSelection() to select text only within class
tagged with: javascript
has body: I have contenteditable=true div, where user enters his feedback and I want to allow him change the text color of selected text written in div when user clicks on colorpalate. I have full code to do my task of changing the color of selected text with user desired color. But... Everthing else on the page can be selected and changed its colour too, which I want to prevent. I want to allow change the colour only for class="comment". Just can't understand how to do that with below code. if (window.getSelection) { // all browsers, except IE before version 9 var selectionRange = window.getSelection (); if (selectionRange.isCollapsed) { alert ("Please select some content first!"); } else { //do the stuff } } Thanks for help
has comment: http://stackoverflow.com/comment/39713785

http://stackoverflow.com/q/25423569
has comment: http://stackoverflow.com/comment/39660907
has title: Cannot Compare The Array Value If It is Number or not
favorite count: 0
has answer: http://stackoverflow.com/a/25423973
has comment: http://stackoverflow.com/comment/39661085
upvote count: 1
tagged with: windows-store-apps
type: AnsweredQuestion
score: 1
has body: I am trying to create a Windows Store App and I am not able to compare the array element. Thing is I don't want the string to be compared but it is doing so. Below is the code of the comparison :- function sort() { var ar = NumList.value; var flag=0; var arr = ar.split(","); for (var i = 0; i &lt; arr.length; i++) { if (typeof (+arr[i]) === 'number') flag = 0; else flag++; } if (flag == 0) { InsertionSort(); QuickSort(); MergeSort(); SelectionSort(); BubbleSort(); } else { error.showAsync(); } } Even if there is a string element in the Array, it is going ahead and still sorting the element. Can anyone help me out here?
accepted answer: http://stackoverflow.com/a/25423973
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39660833
has comment: http://stackoverflow.com/comment/39661051

http://stackoverflow.com/a/25490216
has body: Try HipHop. I don't use Windows any longer, but take a look at Cameyo or search the web for a simmelar solution. Install there an small webserver, PHP and Mysql and add your script. Negative on your solution is that this will take a LOT of space (probobly ~100MB).
score: -1
answers question: http://stackoverflow.com/q/25490000
upvote count: 0
type: Answer
downvote count: 1

http
tags question: http://stackoverflow.com/q/25390668
tags question: http://stackoverflow.com/q/25395119
tags question: http://stackoverflow.com/q/25485455
tags question: http://stackoverflow.com/q/25415202
tags question: http://stackoverflow.com/q/25509720
tags question: http://stackoverflow.com/q/25480895
tags question: http://stackoverflow.com/q/25544620
tags question: http://stackoverflow.com/q/25455475
tags question: http://stackoverflow.com/q/25437740
tags question: http://stackoverflow.com/q/25486606
tags question: http://stackoverflow.com/q/25495730
tag name: http
tags question: http://stackoverflow.com/q/25514507
tags question: http://stackoverflow.com/q/25415026
tags question: http://stackoverflow.com/q/25445654
tags question: http://stackoverflow.com/q/25521552
tags question: http://stackoverflow.com/q/25405762
tags question: http://stackoverflow.com/q/25499278
tags question: http://stackoverflow.com/q/25455573
type: Tag
tags question: http://stackoverflow.com/q/25435338
tags question: http://stackoverflow.com/q/25549373
tags question: http://stackoverflow.com/q/25474346
tags question: http://stackoverflow.com/q/25525477

http://stackoverflow.com/comment/39871035
has text: @User5131231 if your service does not support JSONP (looks like it does not), then you can't get it working from JSFiddle. It should work once you copy your page up to the same server `unikabutiker.nu` though.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25536364
type: Comment

http://stackoverflow.com/comment/39793980
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25494248
has text: Why would you need to do that? Having `undefined`s in your code doesn't seem like a good idea. You may be facing an XY problem...

http://stackoverflow.com/q/25490985
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/39788508
has title: Wordpress + Flexslider + ACF Gallery plugin only works in localhost
tagged with: javascript
has comment: http://stackoverflow.com/comment/39941162
upvote count: 1
favorite count: 0
has body: I have a problem with the Flexslider+ACF Gallery plugin integration in Wordpress. It's only working on localhost but not in the live server http://www.tusenado.com/2014/08/25/prueba-galeria/ If you can see at the code the gallery is generated: As I said, the error is only in the live server, in localhost works perfectly. Any guesses? Thanks in advance!
type: UnansweredQuestion
tagged with: flexslider
tagged with: advanced-custom-fields
downvote count: 0
answer count: 0
score: 1

http://stackoverflow.com/comment/62234503
type: Comment
type: AnswerComment
has text: You can't use a select element for remote data (ajax).
score: 0
comment on: http://stackoverflow.com/a/32202743

http://stackoverflow.com/q/25456250
possible better answer: http://stackoverflow.com/a/41888488
favorite count: 0
has comment: http://stackoverflow.com/comment/39722076
has comment: http://stackoverflow.com/comment/39722058
has answer: http://stackoverflow.com/a/41888488
tagged with: angularjs
has answer: http://stackoverflow.com/a/28595962
has comment: http://stackoverflow.com/comment/39722130
has body: I have looked around, but have not found anything (Angular post) that can actually make a successful call to a MVC Controller. I know there are a lot of Angular/.Net devs out there. Can I get some help? Let's keep answers bare bones simple!!! If I set a linebreak on the controller, I can see that this code is not actually hitting the controller. HTML &lt;!-- I click this button --&gt; &lt;input type="button" value="click" onclick="postit()" /&gt; Javascript/Angular Post function postit() { $http({ method: 'POST', url: 'Home/Give/', data: { id: 4 } }).success(successFn).error(errorFn); } function successFn() { alert("success"); } MVC C# Controller [AcceptVerbs("OPTIONS")] public ActionResult Give(int id) { var response = "some response" + id.ToString(); return Json(new JavaScriptSerializer().Serialize(response)); }
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/39871667
has answer: http://stackoverflow.com/a/25456572
type: Question
has comment: http://stackoverflow.com/comment/39722162
tagged with: c#
accepted answer: http://stackoverflow.com/a/28595962
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/39722194
tagged with: javascript
has comment: http://stackoverflow.com/comment/39722297
answer count: 3
downvote count: 0
has title: How to make Angular POST to C# Asp.Net MVC Controller?

http://stackoverflow.com/a/25511915
downvote count: 0
answers question: http://stackoverflow.com/q/25511849
type: Answer
has body: Are you trying to modify content? You never assign anything to it and then you try to access it synchronously (which will almost certainly occur before the get completes). I assume you want to do something more like: ... var content; http.get(url1, function(response){ response.pipe(bl(function(err,data){ content = data.toString(); console.log(content.length); console.log(content); })); });
score: 1
has comment: http://stackoverflow.com/comment/39826748
upvote count: 1

http://stackoverflow.com/a/25548347
type: AcceptedAnswer
downvote count: 0
has body: You have a couple different things going on. First, you need to bind the app in some way to the DOM, in this case you named your module docsSimpleDirective so you need to add ng-app="docsSimpleDirective a the same level or above your controllers &lt;!-- added ng-app="docsSimpleDirective" --&gt; &lt;div ng-app="docsSimpleDirective" ng-controller="Controller"&gt; &lt;input type="text" ng-model="fname"&gt; &lt;span ng-bind="fname"&gt;&lt;/span&gt; &lt;/div&gt; Second, you are using the array annotation for defining dependencies which is good. You will run into problems if you don't do this and you try to uglify your code. The way you currently have it bound you do not pass $scope to the controller you are passing $http with the name $scope. angular.module('docsSimpleDirective', []) .controller('Controller', ['$scope', function($scope) { // Not ['$http', function($scope).... $scope.fname = 'Foo Bar'; }]) If you want to pass $scope and $http to the controller it would be defined like this. .controller('Controller', ['$scope','$http', function($scope,$http) { In short you could do .controller('Controller', ['$scope','$http', function(foo,bar) { ... and foo would equal $scopeand bar would equal $http. This is done so that when the code is uglified and uglifiery will not change the literal strings for $scope and $http so the references will not be broken. Here is a working Fiddle
has comment: http://stackoverflow.com/comment/39892378
has comment: http://stackoverflow.com/comment/39892981
has comment: http://stackoverflow.com/comment/39892715
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/25547890
has comment: http://stackoverflow.com/comment/39892406
upvote count: 3
answers question: http://stackoverflow.com/q/25547890
has comment: http://stackoverflow.com/comment/39893235

http://stackoverflow.com/q/25521481
type: Question
has answer: http://stackoverflow.com/a/25522796
accepted answer: http://stackoverflow.com/a/25522796
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39843013
tagged with: slider
answer count: 1
has title: link and image not work together
has comment: http://stackoverflow.com/comment/39844737
has body: It is working perfect without anchor tag but, When i put the anchor tag before image tag , to make image link, It show only one image. demo link: http://jsfiddle.net/vrD2C/ Javascript code: $(document).ready(function() { $("#photos a img:gt(0)").hide(); setInterval(function() { var current = $('#photos a img:visible'); var next = current.next().length ? current.next() : $('#photos a img:eq(0)'); current.fadeOut(); next.fadeIn(); }, 3000); }); HTML CODE:
tagged with: anchor
type: AnsweredQuestion

http://stackoverflow.com/a/25547661
has body: As you are using ASP.NET and txt_clientrefmock2 is a server control you need to use Control.ClientID and you are using ID so you need to use # for ID selector. &lt;%= txt_clientrefmock2.ClientID %&gt; will Gets the control ID for HTML markup that is generated by ASP.NET. Use $("#&lt;%= txt_clientrefmock2.ClientID %&gt;").hover(function() { $(".message").show(); //Here Message is a class so you need to use . }, function() { $(".message").hide(); });
downvote count: 0
has comment: http://stackoverflow.com/comment/39890215
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25547552
has comment: http://stackoverflow.com/comment/39890463
score: 2

http://stackoverflow.com/comment/39732347
type: Comment
type: QuestionComment
has text: Read the [Overview](https://developer.chrome.com/extensions/overview#arch). You will need a [Content Script](https://developer.chrome.com/extensions/content_scripts) to perform operations in the opened tab.
comment on: http://stackoverflow.com/q/25461776
score: 0

http://stackoverflow.com/q/25467343
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/39880066
has body: I have this form that I would like to be submitted on page load. My jQuery code is currently as follows: &lt;script&gt; // wait for the DOM to be loaded $(document).ready(function() { document.getElementById('form1').submit(); }); &lt;/script&gt; I have tried the ajax form plugin (http://malsup.com/jquery/form/) which does submit the form but I have no idea how to get it working with on page load: &lt;script&gt; // wait for the DOM to be loaded $(document).ready(function() { $('#form1').ajaxForm(function() { alert("Thank You"); }); }); &lt;/script&gt; Help! I just want form1 submitted once the page loads, the plugin looks like my best bet however I don't know how to get it working on page load
tagged with: javascript
answer count: 2
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25467371
tagged with: php
has title: Submit a form with ajax on page load
score: 0
has answer: http://stackoverflow.com/a/25467511

http://stackoverflow.com/q/25431182
has answer: http://stackoverflow.com/a/63867463
has comment: http://stackoverflow.com/comment/39679087
favorite count: 0
has title: Bootstrap tooltip not styling correctly with Laravel
has answer: http://stackoverflow.com/a/25431224
tagged with: twitter-bootstrap
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
answer count: 2
has body: I am trying to add a couple tooltips to my navbar using Twitter Bootstrap and Laravel 4. However, it seems the Bootstrap CSS is not styling the tooltip correctly. When I hover over the tooltip, it shows a grey box with the tooltip text instead of the proper black box. What am I doing wrong here? {{ HTML::style('css/bootstrap.min.css') }} {{ HTML::script('js/bootstrap.min.js') }} {{ link_to("/personas", '', array('class' => 'glyphicon glyphicon-user', 'id' => 'personas', 'data-toggle' => 'tooltip', 'title' => 'View all personas')) }} {{ link_to("/tags", '', array('class' => 'glyphicon glyphicon-tags', 'id' => 'tags', 'data-toggle' => 'tooltip', 'title' => 'View all tags')) }}
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/45062565
score: 0
has body: There must be a different style on the :focus otherwise this wouldn't happen, go into google chrome open dev tools inspect the div and click the little box on the right that says :foc and that will set the item to focused without being focused then check all the css on the right and it might tell you the reason why. Also make a fiddle so that we can test it ourselves always helpful
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25520747
answers question: http://stackoverflow.com/q/25520747

http://stackoverflow.com/comment/39795617
comment on: http://stackoverflow.com/a/25461696
type: Comment
has text: If this is really important to you, I've managed to change the source code so it works as you need. See the updated answer.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47252522
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28425277
type: Comment
has text: Or quote from [T. Stone](http://stackoverflow.com/questions/9007742/how-do-i-use-getvalue-using-ace-editor) if you use jQuery as well.

http://stackoverflow.com/q/25514841
tagged with: javascript
score: 0
has title: iframe loads outside parent window
has comment: http://stackoverflow.com/comment/39831412
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/25514925
tagged with: iframe
linked to: http://stackoverflow.com/q/17802765
type: Question
has body: I am loading a content from another site in iframe window, but when I select any link it opens the parent site in the window. I need everything to be opened in the same iframe? How to fix that? The code:

http://stackoverflow.com/a/25433717
upvote count: 5
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25431919
score: 5
accepted answer of: http://stackoverflow.com/q/25431919
has body: You always need to pass a callback function to then(). It will be called with the result of the promise that you attach it to. You're currently calling randomBytes(input) immediately, which (if input was defined) would have passed a promise. You need to pass a function expression that just gets the input as its parameter: .then(function(input) { return randomBytes(input); }); Or just pass the function itself directly: randomBytes(32) .then(function(bytes) { return (bytes.toString('base64').charAt(0)=== 'F') ? 64 : 32; }) .then(randomBytes) .then(function(newbytes) { console.log('newbytes: ' + newbytes.toString('base64')); });

http://stackoverflow.com/q/25495540
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/25495822
upvote count: 2
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I'm attempting to write a couple events that respond to keypresses on 'document' to always handle correct tabbing functionality within a modal window, aka always keeping tab focus inside the modal. I have a working jsFiddle but this assumes that all tabbable elements are direct children of the modal container using var $modalTabElements = $(modalID +"&gt;:tabbable"); http://jsfiddle.net/qodyp3jn/12/ Here is the same demo, except now the inputs in the modal are nested in another div the only difference here is the selector var $modalTabElements = $(modalID).children(":tabbable"); http://jsfiddle.net/qodyp3jn/13/ Does the ':tabbable' selector not work with the .children() method, or is there something else I'm missing here?
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/25495822
has title: jQuery ':tabbable' selector with .children()
type: Question

http://stackoverflow.com/a/25554547
has comment: http://stackoverflow.com/comment/39934454
has comment: http://stackoverflow.com/comment/40372206
has comment: http://stackoverflow.com/comment/40375033
answers question: http://stackoverflow.com/q/25510711
has comment: http://stackoverflow.com/comment/40536608
has comment: http://stackoverflow.com/comment/39942346
has comment: http://stackoverflow.com/comment/40311037
has comment: http://stackoverflow.com/comment/39911618
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40532874
has comment: http://stackoverflow.com/comment/40537149
has comment: http://stackoverflow.com/comment/39940359
type: Answer
has comment: http://stackoverflow.com/comment/39934571
has comment: http://stackoverflow.com/comment/39911521
has body: The workaround is to omit the multiple attribute in the file input element. Of course, that will prevent you from selecting multiple files at once, but that's better than not being able to select any files at all. There is another, older bug in iOS7, also related to the multiple attribute. In that case, when this attr is set, video file upload requests will be empty (0-sized). Don't bet on this being fixed before iOS8 releases.
has comment: http://stackoverflow.com/comment/39940308
has comment: http://stackoverflow.com/comment/40536968
upvote count: 1
has comment: http://stackoverflow.com/comment/40532601
has comment: http://stackoverflow.com/comment/39940360
accepted answer of: http://stackoverflow.com/q/25510711
score: 1

http://stackoverflow.com/comment/39743064
score: 0
type: Comment
type: QuestionComment
has text: I have main tags around everything and the controller inclusion is in the main tags. I thought ngIf was no longer supported?
comment on: http://stackoverflow.com/q/25456269

http://stackoverflow.com/comment/39655199
type: Comment
has text: check out the updated answer, resize to see the outcome!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25419773

http://stackoverflow.com/a/25514867
type: Answer
has body: All of the answers will work, as mentioned, you are trying to access an object as though it were an array. here is mine: var keys = Object.keys(obj); for(var i=0;i&lt;keys.length;i++) { var option= $('&lt;option value="' + keys[i] + '"&gt;' + obj[keys[i]] + '&lt;/option&gt;'); $('select').append(option); } on jsfiddle: http://jsfiddle.net/5czG4/75/
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25514761
upvote count: 1

requirejs
tags question: http://stackoverflow.com/q/25433366
tag name: requirejs
tags question: http://stackoverflow.com/q/25421243
tags question: http://stackoverflow.com/q/25399978
tags question: http://stackoverflow.com/q/25428113
tags question: http://stackoverflow.com/q/25467038
type: Tag
tags question: http://stackoverflow.com/q/25491122
tags question: http://stackoverflow.com/q/25476630
tags question: http://stackoverflow.com/q/25474716
tags question: http://stackoverflow.com/q/25476061
tags question: http://stackoverflow.com/q/25408829
tags question: http://stackoverflow.com/q/25419991
tags question: http://stackoverflow.com/q/25464238
tags question: http://stackoverflow.com/q/25495227
tags question: http://stackoverflow.com/q/25396244
tags question: http://stackoverflow.com/q/25405794
tags question: http://stackoverflow.com/q/25422042
tags question: http://stackoverflow.com/q/25425764
tags question: http://stackoverflow.com/q/25473172
tags question: http://stackoverflow.com/q/25427546
tags question: http://stackoverflow.com/q/25487857
tags question: http://stackoverflow.com/q/25402090
tags question: http://stackoverflow.com/q/25533542
tags question: http://stackoverflow.com/q/25509913
tags question: http://stackoverflow.com/q/25485224
tags question: http://stackoverflow.com/q/25395226
tags question: http://stackoverflow.com/q/25545733
tags question: http://stackoverflow.com/q/25514165

http://stackoverflow.com/a/25415189
has body: I would probably try avoid repeating by rearranging the data and tweak the logic a bit. I would just have one select with ng-repeat and my source data will be a 2D array. Example:- //It does not matter where i get the data from $scope.selects = [[{name:'level11', id:1}, {name:'level12', id:2}, {name:'level13', id:3}], [{name:'level21', id:1}, {name:'level22', id:2}, {name:'level23', id:3}], [{name:'level31', id:1}, {name:'level32', id:2}, {name:'level33', id:3}], [{name:'level41', id:1}, {name:'level42', id:2}, {name:'level43', id:3}], [{name:'level51', id:1}, {name:'level52', id:2}, {name:'level53', id:3}]]; Then i would just keep an array to store respective models:- $scope.selected = Array.apply(null, { length: $scope.selects.length }).map(Object); Then have just one changehandler for all of them, which currently pass index you could even pass data. $scope.handleChange = function(index) { //reset data for others when a dropdown in selected $scope.selected = $scope.selected.map(function(itm, idx){ return (idx &gt; index) ? {} : itm; }); //This will give you selected value of the current item if you need var selected = $scope.selected[index]; //DO something with the value } And finally my markup would just be:- &lt;select ng-repeat="select in selects" ng-class="selectLevel{{$index}}" ng-change='handleChange($index)' &lt;!-- Handler for Change event pass index of even model --&gt; ng-model='selected[$index].value' &lt;!-- Yes this is the model --&gt; ng-show='!$index || selected[$index-1].value' &lt;!-- Show only if its previous model has a value --&gt; ng-options='obj.name for obj in select track by obj.id'&gt; &lt;/select&gt; Demo
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25413071
answers question: http://stackoverflow.com/q/25413071
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/39770497
type: Comment
has text: jfriend00, thank you for your detailed explanation. I have updated the post to show the old code and the github version for the select box plugin. My fiddle example is using the old one
comment on: http://stackoverflow.com/a/25482129
type: AnswerComment
score: 0

http://stackoverflow.com/a/25518353
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25517637
score: 0
has body: Secret is in these numbers data-gutterX=10 data-gutterY=10 data-cellW=0.5 data-cellH=0.5
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25517637

http://stackoverflow.com/q/25425879
has body: I'm on the same domain I need to go thru a login form by code and redirect to some page, the login does a bunch of settings across internal servers. I implemented a page with an iFrame &lt;iframe id="iframe" src="&lt;path to login page&gt;" width="500" height="500"&gt;&lt;/iframe&gt; where I load the login page and populate the id/pwd and click the submit button by code and it works fine, the login after a few seconds comes with a logged in message .. args have the data pulled from DB var $myIFrame = $('#iframe'); $myIFrame.contents().find("input#userID").val(arg1); $myIFrame.contents().find("input#userPwd").val(arg2); $myIFrame.contents().find("input#mybutton").trigger("click"); ... if in this browser I manually type the redirected page it works great all of the backend settings stick. It works even on another browser tab. But if I set the redirected location by code all of my login settings go away. window.location.href='&lt;path of internal page&gt;'; I tried placing a delay it didn't work I tried wait until the iframe reloads but still it resets all of the login stuff when it redirects $("#iframe").on("load", function () { window.location.href= ''&lt;path of internal page&gt;'; }); What could I be missing?????
has answer: http://stackoverflow.com/a/25426145
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/60505692
score: 0
has comment: http://stackoverflow.com/comment/39669290
type: UnansweredQuestion
tagged with: iframe
has title: Reloading iframe and redirect parent issue

http://stackoverflow.com/a/25484668
downvote count: 0
has body: Following Bryan's answer, I tried another possible code that would close the dialog automatically. A few minor changes in the way I call the UiApp popup. function onOpen() { var s = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1"); var ui = SpreadsheetApp.getUi(); ui.createMenu('Goto today').addItem('go !','goToToday').addToUi(); var app = UiApp.createApplication().setHeight(40).setWidth(180).setTitle('Start'); var btn = app.createButton('Go to Today in cell A'+(25 + (s.getRange("I4").getValue())), app.createServerHandler("goToToday")) .setStyleAttributes({'fontFamily':'arial','fontSize':'10pt','fontWeight':'bold','color':'white','background':'#3870ff'}).setPixelSize(175,35); app.add(btn); SpreadsheetApp.getActive().show(app); } function goToToday() { var s = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1"); var r = 25 + s.getRange("I4").getValue(); s.setActiveSelection(s.getRange("A" + r )); return UiApp.getActiveApplication().close(); }
type: Answer
accepted answer of: http://stackoverflow.com/q/25472124
answers question: http://stackoverflow.com/q/25472124
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/39733071
comment on: http://stackoverflow.com/q/25462123
type: Comment
type: QuestionComment
has text: isn't the best way loading scroll pages ajax? when the user is idle, focus on loading on screen items, when scrolling, preload further items
score: 0

http://stackoverflow.com/comment/39793110
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25494294
score: 0
has text: I agree that it is unclear what problem you are solving. The thing that looks odd to me is having these numerically indexed arrays of seemingly unrelated terms. How would one use them in an application context? HOw would one know that `properties.A[2]` contains `plane`? I don't see a meaningful key-value or indexing system here.

http://stackoverflow.com/comment/39784810
has text: This returns false in chrome... but it works in chrome.
type: AnswerComment
comment on: http://stackoverflow.com/a/25455531
score: 0
type: Comment

http://stackoverflow.com/a/35110684
downvote count: 0
has body: use $httpProvider.useApplyAsync(true); on app config. then the templates directive loaded within 10ms will face the same digest. this will reduce the digest cycle call. see here
upvote count: 3
answers question: http://stackoverflow.com/q/25549373
type: Answer
score: 3

http://stackoverflow.com/comment/39616613
score: 1
type: Comment
comment on: http://stackoverflow.com/a/25399702
type: AnswerComment
has text: -1 `navigator.appName` does not return the correct browser name since all browsers except IE will probably return `Netscape` instead. `userAgent` returns versions for every part of the browser.

http://stackoverflow.com/comment/39708146
type: QuestionComment
has text: What is the RAD browser based on? Perhaps it does not support the `console` API.
score: 0
comment on: http://stackoverflow.com/q/25449246
type: Comment

http://stackoverflow.com/comment/39611853
type: AnswerComment
score: 0
type: Comment
has text: document.getElementById("someID").getComputedStyle('backGround',null)==image.jpg
comment on: http://stackoverflow.com/a/25397078

http://stackoverflow.com/q/25521869
has comment: http://stackoverflow.com/comment/39843689
tagged with: javascript
has body: i want to open a text file in php using file selector in html this is my code for HTML Select a source NOTEPAD XML i am trying to get path from ID="fileid" and sending it to php var num; num="xyz"; var loc; var loc = document.getElementById("fileid").value; xmlhttp.open("GET","read.phpq="+encodeURIComponent(num)+"&x="+encodeURIComponent(loc),true); xmlhttp.send(); My php code is: $lc=$_GET['x']; $i=$_GET['q']; $myfile = fopen($lc, "r") or die("Unable to open file!"); but my file path shows as C:\fakepath\try.txt, how can i send the correct path to my php script.
has title: how can i open a text file from php using fileselector
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25522231
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/25521918
type: Question

http://stackoverflow.com/q/25410111
downvote count: 0
favorite count: 0
tagged with: angularjs
has title: Haversine Formula - Results Too High
has answer: http://stackoverflow.com/a/25410289
tagged with: haversine
score: 2
type: AnsweredQuestion
tagged with: geolocation
tagged with: coordinates
type: Question
possible better answer: http://stackoverflow.com/a/25410289
tagged with: javascript
has answer: http://stackoverflow.com/a/25410394
has answer: http://stackoverflow.com/a/25413587
upvote count: 2
accepted answer: http://stackoverflow.com/a/25413587
has body: I am using the Haversine formula to calculate the distance between two points on earth. I have the following code: var app = angular.module('app', []); app.controller('firstCtrl', function($scope, $timeout) { var myLat, myLon, locLat, locLon; navigator.geolocation.watchPosition(GetLocation) $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" } }, { "name": "IL5153 GREENFIELD", "styleUrl": "#waypoint", "Point": { "coordinates": "-90.208747,39.364077,0" } }]; $scope.SSiteLocs = []; $scope.SiteLocs = $scope.SSiteLocs.concat($scope.ASiteLocs); repoSortOrder = "site.name"; function GetLocation(location, myLat, myLon) { myLat = location.coords.latitude; myLon = location.coords.longitude; document.getElementById("lat").innerHTML = myLat; document.getElementById("lon").innerHTML = myLon; $timeout(function() { calculate(); }); } $scope.getCoordDistance = function(myLat, myLon, locLat, locLon) { var lat1 = locLat; //41.887055 var lon1 = locLon; //-88.469233 var lat2 = myLat; //41.888668 var lon2 = myLon; //-87.640371 var R = 3959; var x1 = lat2 - lat1; var dLat = x1 * Math.PI / 180; var x2 = lon2 - lon1; var dLon = x2 * Math.PI / 180; 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); c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = R * c; return d; }; angular.forEach($scope.SSiteLocs, function(object) { object.carrier = 'Sprint'; }); angular.forEach($scope.ASiteLocs, function(object) { object.carrier = 'AT&amp;T'; }); var i = 0; locX = 1; var calculate = function() { angular.forEach($scope.SiteLocs, function(location) { var clength = location.Point.coordinat…
answer count: 3

http://stackoverflow.com/a/25517917
score: 0
has body: If you are missing the little icon for your Compatibility View, alternatively look unter Settings -> Compatibility View settings:
type: Answer
answers question: http://stackoverflow.com/q/25517783

http://stackoverflow.com/q/25396705
has body: I need to position the 'previous' on the left side of the li and the 'next' to the right so that they are shown in one line. How can I achieve this? red blue yellow all « Previous Next » http://jsfiddle.net/BlacBunny/5tfcuy1w/12/
type: Question
possible better answer: http://stackoverflow.com/a/25396790
has answer: http://stackoverflow.com/a/25396790
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39611242
downvote count: 2
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/25396876
accepted answer: http://stackoverflow.com/a/25396876
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How to position these ul, li, and span in one line?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25396804

http://stackoverflow.com/comment/39773031
type: Comment
comment on: http://stackoverflow.com/a/25484097
score: 1
type: AnswerComment
has text: Assuming you can use jQuery.

http://stackoverflow.com/comment/39852668
score: 1
has text: your code looks okay, can you provide a fiddle to show the problem? I guess there's some other component causing trouble, are there any other eventhandlers on these elements?
comment on: http://stackoverflow.com/q/25526965
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25441725
answers question: http://stackoverflow.com/q/25441269
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39694543
upvote count: 1
has body: @meetmahpuppy You can see this under .ejs as a templating language https://www.ejs.co/ However, this standard of syntax is similar in Ruby, PHP, which is known as interpolation. Interpolation is where you render something based on data provided by your backend (or server). As a rule of thumb, the &lt;%= means 'render something onto my markup based on this data variable, whereas &lt;% doesn't render Other variations of syntax for interpolation can be seen under handlebars (Angular, Ember) with the following{{ text }}

http://stackoverflow.com/q/25491325
has comment: http://stackoverflow.com/comment/39787733
upvote count: 1
tagged with: firefox
has body: On my page I have a button that on click, toggles the class of that button and then I use an if statement to determine what class is on the button, to decided if I should play or pause the video. &lt;button id="toggle" class="buttonVideoUnactive"&gt;&lt;/button&gt; $(document).ready(function(){ $("video").load(); $("video").get(0).pause(); $("button").click(function(){ $("main").fadeToggle(300); $("video").fadeToggle(300); $("button").toggleClass('buttonVideoUnactive buttonVideoActive'); if ( $( "#toggle" ).hasClass( "buttonVideoUnactive" ) ) { console.log("off"); $("video").load(); $("video").get(0).pause(); } if ( $( "#toggle" ).hasClass( "buttonVideoActive" ) ) { console.log("on"); $("video").get(0).play(); } }); }); My issue is that on firefox on a mac It will not play or pause when button is clicked.It works on every browser except on firefox on a mac. on my fiddle everything works perfect,even on mac! but on my site not so much.. is there a conflict or know reason why this is happening? http://jsfiddle.net/qteuaoos/ http://www.braven.com/705-speaker#
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39790035
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39787521
answer count: 0
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39787296
has title: html5 video javascript controls working everything but firefox on mac
tagged with: javascript
has comment: http://stackoverflow.com/comment/39787213

http://stackoverflow.com/comment/39848353
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25524042
has text: I am a bit of a Javascript novice but all I am trying to replace are the parameters being passed to the function - i.e. AddNotes2(1,0) becomes AddNotes2(7,0). Presumably, if wktxt does contain text on debug then this implies that the attribute is present. This code only executes for a specific quantity field that should have the attribute.
score: 0

http://stackoverflow.com/comment/39734433
type: Comment
type: QuestionComment
has text: i did that way how @Hassan Baig said. but i wanted do something in js. because header height can be change.
comment on: http://stackoverflow.com/q/25461877
score: 0

http://stackoverflow.com/a/25427110
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25427067
has body: Use the replace function: "Stay in London".replace("Stay in ", "");

http://stackoverflow.com/a/25413650
type: AcceptedAnswer
type: Answer
has body: You can use it infact, it is more of precedence issue. Just wrap filter result in brackets:- {{(filtered|sumByKey:'quantity') * price}} ^__ __^ Demo
accepted answer of: http://stackoverflow.com/q/25413419
score: 0
answers question: http://stackoverflow.com/q/25413419

http://stackoverflow.com/q/25467335
tagged with: animation
has body: This one is breaking my head! I have a list of items: var prev = 'sally.charlie.ted'; var next = 'tina.heather.david'; And then I want to loop through them forwards and backwards with each one a 1 second delay: animate(prev, function () { animate(next, function () { console.log('done'); }, false); }, true); But now i'm confusing myself. maybe these is a better way to do thi? function animate(url, callback, reverse, index, length) { var items = url.split('.'), total = items.length - 1; if (typeof index === 'undefined') { index = reverse ? items.length - 1 : 0; } if (typeof length === 'undefined') { length = reverse ? url.length + items[index].length + 1 : 0; } if (index &gt; total || index &lt; 0) { callback(); } else { if (reverse === true) { length -= items[index].length + (items.length - index); } else { length += items[index].length + index; } console.log(url.length, total, length, items[index], url.slice(0, length)); window.setTimeout(function () { animate(url, callback, reverse, reverse ? index - 1 : index + 1, length); }, 1000); } } I want to get the correct full path for each item, either forwards or backwards. My desired output backwards would be: ted = sally.charlie.ted charlie = sally.charlie sally = sally And then forwards: tina = tina heather = tina.heather david = tina.heather.david Here is a working fiddle: http://jsfiddle.net/kmturley/oco5uxrn/1/
has answer: http://stackoverflow.com/a/25468146
type: AnsweredQuestion
tagged with: settimeout
tagged with: loops
accepted answer: http://stackoverflow.com/a/25468146
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: Loop through set of items forwards and backwards with setTimeout

http://stackoverflow.com/a/37392580
type: Answer
answers question: http://stackoverflow.com/q/25401437
score: 0
has body: Sorry, you just can't, even with Store.js No. I believe there is no way to provide sessionStorage semantics cross browser.

http://stackoverflow.com/a/25413040
has comment: http://stackoverflow.com/comment/39647103
has comment: http://stackoverflow.com/comment/39665154
type: Answer
has comment: http://stackoverflow.com/comment/39647824
answers question: http://stackoverflow.com/q/25411071
has comment: http://stackoverflow.com/comment/39647724
has comment: http://stackoverflow.com/comment/39666654
has body: To do this easily we will want to use jQuerys .fadeOut() method on the slideshow. When rotateimages() is called we want to fade the sideshow element out, then to show the slideshow again (I'll fade the next image in so we have a smooth effect). function rotateimages() { $( "#slideshow" ).fadeOut( "slow", function() { document.getElementById("slideshow").setAttribute("src", "images/" + galleryarray[curimg].src) curimg=(curimg&lt;galleryarray.length-1)? curimg+1 : 0 }); $( "#slideshow" ).fadeIn( "slow" ); } In this case what we are doing is fading the #slideshow element itself. Here is a Fiddle example with some minor changes, I've added some generic images. We end up with a nice slideshow effect.
score: 0
has comment: http://stackoverflow.com/comment/39647341

http://stackoverflow.com/comment/39881037
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25541594
has text: is working functions using jQuery instance ($) ?

http://stackoverflow.com/comment/39902383
score: 0
type: Comment
type: QuestionComment
has text: Thanks for your response ! I like Sebastian Bochan, solution.. And just another small detail, in you example the 2012 has space reserved for the second series. is there any way of removing the spaces if the series has no data for the same year ? thanks
comment on: http://stackoverflow.com/q/25534506

http://stackoverflow.com/q/25398383
tagged with: javascript
has answer: http://stackoverflow.com/a/25406099
has title: How to implement printing in chrome pacakaged app created from GWT Application.?
answer count: 1
downvote count: 0
favorite count: 0
tagged with: google-chrome-app
accepted answer: http://stackoverflow.com/a/25406099
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: google-chrome
type: Question
tagged with: gwt
has body: I have integrated the GWT application with Chrome packaged app with help of DirectLinkerinstaller like the code below: public class CSPCompatibleLinker extends DirectInstallLinker { @Override protected String getJsInstallLocation(LinkerContext context) { return "com/google/gwt/core/ext/linker/impl/installLocationMainWindow.js"; } } But now I want to call print function from Chrome packaged app. When I call window.print() it allows me to print current window, but I need to open a new separate window and print that. Could you anyone please help me in this?
tagged with: java

http://stackoverflow.com/comment/39673059
type: Comment
has text: where's the rest of your code?
score: 0
comment on: http://stackoverflow.com/q/25430105
type: QuestionComment

http://stackoverflow.com/q/25447001
downvote count: 0
tagged with: minify
tagged with: gulp
has title: Complette workflow for minifying and concatenating (angular) web apps with gulp
favorite count: 0
has answer: http://stackoverflow.com/a/38143188
type: AnsweredQuestion
tagged with: build
score: 3
has answer: http://stackoverflow.com/a/25942066
upvote count: 3
type: Question
has body: It feels like 99% of all tutorials about using gulp.js and the right workflow showing only the part where the js / css files are (for example) minified and concatenated. But what I haven't found is what to do next to get the right index.html file with the new processed files correctly referenced inside without the need of manual editing the file. Example index.html: [...] And the result should be something like this: [...] where inside the combined.* files are all css/js files concatenated but only these minified with gulp, that do not end with *.min.js or *.min.css. Gulp-usemin and gulp-useref are not suitable for, because they concatenate all files inside a build block and after that can you minify the (combined) result (what would minify already minified files again - I do not want that). How can this missing last step look like to make the workflow complete?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/38143188
answer count: 2
tagged with: concatenation
possible better answer: http://stackoverflow.com/a/25942066

http://stackoverflow.com/q/25493385
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25493462
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39830120
type: Question
possible better answer: http://stackoverflow.com/a/25493426
has answer: http://stackoverflow.com/a/25493426
tagged with: javascript
has answer: http://stackoverflow.com/a/25493453
has answer: http://stackoverflow.com/a/25493462
has title: How to retrive data into directive (angularjs) from service
answer count: 3
downvote count: 0
has body: I tries to get the data from the view to plot a graph using directive. but directive receiving the undefined. Here are the code snippets. View &lt;div linear-chart chart-data="dataset"&gt;&lt;/div&gt; service myapp.factory('data', function($http) { var data = null; return function() { if (data) { return data; } else { data = $http.get('data/data.json'); return data; } }; }); controller: myapp.controller('ContactListCtrl', function ($scope, data) { data().success(function(dataSet) { $scope.dataset = dataSet; }); }); directive: myapp.directive('linearChart', function($parse){ return{ restrict:'EA', template:"&lt;svg&gt;&lt;/svg&gt;", scope: {mydata: '=chartData'}, link: function(scope, elem, attrs) { //var exp = $parse(attrs.chartData); var data = attrs.mydata; //var data = exp(scope); alert(data); //not able to get the data here (i get undefined here) var pathClass = "path"; var padding = 20; var margin = {top: 20, right: 20, bottom: 20, left: 45}, width = 1300 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; var x = d3.scale.linear() .domain(d3.extent(data, function (d) { return d.id; })) .range([0, width]); var y = d3.scale.linear() .domain(d3.extent(data, function (d) { return d.frequency; })) .range([height, 0]); var line = d3.svg.line() .x(function (d) { return x(d.id); }) .y(function (d) { return y(d.frequency); }); var zoom = d3.behavior.zoom() .x(x) .y(y) .on("zoom", zoomed); var rawSvg=elem.find('svg'); var svg = d3.select(rawSvg[0]); svg = d3.select(rawSvg[0]) .attr('width', width + margin.left + margin.right) .attr('height', height + margin.top + margin.bottom) .call(zoom) .append("svg:g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); var make_x_axis = function () { return d3.svg.axis() .scale(x) .orient("bottom") .ticks(data.length-1); }; var make_y_axis = function () { return d3.svg.axis() .scale(y) .orient("left") .ticks(5); }; var xAxis = d3.svg.axis() .scale(x) .orient("bottom") .ticks(data.length-1);…
favorite count: 0

http://stackoverflow.com/q/25549044
linked to: http://stackoverflow.com/q/24365154
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has title: Parse a page (partly generated by JavaScript) by using Selenium
tagged with: java
has body: I've got a problem: I want to parse a page (e.g. this one) to collect information about the offered apps and save these information into a database. Moreover I am using crawler4j for visiting every (available) page. But the problem - as I can see - is, that crawler4j needs links to follow in the source code. But in this case the hrefs are generated by some JavaScript code so that crawler4j does not get new links to visit / pages to crawl. So my idea was to use Selenium so that I can inspect several Elements like in a real Browser like Chrome or Firefox (I'm quite new with this). But, to be honest, I don't know how to get the "generated" HTML instead of the source code. Can anybody help me?
tagged with: selenium
tagged with: web-scraping
tagged with: crawler4j
has answer: http://stackoverflow.com/a/25856832
type: Question

http://stackoverflow.com/comment/39840325
comment on: http://stackoverflow.com/a/25500117
type: Comment
has text: Ok, I see. Thanks a lot. But i think, no load .on() many times is better solutuon. Anyway thanks!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39804010
comment on: http://stackoverflow.com/q/25500466
score: 0
type: Comment
has text: @h2ooooooo Ok. How do node.js callbacks work?
type: QuestionComment

http://stackoverflow.com/comment/39721088
type: QuestionComment
has text: No it's not an option :-(
comment on: http://stackoverflow.com/q/25455633
score: 0
type: Comment

http://stackoverflow.com/comment/39791440
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25493492
has text: Yeah, all it returns is `0` @Barmar
score: 0

http://stackoverflow.com/q/25520541
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39841387
tagged with: cakephp
tagged with: javascript
linked to: http://stackoverflow.com/q/6285006
tagged with: ajax
score: 0
has body: code in my view is bellow: <?php echo $form->create( "ChatForm", array("id" => "chat_form", "type" => "post",'class'=>'form_chat',"url" => array( "controller" => "qasamples", "action" => "quick_request" ) ) ); echo $form->hidden( 'ChatForm.pid', array('class'=>'chat_input_hidden') ); echo $form->hidden( 'ChatForm.uid', array('class'=>'chat_input_hidden') ); echo $form->textarea('ChatForm.text',array('id'=>'text_input','rows'=>'14','cols'=>'400','style'=>'resize:none;width:907px;border:0px;','onkeyup'=>"onTextChange()")); ?> Send <?php $form->end(); ?> here is the controller code: public function quick_request(){ if(!empty($this->data)) { $fields=array('QasampleAnswer.uid','QasampleAnswer.pid','QasampleAnswer.text'); $data=array( 'uid'=>$this->data['ChatForm']['uid'], 'pid'=>$this->data['ChatForm']['pid'], 'text'=>$this->data['ChatForm']['text']); if($this->QasampleAnswer->save($data)) { $data_update=array( 'id'=>$this->data['ChatForm']['pid'], 'status'=>'0'); if($this->Qasample->save($data_update)) $this->render('text2'); } } } Can I just send the message and without fresh my page? I heard that CakePHP and AJAX can make it work, but I'm a new learner of CakePHP and Javascript also. I hope you guys can help me with it. Thank you very much. The page text2 is to turn the page back to where I was,but it not working well.So I hope I could send my message and just stay this page without refreshing.
accepted answer: http://stackoverflow.com/a/25520666
has title: How to save my data to Mysql without page refresh
possible better answer: http://stackoverflow.com/a/25520658
has answer: http://stackoverflow.com/a/25520658
has answer: http://stackoverflow.com/a/25520666
type: AnsweredQuestion

http://stackoverflow.com/comment/39807653
type: QuestionComment
comment on: http://stackoverflow.com/q/25501602
has text: that is a java example my friend
score: 0
type: Comment

http://stackoverflow.com/comment/39799788
type: Comment
comment on: http://stackoverflow.com/a/25445266
has text: its my pleasure always :)
type: AnswerComment
score: 0

http://stackoverflow.com/a/25426389
score: 0
type: Answer
has body: Thanks for the respond guys, but i was unable to solve it. As soon as I wrapped any function around the jQuery function, the functions within it stopped working. I ended up using Jcrop instead of Guillotine, and built a rotating function that can be used before cropping. Now everything is working well. Link to Jcrop: http://deepliquid.com/content/Jcrop.html
answers question: http://stackoverflow.com/q/25391152

http://stackoverflow.com/q/25520208
downvote count: 0
has answer: http://stackoverflow.com/a/25520443
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/25520443
has title: Bootstrap 3.2 - Show Collapsed Navigation for All Screen Sizes - Dropdown Menu Disappears
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/21860263
answer count: 1
tagged with: css
favorite count: 0
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
type: AnsweredQuestion
score: 2
has body: I'm using Bootstrap 3.2.0 and am trying to show the toggle button and collapsed navigation for all screen sizes. I added the custom CSS from this solution: Bootstrap 3 - show collapsed navigation for all screen sizes But unfortunately, immediately after the drop down menu appears, it disappears. The solution works for Bootstrap version 3.0.3, but with versions 3.1.0, 3.1.1 and 3.2.0, the menu immediately disappears. You can see an example here: http://www.bootply.com/OS6ruSGi6Q I've tested all of the CSS styles, so I'm assuming that this is a bootstrap javascript issue. Any help would be greatly appreciated.

http://stackoverflow.com/q/25409571
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25409663
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Click to scroll to element horizontally
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25409663
has body: I am trying to create horizontal scrolling DIVs when a button is pressed it will scroll to the corresponding DIV ID. I have used the following code but it is acting quite buggy, for example if you click to section 2 then click 3 whilst on section 2. I need for the sections to be 200px off the left, rather than scroll to 0px at the left. I think this has caused me to run into issues. Here is the fiddle to see it in action http://jsfiddle.net/susannalarsen/vurbwete/ .nav { position:absolute; z-index:10000; background:red; left:0; } #content { position:absolute; left:200px; top:0px; right:0px; bottom:0px; overflow:auto; -webkit-overflow-scrolling: touch; background:green; } .inner-content { height:105%; padding-right:9000px; } #control-faders-wrapper { white-space:nowrap; padding-right:200000px; } .section{ margin:0px; bottom:0px; width:600px; display:inline-block; height:100%; text-shadow:1px 1px 2px #f0f0f0; } .black{ color:#fff; background:#000 url(../images/black.jpg) no-repeat top right; } .white{ color:#000; background:#fff url(../images/white.jpg) no-repeat top right; } .desk-fader-container { background:#e8e8e8; border:1px solid #d2d2d2; padding:7px; font-size:12px; text-align:center; display:inline-block; margin-left:10px; padding-top:20px; -webkit-border-bottom-right-radius: 7px; -webkit-border-bottom-left-radius: 7px; -moz-border-radius-bottomright: 7px; -moz-border-radius-bottomleft: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; white-space:normal; width:100px; } HTML : 1 2 3 Section 1 MY Spectre around me night and day Like a wild beast guards my way; My Emanation far within Weeps incessantly for my sin. ‘A fathomless and boundless deep, There we wander, there we weep; On the hungry craving wind My Spectre follows thee behind. ‘He scents thy footsteps in the snow Wheresoever thou dost go, Thro’ the wintry hail and rain. When wilt thou return again? ‘He scents thy footsteps in the snow Wheresoever thou dost go, Thro’ the wintry hail …
score: 4
upvote count: 4
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25447715
type: Question
has comment: http://stackoverflow.com/comment/39705513
has title: Removing # params in IE8 using angular js
tagged with: internet-explorer-8
accepted answer: http://stackoverflow.com/a/25453041
possible better answer: http://stackoverflow.com/a/25447798
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25453041
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25447798
has body: I am trying make # less url using angular js. My code working fine in every browser except IE8.In IE8 automatically add # . For removing # i am used $locationProvider.html5Mode(true); and base url &lt;base href="/something/online/" /&gt; but in IE8 my url look like www.test.com/something/online/# I am using angular js 1.2.17

http://stackoverflow.com/comment/39797149
has text: I have tried to call a js which calls the function to get the count(array) and the elements... then using document.CreateElement but it doesnt work...
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25496561
type: Comment

http://stackoverflow.com/q/25437955
has answer: http://stackoverflow.com/a/25453129
answer count: 1
tagged with: asp.net
favorite count: 0
has title: SignalR-Hub after IIS stop,start will no longer call client functions
tagged with: angularjs
tagged with: iis
upvote count: 1
has body: I have a queue system using SignalR 2.1.1 with Angular. Everything is working perfectly actually. However when I decided to test the system against an IIS outage I noticed a problem. When I stop, then start IIS, IIS restart doesn't cause the issue, my javascript functions that the hub calls will no longer fire. That makes sense to me, but the problem is that the client can still call the server without any issue so the user has no idea they are disconnected. This would certainly mess up my queue state. So, the solution would seem to be able to test this disconnect somehow and reconnect if necessary. Is there a way to test to see if the client functions my hub is calling are still connected? It seems that since I can call the hub that it should have to reconnect although I don't see any of that activity happening. I've tried the disconnected, reconnecting, stateChanged events on the client side to see if I could catch that happening with no luck. Thank you for any assistance
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25453129
tagged with: signalr-hub
score: 1
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25549404
tagged with: bootstrap-switch
score: 0
answer count: 1
has title: jQuery bootstrap-switch 3.0.2 is not triggering change event on the input
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25568920
type: UnansweredQuestion
has body: I've just updated the jQuery bootstrap-switch plugin to the latest version that includes so many interesting and cool features, but I'd a working code that looks like: var $checkbox = $('input[name="whatever"]'); $checkbox.bootstrapSwitch(); $checkbox.on('change', function() { // ... do something cool here }); And when I toggle the switch a change event was being triggered in the input, cool because the above code works if so, but... with the last update this is not happening! I know there are an onSwitchChange callback that I can use to identify changes on the input but you know I don't want to refactor 100 lines of code before knowing if I'm missing something.
type: Question

yammer
type: Tag
tags question: http://stackoverflow.com/q/25542054
tags question: http://stackoverflow.com/q/25518893
tags question: http://stackoverflow.com/q/25520775
tags question: http://stackoverflow.com/q/25398665
tag name: yammer

http://stackoverflow.com/a/25485778
type: Answer
upvote count: 1
score: 1
has body: @Matthias - I acted upon your advice and came up with a very simplified jquery solution : `$(function() { $(".showinfo").click(function() { //using class instead of ID $(".showinfo").removeClass("clicked"); //Remove all existing clicks $(this).addClass("clicked"); //add the class to the clicked element }); });` Posted solution in case anyone else has same query. Your help was appreciated.
accepted answer of: http://stackoverflow.com/q/25466086
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25466086
downvote count: 0

http://stackoverflow.com/q/25429739
accepted answer: http://stackoverflow.com/a/25430175
favorite count: 0
has body: I want to use an angular filter but instead of showing the matches I want to hide the matches. How can this be done?
tagged with: angularjs
linked to: http://stackoverflow.com/q/13278371
type: AnsweredQuestion
upvote count: 2
downvote count: 3
has title: How to use a filter reversed, so: hide everything that contains the search-string
has answer: http://stackoverflow.com/a/25430175
type: Question
duplicate of: http://stackoverflow.com/q/13278371
has comment: http://stackoverflow.com/comment/39672627
tagged with: javascript
score: -1
tagged with: angular-filters
answer count: 1

http://stackoverflow.com/q/25421233
has answer: http://stackoverflow.com/a/34702138
has comment: http://stackoverflow.com/comment/127101016
has answer: http://stackoverflow.com/a/38340374
type: Question
duplicate of: http://stackoverflow.com/q/286141
tagged with: object
has answer: http://stackoverflow.com/a/30939307
has comment: http://stackoverflow.com/comment/89957579
has title: Javascript - removing undefined fields from an object
tagged with: javascript
has answer: http://stackoverflow.com/a/40924449
possible better answer: http://stackoverflow.com/a/37836669
score: 220
has comment: http://stackoverflow.com/comment/39656408
has comment: http://stackoverflow.com/comment/61326379
has comment: http://stackoverflow.com/comment/39656459
downvote count: 1
has answer: http://stackoverflow.com/a/32310895
linked to: http://stackoverflow.com/q/286141
tagged with: undefined
has comment: http://stackoverflow.com/comment/74031917
favorite count: 0
answer count: 9
tagged with: field
has answer: http://stackoverflow.com/a/25421448
has answer: http://stackoverflow.com/a/25421439
accepted answer: http://stackoverflow.com/a/38340374
has answer: http://stackoverflow.com/a/37836669
has answer: http://stackoverflow.com/a/42081024
type: AnsweredQuestion
has body: Is there a clean way to remove undefined fields from an object? i.e. &gt; var obj = { a: 1, b: undefined, c: 3 } &gt; removeUndefined(obj) { a: 1, c: 3 } I came across two solutions: _.each(query, function removeUndefined(value, key) { if (_.isUndefined(value)) { delete query[key]; } }); or: _.omit(obj, _.filter(_.keys(obj), function(key) { return _.isUndefined(obj[key]) }))
upvote count: 221

http://stackoverflow.com/a/25420192
has comment: http://stackoverflow.com/comment/39655447
type: Answer
has body: try this: var new_window = window.open('courseAddress.php'); var intr = setInterval(function(){ console.log(new_window.closed); if(new_window.closed){ clearInterval(intr); window.location='http://www.google.com'; } }, 200);
answers question: http://stackoverflow.com/q/25391957
score: 0

http://stackoverflow.com/comment/39687754
type: Comment
has text: You should be checking the Javascript console for errors, it would have told you that it got an error trying to make the call.
type: AnswerComment
comment on: http://stackoverflow.com/a/25437691
score: 0

http://stackoverflow.com/q/25508982
has title: CSS blur and overflow:hidden
favorite count: 0
type: UnansweredQuestion
tagged with: css
upvote count: 3
type: Question
tagged with: javascript
has body: Update I have created a simliar jsfiddle here http://jsfiddle.net/ckaeno9s/ In safari this works correctly. In chrome it does not. If you remove overflow:hidden; from line 15 you'll notice that the blur is now being applied in the correct way. This jsfiddle sums up the problem well. Original Message I am trying to create a blurred banner effect and it is working pretty well in Safari (bottom) but not so well in Chrome (top). How this is working is that something too big is being placed into a div in the header with a blur effect applied via -webkit-filter in the CSS, then the header has an overflow: hidden applied to it. I think what is happening is the overflow: hidden is being applied before the blur in chrome, so then a smaller image is left to blur, giving the soft edges. Whereas in Safari, the filter is being applied before the overflow: hidden. If I increase the size of my div with overlow hidden I get the following: which is correct at the bottom of the header but obviously now it is flowing out of my header. Is there any way I can get my overflow: hidden to be applied after the blur? Or just achieve the same effect in chrome as I'm getting in safari. .content-blurred { margin-top:0px; padding:0; position:absolute; top:-50px; left:0; right:0; -webkit-filter:blur(10px); -moz-filter: blur(10px); -o-filter: blur(10px); -ms-filter: blur(10px); filter:url(#blur-effect); opacity:1; z-index: 1; } #header { overflow:hidden; position: fixed; height:38px; } To summarise my question: I want to create hard edges on a blurred div.
has answer: http://stackoverflow.com/a/25512292
score: 3
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39761747
type: Comment
has text: no problem, I build WP sites for a living and from time to time I forget simple things like that. Glad to help :)
comment on: http://stackoverflow.com/a/25477666
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39607644
comment on: http://stackoverflow.com/a/25394507
has text: @Gin-San Your fiddle gives me a 404 error. I added mine. Check the update please.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25465817
has comment: http://stackoverflow.com/comment/39739746
type: AcceptedAnswer
downvote count: 0
has body: There already is a global with the name name, it's window.name, and it only accepts strings, so when you do var name = ["one" , "two"]; in the global scope, and you get it back console.log( name ); you get "one, two" and it's of type string, so name[1] is "n", the second character in that string. This is because what you're really setting and getting is window.name, and it does not accept an array, so it runs toString() on whatever you pass it. Change the variable name to something that isn't already in use
type: Answer
score: 14
answers question: http://stackoverflow.com/q/25465764
upvote count: 14
accepted answer of: http://stackoverflow.com/q/25465764
has comment: http://stackoverflow.com/comment/39739817

http://stackoverflow.com/comment/39669636
score: 0
type: Comment
type: QuestionComment
has text: This is not a duplicate of that question.
comment on: http://stackoverflow.com/q/25425274

http://stackoverflow.com/a/25430177
has comment: http://stackoverflow.com/comment/39673849
answers question: http://stackoverflow.com/q/25430096
has comment: http://stackoverflow.com/comment/39673507
has body: The best approach is to bind the DOM node's class attribute to a controller property, like this: blah blah and in your action: actions: { changeColor: function() { this.set('myClass', 'someCssClass'); } } If you'd rather deal with styles directly (not recommended), then you could do the same thing with the style attribute binding.
has comment: http://stackoverflow.com/comment/39673287
score: 0
type: Answer

http://stackoverflow.com/a/25465819
has comment: http://stackoverflow.com/comment/39802077
score: 0
accepted answer of: http://stackoverflow.com/q/25465647
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25465647
type: Answer
has body: since your data isn't quoted there won't be a difference between datatypes everything must be parsed as string. Instead of trying to parse this shit i would try to create valid parsable data in the first place.

http://stackoverflow.com/a/25511401
answers question: http://stackoverflow.com/q/25511152
score: -1
type: Answer
has body: $scope.newContacts is empty. You are not iterating in your controller function. you simply defined a function that is suposed to iterate or recourse an array, your not executing it. you need to execute your inner function.
downvote count: 1
upvote count: 0

http://stackoverflow.com/comment/39720243
has text: Might I make an alternative suggestion? Why not highlight the selected text with css? If I understand correctly, you are getting the selected text and then going back to the same control to highlight it. Is the selected div important or is this really just a style change of the selection?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25451528
score: 0

http://stackoverflow.com/comment/39679234
type: Comment
type: QuestionComment
has text: **It's not the regex**, it's the code that's using the regex, probably an infinite loop or something similar, but you didn't post any code, so we can't help you, instead we're going to close the question.
score: 2
comment on: http://stackoverflow.com/q/25433413

http://stackoverflow.com/comment/39850481
has text: Thanks! Helpfull... but suppose I have 5 functions in a row than how can I make a chain from them.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25525768

http://stackoverflow.com/q/25509630
has answer: http://stackoverflow.com/a/25509738
tagged with: browser
score: 0
answer count: 1
tagged with: javascript
has body: I'm thinking of using the browser's navigator.mimeTypes array as a means of a tertiary user/browser identifier. So, for example, on my Chrome when I run... console.log(navigator.mimeTypes[4].type); I get "application/vnd.chromium.remoting-viewer" I totally get that more than one person could have their mimeType set as something identical to mine. I also totally get that anything client-side like this could be thwarted by an attacker relatively easily. What I want to know is, what degree of consistency could I expect one person's browser's mimeTypes to stay the same? If maybe 1 out of 100 or more could end up changing over the course of a year that would be fine. But 1 out of 20 ends up changing that's going to be a problem.
has title: navigator.mimeTypes consistency
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/39753643
type: QuestionComment
type: Comment
has text: how can you have two elements having same `ids` your both checkbox have same id.
comment on: http://stackoverflow.com/q/25473270
score: 0

http://stackoverflow.com/comment/39789883
score: 0
type: AnswerComment
type: Comment
has text: I have tried that, but it does't run the code again. :/ it just change the value in the input.
comment on: http://stackoverflow.com/a/25492699

http://stackoverflow.com/a/25407899
has body: In general looping through an array things = [...] is done like this: for( var i=0; i&lt;thing.length; i++ ) { // do stuff with thing[i] } Looping through an object things = {...} is done like this: for( key in things ) { if( things.hasOwnProperty(key) ) { // do stuff with things[key] or key. } } You can nest them all you like. In your case, if we name your original data structure items, then (see http://jsfiddle.net/7yc5arLe/): for( item=0; item&lt;items.length; item++ ) { console.log('category is '+items[item].category); for( product=0; product&lt;items[item].products.length; product++ ) { p = items[item].products[product]; for( key in p ) { console.log(' product '+key+' is '+items[item].products[product][key]); } } } will output category is A product id is 1 product name is Product 1 product description is Description of my product 1. product id is 2 product name is Product 2 product description is Description of my product 2. product id is 3 product name is Product 3 product description is Description of my product 3. category is B product id is 4 product name is Product 4 product description is Description of my product 4 in cat B. product id is 5 product name is Product 5 product description is Description of my product 5 in cat B. product id is 6 product name is Product 6 product description is Description of my product 6 in cat B.
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25407295
downvote count: 0

http://stackoverflow.com/a/25440429
type: Answer
has body: It should trigger the change event though, that's the default behavior of setting the value of a widget. If you use the following code to add the event and change the value: comboBox.on("change", function(val) { console.log("New value: " + val); }); comboBox.set("value", "Alaska"); Then you will see that it prints the statement of the onChange event into the console, so you would see: New value: Alaska If you don't want to trigger the event, then you also have to add a third parameter to the set() function: comboBox.set("value", "Alaska", false); I also made an example on JSFiddle: http://jsfiddle.net/w2sfsv2f/
downvote count: 0
answers question: http://stackoverflow.com/q/25406275
score: 1
accepted answer of: http://stackoverflow.com/q/25406275
has comment: http://stackoverflow.com/comment/41878978
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/39634878
type: AnswerComment
score: 0
type: Comment
has text: Thanks. It works now. I used the javascript you gave me to initialize the html page and now it works. Thank you for your help.
comment on: http://stackoverflow.com/a/25408382

http://stackoverflow.com/q/25428078
has comment: http://stackoverflow.com/comment/39671067
has comment: http://stackoverflow.com/comment/39669735
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25428745
has comment: http://stackoverflow.com/comment/39670238
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39669364
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39669903
has comment: http://stackoverflow.com/comment/39669493
has comment: http://stackoverflow.com/comment/39669800
has comment: http://stackoverflow.com/comment/39669608
tagged with: php
has answer: http://stackoverflow.com/a/25428745
type: AnsweredQuestion
has title: Using AJAX with a contact form to remove page reload
has body: I have seen lots of questions about this on here and have taken the code I have now from several answers. But for some reason I cant get it to work and I cant figure out why. I have a HTML form with the code here: &lt;form id="quick_contact" name="quick_contact" action="" method="POST"&gt; &lt;div class="input-control text"&gt; &lt;input id="name" name="name" type="text" value="" placeholder="Enter name here"&gt; &lt;/div&gt; &lt;div class="space10"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="input-control email"&gt; &lt;input id="email" name="email" type="email" value="" placeholder="Enter email address here"/&gt; &lt;/div&gt; &lt;div class="space10"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="input-control textarea"&gt; &lt;textarea id="comments" name="comments" placeholder="Enter Comments Here"&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;div class="space10"&gt;&amp;nbsp;&lt;/div&gt; &lt;button id="quick_submit" name="quick_submit" onclick="quickContact()"&gt;Send&lt;/button&gt; &lt;/form&gt; And I have my jquery here UPDATED as of Thomas' answer: &lt;script type="text/javascript"&gt; function quickContact(){ $.ajax({ type: "POST", url: "quick-contact.php", data: { name: $('#name').val().trim(), email: $('#email').val().trim(), comments: $('#comments').val().trim(), }, success: function(html) { var submitted = $.trim(html); if (submitted) { alert("Thanks for your submission"); $('#quick_contact')[0].reset(); return; } else { alert("Failed to submit."); return false; } } }); }; &lt;/script&gt; And here is the PHP which handles the email side of things in a file called "quick-contact.php again updated as of Thomas' answer: if(isset($_POST) == true){ $status = 1 // init to one, assume there will not be an error //Store the entered values in the variables $name = mysql_escape_string(trim($_POST['name'])); $email = mysql_escape_string(trim($_POST['email'])); $comments = mysql_escape_string(trim($_POST['comments'])); $comments = str_replace('\r\n','&lt;br&gt;',$comments); // EMAIL …

sublimetext3
tags question: http://stackoverflow.com/q/25414728
type: Tag
tag name: sublimetext3

http://stackoverflow.com/a/25394298
type: Answer
has body: Unless you have some easy method of getting all the empty tiles, your method is the only real way to do it. I would recommend wrapping it in a do while loop however, to avoid recursion: this.moveFood = function(bbf) { /* bbf: bounding box for the food */ do{ var tx = randInt(0, C_w / this.linkSize - 1) * this.linkSize - bbf.x; var ty = randInt(0, C_h / this.linkSize - 1) * this.linkSize - bbf.y; var fcopy = this.food; fcopy.translate(tx, ty); if (!this.hitSnake(fcopy)) { this.food.translate(tx, ty); } }while(this.hitSnake(this.food); } A better solution would be to either keep or generate a list of all the empty cells and then simply select a random cell from that list which would avoid a potential infinite loop if there isn't a free space.
upvote count: 1
answers question: http://stackoverflow.com/q/25394257
accepted answer of: http://stackoverflow.com/q/25394257
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/comment/109890684
type: AnswerComment
has text: Make sure to not use an arrow function. `this` won't be what you expect inside an arrow function. https://stackoverflow.com/a/28798362/8608146
comment on: http://stackoverflow.com/a/25537894
score: 0
type: Comment

http://stackoverflow.com/q/25480602
favorite count: 0
tagged with: sharepoint-online
has title: Jquery.form (3.51.0-2014.06.20) fileupload not working in IE9 (sharepoint application)
type: UnansweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has answer: http://stackoverflow.com/a/25494792
type: Question
has body: Ok, before I start let me say I did look at almost all answers in SO and elsewhere reg. jq form upload issues and confident that this issue is different. What basically happens is the file upload goes fine and a response is returned in application/json format with a ID from the upload controller. Initially in IE the response was prompting for a download and to solve that I changed the content type to text/json (text/html,text/xml). Now it does not prompt for download anymore but when I try to access the response looking for the return values it comes up empty. The code looks like this and xhr.responseText is empty. $('#upload-file-data-form').ajaxSubmit({ xhrFields: { withCredentials: true }, url: url, dataType: "json", data: { DataItems : "some data" }, complete: function (xhr) { var json = xhr.responseText; var data = $.parseJSON(json); onDone(data.d); }, errors: function () { onFail(); } }); Fiddler extract of the returned JSON. The application is hosted in SP online and the the upload happens to a web api endpoint in azure. Since this works fine in chrome and IE11 I'm assuming this is a CORS issue in IE9. I have been messing with this more than 2 days now and I'd buy a beer (no joke! :) ) for anyone who can shed some light on this. Cheers!
has comment: http://stackoverflow.com/comment/39767326
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39768180
answer count: 1

http://stackoverflow.com/comment/39876194
score: 0
comment on: http://stackoverflow.com/q/25539543
type: QuestionComment
type: Comment
has text: Please define "doesn't work". What are you getting, and what are you expecting to get?

http://stackoverflow.com/comment/39766238
comment on: http://stackoverflow.com/q/25479655
has text: It is from the same. I am unable to understand what the problem is.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39852158
has text: thanks for your reply, it is almost what i need. But the problem now is that if the user does not provide anything after the '.', i get something like: 12. (if the user had just entered 12). Was that clear?
type: AnswerComment
comment on: http://stackoverflow.com/a/25526573
score: 0
type: Comment

http://stackoverflow.com/a/25405149
accepted answer of: http://stackoverflow.com/q/25404915
has comment: http://stackoverflow.com/comment/39626602
score: 5
upvote count: 5
has body: You have border in your 2nd CSS Value. .css("border", "border:1px solid #CCC"); should be: .css("border", "1px solid #CCC"); See this working JSFiddle: http://jsfiddle.net/0jvscr2n/
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25404915
has comment: http://stackoverflow.com/comment/39626773

http://stackoverflow.com/a/25510225
score: 0
has body: Ok I guess I will post an answer for my own question, thanks for help guys :) If somebody need it, this code works well. There is a place for upgrades i.e.: instead of using delete obj it's probably better to use "splice" but for some reasons it didn't work for me so I used delete and then I created new array without null values which occurred after using delete. var body = []; var tr = []; var dataTmp = []; for(key=0; key &lt; data.length; key++) { if(data[key].TrId === null) { data[key].TrId = []; body.push(data[key]); delete data[key]; } } for(key=0; key &lt; data.length; key++) { if(data[key] != null) { dataTmp.push(data[key]); } } data = dataTmp; dataTmp = []; for(key=0; key &lt; data.length; key++) { if(data[key].TrId !== null &amp;&amp; data[key].TdId === null) { tr.push(data[key]); delete data[key]; } } for(key=0; key &lt; data.length; key++) { if(data[key] != null) { dataTmp.push(data[key]); } } data = dataTmp; for(key=0; key&lt;body.length; key++) { for(i=0;i&lt;tr.length;i++) { if(body[key].BodyId === tr[i].BodyId) { tr[i].TdId = []; body[key].TrId.push(tr[i]); } } } for(key=0;key&lt;body.length; key++) { for(i=0; i&lt;body[key].TrId.length; i++) { for(k=0; k&lt;data.length; k++) { if(body[key].TrId[i].BodyId === data[k].BodyId &amp;&amp; body[key].TrId[i].TrId === data[k].TrId) { body[key].TrId[i].TdId.push(data[k]); } } } } document.getElementById("print").innerHTML = JSON.stringify(body);
answers question: http://stackoverflow.com/q/25478277
type: Answer

http://stackoverflow.com/comment/39658709
type: Comment
comment on: http://stackoverflow.com/a/25422398
has text: @Sora okay, what were you trying to reach?
type: AnswerComment
score: 0

http://stackoverflow.com/a/25436914
has body: All you need is the Regex OR | pattern, but it will require some repetition: /^(?:[a-zA-Z]{2}|[a-zA-Z]{4}|[a-zA-Z]{6})$/ Note that the (?:...) part is just a non-capturing group, which is used to make all of the alternatives "act as one." Without it, the ^ and $ would have to be included in each alternative. In your specific case, perhaps try: /^(?:\d{8}|\d{12,14})$/
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25436845
score: 3
answers question: http://stackoverflow.com/q/25436845
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25529358
has body: I have to use google (or similar) geocode APIs to obtain information (state, country, address) by latitude and longitude. I've googled a lot and I've found some useful code, but this code puts information in an alert box. I've found tips about callback functions... I need to use "state" or "Country" outside the async task (for example in the HTML page when I press a button). I've tried to create a global variable (actArea), but, after navigator.geolocation.getCurrentPosition call, its value is "EMPTY". This is, I think, right, because the Async Task is async but how can I save the Async Task result into a global variable or similar? Why the callback isn't working? Where is the mistake? I've tried also using setTimeout, but with the same results. Thanks. This a part of my code (geodec.js): var x = document.getElementById("destination_div"); var actLatPos = 45.076947; var actLonPos = 7.614174; var actArea = 'EMPTY'; function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition,showError); //actArea returns "EMPTY" alert(actArea); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function retrieveGPSdata(data) { actArea=data.results[0].address_components[5].long_name; //actArea returns "Piemonte" alert(actArea); $('#destination_div').text( "Latitude: " + actLatPos + " Longitude: " + actLonPos + " Area: " + actArea); } function showPosition(position) { var richiesta='http://maps.googleapis.com/maps/api/geocode/json?latlng=' + actLatPos + ',' + actLonPos + '&amp;sensor=true'; //setTimeout(function() //{ $.ajax({ url:richiesta, success:retrieveGPSdata}); //},8000); }
tagged with: geolocation
has title: How to put async task returned values into variables (global?)
type: Question
has comment: http://stackoverflow.com/comment/39976459
has comment: http://stackoverflow.com/comment/39880058
has comment: http://stackoverflow.com/comment/39979430
has comment: http://stackoverflow.com/comment/39857351
has comment: http://stackoverflow.com/comment/39888251
tagged with: javascript
has comment: http://stackoverflow.com/comment/39940484
has comment: http://stackoverflow.com/comment/39954697
score: 0
tagged with: google-geolocation
tagged with: jquery
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/39964158
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39977478
has comment: http://stackoverflow.com/comment/39857829
has comment: http://stackoverflow.com/comment/39861184
has comment: http://stackoverflow.com/comment/39918591
has comment: http://stackoverflow.com/comment/39958766
answer count: 0

http://stackoverflow.com/comment/39864983
score: 0
type: AnswerComment
type: Comment
has text: Sorry i mixed it up with the other thing .. but still I want to rotate it in 3D and the div should come back when click is released
comment on: http://stackoverflow.com/a/25533151

http://stackoverflow.com/comment/39824441
comment on: http://stackoverflow.com/q/25510771
score: 0
type: Comment
type: QuestionComment
has text: @PSL yes pretty much there however, I am needing a more generic one

http://stackoverflow.com/comment/39888119
type: Comment
score: 1
type: AnswerComment
has text: OK, that makes it a tad clearer. Anyway, update your answer with the relevant information and I'll mark it as correct
comment on: http://stackoverflow.com/a/25544277

http://stackoverflow.com/comment/39867157
type: AnswerComment
score: 0
has text: The links on the left side do nothing ( `href=""`). I guess I don't understand what you are trying to do in the fiddle.... the `droppable` event, formerly the `click` event, is on `sortable2` which is in the right column where there is no content.... if you add this to your css you will see what Im talking about.. `#sortable2 {background-color:red;}`
type: Comment
comment on: http://stackoverflow.com/a/25531948

http://stackoverflow.com/a/25442645
answers question: http://stackoverflow.com/q/25442462
type: Answer
has body: There is a working demo http://jsbin.com/lepapu/2/edit (Click "Run with JS") The order of scripts matters.
score: 0

http://stackoverflow.com/a/25471033
has body: You can inline the &lt;ul&gt; elements inside the div. ul { display:inline; text-align:center; margin:10px 0; // This is to avoid scrollbars in the demo, might not be necessary for you padding:0; } li { display:inline; list-style:none; } Here is a demo: http://jsfiddle.net/4pv6rby9/14/.
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39749385
score: 1
has comment: http://stackoverflow.com/comment/39749534
upvote count: 1
answers question: http://stackoverflow.com/q/25470953
accepted answer of: http://stackoverflow.com/q/25470953
has comment: http://stackoverflow.com/comment/39749446

http://stackoverflow.com/q/25532770
type: Question
type: AnsweredQuestion
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/39863470
tagged with: javascript
answer count: 1
tagged with: .net
has title: Microsoft Jscript Angular is undefined
tagged with: angularjs
has body: As I'm trying to put some angular in my .net mvc website, I encounter the following error at runtime 0x800a1391 - Erreur d'exécution Microsoft JScript: 'angular' est indéfini. Which means: Error at Microsoft Jscript runtime: 'angular' is undefined . This occurs for the following code var customersApp = angular.module('propositionApp', ['ngGrid']); Some research on the internet advise to add the following code in the head tag (i use angular 1.2.23) But this generates even more runtime errors because some part of the code returned by the url are Null. Of course, I've added angular to my project with nugget package. Where does this problem "angular" is not defined?
has answer: http://stackoverflow.com/a/25532873
tagged with: visual-studio
score: 0
accepted answer: http://stackoverflow.com/a/25532873

http://stackoverflow.com/comment/39847954
type: QuestionComment
comment on: http://stackoverflow.com/q/25519563
has text: How your data does it look like ?
score: 0
type: Comment

http://stackoverflow.com/comment/39805667
comment on: http://stackoverflow.com/a/25491470
type: AnswerComment
score: 0
has text: Both IE 11 and Opera consoles give me the result with too many quotes.
type: Comment

http://stackoverflow.com/comment/39670541
has text: Of course, it doesn't. When you change it to ```html``` or ```body``` it will scale all content with your controls too.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25428671
type: AnswerComment

highcharts
tags question: http://stackoverflow.com/q/25428087
tags question: http://stackoverflow.com/q/25420727
tags question: http://stackoverflow.com/q/25460010
tags question: http://stackoverflow.com/q/25411132
tags question: http://stackoverflow.com/q/25436493
tags question: http://stackoverflow.com/q/25484793
tags question: http://stackoverflow.com/q/25444993
tags question: http://stackoverflow.com/q/25489518
tags question: http://stackoverflow.com/q/25513597
tags question: http://stackoverflow.com/q/25541265
tags question: http://stackoverflow.com/q/25444881
tags question: http://stackoverflow.com/q/25494729
tags question: http://stackoverflow.com/q/25423706
tags question: http://stackoverflow.com/q/25391149
tags question: http://stackoverflow.com/q/25549883
tags question: http://stackoverflow.com/q/25418578
tags question: http://stackoverflow.com/q/25505988
tags question: http://stackoverflow.com/q/25538846
tags question: http://stackoverflow.com/q/25390410
tags question: http://stackoverflow.com/q/25444006
tags question: http://stackoverflow.com/q/25514811
tags question: http://stackoverflow.com/q/25451483
tags question: http://stackoverflow.com/q/25544012
tags question: http://stackoverflow.com/q/25542402
tags question: http://stackoverflow.com/q/25492596
tags question: http://stackoverflow.com/q/25487771
tags question: http://stackoverflow.com/q/25409184
tags question: http://stackoverflow.com/q/25496928
tags question: http://stackoverflow.com/q/25499558
tags question: http://stackoverflow.com/q/25534506
tags question: http://stackoverflow.com/q/25428436
tags question: http://stackoverflow.com/q/25455493
tags question: http://stackoverflow.com/q/25540396
tags question: http://stackoverflow.com/q/25428153
tags question: http://stackoverflow.com/q/25422715
tags question: http://stackoverflow.com/q/25409406
tags question: http://stackoverflow.com/q/25441357
tags question: http://stackoverflow.com/q/25544548
tags question: http://stackoverflow.com/q/25535449
tags question: http://stackoverflow.com/q/25449243
tags question: http://stackoverflow.com/q/25391181
tags question: http://stackoverflow.com/q/25408794
tags question: http://stackoverflow.com/q/25394241
tags question: http://stackoverflow.com/q/25479437
tags question: http://stackoverflow.com/q/25519563
tags question: http://stackoverflow.com/q/25501135
tags question: http://stackoverflow.com/q/25454184
tags question: http://stackoverflow.com/q/25448996
tags question: http://stackoverflow.com/q/25422859
type: Tag
tags question: http://stackoverflow.com/q/25412895
tag name: highcharts
tags question: http://stackoverflow.com/q/25419709
tags question: http://stackoverflow.com/q/25452186
tags question: http://stackoverflow.com/q/25530054
tags question: http://stackoverflow.com/q/25504285
tags question: http://stackoverflow.com/q/25493472

http://stackoverflow.com/comment/39689007
type: AnswerComment
has text: The api seems to be very restricted to limited options see [GmailApp.sendEmail](https://developers.google.com/apps-script/reference/gmail/gmail-app#sendEmail(String,String,String))
type: Comment
comment on: http://stackoverflow.com/a/25431465
score: 0

http://stackoverflow.com/comment/39995205
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25400550
score: 0
has text: @GrandMarshalBraev well if thats the case you could have just used Malsup's ajaxForm, http://malsup.com/jquery/form/ more people should know about this it's awesome :)

http://stackoverflow.com/comment/39875027
comment on: http://stackoverflow.com/a/25538826
type: Comment
type: AnswerComment
has text: Removing the div #contentselection does nothing. The problem lies on the #filtercontent, #filterbutton, and .feedpagetab, thats what causes the white space at the bottom. If you remove those divs and the input everything will work as inteded ex: http://jsfiddle.net/tyy9gmxy/ Unfortunately, I need the hide/show button to work as well :/
score: 0

http://stackoverflow.com/comment/39630461
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25407175
has text: Why not have the first click event make a call to a `CanContinue` function that performs the validation and potentially cancels the event?

http://stackoverflow.com/comment/39807801
has text: Just use seperate controllers for each view.
score: 0
comment on: http://stackoverflow.com/q/25502011
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25473873
type: Answer
upvote count: 1
score: 1
has body: You can tell what day of the week a Date instance represents using its getDay function: if (dt.getDay() === 0) { // It's Sunday } else { // It isn't } I figure you can take it from there... :-)
answers question: http://stackoverflow.com/q/25473844
downvote count: 0

http://stackoverflow.com/a/25538234
type: Answer
accepted answer of: http://stackoverflow.com/q/25528052
type: AcceptedAnswer
has body: My Solution is override (request.Request.prototype.qs) var qs = require('qs'), request = require('request'), url = require('url'); var stringify; var toString = Object.prototype.toString; var isArray = Array.isArray || function (arr) { return toString.call(arr) === '[object Array]'; }; var objectKeys = Object.keys || function (obj) { var ret = []; for (var key in obj) { if (obj.hasOwnProperty(key)) { ret.push(key); } } return ret; }; var stringifyString = function (str, prefix) { if (!prefix) throw new TypeError('stringify expects an object'); return prefix + '=' + encodeURIComponent(str); }; var stringifyArray = function (arr, prefix) { var ret = []; if (!prefix) throw new TypeError('stringify expects an object'); for (var i = 0; i &lt; arr.length; i++) { ret.push(stringify(arr[i], prefix)); } return ret.join('&amp;'); }; function stringifyObject(obj, prefix) { var ret = []; var keys = objectKeys(obj); var key; for (var i = 0, len = keys.length; i &lt; len; ++i) { key = keys[i]; if ('' === key) { continue; } if (null === obj[key]) { ret.push(encodeURIComponent(key) + '='); } else { ret.push(stringify(obj[key], prefix ? prefix + '[' + encodeURIComponent(key) + ']' : encodeURIComponent(key))); } } return ret.join('&amp;'); } stringify = function (obj, prefix) { if (isArray(obj)) { return stringifyArray(obj, prefix); } else if ('[object Object]' === toString.call(obj)) { return stringifyObject(obj, prefix); } else if ('string' === typeof obj) { return stringifyString(obj, prefix); } else { return prefix + '=' + encodeURIComponent(String(obj)); } }; And override prototype.qs : request.Request.prototype.qs = function (q, clobber) { var base; if (!clobber &amp;&amp; this.uri.query) { base = qs.parse(this.uri.query) } else { base = {} } for (var i in q) { base[i] = q[i] } if (stringify(base) === '') { return this } this.uri = url.parse(this.uri.href.split('?')[0] + '?' + stringify(base)); this.url = this.uri; this.path = this.uri.path; return this; };
answers question: http://stackoverflow.com/q/25528052
score: 0

http://stackoverflow.com/comment/39871013
comment on: http://stackoverflow.com/q/25536041
type: Comment
type: QuestionComment
has text: You don't need to pass it through JSON.parse. You can just do `var oLocations = <?= echo $oLocations; ?>;
score: 0

http://stackoverflow.com/a/25413594
upvote count: 2
score: 2
has body: Yes, this is a problem promise implementations face. However the two you've chosen fail at it pretty bad. Indeed - the error is swallowed in your case and indeed you will not get any indication of this silent failure unless you attach a error handler yourself. Your options are: Use a library that offers .done like Q and manually append .done to every single promise in your code to indicate you will not attach handlers to it. Use a library like Bluebird or When that does unhandled rejection detection. In particular, Bluebird is faster than native promises and does this properly. It is also a superset of native promises so you can write code that uses that subset if you'd like (although it has a much richer API). The code you have above logs an unhandled rejection with Bluebird. By the way, Firefox handles this much better and Firefox native promises detect unhandled rejections.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25409391
accepted answer of: http://stackoverflow.com/q/25409391
type: Answer

http://stackoverflow.com/comment/39736349
comment on: http://stackoverflow.com/q/25463945
has text: @royhowie - A question with the answer "you can use `live`..." isn't really a duplicate, it's just wrong.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/66391387
type: AnswerComment
comment on: http://stackoverflow.com/a/25390646
type: Comment
has text: But, I want to use multi-part form data? This is changing my content type and now my backend doesn't know how to parse it? :/
score: 0

types
tags question: http://stackoverflow.com/q/25416725
type: Tag
tag name: types

http://stackoverflow.com/comment/39810297
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25503935
score: 0
has text: Use AJAX. 1)When selecting a country, Value say for Ahganisthan AF will get. 2)Select the corresponding code from the database.

http://stackoverflow.com/comment/39811539
comment on: http://stackoverflow.com/a/25504581
type: Comment
has text: This is close ;) accept if i clicked the dropdown [no alert which is good] and din't click anything and clicked it again i still get no alert only if i selected something else first but thanks so far :)
score: 0
type: AnswerComment

http://stackoverflow.com/q/25428153
tagged with: javascript
score: 0
type: UnansweredQuestion
has body: Is it possible to use a function in a serie data ? like this My function : function CalculBoucle(nbmin,nbmax,nbval) { CoordY = ['2005','2006','2007','2008','2009','2010','2011']; textAxeY = ""; var i; for (i = nbmin; i &lt; nbmax; i++) { textAxeY += "data.dataevolution["+nbval+"]"+".annee"+CoordY[i] + ","; } return textAxeY } My serie data : series: [ { name: [data.dataevolution[19].metier], data: [CalculBoucle(4,6,19)] //here my function }, ]
has comment: http://stackoverflow.com/comment/39670323
tagged with: http://stackoverflow.com/tag/json
has title: Highcharts : use function in Serie data
type: Question
has answer: http://stackoverflow.com/a/25428746
tagged with: highcharts
answer count: 1

http://stackoverflow.com/tag/r
tags question: http://stackoverflow.com/q/25496450
tag name: r
type: Tag

http://stackoverflow.com/a/25534711
has comment: http://stackoverflow.com/comment/39866958
score: 3
upvote count: 3
has body: You could move the css transition from the .nav-float classes to the #nav classes. Then you can simply just add or remove the class: $(window).scroll(function () { var scroll_top = $(this).scrollTop(); if (scroll_top &gt;= 1) { $("#nav").addClass("nav-float"); } else { $("#nav").removeClass("nav-float"); } }); Working fiddle is here
accepted answer of: http://stackoverflow.com/q/25534511
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25534511
type: Answer

http://stackoverflow.com/comment/39871876
comment on: http://stackoverflow.com/a/25537146
has text: `$('#id').css('width','50px')` to be precise.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/25395213
has title: How to change url without changing page in backbone
downvote count: 0
has body: I have a modal that has route of its own and I have an event listener that changes it's route after closing 'closeTask' : function ( e ) { e.preventDefault(); Backbone.history.navigate( '#groups/' + this.model.get( 'LicenseId' ) + '/tasks' ); }, but when I use this, there are times when closing the modal it reloads the page. I also tried using 'closeTask' : function ( e ) { e.preventDefault(); App.navigate( '#groups/' + this.model.get( 'LicenseId' ) + '/tasks', { trigger:false } ); }, but also gives me the same result. What should I use so that I can change my route without reloading the page?
type: Question
score: 1
has answer: http://stackoverflow.com/a/25410850
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25439227
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25439227
favorite count: 0
tagged with: backbone.js
tagged with: marionette
possible better answer: http://stackoverflow.com/a/25410850
type: AnsweredQuestion

d3.js
tags question: http://stackoverflow.com/q/25458570
tags question: http://stackoverflow.com/q/25524906
tags question: http://stackoverflow.com/q/25472702
tags question: http://stackoverflow.com/q/25512248
tags question: http://stackoverflow.com/q/25467426
tags question: http://stackoverflow.com/q/25505779
tags question: http://stackoverflow.com/q/25469434
tags question: http://stackoverflow.com/q/25409141
tags question: http://stackoverflow.com/q/25446672
tags question: http://stackoverflow.com/q/25479972
tags question: http://stackoverflow.com/q/25516078
tags question: http://stackoverflow.com/q/25535510
tags question: http://stackoverflow.com/q/25490653
tags question: http://stackoverflow.com/q/25480778
tags question: http://stackoverflow.com/q/25447409
tags question: http://stackoverflow.com/q/25534122
tags question: http://stackoverflow.com/q/25485951
tags question: http://stackoverflow.com/q/25530853
tags question: http://stackoverflow.com/q/25426840
tags question: http://stackoverflow.com/q/25449104
tags question: http://stackoverflow.com/q/25486808
tags question: http://stackoverflow.com/q/25431037
tags question: http://stackoverflow.com/q/25417117
tags question: http://stackoverflow.com/q/25514386
tags question: http://stackoverflow.com/q/25438123
tags question: http://stackoverflow.com/q/25531713
tags question: http://stackoverflow.com/q/25448430
tags question: http://stackoverflow.com/q/25487249
tags question: http://stackoverflow.com/q/25510188
tags question: http://stackoverflow.com/q/25418333
tags question: http://stackoverflow.com/q/25452322
tags question: http://stackoverflow.com/q/25480285
tags question: http://stackoverflow.com/q/25528947
type: Tag
tags question: http://stackoverflow.com/q/25548785
tags question: http://stackoverflow.com/q/25494170
tags question: http://stackoverflow.com/q/25434225
tags question: http://stackoverflow.com/q/25448213
tags question: http://stackoverflow.com/q/25400925
tags question: http://stackoverflow.com/q/25456225
tags question: http://stackoverflow.com/q/25533540
tags question: http://stackoverflow.com/q/25538172
tags question: http://stackoverflow.com/q/25482798
tags question: http://stackoverflow.com/q/25427542
tags question: http://stackoverflow.com/q/25515631
tags question: http://stackoverflow.com/q/25414904
tags question: http://stackoverflow.com/q/25403735
tags question: http://stackoverflow.com/q/25527259
tags question: http://stackoverflow.com/q/25438109
tags question: http://stackoverflow.com/q/25532765
tags question: http://stackoverflow.com/q/25391799
tags question: http://stackoverflow.com/q/25541637
tags question: http://stackoverflow.com/q/25410138
tags question: http://stackoverflow.com/q/25438493
tags question: http://stackoverflow.com/q/25435214
tags question: http://stackoverflow.com/q/25497133
tags question: http://stackoverflow.com/q/25409462
tags question: http://stackoverflow.com/q/25467487
tags question: http://stackoverflow.com/q/25537081
tags question: http://stackoverflow.com/q/25471334
tags question: http://stackoverflow.com/q/25485975
tags question: http://stackoverflow.com/q/25450167
tag name: d3.js
tags question: http://stackoverflow.com/q/25449548
tags question: http://stackoverflow.com/q/25393336
tags question: http://stackoverflow.com/q/25508639
tags question: http://stackoverflow.com/q/25531328
tags question: http://stackoverflow.com/q/25511846
tags question: http://stackoverflow.com/q/25453175
tags question: http://stackoverflow.com/q/25414892
tags question: http://stackoverflow.com/q/25491111
tags question: http://stackoverflow.com/q/25512023
tags question: http://stackoverflow.com/q/25509474
tags question: http://stackoverflow.com/q/25430282
tags question: http://stackoverflow.com/q/25429974
tags question: http://stackoverflow.com/q/25454889
tags question: http://stackoverflow.com/q/25518380

http://stackoverflow.com/q/25416422
has body: I have a video player in my custom chromecast receiver and this is the HTML code for the body: This is my onLoad method in my java script file. It does not seem to recognize the video element inside the player div onload = function() { mediaElement = document.querySelector('video'); mediaElement.autoplay = true; .... .... mediaManager = new cast.receiver.MediaManager(mediaElement); mediaManager['onLoadOrig'] = mediaManager.onLoad; mediaManager.onLoad = function(event) { if(mediaPlayer !== null) { mediaPlayer.unload(); // Ensure unload before loading again } if (event.data['media'] && event.data['media']['contentId']) { var url = event.data['media']['contentId']; mediaHost = new cast.player.api.Host({ 'mediaElement': mediaElement, 'url': url }); mediaHost.onError = function (errorCode) { if (mediaPlayer !== null) { mediaPlayer.unload(); } } var initialTimeIndexSeconds = event.data['media']['currentTime'] || 0; var protocol = null; var parser = document.createElement('a'); parser.href = url; var ext = ext = parser.pathname.split('.').pop(); if (ext === 'm3u8') { protocol = cast.player.api.CreateHlsStreamingProtocol(mediaHost); } else if (ext === 'mpd') { protocol = cast.player.api.CreateDashStreamingProtocol(mediaHost); } else if (ext === 'ism/') { protocol = cast.player.api.CreateSmoothStreamingProtocol(mediaHost); } console.log('### Media Protocol Identified as ' + ext); if (protocol === null) { mediaManager['onLoadOrig'](event); // Call on the original callback } else { mediaPlayer = new cast.player.api.Player(mediaHost); mediaPlayer.load(protocol, initialTimeIndexSeconds); } } } After this I start the receiver just as instructed in the Google Chromecast APIs. I checked in the console in the chrome debugging and after it loads in the above method, it goes straight to the onEnded method of mediaManager and finishes. What am I doing wrong? If I play the video tag outside the player div, it works fine but I need to customize it to add a title/subtitle/artwork etc.
has comment: http://stackoverflow.com/comment/39674868
answer count: 0
score: 1
type: Question
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has title: Chromecast custom receiver media player styling
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39677233
type: UnansweredQuestion
tagged with: chromecast
upvote count: 1
tagged with: css

http://stackoverflow.com/q/25428686
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/4295782
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39671517
has answer: http://stackoverflow.com/a/25430717
accepted answer: http://stackoverflow.com/a/25429362
upvote count: 1
has comment: http://stackoverflow.com/comment/39670275
possible better answer: http://stackoverflow.com/a/25430717
favorite count: 0
has title: Unable to receive data from clients ajax POST request through rest API
has answer: http://stackoverflow.com/a/25429362
has body: I have built few rest API on server and calling them from other domain the Get request is working fine but I am facing an issue in calling the POST request. I am unable to receive data on server send by the clients. Server Code: var express = require('express'); var routes = require('./routes'); var user = require('./routes/user'); var http = require('http'); var path = require('path'); //var fn = require('fn') var app = express(); var allowCrossDomain = function(req, res, next) { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, Content-Length, X-Requested-With'); // intercept OPTIONS method if ('OPTIONS' === req.method) { res.send(200); } else { next(); } }; // all environments app.set('port', process.env.PORT || 3000); app.use(allowCrossDomain); // development only if ('development' == app.get('env')) { app.use(express.errorHandler()); } app.post('/user', user.saveUser); http.createServer(app).listen(app.get('port'), function(){ console.log('Express server listening on port ' + app.get('port')); }); exports.saveUser = function(req, res) { var key = req.body.key; //fb,twitter,web var userData = req.body.userData; var result = checkUser(userData,key); } Clients code where the request is made : var data = { key: 'web', userData: userData } $.ajax({ method: "POST", //contentType: 'application/json', url: "www.acbd.com/user", //url:"http://prayable-21641.onmodulus.net/user", data: data, crossDomain: true, dataType: "json" }).success(function (data, textstatus) { // this callback will be called asynchronously // when the response is available console.log(data) console.log(textstatus) }).error(function (data, textstatus) { console.log(data) console.log(textstatus) // called asynchronously if an error occurs // or server returns response with an error status. }); I am unable to get key or userData on server, it say they are not…
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/39875863
score: 2
has text: By convention, constructor names are capitalized, like `Person`. It's a way to remember you must use `new` when you call it.
comment on: http://stackoverflow.com/q/25539356
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25497578
accepted answer of: http://stackoverflow.com/q/25497032
has comment: http://stackoverflow.com/comment/39873292
answers question: http://stackoverflow.com/q/25497032
has comment: http://stackoverflow.com/comment/39869049
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39869206
has comment: http://stackoverflow.com/comment/39872556
has comment: http://stackoverflow.com/comment/39821727
type: AcceptedAnswer
upvote count: 3
has body: OK, let's give a quick refresher as to what sin and asin are. Take a look at this right-angle triangle in the diagram below: Source: Wikipedia By taking a look at point A of this right-angle triangle, we see that there is an angle formed between the line segment AC and AB. The relationship between this angle and sin is that sin is the ratio of the length of the opposite side over the hypotenuse. In other words: sin A = opposite / hypotenuse = a / h This means that if we took a / h, this is equal to the sin of the angle located at A. As such, to find the actual angle, we would need to apply the inverse sine operator on both sides of this equation. As such: A = asin(a / h) For example, if a = 1 and h = 2 in our triangle, the sine of the angle that this right triangle makes between AC and AB is: sin A = 1 / 2 To find the actual angle that is here, we do: A = asin(1 / 2) Putting this in your calculator, we get 30 degrees. Radians are another way of representing angle, where the following relationship holds: angle_in_radians = (angle_in_degrees) * (Math.PI / 180.0) I'm actually a bit confused with your code, because you are doing asin and then sin after. A property between asin and sin is: arcsin is the same as asin. The above equation states that as long as x &gt;= -Math.PI / 2, x &lt;= Math.PI / 2 or x &gt;= -90, x &lt;= 90 degrees, then this relationship holds. In your code, the argument inside the sin will definitely be between -1 to 1, and so this actually simplifies to: (fPosXBeforeMoved - sPosX) / Math.sqrt(Math.pow(fPosXBeforeMoved - sPosX, 2) + Math.pow(fPosZBeforeMoved - sPosZ, 2)); If you want to find the angle between the points that are moved, then you're not using the right sides of the triangle. I'll cover this more later. Alright, so how does this relate to your question? Take a look at the equation that you have in your code. We have four points we need to take a look at: fPosXBeforeMoved - The X position of your point before we moved sPosX - The X posit…
has comment: http://stackoverflow.com/comment/39873533
type: Answer
has comment: http://stackoverflow.com/comment/39868754
has comment: http://stackoverflow.com/comment/39821579

http://stackoverflow.com/comment/39866635
score: 0
comment on: http://stackoverflow.com/q/25503493
has text: @Dave Newton can You give me more detail about Your way of thinking?
type: Comment
type: QuestionComment

highlighting
tags question: http://stackoverflow.com/q/25530182
type: Tag
tag name: highlighting

http://stackoverflow.com/comment/64162341
score: 0
type: Comment
has text: I am using this https://github.com/urish/angular-moment directive. do you know how to show a full date after some time?
type: AnswerComment
comment on: http://stackoverflow.com/a/25493332

mediawiki-extensions
tag name: mediawiki-extensions
type: Tag
tags question: http://stackoverflow.com/q/25410822

http://stackoverflow.com/comment/39691158
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25438543
type: Comment
has text: This is as far as I got with testing, which shows that the form is submitted just the once if you get it right. http://jsfiddle.net/y2omyy8r/7/

http://stackoverflow.com/q/25493595
tagged with: indexing
score: 1
answer count: 1
tagged with: arrays
downvote count: 0
tagged with: javascript
has body: I have a Handlebars template that inserts an img element on my page. The image URLs come from an array that can have up to 8 items, but I only want to insert the first 4. A simple {{#each}} block like this inserts an img for every item: {{#each items}} &lt;img src="{{item.url}}" /&gt; {{/each}} How do I "stop" the {{#each}} after the first 4 items? Or, put another way, how do I tell it to only insert the img element if its index in the array is less than 4 (0 through 3)? I know I can output the current index with {{@index}}, but I can't seem to use that within an {{#if}} block. In other words, this doesn't work: {{#each items}} {{#if {{@index}} &lt; 4}} &lt;img src="{{item.url}}" /&gt; {{/if}} {{/each}} What do I do instead?
favorite count: 0
has answer: http://stackoverflow.com/a/25656418
type: UnansweredQuestion
tagged with: handlebars.js
has title: Using index value inside of a Handlebars each block
tagged with: loops
upvote count: 1
type: Question

http://stackoverflow.com/comment/39716452
type: Comment
has text: Thanks it work! But how do I make the rows less wide without using border-collapse?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25453437

http://stackoverflow.com/a/27519629
has body: I've done something somewhat similar and the solution I found was to create my own onElementInsert function and continually check until content has injected into the page. I've altered my code a bit to try to suit your needs. It might require additional changes by you: function onElementInsert( parent, func ) { var startingElementCount = parent.childNodes.length; // Checks to see if the element's number of immediate children nodes increased var checkChildCount = function(count) { if ( count &lt; parent.childNodes.length ) { func(); return true; } return false; } // Interval function to repeat every 100 milliseconds var interval = window.setInterval( function() { // Check if there are any new children if ( checkChildCount(startingElementCount) ) { // If so then trigger the insert event document.dispatchEvent( new Event('insertEvent') ); } }, 100 ); // Add an event listener for our insert event which will tell our interval to stop document.addEventListener('insertEvent', function (e) { clearInterval(interval); }, false); } onElementInsert( document.getElementsByClassName('lazyLoadingList')[0].childNodes[0], function() { // Enter code here to execute when content has been added }); So a breakdown of what's happening here: This code calls the function onElementInsert(ele, func) which will continuously check if any new children nodes are added to the element (ele) passed to it. When an insert has occurred it will execute the function (func) and will trigger the 'insertEvent' which will tell the function to stop checking for further inserts. The element with the class name 'lazyLoadingList' is the element I found that SoundCloud loads it's soundList items into. Might want to double check this for yourself. One other thing to be aware of is that this will only check for new immediate children of the element you pass in, it won't detect children of children. So when you use it, make sure it is called on the element which is having content inserted into -- or change it to ch…
type: Answer
answers question: http://stackoverflow.com/q/25497115
score: 0

http://stackoverflow.com/comment/39861917
has text: I dont have any yet, I'm very new to jquery
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25531868

http://stackoverflow.com/a/25459523
has body: Use $(this) to refer to the current element in the iteration. Also, since there's so much in common in the if/then/else blocks, move that out and just set variables for the different pieces. $("input[name='./items']").each(function(i,val){ var date = JSON.parse(val.value); var startDate = new Date(date.startdate), endDate = new Date(date.enddate), today = new Date(new Date().toISOString()); if((today-startDate&gt;0) &amp;&amp; (endDate-today&gt;0)){ var el = $("input[name='./items']:eq(0)"); var color = 'green'; }else if(today-startDate&lt;0){ el = $(this); color = 'blue'; }else if(today-endDate&gt;0){ el = $(this); color = 'red'; } if (el) { el.siblings('.x-panel').children('.x-panel-header').css('background-image', 'url(/libs/cq/ui/widgets/themes/default/ext/panel/' + color + '-top-bottom.gif)'); } });
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25459411
accepted answer of: http://stackoverflow.com/q/25459411
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25413071
favorite count: 0
tagged with: angularjs
tagged with: angularjs-ng-options
upvote count: 1
has body: I am trying to get drop downs to only populate if the drop down above them has something selected. I had someone point me in the right starting direction with something like this. This is fine for the first round - the drop downs below will not populate until the previous one has something selected. The tricky part is I'm trying to figure out if say I have selected all the way down to the 5th one and I go an reselect the 2nd level one. I then want the third level to show up and 4-5 to disappear. I was thinking maybe something like ng_show="!scope2 || !scope3" (or something similar where i pass multiple arguments), but I cannot seem to get something like this working in angular. Is there a better way of dealing with this?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25415189
score: 1
has comment: http://stackoverflow.com/comment/39677339
has title: How to handle cascading/chained dropdowns using multiple ng-options
tagged with: angularjs-scope
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25415189
linked to: http://stackoverflow.com/q/25412025
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25440768
has comment: http://stackoverflow.com/comment/39694389
tagged with: controller
has body: I'm wondering if there is a template parsing hook in Angular, that you can use globally or in specific controllers. What I want to do is to implement a language and device specific (multidimensional) theme loader, that will dynamically grab any ressource link (img-tags, inline-styles) and redirect to the specific resource. For example: Someone implemented a template that shows some image: &lt;img src="images/my-super-image.jpg"&gt; Now I want to grab the template and change the ressource to it's language specific correspondant: &lt;img src="theme/en_us/lowres/my-super-image.jpg"&gt; The following things are important for me: The one who generates the template doesn't need to take care of the themes, just uses the ressource as given in the first example I don't want to use a directive, I want a global (App specific) solution --> best would be to have it in the run()-function of the app I don't want to use look-up tables for the ressources, just want it to be highly dynamical At the moment I'm not quite sure where to place such a parse-hook-function, nor how to get access to the current templates used on a page, to manipulate them before Angular provides them to the DOM. I used some dirty hack, but I'm unhappy with it, because it will only be applied, when templates are already rendered and provided: $(document).bind('DOMNodeInserted', function(event) { if(angular.isDefined(event.originalEvent.originalTarget.innerHTML)) { event.originalEvent.originalTarget.innerHTML = String(event.originalEvent.originalTarget.innerHTML).replace('src="images','src="' + imgPath); } }); Do you have any idea of how to do it? Thank you, guys! Btw. I'm pretty new to Angular, so if you'd please be very descriptive, that would be kind. Thanks again.
has title: Angular.js template parsing hook
answer count: 1
downvote count: 0
tagged with: templates
has comment: http://stackoverflow.com/comment/39693559
has comment: http://stackoverflow.com/comment/39692882
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25444549
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39693543
type: Question
accepted answer: http://stackoverflow.com/a/25444549
has comment: http://stackoverflow.com/comment/39694456
has comment: http://stackoverflow.com/comment/39693940
tagged with: javascript

http://stackoverflow.com/a/25515509
has comment: http://stackoverflow.com/comment/39834992
upvote count: 8
has comment: http://stackoverflow.com/comment/39835135
has body: Change this line document.getElementById('roomForChart').innerHTML += htmlForGraph; to this holder = document.getElementById('roomForChart'); holder.innerHTML += htmlForGraph; and further you'll have your snippet, modified a bit holder.onclick = function(evt){ var activePoints = myLineChart.getPointsAtEvent(evt); // =&gt; activePoints is an array of points on the canvas that are at the same position as the click event. alert("See me?"); }; Add console.log(activePoints); within onclick handler to see the content of the activePoints variable. As I can see, there are three objects. For instance these are values for activePoints[0] datasetLabel: "Usage Plan" fillColor: "rgba(244,0,0,1)" highlightFill: "#fff" highlightStroke: "rgba(220,220,220,1)" label: "Aug 4" strokeColor: "#fff" value: 1024 x: 371 y: 12.356097560975627 And they may be accessed as following activePoints[0].label activePoints[0].x activePoints[0].y activePoints[0].value It will be good to check if the property is undefined first, since there are no data behind every click event.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25514802
has comment: http://stackoverflow.com/comment/39832990
has comment: http://stackoverflow.com/comment/39834076
answers question: http://stackoverflow.com/q/25514802
has comment: http://stackoverflow.com/comment/39834763
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/39832848
has comment: http://stackoverflow.com/comment/39833059
downvote count: 0

http://stackoverflow.com/a/25536397
downvote count: 0
type: Answer
has body: The === operator in javascript means: equal value and equal type So the value of f[i] must be 10 and exactly the number 10 that means the character LF in ascii.
answers question: http://stackoverflow.com/q/25536135
score: 1
upvote count: 1

http://stackoverflow.com/a/25421199
has comment: http://stackoverflow.com/comment/39657959
has comment: http://stackoverflow.com/comment/39657913
has body: Try using encodeURIComponent(str) function. var test = "Paul John"; var result = encodeURIComponent(test ); //result: "Paul%20John" To replace the content just before submitting the form use this jquery code: $(document).ready(function(){ $('.form-horizontal').submit(function(){ var encoded = encodeURIComponent($('#nickname').val().trim()); $('#nickname').val(encoded ); }); });
has comment: http://stackoverflow.com/comment/39660102
upvote count: 2
has comment: http://stackoverflow.com/comment/39657413
has comment: http://stackoverflow.com/comment/39658368
type: Answer
answers question: http://stackoverflow.com/q/25421144
has comment: http://stackoverflow.com/comment/39658428
score: 2
downvote count: 0

http://stackoverflow.com/q/25542814
favorite count: 0
downvote count: 2
score: 16
type: AnsweredQuestion
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/88966055
has answer: http://stackoverflow.com/a/25543217
tagged with: media-queries
has title: HTML5: Detecting if you're on mobile or pc with javascript?
has body: What javascript code can I use to detect if users are on a mobile or pc/mac browser in HTML5?
upvote count: 18
linked to: http://stackoverflow.com/q/3514784
type: Question
tagged with: javascript
duplicate of: http://stackoverflow.com/q/3514784
accepted answer: http://stackoverflow.com/a/25543217
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/39768501
type: AnswerComment
comment on: http://stackoverflow.com/a/25478356
type: Comment
has text: Looks like a new problem... Because when I use it through my account, it shows about 100 posts, then returns No data! but I am sure I have many more posts because I have been using that account for years! :/
score: 0

http://stackoverflow.com/comment/39830875
comment on: http://stackoverflow.com/a/25514557
score: 0
type: Comment
has text: Thanks again. You and Felix have confirmed my suspicion as to how I'm formatting my data (ergo the "JSON newb asking", and having formatted it more than a few ways already). Also I appreciate the heads-up on my if statement; I was a little doubtful of that too but it was back-burnered since it wasn't preventing me from working on getting the data ;)
type: AnswerComment

http://stackoverflow.com/q/25510711
has answer: http://stackoverflow.com/a/25554547
possible better answer: http://stackoverflow.com/a/25915268
has answer: http://stackoverflow.com/a/25915268
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: photos
type: Question
upvote count: 2
answer count: 2
has title: iOS 8 Beta 5 Safari Multiple Photo Upload
tagged with: ios8
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: We have a mobile web app that does some photo uploads using the html input tag as follows: &lt;input type='file' accept='image/* name='takeMult[]'/&gt;. This was working in all previous builds of iOS safari (6.0 and greater). Has anyone else seen this with the Beta yet? We are wrapping it in a jquery widget and that could be the issue as there have been noted problems with jquery mobile on iOS 8 beta, but I thought they were fixed on the most recent beta. Removing it from the query widget as follows also failed: &lt;input type='file' multiple='multiple'&gt; It is no longer is allowing for multiple photo selects. The dialog box comes up and it won't let you select images. Does anyone have a workaround or heard any changes to mobile safari or photos/file input? EDIT: I've confirmed this issue on multiple devices and the iOS 8 Beta simulator on xCode 6. I've submitted a bug report to Apple on the issue. Beta 6 was released to carriers only, so no word if it is fixed in that build. Still would like some feedback if anyone has a workaround in the off chance that Apple doesn't fix the issue.
accepted answer: http://stackoverflow.com/a/25554547
favorite count: 0
has comment: http://stackoverflow.com/comment/40790464

http://stackoverflow.com/a/33611038
type: Answer
downvote count: 0
has body: There is no user-unhandled column on yours Exceptions window, if its hide make it appear and uncheck all check marks. See:
score: 1
answers question: http://stackoverflow.com/q/25536336
upvote count: 1

http://stackoverflow.com/a/25452716
has comment: http://stackoverflow.com/comment/39819801
downvote count: 1
upvote count: 0
score: -1
has body: Also note that a 128x128 icon is required for Firefox Marketplace, see https://developer.mozilla.org/en-US/Apps/Build/Manifest#Required_icon_sizes
answers question: http://stackoverflow.com/q/25436828
type: Answer

http://stackoverflow.com/q/25518735
type: Question
has comment: http://stackoverflow.com/comment/39838686
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/39841278
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/39838407
has comment: http://stackoverflow.com/comment/39838432
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39838721
has comment: http://stackoverflow.com/comment/39838810
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25519122
type: UnansweredQuestion
has title: Issue in Calling functions in another JS file in ASP.Net MVC application
has comment: http://stackoverflow.com/comment/39838384
has answer: http://stackoverflow.com/a/26612315
has body: I am new to ASP.NET MVC. I have an asp .net MVC application. I have a view index.cshtml. I have two JS files:- Master.js and Child.js. All JS functions are defined in Master.js and those functions are used in Child.js file. I am getting following error: Object doesn't support property or method 'method1'. If I copy whole code of Master.js and place it above code of Child.js, then it works very fine in MVC application. Both JS files are working fine with ASP.NET web forms application. I tried to load master.js file in _layouts.cshtml and child.js index.cshtml. I was hoping that master.js will load before child.js. index.cshtml:- @section JavaScript { </ script> } layout.cshtml: @ViewBag.Title @Scripts.Render("~/bundles/modernizr") @Scripts.Render("~/Master.js") @RenderSection("javascript", false) @RenderBody() Thanks in advance Additional Information: In Master.js: I am extending the method as follows: $.fn.method1 = function() { //My Code }; I child.js : I am using the method as follows: $('#MyDiv').method1(); I came across following link: Problems with Jquery function extend in MVC4

http://stackoverflow.com/comment/39751861
comment on: http://stackoverflow.com/q/25472355
has text: Recursion. Loop through all nodes and replace as necessary.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25499891
has comment: http://stackoverflow.com/comment/39802898
accepted answer of: http://stackoverflow.com/q/25499418
answers question: http://stackoverflow.com/q/25499418
downvote count: 0
score: 1
type: AcceptedAnswer
has body: Remove the javascript: parts in the onclick. &lt;a href="http://forma.culturadigital.cc/es/casos" onclick="unhide('casos', 'nil', 'nil');activate('menucasos');return makeGetRequest(event,'http://forma.culturadigital.cc/pages/casos.php');" class="menu_link"&gt;&lt;span id="menucasos" class="nonactive"&gt;&amp;nbsp;Casos de estudio&amp;nbsp;&lt;/span&gt;&lt;/a&gt; Prefixing with javascript: is for the href attribute in a link, in the onclick handler you should place normal javascript. Other than that there is an error in your js, in the activate function. it starts with: function activate(fieldID){ var e = window.event; if (!e.ctrlKey &amp;&amp; !e.button == 1) { window.event returns undefined for firefox. change it to pass the event as a parameter like you do in makeGetRequest activate(event,'menucasos'); and function activate(e, fieldID){ if (!e.ctrlKey &amp;&amp; !e.button == 1) {
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39804670

http://stackoverflow.com/a/25431980
score: 0
has comment: http://stackoverflow.com/comment/39676694
has body: Here is an idea what you could do: Demo Fiddle HTML Input words: &lt;input type="text" class="word"&gt; &lt;ul class="word-list"&gt;&lt;/ul&gt; JS var words = []; // will render the contents of the list into the .word-list list var showWords = function () { words.sort(); //sort the words var $list = $('.word-list'); $list.html(''); // clear the last content of .word-list $.each(words, function () { // iterate through the words $list.append('&lt;li&gt;' + this + '&lt;/li&gt;'); // append a list item for each word (this refers to the word in the array }); }; $('.word').on('keyup', function (e) { // listen to each keypress in the input box if (e.which === 13) { // if we pressed enter var $input = $(e.target); // take the reference to the inputbox var word = $input.val(); // take the value of the input box words.push(word); // add it to the array $input.val(''); // clear the input box showWords(); // show the words } }); This solution uses jQuery. I suggest you go through the used functions: .each, .val, .keyup, .html, .append to be able to completely understand the code.
answers question: http://stackoverflow.com/q/25431775
type: Answer
has comment: http://stackoverflow.com/comment/39676757

http://stackoverflow.com/q/25488322
has body: Trying to wrap each buttons in a div (class='gp'). how to do this with pure JavaScript. HTML sds sdsasas sds CSS .gp{ background: blue; padding: 8px; } JavaScript function fixjsf(){ var parent = document.getElementsByClassName("af-button-group-justified"); var elementsCount = parent.length; for(var i=0; i<=elementsCount; i++){ var childCount = parent[i].childNodes.length; var elementContent = ""; for(var j=0; j<=childCount; j++){ var clone = parent[i].childNodes[j].cloneNode(true); elementContent += " "+clone+" "; } parent[i].innerHTML = elementContent; } } fixjsf(); Expecting the dom to look like this sds sdsasas sds JSFiddle
has answer: http://stackoverflow.com/a/25489138
upvote count: 3
has title: Wrap an element like wrap() function in jQuery, with pure JS
type: Question
has comment: http://stackoverflow.com/comment/39781373
score: 3
possible better answer: http://stackoverflow.com/a/25488904
has comment: http://stackoverflow.com/comment/39781657
has answer: http://stackoverflow.com/a/25488904
tagged with: dom
has answer: http://stackoverflow.com/a/25488670
downvote count: 0
has answer: http://stackoverflow.com/a/25488496
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25488670
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/q/25398534
has answer: http://stackoverflow.com/a/25423353
type: Question
has title: Unable to Extract Value from URL in Jmeter
tagged with: javascript
has body: I'm new to JMeter tool. I have requirement to record an email transaction. There are many dynamic values which are passed as URL query string. I'm unable extract those values using Reg-ex Extractor. Those dynamic parameters values are used in the same HTTP request not in the next/subsequent request. For example : www.xyz.com/shva?123&amp;abc=LLRRQQ;cdv=AABBCC. In the same http request contains parameter abc = LLRRQQ and cdv=AABBCC. So how to dynamically extract from URL query string and pass it to the same request. Any help would be highly appreciated ! Thanks
score: 0
answer count: 2
tagged with: load-testing
tagged with: performance-testing
tagged with: load
has answer: http://stackoverflow.com/a/25401148
type: UnansweredQuestion
tagged with: jmeter
has comment: http://stackoverflow.com/comment/39615302

http://stackoverflow.com/q/25500970
has body: As the title suggests. How do I do this? Im bound to use pure JS, and i'm realy new to it (like realy realy new). So please excuse my noob question. :) My array looks like this : var questionArr = [ { 'questionId' : 'Question1', 'question' : 'Q1: How many Objects are there? ', 'choices' : [ {"id" : "10", "tf" : false, "points" : 0}, {'id' : "11", "tf" : false, "points" : 0}, {'id' : "12", "tf" : false, "points" : 0}, {'id' : "15", "tf" : true, "points" : 10}, {'id' : "16", "tf" : false, "points" : 0} ], 'Mchoice' : false, 'completed' : false }, { 'questionId' : 'Question2', 'question' : 'Q2: some Question will go here? ', 'choices' : [ and ongoing. Its for a quiz as you can see, and i want to get the Value of 'completed'. Im changing the value into true later on to check if a question has been answered or not. If there is at least on answer for every question selected, a submit button should be enabled. So i was thinking about using a forEach loop to check if completed is set to true or false for every question. My forEach looks like this, at least it does so far. questionArr.forEach(function(questionId, value){ console.log(questionId, value); }); I'm realy clueless how i'm supposed to check for that value now and how i than proceed from there to enable my button. For the button i was think about something like this, this is more an optional question now, but it would be good to know if i'm going in the right direction with this. for(l = 0; l &lt; questionArr[questionId].completed ; l++){ if (questionArr[l].completed === true){ button = document.getElementById("button").disabled = false; } } I hope someone can help me with this. Thanks in advance.
type: AnsweredQuestion
has title: How to get a specific Value from an array with forEach
type: Question
has answer: http://stackoverflow.com/a/25501105
tagged with: javascript
has answer: http://stackoverflow.com/a/25501067
accepted answer: http://stackoverflow.com/a/25501183
score: 0
has answer: http://stackoverflow.com/a/25501183
has answer: http://stackoverflow.com/a/25501088
answer count: 5
possible better answer: http://stackoverflow.com/a/25501058
has answer: http://stackoverflow.com/a/25501058

http://stackoverflow.com/comment/39603184
has text: Can you create a [fiddle](http://jsfiddle.net/) with your code demonstrating the problem? How is `fadeOut` and `fadeIn` originally called? What does the HTML look like?
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25392385

http://stackoverflow.com/q/25457299
has body: In my javascript code I am using the window.open method and the behavior is totally inconsistent: depending on the way I write the code it will either open a new tab or open a pop up window (which is blocked by the pop up blocker). I don't know how to work around it thanks for your help. The html code: Visualiser The javascript code: function quoteVisu(){ quoteCreate(1); } quoteCreate is a method with an AJAX call function quoteCreate(num_function){ var request=$.ajax({ url: url_up, type: "POST", beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))}, data: {q_param: { title: title, total: total, list: list, client: idclient, tax_rate: tax_rate }}, success: function(data, textStatus, jqXHR) { if (num_function==1){request.done(goShow(data.quote_id))}; if (num_function==0){request.done(goBack());} }, dataType: "json" }); return true; } and the goShow method: function goShow(quote_id) { var url_visu="/visu_pdf/quote_visu."+quote_id window.open(url_visu, '_blank'); return true; } The code above gives a pop up window which is not the behavior expected. If I put the window.open in the quoteVisu method for example I will have a tab open and not a pop up which is what I want. But if I put it there I don't have the answer from the JSON which is needed for the new window url. Thanks for your help.
has comment: http://stackoverflow.com/comment/39724166
has comment: http://stackoverflow.com/comment/39724106
score: 0
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/4907843
tagged with: ajax
tagged with: window.open
accepted answer: http://stackoverflow.com/a/25457557
type: Question
type: AnsweredQuestion
has title: window.open opens pop up and not window - behavior inconsistent
has answer: http://stackoverflow.com/a/25457557
has comment: http://stackoverflow.com/comment/39724567

http://stackoverflow.com/q/25474265
type: Question
tagged with: javascript
has body: My javascript is: $(function(){ $("a[data-toggle-length]='toggle'").click(function(event){ event.preventDefault(); $("span.show_hide").toggleClass("shown hidden"); $("table").toggleClass("wide narrow"); // here $.get('/toggle_full_details'); }); }); I want to add to this js, something like (just before the $.get call above): if (params[:focus_on_first_field]) == "1" { $("input[type='text']:first").focus(); } But params[:focus_on_first_field] is the rails way to refer to a url parameter and gives me a syntax error here. How can I refer to the url param in javascript? I can use jquery if it makes it easier. I already use it elsewhere. The haml view is; = render partial: 'links', :locals => {:first_field_focus => 1 } which calls a partial which uses: - this_first_field_focus = ((first_field_focus ||= 0) == 1) ? 1 : 0 ... = render partial: 'toggle_details_link_bold', :locals => {:txt => "Summary / Details", :show_hide => 'shown', :first_field_focus => this_first_field_focus} and then uses another partial, which has the hyperlink: %a{href: '#', :data => {toggle_length: 'toggle', first_field_focus: first_field_focus}} I tried using ... // here if ($(location).attr('data-first-field-focus') == "1") { $("input[type='text']:first").focus(); } ... but it didn't work (but no console errors either) Without the attr condition, $("input[type='text']:first").focus(); does work on its own.
tagged with: jquery
tagged with: ajax
linked to: http://stackoverflow.com/q/979975
score: 0
has comment: http://stackoverflow.com/comment/39764483
has comment: http://stackoverflow.com/comment/39755860
answer count: 0
type: UnansweredQuestion
tagged with: ruby-on-rails
has title: How can I refer to url params in my rails javascript template using jquery?

http://stackoverflow.com/comment/39642788
type: AnswerComment
comment on: http://stackoverflow.com/a/25412886
score: 0
has text: Interesting. My template has it's html structure, then includes jQuery, then Cycle2, then script file with functions and then evokes the init function from script file in $(document).ready(function(){ base.init(); }); Your suggestions work well when I place them outside an init function applied on the template of the loaded page.. thus if initiated before $(document).ready(function() { .. }
type: Comment

http://stackoverflow.com/comment/39703463
has text: Is this what you're trying to achieve? http://jsfiddle.net/u2oj799u/8/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25442869
score: 0

http://stackoverflow.com/q/25425958
tagged with: http://stackoverflow.com/tag/html
has title: Accessing Parent global variable in iFrame url
tagged with: php
has answer: http://stackoverflow.com/a/25426035
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25426047
has body: I have following code Placed in my domain as thedomain.com/myapp/index.php <?php ini_set('display_errors',1); error_reporting(E_ERROR); $storeId = 123; ?> In my thurber/index.php i want to access the parent variable $storeId Is this possible? if so How can i achieve it?
has answer: http://stackoverflow.com/a/25426047
type: Question
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25426035
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39664921

http://stackoverflow.com/comment/39604373
score: 0
type: Comment
has text: @FelixKling I agree, that is better. I will add that as an alternative.
type: AnswerComment
comment on: http://stackoverflow.com/a/25392970

http://stackoverflow.com/a/25444301
answers question: http://stackoverflow.com/q/25436493
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/39710043
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/39708024
has body: Better is keeping url in the point object like: data: [{x:Date.UTC(2012, 10, 9), y:37000,url:'http://www.google.com'}, [Date.UTC(2012, 11, 1), 39000]] Example: http://jsfiddle.net/5kyzkps5/3/ Click on the first point, url will be working.

http://stackoverflow.com/q/25463706
has body: I'm creating a game that allows two socket connections with Node.js and Socket.io. There is a "host" and and "join" function. First the host connects, but I want to make sure they cannot connect again to another game, so I put in a conditional to check if the game object has been created for that socket. For some reason, (with the simplified code I used below), the Game object is not saved with the UserSocket object. I'm assuming it's a scoping issue, but not really sure. function Game(gameid) { this.gameID = gameid; this.joined = false; this.active = false; this.baseball = false; } function UserSocket(sock) { o = this; o.sock = sock; o.sock.on('clientData', function (data) { o.CreateGame(data); }); o.CreateGame = function (hostdata) { console.log('in create game'); ---&gt;console.log(o.game); //*** this call always returns null if (o.game) { console.log('game already started'); // this never happens return false; } newgame = new Game(hostdata); console.log("game object created"); console.log(newgame.gameID); newgame.host = o.sock; o.game = newgame; console.log(o.game); arrGames.push(newgame); o.SendToHostSocket("Hosting game: " + newgame.gameID ); } }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39736042
tagged with: node.js
has comment: http://stackoverflow.com/comment/39735906
has title: Node.js and Object Oriented Javascript
has comment: http://stackoverflow.com/comment/39736016
has comment: http://stackoverflow.com/comment/39735800
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39735985
has answer: http://stackoverflow.com/a/25463942
answer count: 1
has comment: http://stackoverflow.com/comment/39735772

http://stackoverflow.com/q/25410810
has title: Node 0.11.x in Azure Web Site
tagged with: node.js
linked to: http://stackoverflow.com/q/25194947
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25437787
has body: I am trying to get a node app running on Azure with version 0.11.x of node, so I can take advantage of some new features (e.g. generators &amp; Koa). I have read this question and tried to follow the steps, with no success so far: Error setting up node v0.11.x on Azure WebSite Here are the steps I did: In VS2013 (update3), File => New Project Choose "Blank Microsoft Azure Node.js Web Application" (under Templates/Javascript/node.js), click OK In server.js, change the last "hello world" line to show the node version: res.end('App running in node version ' + process.version + '\n'); Add a new file "iisnode.yml" in same folder as server.js, with the contents: nodeProcessCommandLine: D:\home\site\wwwroot\bin\node.exe Copy node.exe (version 0.11.13) into the "bin" folder (under the folder where server.js is) Right-click the project in VS, select Publish, create new Website with all the default credentials/etc... then click Publish At this point, the "myproj.azurewebsites.net" page comes up with the response: App running in node version v0.10.29 But I was hoping for node version 0.11.13. If I go to my \bin folder and run node.exe --version it spits out: v0.11.13 Running locally (F5) seems to do the right thing: App running in node version v0.11.13 I'm fairly stumped how to get node 0.11 running on an Azure web site, any suggestions?
score: 0
answer count: 2
tagged with: azure
has answer: http://stackoverflow.com/a/25487409
type: UnansweredQuestion
tagged with: iisnode

http://stackoverflow.com/comment/39752825
comment on: http://stackoverflow.com/a/25472748
has text: oh.. yes document.ready function is a function itself. i didnt thought of that.. xD Thanks. Next time i will be careful..
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/39890311
type: Comment
has text: @JamesThorpe Ok thanks, I will delete it now. I have edited my post as I have sorta figured the issue, but not fully.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25547552

http://stackoverflow.com/comment/39878541
comment on: http://stackoverflow.com/q/25540705
has text: Yah its also possible
score: 0
type: Comment
type: QuestionComment

variables
tag name: variables
tags question: http://stackoverflow.com/q/25550783
tags question: http://stackoverflow.com/q/25529619
tags question: http://stackoverflow.com/q/25510245
tags question: http://stackoverflow.com/q/25395334
tags question: http://stackoverflow.com/q/25459516
tags question: http://stackoverflow.com/q/25518865
tags question: http://stackoverflow.com/q/25444057
tags question: http://stackoverflow.com/q/25522405
tags question: http://stackoverflow.com/q/25477910
tags question: http://stackoverflow.com/q/25499448
type: Tag
tags question: http://stackoverflow.com/q/25409431
tags question: http://stackoverflow.com/q/25392705
tags question: http://stackoverflow.com/q/25546868
tags question: http://stackoverflow.com/q/25471394
tags question: http://stackoverflow.com/q/25501969
tags question: http://stackoverflow.com/q/25500450
tags question: http://stackoverflow.com/q/25393657
tags question: http://stackoverflow.com/q/25404063
tags question: http://stackoverflow.com/q/25541482
tags question: http://stackoverflow.com/q/25489060
tags question: http://stackoverflow.com/q/25530534
tags question: http://stackoverflow.com/q/25540250
tags question: http://stackoverflow.com/q/25471037
tags question: http://stackoverflow.com/q/25402904
tags question: http://stackoverflow.com/q/25495241

http://stackoverflow.com/comment/39814757
has text: Your question could use a formatting change since it does not appear as you typed it. Also when you use links to jsfiddle you are to include a minimal working example in the question.
score: 0
comment on: http://stackoverflow.com/q/25506169
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39774165
type: AnswerComment
score: 0
type: Comment
has text: simple webview, the url is below.
comment on: http://stackoverflow.com/a/25484612

http://stackoverflow.com/a/25431918
type: Answer
upvote count: 1
score: 1
has body: It seems to me your actual question is how to do DOM manipulation, which is... a bit of a question I'll keep it simple, I suppose. Add an element to your HTML to contain the words, first of all. Something like &lt;p id="words"&gt;&lt;/p&gt; To access that element through javascript, you will use var words = document.getElementById("words"); There's an issue with your code, in that Array.sort() does not return a sorted array, but rather sorts in place. You should remedy this by removing the alphabetize variable, and just using input. Now to actually add the text content to the paragraph, you should use the Node.textContent attribute like so: words.textContent = input.join(); You can read up more on DOM manipulation on the mozilla devleper network here: https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model
answers question: http://stackoverflow.com/q/25431775
downvote count: 0

http://stackoverflow.com/q/25543549
has answer: http://stackoverflow.com/a/25618851
tagged with: kendo-ui
has answer: http://stackoverflow.com/a/25544171
has title: Php Kendo UI With datasource (CRUD)
has comment: http://stackoverflow.com/comment/39886460
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40022566
upvote count: 1
tagged with: php
tagged with: crud
score: 1
has body: I am struggling to get the functionality of CRUD using the Kendo UI? My create and Update options dont seem to work but my read does, any help? I have been through plenty of tutorials but simply just cant get this to work.Thanks in advance. Here is my code, this is my Index.php file:
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40022676
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/25419378
answers question: http://stackoverflow.com/q/25419277
has body: You could use the append function in JQuery. $(document).ready(function () { var div = $("&lt;div&gt;&lt;/div&gt;"); var span1 = $("&lt;span&gt;&lt;/span&gt;"); span1.append("value 1"); var span2 = $("&lt;span&gt;&lt;/span&gt;"); span2.append("value 2"); div.append(span1).append("&lt;br&gt;").append(span2).append("&lt;br&gt;"); $("body").append(div); }); Replace the text values with the values you are returning from your query. See my JSFiddle
score: 0
type: Answer

http://stackoverflow.com/a/25476313
accepted answer of: http://stackoverflow.com/q/25475878
answers question: http://stackoverflow.com/q/25475878
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Try (this pattern) // var last = $.now(); function info(text, state) { $("&lt;h4&gt;" + text + "&lt;/h4&gt;").appendTo("body"); if (state != "run") { $("h2").text(text).fadeIn("slow").delay(30000).fadeOut(); } // missing closing `{` at OP }; $.post(buy, function (_info) { // `_info` : return json object // `info` : function declaration name // diff = $.now() - last; $(document).prop('title', 'Purchased ' + _info['itemName'] + '!'); info('Purchased ' + _info['itemName'] + ' for ' + _info['expectedPrice'] + ' in ' + diff + ' milliseconds!' , "run"); console.log('Purchased ' + _info['itemName'] + ' for ' + _info['expectedPrice'] + ' in ' + diff + ' milliseconds!'); }); jsfiddle http://jsfiddle.net/guest271314/7vxb7336/
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39783457
type: AnswerComment
type: Comment
has text: Same name = confusing... Me much dumb me should stop posting stackOveflow XP
comment on: http://stackoverflow.com/a/25487993
score: 0

http://stackoverflow.com/comment/39761869
type: Comment
has text: Check capitalization of keyCode in your switch statement.
type: AnswerComment
comment on: http://stackoverflow.com/a/25475318
score: 0

http://stackoverflow.com/comment/39772942
type: Comment
has text: @Kiee but how do I know where the user is going?
score: 0
comment on: http://stackoverflow.com/q/25484002
type: QuestionComment

http://stackoverflow.com/a/25445296
has body: PHP : &lt;?php mysql_connect('localhost','root',""); mysql_select_db('geo-image'); $ARR_DATA = array(); $sql="SELECT * FROM images WHERE satellite='".$_POST["satellite"]."'"; $result=mysql_query($sql)or die(mysql_error()); while($rows = mysql_fetch_array($result) { $arr_temp['a'] = $rows['xpos']; $arr_temp['b'] = $rows['ypos']; $arr_temp['c'] = $rows['width']; $arr_temp['d'] = $rows['height']; $arr_temp['e'] = $rows['xoffset']; $arr_temp['f'] = $rows['yoffset']; $arr_temp['g'] = $rows['rotation']; $arr_temp['h'] = $rows['resolution']; $arr_temp['i'] = $rows['name']; $arr_temp['j'] = $rows['url']; $ARR_DATA[] = $arr_temp; } $count = count($ARR_DATA); ?&gt; JS : &lt;script&gt; &lt;?php foreach($ARR_DATA as $key=&gt;$arr_temp) { ?&gt; var a = "&lt;?php echo $arr_temp['a'];?&gt;"; var b = "&lt;?php echo $arr_temp['b'];?&gt;"; var c = "&lt;?php echo $arr_temp['c'];?&gt;"; var d = "&lt;?php echo $arr_temp['d'];?&gt;"; var e = "&lt;?php echo $arr_temp['e'];?&gt;"; var f = "&lt;?php echo $arr_temp['f'];?&gt;"; var g = "&lt;?php echo $arr_temp['g'];?&gt;"; var h = "&lt;?php echo $arr_temp['h'];?&gt;"; var i = "&lt;?php echo $arr_temp['i'];?&gt;"; var j = "&lt;?php echo $arr_temp['j'];?&gt;"; var img = "image/"+j+".jpg"; anArray[&lt;?php echo $key;?&gt;] = [ a, b, c, d, e, f, g, h, i, j]; &lt;?php } ?&gt; &lt;/script&gt;
score: 0
answers question: http://stackoverflow.com/q/25444900
type: Answer

http://stackoverflow.com/q/25423336
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/25424742
has body: So I have this layout here . 4 divs, if I hover on top it (should) scroll top, if I hover on bottom it (should) scroll bot, left scrolls left and right scrolls right! On mouse hover on any of the four divs inside the content will scroll the page accordingly. Important h_amount is horizontal and v_amount is for vertical function scroll_h() { console.log('scrolling left and right'+h_amount); $('#game').animate({ scrollLeft: h_amount }, 100, 'linear',function() { if (h_amount != '') { scroll_h(); } }); } function scroll_v() { console.log('scrolling up and down'+v_amount); $('#game').animate({ scrollTop: v_amount }, 100, 'linear',function() { if (v_amount != '') { scroll_v(); } }); } and then on hover I call $('.direction_right').hover(function() { console.log('scroll right'); h_amount = '+=50'; scroll_h(); }, function() { h_amount = ''; }); $('.direction_up').hover(function() { console.log('scroll up'); v_amount = '-=50'; scroll_v(); }, function() { v_amount = ''; }); FULL fiddle here The problem, I cannot understand why it does not work for up and down. I think my script is correct so am thinking maybe css which is a general weakness of mine might be wrong :D help!
type: Question
has answer: http://stackoverflow.com/a/25424742
has title: Scrolling on webpage with mouse location - hover on side elements
upvote count: 2
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/18779708
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/39808803
has text: It seems like spyOn() doesn't have access to window object and to ajax $. But the next line using $ to emulate click working well.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25502975

http://stackoverflow.com/a/25448120
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25448056
answers question: http://stackoverflow.com/q/25448056
type: Answer
has comment: http://stackoverflow.com/comment/39706530
downvote count: 0
score: 1
has body: You should use the same sequence in success for fadeOut() and fadeIn() success: function (html) { $('#loading').fadeOut('fast', function () { $('#my-box').html(html).fadeIn(); }); } DEMO
has comment: http://stackoverflow.com/comment/39706124

http://stackoverflow.com/comment/39838871
comment on: http://stackoverflow.com/a/25518434
type: AnswerComment
has text: @wenzday - You are trying to install your event handlers too early before the page is loaded (posting external links for this reason are fine). See how I modified the code at the end of my answer by putting it inside a `$(document).ready()` block.
score: 0
type: Comment

http://stackoverflow.com/comment/39827198
type: AnswerComment
has text: I want to run servlets and so i need to set up the catalina environment variable.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25512627

http://stackoverflow.com/q/25448162
has body: I have a function like: var Crypto = require('crypto'); var string_to_encode = "some number or string"; var encrypted_string = ""; var des_key = new Buffer("key string here", "base64"); var des_iv = new Buffer(0); var des_encryption = Crypto.createCipheriv("DES-EDE3", des_key, des_iv); encrypted_string = des_encryption.update(string_to_encode, "utf8", "base64"); console.log(string_to_encode+" =&gt; ["+encrypted_string+"]"); Which outputs a short encrypted string. But when I try to reverse this with: var Crypto = require('crypto'); var string_to_decode = "encrypted string from above"; var deciphered_string = "empty"; var des_key = new Buffer("key string here", "base64"); var des_iv = new Buffer(0); var des_decryption = Crypto.createDecipheriv("DES-EDE3", des_key, des_iv); deciphered_string = des_decryption.update(string_to_decode, "base64", "utf8"); console.log(string_to_decode+" =&gt; ["+deciphered_string+"]"); It returns an empty string (ie "encoded string from above => []") I initially thought that the encoding methods might be wrong but the input will only ever be a number as a string and the result is the same for ascii and utf8. My understanding of the createDecipheriv is that it is effectively the mirror of createCipheriv and it should return the deciphered string. Is this not correct? If so how should the string be decrypted? SOLVED: .final() was required for both encoding and decoding the string. We've used it elsewhere without and my understanding was wrong.
tagged with: encryption
tagged with: node.js
downvote count: 0
score: 1
has title: Node.JS Crypto decipher not working
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25449467
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/25449467
favorite count: 0

http://stackoverflow.com/comment/39724262
score: 0
has text: hmmm it isn't working
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25457267

http://stackoverflow.com/q/25428612
favorite count: 0
has title: Periodic refresh of a book's dynamic pages using turn.js
type: Question
upvote count: 2
answer count: 1
has body: I have created an example of dynamically generated content to be viewed using turn.js using the sample provided here. This is the part of the code that I have so far: &lt;body&gt; &lt;div id="paper"&gt; &lt;/div&gt; &lt;/body&gt; &lt;script type="text/javascript"&gt; $(window).ready(function() { $('#paper').turn({pages: 12}); }); $('#paper').bind('turning', function(e, page) { var range = $(this).turn('range', page); for (page = range[0]; page&lt;=range[1]; page++) addPage(page, $(this)); }); function addPage(page, book) { // Check if the page is not in the book if (!book.turn('hasPage', page)) { // Create an element for this page var element = $('&lt;div /&gt;').html('Loading…'); // Add the page book.turn('addPage', element, page); // Get the data for this page $.ajax({url: "getPage?filename=abcd&amp;page="+page}) .done(function(data) { element.html(data); }); } } &lt;/script&gt; getPage is a jsp that returns &lt;div class="page"&gt;&lt;img src="docs/local/abcd_1.png" alt="" /&gt;&lt;/div&gt; or any other page number as per the ajax request. The problem I have is that the png's requested may or may not be available on the web server at the time of the request. They will become available a few (or sometimes many) seconds later. So I would like to be able to display some default "Loading..." type content if a png is not available and refresh periodically (i.e. every x seconds) until the actual png becomes available. I don't have a problem changing the output of getPage if required.
has answer: http://stackoverflow.com/a/25552143
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: turnjs
accepted answer: http://stackoverflow.com/a/25552143
type: AnsweredQuestion

http://stackoverflow.com/q/25550449
type: Question
has comment: http://stackoverflow.com/comment/39896185
answer count: 1
tagged with: javascript
has title: How to get week days between two different dates in javascript
upvote count: 1
favorite count: 0
downvote count: 0
has answer: http://stackoverflow.com/a/25551115
accepted answer: http://stackoverflow.com/a/25551115
has comment: http://stackoverflow.com/comment/39896065
type: AnsweredQuestion
score: 1
tagged with: date
has comment: http://stackoverflow.com/comment/39895937
has body: Here I need a way to find out the weekdays between two dates. If I supply two dates like '2014-08-28' and '2014-08-30', it should return ['Friday','Saturday']. var d = new Date(); var weekday = new Array(7); weekday[0]= "Sunday"; weekday[1] = "Monday"; weekday[2] = "Tuesday"; weekday[3] = "Wednesday"; weekday[4] = "Thursday"; weekday[5] = "Friday"; weekday[6] = "Saturday"; var n = weekday[d.getDay()]; How can I use .getDay()?

http://stackoverflow.com/q/25470031
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39748524
has comment: http://stackoverflow.com/comment/39748155
type: Question
has comment: http://stackoverflow.com/comment/39748783
has answer: http://stackoverflow.com/a/25470131
tagged with: javascript
has body: I'm using sinon.js for testing, but it's not relevant here. Original sinon implementation contains following code: sinon = { log: function() {} //... } there is just a stub log function to be overriden by users, higher-level sinon functions use that. That makes sense. And now I try to define sinon.log function for myself: sinon.log = console.log; When I try to log something, I get a nasty error I don;t clearly understand: sinon.log(1) &gt; TypeError: Illegal invocation I have found that it has something to do with the this context in javascript, because when I change this implementation to: sinon.log = function(){ console.log.apply(console, arguments) }; it works perfectly for n arguments (just as console.log does). But I don't know why should I set the this object to console object. Does it rely on internal browser implementation (I'm using chrome)? Is there any standard for that, e.g. I should always set this object to console in such case? I ask for the explanation: how do the internals work, why is this error raised and why is my second implementation correct.
score: 0
tagged with: this
answer count: 1
accepted answer: http://stackoverflow.com/a/25470131
tagged with: console
has comment: http://stackoverflow.com/comment/39747742
has title: javascript assign console.log to an object
has comment: http://stackoverflow.com/comment/39748109
linked to: http://stackoverflow.com/q/8159233
has comment: http://stackoverflow.com/comment/39748366

http://stackoverflow.com/a/25512405
has comment: http://stackoverflow.com/comment/39826586
answers question: http://stackoverflow.com/q/25512340
type: Answer
has comment: http://stackoverflow.com/comment/39828089
upvote count: 2
has body: Basicly, if you show your captcha image captcha_code_file.php, you generate a code to display. Save this Code in the User Session. If your Form is sended, you check, if the captcha code is in the session. The rand=1846368456 parameter, is only to ensure, that you see the latest generated picture, and not some cached one. How to check the code from JS? You can provide an checkCaptcha.php, which basicly do the lookup in the session, and echo true or false. Before sending your Form, you can do an Ajax call to it. checkCaptcha.php?code=foobar $code = isset($_GET['code']) ? $_GET['code'] : ''; $sessionCode = isset($_SESSION['captchacode']) : $_SESSION['captchacode'] : ''; if (empty($code) || $code !== $sessionCode) { die('FALSE'); } die ('TRUE'); Ajax: var captchacode = 'foobar'; //Read from Input $.get("checkCaptcha.php?code=" + captchacode, function( data ) { if (data == 'FALSE') { alert('Error with Captcha'); } }); On Form submit, you should clear the "used" captcha code. Whats about Security? We always check Captcha Code on Server side. This ajax is only for User Experience. I don't think this solution provides a security hole. It is more easy to do single Post: $success = false while(!$sucess) { $code = tryReadCode(); $result = attackPageViaPost($code); $success = str_pos('Congrats, you successfuly entered the captcha', $result) !== false; } then $success = false while(!$sucess) { $code = tryReadCode(); $success = getAjaxResult($code); } attackPageViaPost($code)
has comment: http://stackoverflow.com/comment/39827594
has comment: http://stackoverflow.com/comment/39827087
score: 2
downvote count: 0

http://stackoverflow.com/comment/39646732
comment on: http://stackoverflow.com/q/25415637
type: Comment
type: QuestionComment
has text: Why can't you see the fields from jQuery? What is stopping you?
score: 0

http://stackoverflow.com/q/25436056
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39685087
has answer: http://stackoverflow.com/a/25436825
accepted answer: http://stackoverflow.com/a/25436825
has comment: http://stackoverflow.com/comment/39685184
type: Question
has comment: http://stackoverflow.com/comment/39684534
has comment: http://stackoverflow.com/comment/39684776
tagged with: javascript
has comment: http://stackoverflow.com/comment/39684636
score: 0
has body: I'm looking for a way to reference an object, based on a variable with it's name in it. I know I can do this for properties and sub properties: var req = {body: {jobID: 12}}; console.log(req.body.jobID); //12 var subProperty = "jobID"; console.log(req.body[subProperty ]); //12 var property = "body"; console.log(req[property][subProperty]); //12 is it possible for the object itself? var req = {body: {jobID: 12}}; var object = "req"; var property = "body"; var subProperty = "jobID"; console.log([object][property][subProperty]); //12 or console.log(this[object][property][subProperty]); //12 Note: I'm doing this in node.js not a browser. Here is an exert from the function: if(action.render){ res.render(action.render,renderData); }else if(action.redirect){ if(action.redirect.args){ var args = action.redirect.args; res.redirect(action.redirect.path+req[args[0]][args[1]]); }else{ res.redirect(action.redirect.path); } } I could work around it by changing it to this, but I was looking for something more dynamic. if(action.render){ res.render(action.render,renderData); }else if(action.redirect){ if(action.redirect.args){ var args = action.redirect.args; if(args[0]==="req"){ res.redirect(action.redirect.path+req[args[1]][args[2]]); }else if(args[0]==="rows"){ rows.redirect(action.redirect.path+rows[args[1]][args[2]]); } }else{ res.redirect(action.redirect.path); } }
answer count: 1
has comment: http://stackoverflow.com/comment/39684731
has comment: http://stackoverflow.com/comment/39684600
has comment: http://stackoverflow.com/comment/39684720
has comment: http://stackoverflow.com/comment/39685281
has title: Reference an object, based on a variable with it's name in it

http://stackoverflow.com/comment/39784621
type: Comment
has text: @karthikr there is only a response if the argument in the multi-check.php was true, failing that there was no response and that is what caused the error. Your suggestion of checking if there was a response fixed the problem so if you add it as an answer I will accept it, thanks
score: 0
comment on: http://stackoverflow.com/a/25489831
type: AnswerComment

http://stackoverflow.com/comment/39759618
type: Comment
comment on: http://stackoverflow.com/a/25476505
has text: At first I didn't understand, this other SO question explains it further and now I get it. http://stackoverflow.com/questions/4968406/javascript-property-access-dot-notation-vs-brackets
type: AnswerComment
score: 0

http://stackoverflow.com/q/25496490
has comment: http://stackoverflow.com/comment/39826712
has body: Plunkr: http://plnkr.co/edit/zYd13f4EelPcQqJrguVh?p=preview var app = angular.module("inputGroupApp", []); app.controller('numbersController', ['$scope', function($scope){ $scope.data = {} $scope.data.numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; }]); app.directive('labelGroup', ['$compile', '$timeout', function($compile, $timeout) { return { 'template' : '&lt;div class="label-group"&gt;' + '&lt;label class="label-group-label"&gt;&lt;/label&gt;' + '&lt;div class="label-group-content"&gt;&lt;/div&gt;' + '&lt;/div&gt;', 'restrict' : 'E', 'transclude' : true, 'replace' : true, 'link' : function(scope, elem, attr, nullController, transclude) { var labelElem = elem.find('.label-group-label'); var contentElem = elem.find('.label-group-content'); transclude(scope, function(clone) { var tLabel = null; var tContent = null; angular.forEach(clone, function(node) { var $node = angular.element(node); // these nodes have been emptied by gutting their contents // is it a memory problem that the nodes themselves aren't destroyed? if ($node.is('label-group-label')) { tLabel = $node.contents(); labelElem.append(tLabel); } else if ($node.is('label-group-content')) { tContent = $node.contents(); contentElem.append(tContent); } }); // why doesn't this work? i've tried compiling elem with no success either $compile(contentElem)(scope); console.log('contentElem ', contentElem); console.log('elem ', elem); }); } }; }]); I'm trying to write a markup abstraction directive to wrap a label and corresponding content using custom elements that are discarded when their contents are placed where they should be in the new template. The content part of the label group could have directives within it, and they need to compile successfully. The only part that I can't seem to get working is to have the transcluded dom elements that have not yet rendered (in this case, ng-repeat) actually compile. I'm successfully copying over the ng-repeat comments, but when I try to run use $compile to have the ng-repeat…
type: Question
accepted answer: http://stackoverflow.com/a/25512495
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39797594
answer count: 1
has title: AngularJS : Is it possible to compile a ng-repeat comment after it has been manually transcluded?
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/39825661
has comment: http://stackoverflow.com/comment/39798371
tagged with: angularjs
has answer: http://stackoverflow.com/a/25512495
tagged with: angularjs-directive
type: AnsweredQuestion

http://stackoverflow.com/comment/39745448
has text: What exactly is meant by "within the tags"? You've got some fragments of code you're showing us. What does it actually look like put together?
type: Comment
comment on: http://stackoverflow.com/q/25468902
type: QuestionComment
score: 1

http://stackoverflow.com/comment/39850262
type: QuestionComment
has text: What you are trying to do doesn't make much sense. You can't create Java object inside (at least client side) JS. Note, that Java and JavaScript have nothing in common. What you do is to use a REST service and pass the properties required to your Java function and then create the object within the Java server code.
score: 0
comment on: http://stackoverflow.com/q/25525477
type: Comment

http://stackoverflow.com/comment/39698973
comment on: http://stackoverflow.com/q/25443556
has text: i want to select all day and month or some to sales report
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39691807
has text: I can not set the the recipient as users email as it would deliver the notification to the user's inbox instead of my inbox. I guess you wanted to suggest to modify the from address as the as users email, but that is also not possible due to gmail's restrictions.
comment on: http://stackoverflow.com/a/25439715
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25489308
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39783410
has body: I'm a begginer with javaScript. and I want to create number of windows (div) with loop operation only with javaScript. This is my code: var numOfWindows = 3; var arrayDiv = new Array(); for (var i = 0; i &lt; numOfWindows; i++) { arrayDiv[i] = document.createElement('div'); arrayDiv[i].id = 'block' + i; arrayDiv[i].style.backgroundColor = 'green'; arrayDiv[i].className = 'block' + i; document.body.appendChild(arrayDiv[i]); } but I see a blank screen.
has comment: http://stackoverflow.com/comment/39783451
has title: JavaScript - create number of divs in loop
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39783550
has answer: http://stackoverflow.com/a/25489377
accepted answer: http://stackoverflow.com/a/25489377
tagged with: javascript
tagged with: visual-studio-2012
score: 0
possible better answer: http://stackoverflow.com/a/25489402
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25489402
has comment: http://stackoverflow.com/comment/39783259
has comment: http://stackoverflow.com/comment/39783236

http://stackoverflow.com/comment/39847292
type: QuestionComment
comment on: http://stackoverflow.com/q/25523396
score: 0
has text: @GruffBunny Thx for the link..I applied the range method here..but feel what satpal suggested fitted in my case too closely :)
type: Comment

http://stackoverflow.com/q/25400770
downvote count: 0
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39618833
has answer: http://stackoverflow.com/a/25405057
linked to: http://stackoverflow.com/q/24046
has comment: http://stackoverflow.com/comment/39619640
type: UnansweredQuestion
has body: I'm testing a template where each page has an opacity set to 0 and gets it set to 1 on page load with an event listener so that it appears to fade-in. The issue I have is that when I hit "back" on mobile devices (namely iPhone 5) the JS won't execute, leaving the page with its 0 opacity. I guess that the way it's done is to save bandwidth, but isn't there a way to force the browser to execute its JS even when hitting "back"? Basic example of the code: window.addEventListener('load', function() { someelement.style.opacity = '1'; });
has comment: http://stackoverflow.com/comment/39618590
has title: Reload previous page's JavaScript on mobile
tagged with: css
has comment: http://stackoverflow.com/comment/39618463
has comment: http://stackoverflow.com/comment/39618474
score: 1
type: Question
tagged with: mobile
has comment: http://stackoverflow.com/comment/39619075
has comment: http://stackoverflow.com/comment/39619011

http://stackoverflow.com/comment/39637044
type: Comment
has text: @adeneo +1 for pointing that mistake!
type: QuestionComment
comment on: http://stackoverflow.com/q/25410492
score: 0

http://stackoverflow.com/comment/39650619
has text: This question appears to be off-topic because it is about a question which could be easily answered with a one-second test.
type: Comment
comment on: http://stackoverflow.com/q/25417667
score: 0
type: QuestionComment

http://stackoverflow.com/a/25437690
has body: In general, if chrome.something is undefined while it should exist, you don't have permissions to use it. Either you need a permission in your manifest, or it cannot be used in the current context (i.e. a content script). In your case, you must be missing "identity" permission in the manifest. It's specified in the documentation header.
accepted answer of: http://stackoverflow.com/q/25437648
type: Answer
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39687480
answers question: http://stackoverflow.com/q/25437648

http://stackoverflow.com/comment/39894359
type: Comment
has text: here is example, (http://135.su/temp/shownhide.html#div3) when you're giving direct link to some one. Just tried in Firefox & Chrome (private) And direct links for the first time is not working.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25549374

http://stackoverflow.com/q/25414963
answer count: 2
has answer: http://stackoverflow.com/a/25415261
accepted answer: http://stackoverflow.com/a/25415261
tagged with: google-chrome-extension
downvote count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39645956
type: AnsweredQuestion
tagged with: popup
score: 1
type: Question
has answer: http://stackoverflow.com/a/25415181
has title: chrome extension popup cannot find element by ID
tagged with: javascript
tagged with: jquery
has body: I know similar questions have been asked many times, but I didn't find a solution for mine yet. My question is really simple. All I want to do is to test actions on popup.html, for here, I have a click button on popup, when I click it, I want to show alert. But nothing happened. It's not finding the element. I don't understand what's going wrong here. manefest.json { "name": "test", "version": "1.0", "description": "test", "manifest_version":2, "browser_action": { "default_icon": "logo.png", "default_popup":"popup.html" }, "permissions": [ "tabs", "http://*/*", "notifications" ] } popup.html Test click popup.js $('#btn').click(function (){ alert("test"); };
upvote count: 2
possible better answer: http://stackoverflow.com/a/25415181

http://stackoverflow.com/comment/39705702
has text: The default behaviour on hover over a marker is it shows the contents inside the marker. However I have html tags which i do not want to display
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25446082
type: Comment

http://stackoverflow.com/comment/39854542
type: Comment
type: QuestionComment
has text: you're reloading current view before jQM changes page and update popstate. Do you want to _reload_ whenever user go back to previous page?
score: 0
comment on: http://stackoverflow.com/q/25527380

http://stackoverflow.com/comment/39749155
type: Comment
type: QuestionComment
has text: Corrected. Thanks matthias_h
comment on: http://stackoverflow.com/q/25470730
score: 0

http://stackoverflow.com/q/25417359
tagged with: mongodb-query
type: AnsweredQuestion
has title: Delete based on BSON date attribute?
accepted answer: http://stackoverflow.com/a/25417507
type: Question
has body: Is it possible to do a conditional remove in Mongo based on an attribute of a BSON date? I'm trying to do this: db.events.remove( { StartTime.getDay() : { $ne : "1" } } ) I know I could copy the day into a new attribute but I have over 7 million records and I'd prefer to evaluate this 'in-line' if possible. I appreciate you taking the time to help me (p.s. this is my first day using mongo). As sample document looks like: &gt; db.events.findOne() { .. "_id" : ObjectId("53f4fceeec3ef1e91d997d8d"), "StartTime" : ISODate("2014-07-22T04:59:52Z") .. } Dan
tagged with: mongodb
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25417507

http://stackoverflow.com/a/76945051
has body: Solution: const date = new Date(); date.setHours(0, 0, 0, 0); First answer (dateTicks % 86400000) is bad, you can ensure: const date = new Date(); console.log(date + ' - source datetime'); const date1 = new Date(date); date1.setHours(0, 0, 0, 0); console.log(date1 + ' - today via setHours (good)'); const date2ticks = date.getTime(); const date2 = new Date(date2ticks - date2ticks % 86400000); console.log(date2 + ' - today via remainder (bad)'); console.log(date1 === date2 ? 'two ways are the same!' : 'two ways are the different!');
upvote count: 8
answers question: http://stackoverflow.com/q/25445377
type: Answer
score: 8
downvote count: 0

http://stackoverflow.com/comment/39888361
score: 0
has text: see my answer it does exactly what you asked for.. and dont forget to mark it as correct (:
comment on: http://stackoverflow.com/q/25546472
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39708284
type: Comment
comment on: http://stackoverflow.com/a/25414908
has text: hopefully you will join the chat!!!i am able to get sid and rid but i have to make modification to 2/3 files of jbosh library !!!!
type: AnswerComment
score: 0

http://stackoverflow.com/a/25548354
has body: Apart from that your code wouldn't work anyway, the _results are generated because of coffeescripts implicit function return values - and loops are only expressions as well that generate arrays. The docs state: Sometimes functions end with loops that are intended to run only for their side-effects. Be careful that you're not accidentally returning the results of the comprehension in these cases, by adding a meaningful return value — like true — or null, to the bottom of your function. So the javascript that you expected can be created by writing … success: (data) -&gt; for oneResponse in data displayValues.push oneResponse.name return … ("Trailing return and return undefined are now optimized away." - since version 1.0.1); See also Is there any way to not return something using CoffeeScript? However, what you actually want is this: getProviderListDisplayValues:(domainId) -&gt; $.ajax contentType: 'application/json', url: "/Services/ListProviders?domainid=#{domainId}" .then (data) -&gt; for oneResponse in data oneResponse.name … getProviderListDisplayValues(…).then (displayValues) -&gt; …
downvote count: 0
answers question: http://stackoverflow.com/q/25548181
has comment: http://stackoverflow.com/comment/39891891
type: Answer
has comment: http://stackoverflow.com/comment/39892118
has comment: http://stackoverflow.com/comment/39892704
upvote count: 2
has comment: http://stackoverflow.com/comment/39892896
score: 2

http://stackoverflow.com/comment/39733915
comment on: http://stackoverflow.com/a/25462602
type: Comment
score: 0
type: AnswerComment
has text: I found html tags in my "include("mysqlconnect.php");" and that was the issue. Thank you

http://stackoverflow.com/a/25515595
answers question: http://stackoverflow.com/q/25515386
type: Answer
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25515386
has body: I'm not sure the catch would be on keydown. But if you need a condition to see if the input is inside a hidden container, bootstrap 3 adds a collapsed class to the accordion element's header that is closed.. so look for it with Jquery. Something like: if($("input[type=file]").parents(".panel").find(".panel-heading [data-toggle].collapsed").length &gt; 0) { //Is closed } else { //Is opened }

http://stackoverflow.com/a/25476455
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25476294
answers question: http://stackoverflow.com/q/25476294
type: Answer
has body: You need to add a event listener for the enter key. You could remove your function checkEnter and use this instead: document.querySelector('#email').addEventListener('keypress', function (e) { var key = e.which || e.keyCode; if (key == 13) { text.placeholder = "cool"; } };
score: 1

http://stackoverflow.com/q/25412866
tagged with: javascript
tagged with: jquery
answer count: 1
has answer: http://stackoverflow.com/a/25412898
has body: I need help creating a regex, I have a string called filter. I need to use the jQuery function .replaceAll() to search for any instance of {0} and replace it with the value variable. What I tried: filter = filter.replaceAll('/^{0}$/', value); filter = filter.replaceAll('/{0}/', value); filter = filter.replaceAll('^{0}$', value);
has comment: http://stackoverflow.com/comment/39641786
tagged with: regex
type: AnsweredQuestion
score: 0
has title: Need help formatting string literal regex
type: Question
accepted answer: http://stackoverflow.com/a/25412898

http://stackoverflow.com/a/25417993
answers question: http://stackoverflow.com/q/25417757
upvote count: 2
type: AcceptedAnswer
has body: You can always use $state.includes(stateName) to check if the current active state is equal to or is the child of the state stateName. Here is an example plnkr that shows the usage of $state.includes. More details on the wiki
has comment: http://stackoverflow.com/comment/39676082
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25417757

http://stackoverflow.com/comment/39790173
type: Comment
has text: when i did console.log(b) on both implementations, it seemed to return the same output. that's why i was confused.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25492372

http://stackoverflow.com/q/25459798
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39754876
tagged with: javascript
has comment: http://stackoverflow.com/comment/39728851
favorite count: 0
has answer: http://stackoverflow.com/a/25459867
linked to: http://stackoverflow.com/q/22372476
has answer: http://stackoverflow.com/a/25475042
linked to: http://stackoverflow.com/q/4877234
has body: I have a drop down list in a form where I'm showing 2 values. I like the 2nd value to have another text color (light gray). I've been searching how to do this, and apparently you need to use Java-script for this. Unfortunately I'm not very good with Java-script and everything I tried so far didn't work. London (England) Sidney (Australia) Amsterdam (Netherlands) I tried things like: London (England) and London (England) And although it works in fiddle it doesn't work on my site. Another option that comes close is Assign color to select OPTION Anyone know a simple bit of java-script code to make this possible? Thank you
has comment: http://stackoverflow.com/comment/39728808
downvote count: 0
type: UnansweredQuestion
score: 1
tagged with: select
has title: How to color text with multiple colors in option tag
tagged with: forms
type: Question

http://stackoverflow.com/q/25417067
tagged with: css
has body: I have made a jsfiddle In the fiddle there are 3 divs. The one on the left is purple. The one on the right is blue. The one above the blue div has a yet unknown colour The desired colour of the third div (the one laying over the blue div to the right) is that of the div on the left (the purple one). The issue is that all the divs have an opacity of 0.7, and must remain (in order to see the content behind them). My question, then, is how do I calculate the difference between the purple colour on the left and the blue colour on the right so that I may give give the third div a colour so that it matches the colour of the purple div on the left when it overlays the blue div on the right. I am not asking for you to guess by eye, as I have many other colours to do this for, I would simply like to know if there is a calculation that allows me to do this using JQuery or Javascript? I do not have any JS code to date as I have no idea where to even start. HTML CSS div{ position:absolute; } #target{ left:0px; top:0px; height:150px; width:150px; } #actualBackground{ left:150px; top:0px; height:150px; width:150px; } #sameColourAsTarget{ left:150px; top:50px; height:50px; width:50px; } .opacity{ opacity:0.7; } .purple{ background-color:rgb(152, 3, 214); } .blue{ background-color:rgb(10, 127, 188); } .purple2{ background-color:rgb(175, 3, 150); } Any help with this is greatly appreciated, Thank you
type: AnsweredQuestion
score: 3
downvote count: 0
possible better answer: http://stackoverflow.com/a/25417452
accepted answer: http://stackoverflow.com/a/25417502
has comment: http://stackoverflow.com/comment/39649772
has comment: http://stackoverflow.com/comment/39649808
has comment: http://stackoverflow.com/comment/39649618
type: Question
tagged with: c#
has title: How to match an element's background colour with 2 semi-transparent element background colours
has answer: http://stackoverflow.com/a/25417502
tagged with: javascript
tagged with: http://stackoverflow.com/tag/c
upvote count: 3
answer count: 2
has answer: http://stackoverflow.com/a/25417452
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39649860

http://stackoverflow.com/comment/39678511
type: QuestionComment
type: Comment
has text: What @PatrickQ said, or you can create a page that only shows the loading screen, then redirect from it to the long-loading page.
comment on: http://stackoverflow.com/q/25432996
score: 0

http://stackoverflow.com/comment/39887587
type: AnswerComment
comment on: http://stackoverflow.com/a/25521508
score: 0
type: Comment
has text: Did you do every step on the link I posted above? Since I am using Phonegap Build, I won't be able to help you about this, sorry.

http://stackoverflow.com/comment/39733929
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25462280
has text: @vincentT Something must map the url's to a script or page on your server. Apache is a common http deamon. Lighttpd, IIS and nginx are other http deamons. Internal server errors can be generated by a http deamon due to bad or invalid configuration. Find out what http deamon your server uses.

http://stackoverflow.com/comment/39605022
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25393164
has text: I believe this onSuccess is the callback of the Prototype ajax call. What is the problem if you add your jQuery call to the end of the try block?

http://stackoverflow.com/q/25438109
has title: Creating Hexagonal Cartogram JSON file in d3
answer count: 0
type: UnansweredQuestion
has body: I am trying to make a hexagonal cartogram in d3.js, similar to the one found here. Mike Bostock mentions this in his (awesome) Eyeo 2013 talk, and has created a tool to allow a user to point-and-click draw a hexagonal polygon (here). What I'm wondering is how to use the tool to create a static cartogram in json/geojson and classify the various polygons (countries in both the examples above) into a useable format to bring into a d3 project. In other words, once computation has been done to determine the desired scale of hexagon and how many hexagons are needed for each enumeration unit (again, countries in the examples), how would one go about creating the json file for the cartogram?
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 4
upvote count: 4
downvote count: 0
favorite count: 0
tagged with: cartogram
tagged with: d3.js

http://stackoverflow.com/comment/39735897
has text: Well it solves the issues partially........I am now getting the alert message which displays message about missing fields...but as soon I press OK...I am directed to thanks page....
comment on: http://stackoverflow.com/a/25463498
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25478120
has comment: http://stackoverflow.com/comment/39774216
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39763312
tagged with: jquery
has title: javascript foreach and jquery's .append()
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39910927
tagged with: htmlcollection
has answer: http://stackoverflow.com/a/25478286
has comment: http://stackoverflow.com/comment/39762605
has comment: http://stackoverflow.com/comment/39774580
type: Question
has body: I've wasted an entire day trying to work it out, and I think I nailed it, but still not sure what the heck :/ I have a js file, where I generate &lt;option&gt;'s for a &lt;select&gt;: _htmlString = '&lt;option value="' + __hex_value + '" data-class="' + _cbtn.substring(1, 13) + '"&gt;' + __hex_value + '&lt;/option&gt;\n'; jQuery("#colourtiles").append(_htmlString); #colourtiles is an ID of a &lt;select&gt;. I also have 3 static options in that select, inside html. Now, in another script I'm doing this: [].slice.call( this.el.children ).forEach( function(el) { console.info(el); if( el.disabled ) { return; } var tag = el.tagName.toLowerCase(); if( tag === 'option' ) { options += createOptionHTML(el); } else if( tag === 'optgroup' ) { options += '&lt;li class="cs-optgroup"&gt;&lt;span&gt;' + el.label + '&lt;/span&gt;&lt;ul&gt;'; [].slice.call( el.children ).forEach( function(opt) { options += createOptionHTML(opt); } ) options += '&lt;/ul&gt;&lt;/li&gt;'; } } ); ...but this only renders 3 elements, completely ignoring these added by .append(). And to be clear, when I return that &lt;select&gt; in console, it's all there. But I've noticed, that this.el.children.length is ...3! So it looks like 1) jQuery isn't updating .length, and 2) forEach() relies on it, therefore failing. I'm I correct? Is it a bug in jQuery, or am I being stupid? How do I resolve this? Many thanks in advance for all the answers. Marcin

http://stackoverflow.com/comment/40135053
type: AnswerComment
score: 0
has text: Update your question with the code you use to create the HTML and i will have a look.
type: Comment
comment on: http://stackoverflow.com/a/25525846

http://stackoverflow.com/a/25431638
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25431603
has body: You can check the number of arguments using the arguments variable, like this: function F(x, y) { if (arguments.length == 1) { say(x); } else if (arguments.length == 2) { run(x, y) } }
upvote count: 2
downvote count: 0

http://stackoverflow.com/a/25451006
upvote count: 1
has comment: http://stackoverflow.com/comment/39723626
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: Try to set equalSpacing to false (default). I am not yet sure why with this setting not all labels are visible - need to investigate. As for grey columns - you can add another graph to your chart and set clustered and stacked to false: http://jsfiddle.net/wv1sasyb/2/ { "columnWidth": 0.43, "fillAlphas": 1, "fillColors": "#DADADA", "id": "AmGraph-3", "lineThickness": 0, "title": "Contextual", "type": "column", "clustered":false, "stacked":false, "valueField": "column-3", "showHandOnHover": true, }
accepted answer of: http://stackoverflow.com/q/25442169
answers question: http://stackoverflow.com/q/25442169

http://stackoverflow.com/comment/39873683
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25538128
has text: Angular has no way of doing this I'm afraid - such feature would be handy, but it could damage performance whilst not always being needed. What's more, how angular suppose to know what to return? As in, what you want to be provided as a change (the full path, a sub path, etc.)
score: 0

http://stackoverflow.com/comment/39649556
type: QuestionComment
comment on: http://stackoverflow.com/q/25411338
type: Comment
has text: I am using nodemailer -- the app works only when i use it via local host; however, when i upload it to heroku, it no longer works... I am using gmail as my SMTP account. Help?
score: 0

http://stackoverflow.com/q/25422859
type: Question
tagged with: charts
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25423100
tagged with: linechart
score: 0
has body: i have to implement a line chart that has many elements to track. I know that there are many libraries, and for now i use highcharts. The problem is that i pass 12 milestones for the horizontal line, but pass only 3 values. The desired behavior is to draw all of the milestones and draw the line only for those, for who i have passed a value. In the moment it shows only the milestones, for which i have passed a value. Here is an example: ... xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, ... series: [{ name: 'Tokyo', marker: { symbol: 'square' }, data: [7.0, 6.9, 9.5, 14.5, 13.9, 9.6] }, When supplying less number of data, than the number of xAxis elements, not all of the xAxis elements are show on the chart. I want all of them to show on the chart and the cart line to be drawn only for the xAxis elements for which it has data. Do you know how i can do that with highcharts, or do you know a library that can do the work. Thank you for the time. Regards, Goergi.
answer count: 1
tagged with: highcharts
has answer: http://stackoverflow.com/a/25423100
has title: JS Charts Library
type: AnsweredQuestion

http://stackoverflow.com/q/25477877
answer count: 1
tagged with: arrays
tagged with: string-length
has comment: http://stackoverflow.com/comment/39762043
type: AnsweredQuestion
has title: .length on array crashing when length is 1 (maybe issue with split)
has body: I'm having trouble with this code. I've tried to troubleshoot it many times and seem to have isolated the issue, but can't figure out the cause. If the variable called string is set to something in the form of "text v. text," the code runs fine and the first if-statement triggers the sentence. If the string contains text but no "v." i.e. nothing that meets the search separator value, the function fails and does not execute the second if-statement. Link to Fiddle: http://jsfiddle.net/qsq4we99/ Snippet of code, there also would need to be a html div with ID "outputtext." function brokenCode() { //Setting Relevant Variables var string = "red"; var array = string.split("v."); var number = array.length; // Checking location of things var findText1 = array[0].search("search text"); var findText2 = array[1].search("search text"); //Running Conditional Stuff if(number &gt; 1) { document.getElementById('outputtext').innerHTML = "2+ listed"; } else if(number &lt; 2) { document.getElementById('outputtext').innerHTML = "1 listed"; } } brokenCode(); In this simplified example there is no clear explanation why the search operations need to occur (they are there because in the real code they are needed... but something about them seems to be causing the problem (even in this simple example). If the two searches are removed, the code runs smoothly.
type: Question
tagged with: split
tagged with: javascript
has answer: http://stackoverflow.com/a/25477901
tagged with: search
accepted answer: http://stackoverflow.com/a/25477901
score: 0

http://stackoverflow.com/comment/39625475
type: QuestionComment
has text: yes.... it is possible
comment on: http://stackoverflow.com/q/25404478
score: 1
type: Comment

http://stackoverflow.com/q/25421903
has comment: http://stackoverflow.com/comment/39726367
linked to: http://stackoverflow.com/q/21177267
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25585988
has title: What does the Reflect object do in JavaScript?
has comment: http://stackoverflow.com/comment/39726592
has comment: http://stackoverflow.com/comment/39741340
score: 117
accepted answer: http://stackoverflow.com/a/25585988
has body: I saw a blank stub on MDN a while ago for the Reflect object in javascript but I can't for the life of me find anything on Google. Today I found this http://people.mozilla.org/~jorendorff/es6-draft.html#sec-reflect-object and it sounds similar to the Proxy object apart from the realm and loader functionality. Basically, I don't know whether this page I found only explains how to implement Reflect or if I just can't understand its wording. Could someone please explain to me generally what the methods of Reflect do? For instance, on the page I found says that calling Reflect.apply ( target, thisArgument, argumentsList ) will "Return the result of calling the Call internal method of target with arguments thisArgument and args." but how is that any different than just calling target.apply(thisArgument, argumentsList)? Update: Thanks to @Blue, I found this page on the wiki http://wiki.ecmascript.org/doku.php?id=harmony:reflect_api&amp;s=reflect which to the best of my knowledge says that the reflect object provides method versions of all the actions that can be trapped by proxies to make forwarding easier. But that seems a little weird to me since I don't see how it's entirely necessary. But it Seems to do a little more than that, particularly the par that says double-lifting but that points to the old proxy spec/
upvote count: 117
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39961656
type: Question
possible better answer: http://stackoverflow.com/a/25517038
tagged with: javascript
has answer: http://stackoverflow.com/a/25517038
tagged with: ecmascript-6
answer count: 2

http://stackoverflow.com/comment/39670759
type: Comment
has text: @a1061384 Is `ask-user` a unique identifier within the document?
comment on: http://stackoverflow.com/a/25428930
score: 0
type: AnswerComment

http://stackoverflow.com/q/25525706
has answer: http://stackoverflow.com/a/25525901
type: Question
has body: Is it possible to hide hr with class name event-title(number) and h2 with class name event-title(number) before div if div with class name events-container(number) is without text? Code: {section name=MainOffice loop=$MainOffice} {$MainOffice[MainOffice].offCountry} {* Hide if div events-container1 is without text *} {/section} {* Example content1 *} {* Hide if events-container1 is without text *} Online {* Hide if events-container2 is without text *} {* Example content2 *} {* Hide if events-container2 is without text *} International {* Hide if events-container3 is without text *} {* Example content3 *}
has title: Jquery - hide and before if there isn't text inside?
has answer: http://stackoverflow.com/a/25525896
tagged with: javascript
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/25526749
score: 0
has answer: http://stackoverflow.com/a/25525835
tagged with: http://stackoverflow.com/tag/html
tagged with: smarty
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25525851
has answer: http://stackoverflow.com/a/25526298

http://stackoverflow.com/q/25532778
has answer: http://stackoverflow.com/a/63139770
has answer: http://stackoverflow.com/a/25839937
has answer: http://stackoverflow.com/a/77070796
has comment: http://stackoverflow.com/comment/130211351
linked to: http://stackoverflow.com/q/69071151
accepted answer: http://stackoverflow.com/a/25532848
downvote count: 1
has title: Node.js console.log vs console.info
favorite count: 0
tagged with: console
score: 154
has answer: http://stackoverflow.com/a/64547444
tagged with: terminal
has comment: http://stackoverflow.com/comment/82569681
has answer: http://stackoverflow.com/a/40554818
has answer: http://stackoverflow.com/a/25532848
answer count: 10
tagged with: node.js
type: AnsweredQuestion
has body: What is the benefit of using console.log vs console.info? Or any of the other console commands for that matter? console.info("info"); console.error("error"); console.warn("warn"); vs console.log("log"); I thought it might change the color of the output or concatenate some sort of label, but they seem to all do the same thing. And according to the documentation here: https://nodejs.org/api/console.html#console_console_info_data they seem to all do the same as console.log
has answer: http://stackoverflow.com/a/69200584
has comment: http://stackoverflow.com/comment/95649778
possible better answer: http://stackoverflow.com/a/45766458
type: Question
has answer: http://stackoverflow.com/a/25532819
has answer: http://stackoverflow.com/a/45766458
upvote count: 155
has answer: http://stackoverflow.com/a/62125653
tagged with: javascript
linked to: http://stackoverflow.com/q/14437428

http://stackoverflow.com/a/25454788
has body: Echoing your data will just return a string. Use echo json_encode( $data ); instead. Here is what you can do in PHP to ensure json is sent from your server: &lt;?PHP $data = /** whatever you're serializing --- array/object **/; header('Content-Type: application/json'); echo json_encode($data); Returning JSON from a PHP Script
type: Answer
answers question: http://stackoverflow.com/q/25454529
has comment: http://stackoverflow.com/comment/39719142
score: 0

http://stackoverflow.com/comment/39737050
type: QuestionComment
comment on: http://stackoverflow.com/q/25454670
type: Comment
has text: I think like there is something else playing. I just noticed I can't start playing the ones without title either!
score: 0

http://stackoverflow.com/a/25417310
has comment: http://stackoverflow.com/comment/39650067
has comment: http://stackoverflow.com/comment/39650346
has comment: http://stackoverflow.com/comment/39650047
has comment: http://stackoverflow.com/comment/39650019
has comment: http://stackoverflow.com/comment/39650706
has comment: http://stackoverflow.com/comment/39650368
score: 0
has body: According to your JS, I think you can change it into this: EDIT $(document).ready(function(){ $("a.active").removeClass('active'); $("#product1").click(function(event){ //Make sure you put this inside every click function $("a.active").removeClass('active'); if($(this).parent('a').hasClass('active')){ $(this).parent('a').removeClass('active'); }else{ $(this).parent('a').addClass('active'); } $("#product2box").slideUp('slow', function() { $("#product3box").slideUp('slow', function() { $("#product4box").slideUp('slow', function() { $("#product5box").slideUp('slow', function() { $("#product6box").slideUp('slow', function() { event.preventDefault(); $("#product1box").stop().slideToggle(1000); return false; }); }); }); }); }); }); });
has comment: http://stackoverflow.com/comment/39650123
type: Answer
has comment: http://stackoverflow.com/comment/39650312
answers question: http://stackoverflow.com/q/25417020
has comment: http://stackoverflow.com/comment/39650140
has comment: http://stackoverflow.com/comment/39649839

http://stackoverflow.com/q/25434205
favorite count: 0
score: -1
tagged with: asset-pipeline
tagged with: ruby
type: UnansweredQuestion
downvote count: 2
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39703486
has comment: http://stackoverflow.com/comment/39680871
has comment: http://stackoverflow.com/comment/39680815
tagged with: underscore.js
has answer: http://stackoverflow.com/a/25450132
upvote count: 1
has body: So very suddenly on a production server running ruby 2.1.2p95 and rails 3.2.14, I've started getting an error from what looks like underscore.js. This is only on this server. Uncaught SyntaxError: Unexpected token ILLEGAL b/c this is production the code is minified but using chrome to expand it this is where it is saying the issue is: S.template = function(e, t, n) { var i; n = S.defaults({}, n, S.templateSettings); var r = new RegExp([(n.escape || L).source, (n.interpolate || L).source, (n.evaluate || L).source].join("|") + "|$", "g"), s = 0, a = "__p+='"; e.replace(r, function(t, n, i, r, o) { return a += e.slice(s, o).replace(O, function(e) { return "\\" + P[e] }), n &amp;&amp; (a += "'+\n((__t=(" + n + "))==null?'':_.escape(__t))+\n'"), i &amp;&amp; (a += "'+\n((__t=(" + i + "))==null?'':__t)+\n'"), r &amp;&amp; (a += "';\n" + r + "\n__p+='"), s = o + t.length, t }), a += "';\n", n.variable || (a = "with(obj||{}){\n" + a + "}\n"), a = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + a + "return __p;\n"; try { i = new Function(n.variable || "obj", "_", a) // &lt;---- right here --&lt;&lt; } catch (o) { throw o.source = a, o } if (t) return i(t, S); var l = function(e) { return i.call(this, e, S) }; return l.source = "function(" + (n.variable || "obj") + "){\n" + a + "}", l } Now obviously I have not touched the underscore.js code itself and I have tried downloading the most current version of underscore.js and still get the same thing. Just to see if I could reproduce the error on my local machine I set the project to production and rake assets:precompile and I still do not get the error locally. My guess is that this is something to do with my Gem versions or the actual environment on my server but I've been debugging these things for a while now and see no change at all. Gemfile: (w/o unrelated gems) gem 'rails', '3.2.14' gem 'json' group :assets do gem 'sprockets' gem 'sass-rails' gem 'coffee-rails' gem 'uglifier' g…
type: Question
has comment: http://stackoverflow.com/comment/39681648
has title: Unexpected token ILLEGAL in Rails production
tagged with: javascript
linked to: http://stackoverflow.com/q/12719859
answer count: 1

http://stackoverflow.com/a/25521521
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39843492
has body: I think this would do it: ^(?=(?:.*[A-Za-z].*){6})(?=(?:.*[A-Z].*){1})(?=(?:.*[0-9].*){2})(?:[a-zA-Z0-9*#$%]){8,16}$ Where you drop in the relevant limits (letters, capitals, numbers, min &amp; max length) as well as the non-comma-separated special characters in the end EDIT adding example with the variables... you just build up the string to the regex pattern, and then test with it string regex = "^(?=(?:.*[A-Za-z].*){" + minCharLength + "})(?=(?:.*[A-Z].*){" + minCapCharLength + "})(?=(?:.*[0-9].*){" + minNumLength + "})(?:[a-zA-Z0-9" + specialChars + "]){" + overallMinLength + "," + overallMaxLength + "}$"; bool isValid = Regex.IsMatch(password, regex); EDIT2 - I thought an explanation might be appreciated :-) We are anchoring the regex to the whole string with ^ and $ Each test is a positive lookahead (?= ) so it checks for existence but doesn't move the position the test has the group (?:.*[our_characterset].*){how_many_times} - so a non-capturing group effectively searching for our characters at any point in the string (with the .*s) the right number of times Finally we get the allowed characters (including our special characters) having to exist between min and max length occurrences (using the {m,n}) (with the anchors) And a regex pattern is just a string - so we can build it up using the variables from the form..
accepted answer of: http://stackoverflow.com/q/25520667
upvote count: 1
answers question: http://stackoverflow.com/q/25520667
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39843838
type: Answer

http://stackoverflow.com/q/25472804
answer count: 0
score: 0
tagged with: forms
has title: HTML table linked to Javascript how?
type: Question
has comment: http://stackoverflow.com/comment/39753155
tagged with: javascript
has body: I have an order form within an HTML table associated to some JavaScript verification logic. The current code works but I would like some enhancements to be implemented. Currently, pressing the "verify" order button gives me the following output: Line 0 = 1 Qty Line 1 = 4 Qty Line 2 = 2 Qty Instead of showing table lines numbers followed by quantity value, I need the text to contain the actual products names. E.g. "Line 0 = 1" → "Apple = 1" … I cannot really seem to figure it out can someone tell me how to do this? Untitled Document Order Form Item Qty Each Total Apple $ 5.95 Banana $ 10.95 Orange $ 20.95 Grand Total :
tagged with: html-table
has comment: http://stackoverflow.com/comment/39752763
has comment: http://stackoverflow.com/comment/39754599
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39756136

http://stackoverflow.com/a/25526288
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25526162
has body: Just change the sequence, Bind event first then use trigger. Script //Even Binding $(".lrow").click(function () { alert("c"); }); $("#tlist tr").on('click', function () { alert("d"); }); //Trigger event $("#tlist").find("tr").eq(1).addClass("highlight"); $("#tlist").find("tr").eq(1).trigger("click"); Also in CSS, .highlight{ background-color: #0f0; //remove quotes } DEMO
type: Answer
accepted answer of: http://stackoverflow.com/q/25526162
upvote count: 1
score: 1

http://stackoverflow.com/comment/39765058
type: Comment
type: QuestionComment
has text: Thanks! Based on what you wrote I now know what to look for and already found few questions regarding this problem, ie. how to use MySQL together with PHP and jQuery timer to achieve this, for example: http://stackoverflow.com/questions/18876270/using-jquery-countdown-timer-with-mysql-datetime
comment on: http://stackoverflow.com/q/25434747
score: 0

http://stackoverflow.com/a/25454507
answers question: http://stackoverflow.com/q/25454437
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39718630
has body: It looks like they're built in https://www.legalshield.com/assets/js/video-library.js . Specifically, var thumbnail_hostname = 'http://www.legalshield.com'; near the top of that script would need to be changed.

http://stackoverflow.com/comment/39788239
type: QuestionComment
has text: When I click on the download button, it downloads the file in XML format but when I try to open that downloaded XML file in the chrome, it doesn't display that file in XML tree like format whereas when I try to open it in notepad, it shows up in the XML format. Please solve this issue.....rest everything is perfect...I fell short of words to thank you...:-)
comment on: http://stackoverflow.com/q/25483555
score: 0
type: Comment

http://stackoverflow.com/comment/138974121
has text: Where does pagination tag come from?
type: Comment
comment on: http://stackoverflow.com/a/38764638
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39737858
score: 1
has text: You mean without jQuery? `document.querySelectorAll(".post")`;
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25464429

http://stackoverflow.com/comment/39607549
has text: I tried using `jQuery.on('throttleComplete', ...` and `jQuery.trigger('throttleComplete')` to trigger the callback instead of actually using a callback and that did not help either
comment on: http://stackoverflow.com/q/25394608
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25458248
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25466753
accepted answer: http://stackoverflow.com/a/25466753
has title: PHP multiple follow-up HTML select fields
has comment: http://stackoverflow.com/comment/39725835
type: Question
has comment: http://stackoverflow.com/comment/39725811
has body: I want to create a form with multiple follow-up select fields. This from an array that contains 3 fields: ID, Name, followingID. FollowingID's matches an ID so we can figure out the layers. Small scale example: 0 = ID, 1 = Name, 2 = followingID Array ( [0] =&gt; Array ( [0] =&gt; 1 [1] =&gt; Auto’s, werktuigkundigen, technici, ingenieurs [2] =&gt; 0 ) [1] =&gt; Array ( [0] =&gt; 2 [1] =&gt; Bewaking, leger, politie [2] =&gt; 1 ) [2] =&gt; Array ( [0] =&gt; 3 [1] =&gt; Bouw, montage [2] =&gt; 1 ) [3] =&gt; Array ( [0] =&gt; 4 [1] =&gt; Commercieel, winkel, inkoop en verkoop [2] =&gt; 2 ) [4] =&gt; Array ( [0] =&gt; 5 [1] =&gt; Financiën, bank, verzekering [2] =&gt; 2 ) [5] =&gt; Array ( [0] =&gt; 6 [1] =&gt; Gezondheidszorg, paramedici, laboratorium [2] =&gt; 3 ) [6] =&gt; Array ( [0] =&gt; 7 [1] =&gt; Gezondheidszorg, paramedici, laboratorium [2] =&gt; 4 ) In this case level 1 -> followingID = 0 Level 2 -> followingID = 1 if chosen first option I can not figure out a way to do this without putting everything manually in a jquery script.
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: html-select
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/q/25532565
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39863155
score: 0
has comment: http://stackoverflow.com/comment/39863215
has answer: http://stackoverflow.com/a/25532849
type: Question
has comment: http://stackoverflow.com/comment/39864706
tagged with: javascript
tagged with: forms
has title: Submit Multiple, dynamically created forms but not all
has comment: http://stackoverflow.com/comment/39863595
has body: So here we go. I have a page that lists a bunch of unscored sports games. Here is the query I run to generate the page. <?php foreach ($conn->query("SELECT * FROM game_data WHERE sport='NFL' AND awayscore IS NULL ORDER BY date DESC") as $NFL) { echo ' '; echo ' Rotation Team Money Line Spread Over/Under Score '; echo ' '; $date = date_create($NFL['date']); echo date_format($date, 'l F jS Y \@ g:iA'); echo ' '; echo ' '.$NFL['awayrotation'].' '.$NFL['awayteam'].' '.$NFL['awaymoneyline'].' '; echo ' '; if ($NFL['awaymoneyline'] > 0) { $line = $NFL['line'] * -1; echo $line; } elseif ($NFL['awaymoneyline'] < 0) { echo $NFL['line']; } ; echo ' '; echo ' '.$NFL['total'].' '; echo ' '.$NFL['homerotation'].' '.$NFL['hometeam'].' '.$NFL['homemoneyline'].' '; echo ' '; if ($NFL['homemoneyline'] > 0) { $line = $NFL['line'] * -1; echo $line; } elseif ($NFL['homemoneyline'] < 0) { echo $NFL['line']; } ; echo ' '; echo ' '.$NFL['total'].' '; echo ' '; } ?> This is what I'm looking to do, I would like to have a button to submit multiple forms. Only though if they have placed a value in the score. Is this possible? I have read about doing multiple forms based off names but these forms are being created dynamically. I look forward to your insight.
answer count: 1
tagged with: jquery

wamp
tag name: wamp
tags question: http://stackoverflow.com/q/25469309
type: Tag

http://stackoverflow.com/comment/39827474
score: 3
has text: `this` in your code refers to `window` object and `closest` selects the closest _parent_ element.
comment on: http://stackoverflow.com/q/25512918
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39835098
has text: Have you tried to use an ?
comment on: http://stackoverflow.com/q/25516768
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25473498
upvote count: 1
has body: Inside your update function, parstr is a javascript identifier. It is being used as the property name without being parsed. It has the same effect as using the string "parstr". To use the value of a variable as a property name, you must use the array notation. So create an object to be used as the value of the addToSet operation and set a property there using the value of parstr. hisobj = {'type':type, 'startdate':startdate,'enddate':enddate}; parstr = "members." + insertmemberid + ".history"; // create an object to be used as the value of the addToSet operation var addToSetValue = {}; // the value stored in parstr will be used here addToSetValue[parstr] = hisobj; Groups.update({"_id":Session.get("groupid")}, {$addToSet: addToSetValue}}, function (error) { if (error) { console.log(error); } }); Notice that inside parstr you need to use dot notation, as Hubert OG said. That's a different situation. We're just creating the string that mongodb will use internally to do it's magic. Also, the callback as the last argument of the update call will let you see a possible error.
score: 1
has comment: http://stackoverflow.com/comment/39936774
downvote count: 0
has comment: http://stackoverflow.com/comment/39929707
answers question: http://stackoverflow.com/q/25469242
type: Answer

http://stackoverflow.com/q/25405490
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25406673
score: 0
tagged with: http://stackoverflow.com/tag/pdf
has body: On clicking a button in pdf how to create an new word document and save it destination path using javascript
type: UnansweredQuestion
type: Question
has title: How to execute saveAs Menuitem in pdf to convert pdf to word document using javascript

http://stackoverflow.com/comment/39822795
comment on: http://stackoverflow.com/q/25510314
type: Comment
type: QuestionComment
has text: are you loading the js in the same order as in the fiddle? Open console (hit f12 in your browser, reload the page), do you see any errors? The google.com script tag needs to load first then you can execute your script.
score: 1

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/25416989
tags question: http://stackoverflow.com/q/25485639
tags question: http://stackoverflow.com/q/25490362
tags question: http://stackoverflow.com/q/25391028
tags question: http://stackoverflow.com/q/25423400
tags question: http://stackoverflow.com/q/25390467
tags question: http://stackoverflow.com/q/25510781
tags question: http://stackoverflow.com/q/25450167
tags question: http://stackoverflow.com/q/25402011
tags question: http://stackoverflow.com/q/25490462

http://stackoverflow.com/comment/39835948
type: Comment
has text: Yes, query the button and add and event listener.
type: QuestionComment
comment on: http://stackoverflow.com/q/25517201
score: 3

http://stackoverflow.com/a/25472472
score: 1
has body: HTML Website #1 Website #2 Website #2 JAVASCRIPT var form1 = document.getElementById("form1"); var url = document.getElementsByName("url")[0]; var buttons = form1.getElementsByTagName("button"); for (var index = 0; index < buttons.length; index++) { buttons[index].addEventListener("click", function(){ url.setAttribute("value", this.getAttribute("value")); form1.submit(); }); }
answers question: http://stackoverflow.com/q/25472347
type: Answer
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/36512424
has comment: http://stackoverflow.com/comment/60631610
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/25430711
score: -1
upvote count: 0
has body: You can create a File object using your blob object: var temporalFile= new File([blob], 'correctName.txt'); form.append("blob", temporalFile);

http://stackoverflow.com/q/25518424
has comment: http://stackoverflow.com/comment/39838477
has comment: http://stackoverflow.com/comment/39840833
answer count: 0
has title: Modify innerHTML for table row in javascript in ie8?
has comment: http://stackoverflow.com/comment/39839543
has comment: http://stackoverflow.com/comment/39839335
tagged with: vb.net
type: Question
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/39839658
score: 0
has body: I am trying to add create an editable table in HTML. So, I need to add rows, when user clicks on a button. Here is the code I am using. //remove all old rows. while (summaryTableElement.firstChild) { summaryTableElement.removeChild(summaryTableElement.firstChild); } //add a new text area in the summary field. summaryTableElement.innerHTML = " "; This code works fine on Chrome and Mozilla. But, IE doesn't allow editing innerHTML. This HTML will be displayed inside a VB form, so I have "browser" and "webbrowser" controls available. Both of those controls use IE engine, so this code does not work there. I have tried using firstchild.innerHTML instead so that I am not editing table row directly, and even that gave me same error. I tried using WebKitBrowser. But, that causes an exception on load. Apparently that control uses some old method, and the method is changed. So, that control is out of question too. Now, I am confused as to how to solve this problem? Edit: I found the issue with WebKitBrowser. It was specific to x86, while my project was targeting both x64 and x86. Switching it to x86 for both, worked. Although, webkit browser do not take return key values. So, I have a new problem. Pressing enter does not create a new line in table cell, and instead passes the event to vb form. Edit: Okay, so I tried working further with WebKitBrowser. But, that control gives me accessviolatedexception. So, I am thinking about going back to using the default browser control, for now. As for default control, I checked further. Apparently, code works fine in IE9 and above. But, vb.net control uses some weird JS engine. So, I am receiving error only in vb control. Here is the complete code for reference: var summaryChanges = ""; var isSummaryClickable = true; //creates a textbox for editing purpose and include the original summary data. function modifySummary(id) { var summaryTableElement; //to get the table cells so that we can access the value var originalSummary = ""; //to hold…
has comment: http://stackoverflow.com/comment/39840777
has comment: http://stackoverflow.com/comment/39840369
has comment: http://stackoverflow.com/comment/39839171
tagged with: javascript
has comment: http://stackoverflow.com/comment/39839812
has comment: http://stackoverflow.com/comment/39839535
has comment: http://stackoverflow.com/comment/39840155
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25391453
has body: From the provided info, assuming you want to do all this on pageload, you would write the backend part which retrieves your info from the DB, and builds the javascript for you. Example being: // Basic DB connection handler $dbHandler = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass); // Basic data retrieval from DB $SQL = "SELECT filename FROM files WHERE id = ?;"; $PREP = $dbHandler-&gt;prepare($SQL); $PREP-&gt;execute(array($idToRetrieve)); $fileData = $PREP-&gt;fetch(); // Basic script output echo "$(document).ready(function(){ $('.mainimage').zoom({url: '{$fileData['filename']}'}); });"; Of course, the various parts would go into their appropriate sections within your codebase. Please elaborate if this did not exactly cover your question. ** Update You could modify your jQuery along the below lines: $(document).ready(function(){ $('.mainimage').zoom({url: '$(this).attr("src")'}); }); Or if the zoomed image would be a different one from the small thumbnail, you would have to extend your PHP snippet something like this: ... "&lt;img src='$file' data-zoomedimage="{$row['bigimage']}" class='productimage' alt='{$row['name']}' /&gt;", ... And you would swap the $(this).attr("src"); for $(this).attr("data-zoomedimage");.
type: Answer
answers question: http://stackoverflow.com/q/25391297
score: 0
has comment: http://stackoverflow.com/comment/39633814

http://stackoverflow.com/comment/39701510
type: AnswerComment
comment on: http://stackoverflow.com/a/25445502
score: 0
type: Comment
has text: Thank you! That worked perfectly fine after adding it on both of the fades!

http://stackoverflow.com/a/25522244
has comment: http://stackoverflow.com/comment/39845950
has comment: http://stackoverflow.com/comment/39845028
score: 4
has comment: http://stackoverflow.com/comment/39845665
upvote count: 4
has comment: http://stackoverflow.com/comment/39844310
has comment: http://stackoverflow.com/comment/39847737
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39848141
downvote count: 0
answers question: http://stackoverflow.com/q/25522156
has comment: http://stackoverflow.com/comment/39844997
accepted answer of: http://stackoverflow.com/q/25522156
has comment: http://stackoverflow.com/comment/39844373
type: Answer
has comment: http://stackoverflow.com/comment/39845268
has comment: http://stackoverflow.com/comment/39845219
has body: You can use :contains() with .filter() and slice() jQuery('body').find(".name").filter(':contains(John), :contains(Adam)').parent().slice(-5).remove() Demo: Fiddle

http://stackoverflow.com/q/25499370
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25499411
has comment: http://stackoverflow.com/comment/39801977
has comment: http://stackoverflow.com/comment/39802456
has comment: http://stackoverflow.com/comment/39802384
answer count: 4
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has title: Toggle Animate Div on Button Click
has answer: http://stackoverflow.com/a/25499462
has answer: http://stackoverflow.com/a/25499410
score: 2
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25499436
has body: I want to Toggle animate the Margin of a div on button click but doesn't seem to work. Here is the code and the fiddle link. I found the solution in one of the previous posts but still couldn't get it right. $('button').click(function () { if ($('.demo').css('margin-top') == '0') { $('.demo').animate({ marginTop: '-160px' }, 1000); } else { $('.demo').animate({ marginTop: '0' }, 1000); } }); Fiddle Thanks for help

http://stackoverflow.com/comment/39750415
score: 2
has text: @poshest: Yes, that control flow - expressed either way - would have the same race condition possibilities. The problem with your syntax is "*magically implies*". When you don't know which functions are async and which are not, it will be a horror to understand code and *where* it pauses. When you don't have control over whether a function is sync or async (such as `transfer` doesn't know about the asynchrony in `howMuch`), it will be a horror (if not right impossible) to write correct & race-condition-free code. That's why generators force us to be explicit with `yield` and `function*`.
comment on: http://stackoverflow.com/a/25447289
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39737653
type: Comment
comment on: http://stackoverflow.com/a/25449893
score: 0
has text: @Rohit, is www the name of a folder right below where main.html is, and file.html is in that www folder?
type: AnswerComment

http://stackoverflow.com/q/25469268
favorite count: 0
has answer: http://stackoverflow.com/a/25506287
answer count: 5
type: UnansweredQuestion
has body: Say I have the following plugin, enclosed within an immediately invoked function expression: $.fn.someFunc = function(tags, options) { // Containing element $self = $(this); opts = $.extend({}, $.fn.someFunc.defaults, options); // More code here return $self; } $.fn.someFunc.defaults = { property: { prop: value, prop2: value2 }, anotherProp : { prop: value, prop2: value2 } } How do I give my array $.fn.someFunc.defaults access to my $self variable? Say I want to set the default value of $.fn.someFunc.defaults.property.prop to something that is dependent on some intrinsic property of the element the plugin has been provided access to? Such as: $.fn.someFunc.defaults = { property: { prop: $self.width(), prop2: value2 }, // This currently does not work anotherProp : { prop: value, prop2: value2 } } Attempting to do so currently results in a ReferenceError: $self is not defined error. Any ideas?
has title: How can I give my default array of properties access to the passed jQuery object in my plugin?
has answer: http://stackoverflow.com/a/25609163
has answer: http://stackoverflow.com/a/25561816
upvote count: 1
has answer: http://stackoverflow.com/a/25617076
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39803532
tagged with: scoping
has answer: http://stackoverflow.com/a/25546261
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25475649
score: 1
has comment: http://stackoverflow.com/comment/39758045
has comment: http://stackoverflow.com/comment/39758428
answers question: http://stackoverflow.com/q/25475605
upvote count: 1
has comment: http://stackoverflow.com/comment/39758142
type: Answer
downvote count: 0
has body: I would suggest sending a JSON object extracted from your form to be accessed by the PHP script... In the PHP script create a PHP class instance or an indexed array from this JSON using this function http://php.net/manual/en/function.json-decode.php To serialize form to a JSON in javascript client side you can use this http://api.jquery.com/serializearray/ And if I might give an advice, skip using xhr directly... use the jQuery ajax wrapper... it will ensure running on all major browsers the same way without hassle

http://stackoverflow.com/a/25452064
type: Answer
answers question: http://stackoverflow.com/q/25451244
score: 0
has body: Ok, i finally Figured out the solution, i dont know if its the best one or not for me. but atleast it works. if anyone have better jquery prposition please answer it to make the jquery more short. anyhow the problem was not with if/else statement neither the .prop. but i was using the bootstrap switch checkboxes which when page is loaded add classes and do stuff... however it turns out i had to change the class from off to on to change the checkbox value. if(value.IsMenuLink !=='0'){ $("#isMenuLink").parent().parent().removeClass('bootstrap-switch-off'); $("#isMenuLink").parent().parent().addClass('bootstrap-switch-on'); } else{ $("#isMenuLink").parent().parent().removeClass('bootstrap-switch-on'); $("#isMenuLink").parent().parent().addClass('bootstrap-switch-off'); } if anyone can suggest better jquery which is shorter then this to swap classes please tell.

http://stackoverflow.com/q/25424848
has title: How to remove html tag from webpage with some other text?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39663319
possible better answer: http://stackoverflow.com/a/25425285
tagged with: tampermonkey
has answer: http://stackoverflow.com/a/25425256
accepted answer: http://stackoverflow.com/a/25425256
has body: I'm writing a simple parser for one site and I'm novice. However, that website has WBR HTML-tag inside links. For example, links look like this: [The Aven" "gers [720p, DVDRIP] <[Home alo" "ne [1080p, BDRIP] And I need to remove " " text. I've managed to remove wbr tag with this Tampermonkey script: del = document.getElementsByTagName("wbr"); if (del.length > 0) { for (i = 0, j = del.length; i < j; i++) { del[i].parentNode.removeChild(del[i]); } } But I still can't remove quotes, so my new text looks like this: [The Aven""gers [720p, DVDRIP] <[Home alo""ne [1080p, BDRIP] And my parser doesn't work. I've tried searching for function to select text, not HTML-tag, but can't find it. Could you help me to modify this script? Thanks in advance.
has answer: http://stackoverflow.com/a/25425285
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39663313
has comment: http://stackoverflow.com/comment/39663655
tagged with: dom
has comment: http://stackoverflow.com/comment/39663433
type: Question
has comment: http://stackoverflow.com/comment/39663404
has comment: http://stackoverflow.com/comment/39663215
answer count: 2
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39675232
type: QuestionComment
comment on: http://stackoverflow.com/q/25429778
score: 0
type: Comment
has text: Yea I assumed it wouldn't have something like that, plus I felt the picker would slow down the page. Trying to also think of a light weight calendar.

http://stackoverflow.com/comment/39885451
type: Comment
type: QuestionComment
has text: Thanks for the try Sumeet, but it's only the top-margin for the first div after it fades in there is approx -10px. So that will not work. But thanks anyway.
comment on: http://stackoverflow.com/q/25544559
score: 0

http://stackoverflow.com/comment/39661096
comment on: http://stackoverflow.com/a/25422420
type: Comment
has text: I have created a Fiddle for you to understand. http://jsfiddle.net/shaharlini/xLw2p54e/ JSON -> Javascript Object Notation. Please look at here to read some more from Mozilla MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39632162
score: 0
has text: your code doesn't make sense. You've an `else` before the last statement without an `if`.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25407675

events
tags question: http://stackoverflow.com/q/25443597
tags question: http://stackoverflow.com/q/25538114
tags question: http://stackoverflow.com/q/25407175
tags question: http://stackoverflow.com/q/25406432
tags question: http://stackoverflow.com/q/25458293
tags question: http://stackoverflow.com/q/25402949
tags question: http://stackoverflow.com/q/25494828
tags question: http://stackoverflow.com/q/25436152
tags question: http://stackoverflow.com/q/25538050
tags question: http://stackoverflow.com/q/25482488
tags question: http://stackoverflow.com/q/25465063
tags question: http://stackoverflow.com/q/25454501
tags question: http://stackoverflow.com/q/25392463
tags question: http://stackoverflow.com/q/25507532
tag name: events
tags question: http://stackoverflow.com/q/25545170
type: Tag

http://stackoverflow.com/a/25462613
has comment: http://stackoverflow.com/comment/39735009
has body: You are doing the game length calculations only on the client side. I think you already show some intentions to store it in a "hidden field 2", but you don't follow through. Uncomment the field in ASP.NET, fill it with Javascipt in the javascript, and copy it in the C# codebehind. You also have to make sure that what you store in the field can be recognized as a datetime in SQL.
score: 0
has comment: http://stackoverflow.com/comment/39739165
type: Answer
answers question: http://stackoverflow.com/q/25462396

http://stackoverflow.com/q/25477882
tagged with: jquery
has comment: http://stackoverflow.com/comment/39762071
favorite count: 0
has comment: http://stackoverflow.com/comment/39762077
has body: I'm trying to animate from the number '1' to '100' using a jquery technique I've seen several places online. It works OK, but Firefox has some serious issues with this, and I know jQuery's .animate() as a whole isn't the greatest. The span '#headline-number' starts out as a one, which is why the age range begins at 2. function incrementNumber(number) { if (number.length) { number.addClass('is-visible'); // Triggers 500ms opacity transition in my css setTimeout( function(){ $({ages: 2}).animate({ages: 100}, { duration: 1500, easing:'swing', step: function() { number.text(Math.round(this.ages)); } }); }, 510); } } incrementNumber($('#headline-number')); Are there any alternative techniques to accomplish this? Either with jQuery, or just vanilla javascript? Thanks!
has comment: http://stackoverflow.com/comment/39763341
has comment: http://stackoverflow.com/comment/39762317
has answer: http://stackoverflow.com/a/27757225
tagged with: animation
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39763089
type: Question
tagged with: javascript
has title: Way to animate between two numbers that's more performant than .animate();
has comment: http://stackoverflow.com/comment/39775849
score: 2
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39694691
comment on: http://stackoverflow.com/a/25441701
score: 0
type: AnswerComment
has text: just place the gif inside that #imtheloadingdiv div and it will be the only thing you can see on the page. For the effect to work you need to make it so the #imtheloadingdiv covers the whole page and set a background color for it or it will look bad!
type: Comment

http://stackoverflow.com/comment/39804737
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25499985
has text: Thank you so much for replying me this is very new thing for me because I am a beginner in JavaScript. Your code is working perfectly on buttons but cant show any alert on making changes in textboxes, if I leave the page.

http://stackoverflow.com/comment/39608449
score: 0
type: Comment
has text: hierarchyViewer vs HierarchyViewer will make a difference. I don't think I explicitly mention that in the docs, but will add it to make it more obvious.
type: AnswerComment
comment on: http://stackoverflow.com/a/25395092

http://stackoverflow.com/comment/39759701
type: Comment
type: QuestionComment
has text: Your fiddle is not setup correctly. http://jsfiddle.net/gpceqb8t/1/
comment on: http://stackoverflow.com/q/25476612
score: 0

http://stackoverflow.com/comment/39624089
comment on: http://stackoverflow.com/a/25403582
has text: The callback will be called in the promise context, yes. But you get $scope through the closure. Just be sure that you inject $scope into your controller.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25486895
type: Question
has body: I am beginner to phonegap. I want to create layout inside index.html which is driven by javascript and also having cordova to use apis in app. I am able to run hard coded index.html but I want to run as a live site inside phonegap and also want to use cordova plugins inside my live site. Can anybody help me or any idea to how I use live site or dynamic html through javascript? Thanks in advance, Vijay Barnwal
score: 1
has comment: http://stackoverflow.com/comment/39778528
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25496969
has comment: http://stackoverflow.com/comment/39778739
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has title: Dynamically load index.html in Phonegap Application
favorite count: 0
tagged with: cordova
linked to: http://stackoverflow.com/q/9963799
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/39732317
comment on: http://stackoverflow.com/a/25424253
type: AnswerComment
has text: Hey Xanco, thank you very much, getting much closer now. I hope you're not getting too impatient with me :). As I am planning to use it with WordPress and the sections' names have to be dynamic/changeable I cannot just hand-type it for every section into my JS, it's more like: 'Grab the heading of each section with the class="something" and put it out in a scrollbar.' Your version of course works in a static page, unfortunately it doesn't have the flexibility of a) dynamic headings, i.e. heading changes = scrollerbar title changes and b) scalability, i.e. WP can't add sections dynamically :).
score: 0
type: Comment

http://stackoverflow.com/comment/39687562
type: QuestionComment
has text: @AnthonyChu thanks, i tried `$('#ManageForms').on('click', '.editBtnFunc', function(e){` It worked But i dont get it, why my code didn't worked i am refrencing to same class, but you defined the table id and the class of the button. what changed then?? how it comes to work with this code but not with the previous?
score: 0
comment on: http://stackoverflow.com/q/25437679
type: Comment

http://stackoverflow.com/comment/39641771
type: AnswerComment
score: 0
type: Comment
has text: unfortunately the data-start value is dynamic so it will change every time. which is why i am having a problem wrapping my mind around the code needed. i first have to find any matching rows if their are then I have to find the lowest value and then go back and assign it to the rows
comment on: http://stackoverflow.com/a/25412840

http://stackoverflow.com/comment/40057106
type: Comment
has text: I created SVG file with required components and added jQuery animation codes to call those. I think I pretty much achieved what I wanted. Further, I had to create my own web page to add the stuff in. And I tried out with few people and notice that they can't actually download my SVG file. So that's good enough. =) I would have accepted your answer, but I want to support the @chriskelly for showing another way to do it.
comment on: http://stackoverflow.com/a/25478610
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39604328
type: Comment
comment on: http://stackoverflow.com/a/25392970
score: 0
type: AnswerComment
has text: Or even better: `theButtonState = modB === 1;`.

http://stackoverflow.com/a/25466796
has comment: http://stackoverflow.com/comment/82464439
score: 2
accepted answer of: http://stackoverflow.com/q/25463106
upvote count: 2
has comment: http://stackoverflow.com/comment/82464331
answers question: http://stackoverflow.com/q/25463106
has body: Ace editor is only the UI part of the editor. Think of it as: like a textarea but cool!. To deal with files you need some kind of server that will read and save the files and will send the text to the webpage where Ace lives. (You can also use html5 filesystem api, but that only works on chrome). You can find many interesting implementations of this in Zed source code at https://github.com/zedapp/zed/tree/master/app/js/fs, which is a code editor based on Ace.
has comment: http://stackoverflow.com/comment/82431847
type: AcceptedAnswer
type: Answer
downvote count: 0

appsdk2
tags question: http://stackoverflow.com/q/25549207
tag name: appsdk2
type: Tag

http://stackoverflow.com/q/25400550
has answer: http://stackoverflow.com/a/25401689
has comment: http://stackoverflow.com/comment/39974254
tagged with: jquery
has comment: http://stackoverflow.com/comment/39985865
has comment: http://stackoverflow.com/comment/39995205
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
score: 6
tagged with: php
has title: Determine an array submit button using javascript then outputs data using Ajax
linked to: http://stackoverflow.com/q/25557075
has body: I have a list of fetched data, and to every data has a form below it, like a comment box form, where other users can leave a message to the specific data. What I've tried so far is putting the submit button into an array to distinguish it from one to another (don't know if I'm doing this right as this is one of my first attempt in using Javascript/jQuery library and AJAX). I can submit the data and insert it into the SQL database just by using PHP/MySQL but I wanted to achieve at least the comment-like system of this community, Stackoverflow, wherein once a comment is posted, it would show up right after hitting the button (not by reloading the whole page in order to submit the data into the database). This is the dynamically post data: &lt;?php while($loopquery){ ?&gt; &lt;div&gt; &lt;?php echo $row['data']; ?&gt; &lt;div id="flash[]"&gt;&lt;/div&gt; &lt;!-- NEW POSTED COMMENT SHOULD BE SHOWN HERE --&gt; &lt;form action="#" method="POST"&gt; &lt;input type="text" name="comment[]" id="comment[]"&gt; &lt;input type="submit" id="submit[]"&gt; &lt;/form&gt; &lt;/div&gt; &lt;?php } /* END OF LOOP */ ?&gt; And once the submit is clicked: $(function () { var submit = document.getElementById('submit'); for (var a = 0; a &lt; submit.length; a++) { submit[a].click(function () { var comment = document.getElementById('comment'); var hiddentaskid = document.getElementById('hiddentaskid'); var dataString = '&amp;comment='+comment[a]+'&amp;hiddentaskid='+hiddentaskid[a]; if (comment[a] == '' || hiddentaskid[a] == '') { alert('Please Give Valid Details'); } else { var flash = document.getElementById('flash'); flash[a].show(); flash[a].fadeIn(400).html('Loading message'); $.ajax({ type: "POST", url: "commentajax.php", data: dataString, cache: false, success: function (html) { $("ol#update").append(html); $("ol#update li:last").fadeIn("slow"); flash[a].hide(); } }); } return false; }); } }); I've tried using array to distinguish the data from one to another, but it's not working whe…
downvote count: 0
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/39618582
upvote count: 6
tagged with: javascript
has comment: http://stackoverflow.com/comment/39913089
has comment: http://stackoverflow.com/comment/39986074
has comment: http://stackoverflow.com/comment/39618745
answer count: 1

http://stackoverflow.com/q/25410822
upvote count: 1
has answer: http://stackoverflow.com/a/25473549
tagged with: mediawiki
score: 1
has title: CKEditor JS API insert internal file link (MediaWiki WYSIWYG extension)
type: Question
tagged with: javascript
tagged with: ckeditor
tagged with: mediawiki-extensions
answer count: 1
downvote count: 0
has body: I'd like to use CKEditor's Javascript API to insert an internal file link into the text being edited. (Same as when you click on the Link icon and select "Internal link to an image or a file") I've tried using insertText and insertHtml, the problem is the special characters ([, ], etc.) are escaped. var inst = CKEDITOR.instances.wpTextbox1; inst.insertText('File:'+file.name+''); inst.insertHtml('File:'+file.name+'', '', '', '' ); I've tried switching the mode of the editor but it seems insertText and insertHtml only work in wysiwyg mode. var inst = CKEDITOR.instances.wpTextbox1; var oldmode = inst.mode; inst.mode = 'source'; inst.insertText('File:'+file.name+''); inst.insertHtml('File:'+file.name+'', '', '', '' ); inst.mode = oldmode; What does the "Link" button actually do for this to work? If the Link button can do it, I believe so should I, using the JS API...
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39857816
comment on: http://stackoverflow.com/q/25529714
score: 0
has text: have you tried anything?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25457009
tagged with: interpolation
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/25457138
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25457138
tagged with: javascript
score: 0
tagged with: ruby-on-rails-4
has body: For context, gon.jbuilder is a nested JSON that represents a has_many relationship between lenders and their inventories. gon.jbuilder = [ { "name": "John Doe", "age": 29, "inventories": [ {"id": 1, "name": "nail"}, {"id": 2, "name": "hammer"}, ... ] }, { "name": "Jane Smith", "age": 31, "inventories": [ {"id": 3, "name": "picture"}, {"id": 4, "name": "frame"}, ... ] } ] I'm using the Google Maps api to make a marker for each lender and then display in the infowindow for each lender all his/her inventories. This requires a each loop inside the content for the infowindow, which I'm don't know how to do. I need something like this: $.each( gon.jbuilder, function (counter, lender) { // draw the marker for each lender // establish an info window for each lender // below per Google API docs should be the content that goes into the info window, not sure how to interpolate the each correctly var contentString = ' '+ ' '+ ' '+ ' '+ lender.name + ' '+ ' '+ ' ' + $.each( lender, function (counter, inventory) { ' ' + inventory.name + '</li'> }; + ' ' + ' '+ ' '; Thanks!
answer count: 1
has title: How to find output of JS each function within a JS string variable (i.e., javascript interpolation)

http://stackoverflow.com/q/25404041
type: AnsweredQuestion
downvote count: 0
type: Question
tagged with: c#
answer count: 1
upvote count: 6
tagged with: javascript
tagged with: .net-4.5
has body: I am working with .NET 4.5 System.Web.Optimization bundling. When bundling files with minimisation turned on I have spotted that some CSS and JavaScript do not get minimised for not passing validation mechanisms. These files get messages written like /* Minification failed. Returning unminified contents. (5616,18): run-time error CSS1036: Expected expression, found '@Arial' because class had font-family: @Arial Unicode MS; or Javascript that didn't have window in front of global variable produced following errors. /* Minification failed. Returning unminified contents. (210,13-20): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: PageObj (189,13-20): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: PageObj */ I do understand that proper solution was to fix the errors, however having many files with lots of errors like these can be a hassle to fix sometimes. Is there a way to disable validation of css/js when bundling or one would have to use custom IBundleTransform writer that would remove things like "use strict" from javascript files that are being bundled and minified?
tagged with: bundling-and-minification
favorite count: 0
score: 6
has title: Is there a way to disable js/css validation when using System.Web.Optimization Bundling minimisation?
has comment: http://stackoverflow.com/comment/39634586
has answer: http://stackoverflow.com/a/25409651
accepted answer: http://stackoverflow.com/a/25409651
tagged with: css
has comment: http://stackoverflow.com/comment/39634509

http://stackoverflow.com/q/25394318
favorite count: 0
has comment: http://stackoverflow.com/comment/39607001
has comment: http://stackoverflow.com/comment/39638040
has comment: http://stackoverflow.com/comment/39606890
has comment: http://stackoverflow.com/comment/39607337
has answer: http://stackoverflow.com/a/25394361
score: -4
has comment: http://stackoverflow.com/comment/39606931
has comment: http://stackoverflow.com/comment/39607805
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39608450
downvote count: 5
has comment: http://stackoverflow.com/comment/39606999
type: Question
has comment: http://stackoverflow.com/comment/39606871
accepted answer: http://stackoverflow.com/a/25394361
has body: alert("dfg"); fires several times, alert("asd") not once. Any idea why alert("asd") won't fire? $(window).resize(function(){//shortens name if length would otherwise break line for(x in nameLabels){ if($(nameLabels[x]).text()=="..."){ $(nameLabels[x]).text(originalNameLabels[x]); } if($(nameLabels[x]).width()&gt;$(window).width()*0.45 &amp;&amp; !($(nameLabels[x]).width()==$(window).width())){ $(nameLabels[x]).text("..."); } alert("dfg"); } alert("asd"); }); alert("dfg") fires several times, alert("asd") not once. Any idea why alert("asd") won't fire?
has comment: http://stackoverflow.com/comment/39606955
answer count: 1
has comment: http://stackoverflow.com/comment/39606895
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39608468
has title: Javascript Jquery, some alert won't fire
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25479498
has answer: http://stackoverflow.com/a/25479551
type: AnsweredQuestion
tagged with: twitter-bootstrap
has title: jQuery addClass and removeClass in checkboxes
accepted answer: http://stackoverflow.com/a/25479551
upvote count: 1
possible better answer: http://stackoverflow.com/a/25479604
type: Question
has answer: http://stackoverflow.com/a/25479604
has body: i am new to jQuery, and i am trying to figure out how to create the jQuery function of the checkboxes, what i want to attain is that, when a user clicked on Yes the checkboxes(which will have a display:none) will have a checkmark. But if a user will click on No the checkmark will be removed. This will be a selection of multiple Yes and multiple No have a look at the page im working on http://jsfiddle.net/4x2f52ka/ I have started the script for it, but for some reason, when i started to select Yes on the first selection, another yes to the second selection, and if im gonna select No to the 3rd item, the 2 Yes will be removed. It is fine if i will select all yes and all no, but if im gonna select alternate Yes and No, it doesnt allow me to. this is my code for the html Have you found a property? YES NO Would you like a free RP Data Property Report? YES NO and this is my code for the jQuery Can anyone help me please?
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox

java
tags question: http://stackoverflow.com/q/25398383
tags question: http://stackoverflow.com/q/25422528
tags question: http://stackoverflow.com/q/25513305
tags question: http://stackoverflow.com/q/25390272
tags question: http://stackoverflow.com/q/25505358
tags question: http://stackoverflow.com/q/25485515
tags question: http://stackoverflow.com/q/25549866
tags question: http://stackoverflow.com/q/25519316
tags question: http://stackoverflow.com/q/25525477
tags question: http://stackoverflow.com/q/25412848
tags question: http://stackoverflow.com/q/25485735
tags question: http://stackoverflow.com/q/25546778
tags question: http://stackoverflow.com/q/25455977
tags question: http://stackoverflow.com/q/25408575
tags question: http://stackoverflow.com/q/25466283
tags question: http://stackoverflow.com/q/25475023
tags question: http://stackoverflow.com/q/25478129
tags question: http://stackoverflow.com/q/25542795
tags question: http://stackoverflow.com/q/25436244
tags question: http://stackoverflow.com/q/25549044
tags question: http://stackoverflow.com/q/25463427
tags question: http://stackoverflow.com/q/25447055
tags question: http://stackoverflow.com/q/25440278
tags question: http://stackoverflow.com/q/25423883
tags question: http://stackoverflow.com/q/25514164
tags question: http://stackoverflow.com/q/25550616
tags question: http://stackoverflow.com/q/25439099
tags question: http://stackoverflow.com/q/25397298
tags question: http://stackoverflow.com/q/25425056
tags question: http://stackoverflow.com/q/25481395
tags question: http://stackoverflow.com/q/25462850
tags question: http://stackoverflow.com/q/25523153
tags question: http://stackoverflow.com/q/25483927
tags question: http://stackoverflow.com/q/25444637
tags question: http://stackoverflow.com/q/25472055
tags question: http://stackoverflow.com/q/25550418
tags question: http://stackoverflow.com/q/25471022
tags question: http://stackoverflow.com/q/25472966
tags question: http://stackoverflow.com/q/25497954
tags question: http://stackoverflow.com/q/25426272
tags question: http://stackoverflow.com/q/25417583
tags question: http://stackoverflow.com/q/25549265
tag name: java
tags question: http://stackoverflow.com/q/25407934
tags question: http://stackoverflow.com/q/25462230
tags question: http://stackoverflow.com/q/25529108
tags question: http://stackoverflow.com/q/25486283
tags question: http://stackoverflow.com/q/25537634
tags question: http://stackoverflow.com/q/25430104
tags question: http://stackoverflow.com/q/25474527
tags question: http://stackoverflow.com/q/25414922
tags question: http://stackoverflow.com/q/25445654
tags question: http://stackoverflow.com/q/25512316
tags question: http://stackoverflow.com/q/25535878
tags question: http://stackoverflow.com/q/25450036
tags question: http://stackoverflow.com/q/25478900
tags question: http://stackoverflow.com/q/25490820
tags question: http://stackoverflow.com/q/25407527
type: Tag
tags question: http://stackoverflow.com/q/25422531
tags question: http://stackoverflow.com/q/25511352
tags question: http://stackoverflow.com/q/25508378
tags question: http://stackoverflow.com/q/25499567
tags question: http://stackoverflow.com/q/25536053
tags question: http://stackoverflow.com/q/25415430
tags question: http://stackoverflow.com/q/25449103
tags question: http://stackoverflow.com/q/25438418
tags question: http://stackoverflow.com/q/25481292

http://stackoverflow.com/a/25532587
accepted answer of: http://stackoverflow.com/q/25530164
downvote count: 0
answers question: http://stackoverflow.com/q/25530164
upvote count: 1
type: AcceptedAnswer
type: Answer
score: 1
has body: You can use a combination of the getLocalRow and addRowData methods to achieve your functionality. Docs for these methods. Let's say in your HTML you have a button: ADD In your javascript you could have:

http://stackoverflow.com/q/25440288
favorite count: 0
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25440411
downvote count: 1
has comment: http://stackoverflow.com/comment/39691634
has answer: http://stackoverflow.com/a/25440858
score: -1
has title: button onclick textfield validation not working
has comment: http://stackoverflow.com/comment/39692698
type: Question
has comment: http://stackoverflow.com/comment/39691647
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25440366
has body: I have a text filed with id='codeCityId' and a button with onclick method. OnClick it will check the function function click()={ var valid = $('#codeCityId').val().replace(/ /g,'').match(/^[A-Za-z]{1,}-[A-Za-z])+)?$/); if(valid){alert("valid")}else{alert("Not valid")} } The value of text filed should be like string - sting2. For example a-b. It should not accept any other expressions.How to check it?
has comment: http://stackoverflow.com/comment/39691677
answer count: 3

http://stackoverflow.com/comment/40502451
comment on: http://stackoverflow.com/q/25436042
type: Comment
type: QuestionComment
has text: @jumpdart: But that requires user interaction (click), yes? See this answer: http://stackoverflow.com/a/15133808/1303740
score: 3

http://stackoverflow.com/q/25458591
upvote count: 2
has answer: http://stackoverflow.com/a/25458634
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25458741
has comment: http://stackoverflow.com/comment/39726485
type: Question
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/91338228
has answer: http://stackoverflow.com/a/68249050
favorite count: 0
has body: i have muddling with date comparison in native javascript or jquery, can anybody point me out how i can quickly do the comparison with today's date in ISO-8601 format
has answer: http://stackoverflow.com/a/25458741
has title: ISO date comparison in native javascript
possible better answer: http://stackoverflow.com/a/68249050
has answer: http://stackoverflow.com/a/25458821
has comment: http://stackoverflow.com/comment/39726452

http://stackoverflow.com/a/25482688
answers question: http://stackoverflow.com/q/25482395
has comment: http://stackoverflow.com/comment/39770802
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25482395
has comment: http://stackoverflow.com/comment/39770870
upvote count: 2
type: Answer
score: 2
has body: The solution is that we have to make sure the 720p video is ready to be played. HTML5: 720p JS: $("#720p").click(function() { $("preload").attr("src", "videos/nesemdonti_720p.mp4"); $("preload").on("canplay",function(){ $('video').attr("src", "videos/nesemdonti_720p.mp4"); }); }); The 'canplay' event occurs when the browser can start playing the specified audio/video. See: http://www.w3schools.com/tags/av_event_canplay.asp

http://stackoverflow.com/q/25511849
tagged with: node.js
favorite count: 0
has title: Node JS variable scope with response and http methods
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39863990
type: Question
has body: I'm still trying to get the hang of this, but this is confusing for me. So I use http.get and a pipe with the bl module, I want it to change content so I can use it outside the function doesn't work why? I thought with var it would be global within my file and that would allow me to change it. var http = require('http'); var bl = require('bl'); var url1 = process.argv[2]; var content; http.get(url1, function(response){ response.pipe(bl(function(err,data){ return data.toString(); })); }); console.log(content.length); console.log(content);
has comment: http://stackoverflow.com/comment/39825576
has answer: http://stackoverflow.com/a/25511915
answer count: 2
score: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25511934
has comment: http://stackoverflow.com/comment/39825622

http://stackoverflow.com/comment/39660544
comment on: http://stackoverflow.com/a/25423274
score: 0
has text: that is because you call `console.log(tabledata);` and `$scope.result = makeTableFrom(tabledata);` before the http success function is called. I have modified my answer to reflect the correct change
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39733456
type: AnswerComment
comment on: http://stackoverflow.com/a/25462340
type: Comment
has text: This is similar as two previous answers two. I don't like the idea of using `trim` in there. Isn't there a way to capture it without those spaces ?
score: 0

http://stackoverflow.com/a/25516783
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25516768
answers question: http://stackoverflow.com/q/25516768
type: Answer
has body: A quick way to acheive this is to use the HTML iframe. It displays a frame of another webpage, an example usage is . Also see this link for some more basic info.
score: 0
has comment: http://stackoverflow.com/comment/39835140

http://stackoverflow.com/comment/39877421
score: 0
type: Comment
has text: Thanks for your answer man. By the way, this is what I was referring on the divs that are lining on the left http://screencast.com/t/mZQLwELQofV9
comment on: http://stackoverflow.com/a/25540231
type: AnswerComment

http://stackoverflow.com/comment/39687094
type: QuestionComment
has text: jotform.com -if i understand your question correctly this should help
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25437371

http://stackoverflow.com/q/25503062
tagged with: javascript
has answer: http://stackoverflow.com/a/25650124
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/40075456
tagged with: cordova
type: UnansweredQuestion
upvote count: 1
tagged with: input
has comment: http://stackoverflow.com/comment/40188474
has answer: http://stackoverflow.com/a/25709792
score: 1
has body: I attach a video cause its hard for me to explain the problem i'm getting: https://vid.me/5Mo Actually i styled by my own the form inputs and they works like a charm but when i test the fomr on ios simulator i do this: focus the input touch scroll the page then the form input is rsetted to the default background as you can see in the video it gets a white background, while i specified in css that such inputs has to be without background at all. I tryed in many ways using the css like: .input-huge:focus, .input-huge:focus:hover{ background:none; } but it still wont work. Any idea? this is the html: Submit and this is my styled inputs in css : input.input-huge{ background: none; text-align: center; font-size: 20px; padding-bottom:40px; color:#fff; border-bottom:1px solid rgba(0,0,0,0.08); } thanks in advice
has title: Ionicframework , cordova and ios simulator form input issue
tagged with: ionic-framework
type: Question
has comment: http://stackoverflow.com/comment/40188510
answer count: 2
downvote count: 0

http://stackoverflow.com/a/25440116
accepted answer of: http://stackoverflow.com/q/25402191
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25402191
type: AcceptedAnswer
downvote count: 0
has body: I have been able to solve the problem. In application.js, I removed the code related to datepicker and its librariies and created a new file datepicker.js datepicker.js contains /* bootstrap datepicker */ //= require bootstrap-datepicker/core //= require bootstrap-datepicker/locales/bootstrap-datepicker.es jQuery(document).on('focus', 'input.datetime', function() { opts = {format: 'M dd, yyyy', autoclose: true}; jQuery(this).datepicker(opts); }); In application.js //= require datepicker In _admin_controls.html.erb, &lt;%= f.input :end_date, wrapper: :append do %&gt; &lt;div id="datepicker" class="datepicker input-group edit-left"&gt; &lt;%= f.text_field :end_date, :class =&gt; "datetime form-control", :'data-date-start-date' =&gt; Date.current.strftime('%m/%d/%Y') %&gt; And this disables backdate selection for particularly _admin_controls datepicker. :)
type: Answer

http://stackoverflow.com/comment/39751738
type: Comment
type: QuestionComment
has text: please post some of your code so that better help could be offered.
comment on: http://stackoverflow.com/q/25472248
score: 4

http://stackoverflow.com/a/25410427
answers question: http://stackoverflow.com/q/25393603
type: AcceptedAnswer
has body: Everything you need to know about this can be found here. The highlights: Store dates as JavaScript Date objects. They have all the query advantages of integer timestamps, but you don't need to convert them back to Date objects to use them. Range queries work like so: Posts.find({creation_date: {$gte: startDate, $lt: endDate}}) You should either have the server do the inserts or use the timesync package to prevent clock skew problems. You can use moment-timezone to format you dates to different timezones. e.g. moment(date).tz("America/New_York").format('l LT')
upvote count: 5
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25393603
score: 5

http://stackoverflow.com/comment/39859506
type: Comment
score: 1
has text: Why would this be downvoted? This is the proper approach and the best advice for a programmer new to JavaScript.
type: AnswerComment
comment on: http://stackoverflow.com/a/25530572

http://stackoverflow.com/comment/39892416
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25546699
has text: No problem with animation in FF. But for the left move, there is a typo : change `character.changeXBy(-5)` (l66) with `character.changeXby(-5)`
score: 0

http://stackoverflow.com/q/25439429
has answer: http://stackoverflow.com/a/25439489
score: 3
downvote count: 0
has body: I'm designing an app to run on very low spec machine..and i needed it to be efficient as possible.. I needed to issue around 10 intervals at every second that simply makes an ajax call.. and then does a few add/remove classes and (think of it as SERVER Status monitor) I know in FLASH (oh good old flash days) having a lot of intervals can cause processor spikes .. so i'm very conservative with issuing setIntervals in AS 2.0 before. I was wondering if this is the same case with JS? or is it alright for JS to have a bunch of intervals (that does lightweight tasks) running? I noticed a lot of sites do this , even facebook has tons of intervals running, loading scripts, etc.. And oh, for one interval, I wanted to run it at 50ms (it loads as status.php link) ... this ok? I could probably optimize my interval calls, no problem but i'm just wondering how "heavy" or "lightweight" background intervals are in JS.. Thanks all
type: Question
has answer: http://stackoverflow.com/a/25439581
tagged with: javascript
upvote count: 3
answer count: 3
tagged with: intervals
tagged with: setinterval
tagged with: jquery
has answer: http://stackoverflow.com/a/25439524
has title: is Javascript's setInterval loop a resource hog?
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39886359
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25545381
has text: If you are using the jquery validation plugin then apply `validate` to the form and every time a tab is clicked switch the tab only if `$("#form_id").valid() == true`.
score: 0

http://stackoverflow.com/comment/39624048
type: Comment
type: QuestionComment
has text: Maybe you could show/hide the validation messages using similar logic that you already are using to show/hide things in the UI?
comment on: http://stackoverflow.com/q/25403506
score: 0

http://stackoverflow.com/comment/39651721
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25418334
has text: If you put an alert at the beginning of `RaiseEvent`, does it appear?
type: Comment

http://stackoverflow.com/comment/39689369
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25438815
has text: This is the rendered result - http://liveweave.com/5KNjtU How would you get it to only append the value amount? It appends more when the value is (2 becomes 3, 3 becomes 6, 4 becomes 10 and repeats even when I'm decreasing the numeric value)

http://stackoverflow.com/comment/39762604
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25478097
has text: if you want to save content, you must use a database like MySQL

http://stackoverflow.com/q/25493863
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25494021
has title: Show/hide buttons when clicking on a button on accordion header - jQuery
has body: I have a button on accordion header and when it is clicked I want to show another button in the div. This is the first paragraph This is the second paragraph This is the third paragraph How could I show/hide #divButton when the respective section #headerButton is clicked? Any help greatly appreciated!
has answer: http://stackoverflow.com/a/25494014
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25494021
has comment: http://stackoverflow.com/comment/39792170
tagged with: jquery-ui-accordion
type: Question
possible better answer: http://stackoverflow.com/a/25494341
has answer: http://stackoverflow.com/a/25494341
tagged with: javascript
tagged with: jquery
tagged with: accordion

http://stackoverflow.com/q/25455603
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25455626
has title: JQuery - Snap text area to content size
linked to: http://stackoverflow.com/q/7477
has body: I've got a div and the user can click on a button to make the div grow in size and become editable: $('#t4_post_item_' + $number).css("height", "500px"); When the user clicks the button again the div needs to snap back to the minimum possible size, this will likely be different to the original size as the user will enter some text. How can i make the textarea snap back to the minimum possible size based on whats in the textarea? Example: The textarea starts at 200px in height, then grows to 500px when the button is clicker, then the user enters a bunch of text which takes up say .. 324px, how can i snap to that variable size?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25455626
tagged with: javascript
score: 0

http://stackoverflow.com/a/25498661
type: Answer
answers question: http://stackoverflow.com/q/25498580
has body: just simple try: /\[[^\]]+]([^\[]+\[\/[^\]]+])?/g Debuggex Demo
score: 0

http://stackoverflow.com/a/25517652
accepted answer of: http://stackoverflow.com/q/25516987
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39836658
answers question: http://stackoverflow.com/q/25516987
score: 1
downvote count: 0
type: AcceptedAnswer
has body: You can capture the relative position on mousedown (such as e.pageX - (parseInt($(this).css('left')) || 0)), try this: http://jsfiddle.net/hwvvu2rg/9/

http://stackoverflow.com/q/25450313
has comment: http://stackoverflow.com/comment/39710857
has body: Hi I've started to make a comments module for my website with Angular, and I am stucking now at one point: updating my JSON file which contains the comments. Here is the JSON: [ { "page": "dashboard", "text": "first comment", "author": "vince" }, { "page": "dashboard", "text": "second comment", "author": "vince" }, { "page": "angular_crawling", "text": "second comment", "author": "vince" } ] And the function which add comments to the $scope data, but it's not changing the JSON file $scope.addcommentaire = function () { console.log(this.textMessage); console.log(this.auteur); console.log(document.getElementById('hiddenpage').value); var onecomment = {page: document.getElementById('hiddenpage').value, text: this.textMessage, author: this.auteur}; $scope.commentaires.unshift(onecomment); }; how to add data in a JSON file with angular or javascript ? Is it possible?
has comment: http://stackoverflow.com/comment/39710317
has title: how to add data in a JSON file with angular or javascript?
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39710503
type: Question
has comment: http://stackoverflow.com/comment/39710694
tagged with: javascript
has comment: http://stackoverflow.com/comment/39710441
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39710256
answer count: 0
has comment: http://stackoverflow.com/comment/39710980
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39710172

http://stackoverflow.com/a/25467792
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39743528
has comment: http://stackoverflow.com/comment/39743642
has body: If you want "show more" to appear below, you can simply move your tag below tag. For the toggle you should use jQuery as it will make your life easier. HTML blah blah text and images blah blah Show More JAVASCRIPT $('#trigger').bind('click', function(){ $(this).hide(); $('#mytext').show(); }); As for the images, it's a matter of browser. Some modern browsers do not preload images when display is set to none.
accepted answer of: http://stackoverflow.com/q/25467644
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25467644

http://stackoverflow.com/comment/39647099
has text: I will give it a try and let you know, thanks for the advice!
comment on: http://stackoverflow.com/a/25397422
score: 0
type: AnswerComment
type: Comment

blur
tags question: http://stackoverflow.com/q/25448398
tag name: blur
type: Tag
tags question: http://stackoverflow.com/q/25398402

http://stackoverflow.com/a/25439817
type: Answer
answers question: http://stackoverflow.com/q/25417117
score: 0
accepted answer of: http://stackoverflow.com/q/25417117
type: AcceptedAnswer
has body: So I made the following changes to the update of the data var svg = d3.select("#viz").selectAll("svg").data(data) svg.call(chart.duration(duration)); svg.enter().append("svg") .attr("class", "box") .attr("id", function (d, i) { return "box_" + i; }) .attr("width", width + margin.left + margin.right) .attr("height", height + margin.bottom + margin.top) .append("g") .attr("id", function (d, i) { return "g_" + i; }) .attr("transform", "translate(" + margin.left + "," + margin.top + ")") .call(chart.duration(duration)) svg.exit().remove(); and there is actually some bugs with that box.js code that needs to be fixed which I found about here: D3 Datum Update Boxplot

http://stackoverflow.com/a/25543598
has comment: http://stackoverflow.com/comment/39991329
has body: There is the db.getCollectionNames() helper method that does this for you. You can then implement your code: db.getCollectionNames().forEach(function(collname) { // find the last item in a collection var last_element = db[collname].find().sort({_id:-1}).limit(1); // check that it's not empty if (last_element.hasNext()) { // print its timestamp printjson(last_element.next()._id.getTimestamp()); } }) You probably also want a .hasNext() check in there to cater for possible empty collections.
upvote count: 61
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39990591
score: 61
type: Answer
accepted answer of: http://stackoverflow.com/q/25543452
answers question: http://stackoverflow.com/q/25543452
downvote count: 0

http://stackoverflow.com/comment/40194955
comment on: http://stackoverflow.com/a/25709792
type: Comment
has text: I have restrictions, also the bug happening only on ios simulator not on safari, and its impossible to me to make public the simulator :P
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39687371
has text: Change `id='editBtnFunc'` to a class: `class='editBtnFunc'` because you shouldn't have duplicate id's. Then change `$('#editBtnFunc').on('click', function(e){` to `$('ManageForms').on('click', '.editBtnFunc', function(e){`
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25437679
type: QuestionComment

http://stackoverflow.com/comment/39771684
has text: thank's to all of you for answering me
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25482998
type: Comment

http://stackoverflow.com/comment/39653512
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25418854
has text: @RobG thanks for pointing that out. What I'm learning here is that if you're the one who writes the language or library, you can decide for yourself what the rules should be. My main concern was primarily trying to figure out if ```someLibrary.times = function(){}``` was somehow going to get me in trouble with the language itself. I'm new to "real" JavaScript programming, and JS has all sorts of weird gotchas.

http://stackoverflow.com/q/25452751
score: 0
has body: I'm using javascript to control where my page page scrolls to after clicking on an anchor link, as I have a fixed nav. I have one page that the anchors + script work correctly on (PAGE B). My issue is that I have buttons on a different page (PAGE A) that need to go the anchors on the correctly working page (PAGE B). The anchor itself works correctly, but the javascript does not fire. The reason why it's not firing (tested by putting an alert and not receiving a popup) is because the javascript for the buttons on PAGE A does not know to look for the element on PAGE B. After googling for three hours I cannot figure out how to tell it to look at a new page instead of just the hierarchy of elements. I'm sure this is stupidly simple, but I'm a beginner at javascript and appreciate the help. The code: PAGE A Button HTML: Learn more PAGE A Javascript: PAGE B Anchor HTML: PAGE B: Javascript: (the exact same as PAGE A) $("div ul li a[href^='productsandservices.html#']").on('click', function(e) { // prevent default anchor click behavior e.preventDefault(); // animate $('html, body').animate({ scrollTop: $(this.hash).offset().top - 150 }, 300, function(){ }); }); Please and Thanks.
tagged with: anchor-scroll
has comment: http://stackoverflow.com/comment/39716160
has answer: http://stackoverflow.com/a/25453379
accepted answer: http://stackoverflow.com/a/25453379
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
possible better answer: http://stackoverflow.com/a/26060588
has comment: http://stackoverflow.com/comment/39757106
has answer: http://stackoverflow.com/a/26060588
type: Question
answer count: 2
tagged with: javascript
has title: I need javascript on one page to influence elements on a different page
linked to: http://stackoverflow.com/q/1451208

http://stackoverflow.com/a/25537505
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39873946
has comment: http://stackoverflow.com/comment/39900582
has comment: http://stackoverflow.com/comment/39900226
accepted answer of: http://stackoverflow.com/q/25537230
answers question: http://stackoverflow.com/q/25537230
has body: Use sessionStorage or localStorage to store a flag that overrides the redirect. E.g. on mobile site if (window.sessionStorage) sessionStorage.setItem("beenOnMobileSite",true) and on main site if ((navigator.userAgent.indexOf('iPad') != -1 &amp;&amp; !sessionStorage.getItem("beenOnMobileSite")) { document.location = "http://www.sample.com/mobilego.aspx"; } use localStorage instead of sessionStorage to make the override persistent. If the mobile site and main site are on different servers, they won't have access to the same storage. One solution to this is to add a parameter to the link to the main page, and check for the parameter in your script on the main page. If the parameter is present, override the redirect as before, but also set the sessionStorage or localStorage item as above to make it stick.
has comment: http://stackoverflow.com/comment/39875011
type: AcceptedAnswer

http://stackoverflow.com/q/25537377
favorite count: 0
has comment: http://stackoverflow.com/comment/39872904
has comment: http://stackoverflow.com/comment/39872336
accepted answer: http://stackoverflow.com/a/25537416
has comment: http://stackoverflow.com/comment/39872909
has title: Filtering javascript from site content PHP
tagged with: keyword
tagged with: php
type: AnsweredQuestion
score: 3
has body: So I'm making a script to check the keyword density of a page based off the URL the user submits and I have been using strip_tags but it doesn't seem to be completely filtering the javascript and other code from the actual word content on the site. Is there a better way to filter between the code content on a page and the actual word content? if(isset($_POST['url'])){ $url = $_POST['url']; $str = strip_tags(file_get_contents($url)); $words = str_word_count(strtolower($str),1); $word_count = array_count_values($words); foreach ($word_count as $key=&gt;$val) { $density = ($val/count($words))*100; echo "$key - COUNT: $val, DENSITY: ".number_format($density,2)."%&lt;br/&gt;\n"; } }
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/39873024
answer count: 2
has comment: http://stackoverflow.com/comment/39872957
has comment: http://stackoverflow.com/comment/39872928
possible better answer: http://stackoverflow.com/a/25537475
downvote count: 0
has answer: http://stackoverflow.com/a/25537416
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25537475
has comment: http://stackoverflow.com/comment/39872940
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39872973

http://stackoverflow.com/comment/39668652
comment on: http://stackoverflow.com/a/25427507
type: Comment
score: 0
type: AnswerComment
has text: Thank you guys for help, @MilindAnantwar can you also help me with this question please as its related http://stackoverflow.com/questions/25426264/cross-filtering-table-data - since I got ids now, I want to filter another's table rows based on data-fid i just collected :-)

http://stackoverflow.com/comment/39609128
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25395460
has text: You realize you're making up all kinds of tags and attributes, right? The question itself is a bit muddled, but if you want to get the next element of a certain tag name (or any other selector), use [`$(this).nextAll('tagname').get(0)`](http://jsfiddle.net/hwf6pyyu/) (`this` being a reference to which element you're working from, it could be a selector instead).

http://stackoverflow.com/comment/40220975
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25508590
has text: Alright, but what if other people experience the same problem? Should'nt we put up some more information?
type: AnswerComment

http://stackoverflow.com/a/25498058
answers question: http://stackoverflow.com/q/25497954
has comment: http://stackoverflow.com/comment/39835244
type: Answer
upvote count: 3
score: 3
has body: If you mean, add semicolon to the end of each line within triple quotes, you can't do it with one regexp - regexps are not powerful enough for that. This JavaScript should do the trick: var a = 'print and not affected\n"""\nThis is my game\ndead or alive\nALIVE!\n"""'; a.replace(/("""\n?)([^]*?)(""")/mg, function(_, o, m, c) { return o + m.replace(/\n/g, ";\n") + c; }); // =&gt; // print and not affected // """ // This is my game; // dead or alive; // ALIVE!; // """
downvote count: 0

http://stackoverflow.com/comment/39681818
type: Comment
has text: @FelixKling - Yeah, I noticed the dupe. I have no idea, I just sometimes answer without thinking, other times I instantly remember a dupe and tag etc. Depends !
comment on: http://stackoverflow.com/a/25434661
type: AnswerComment
score: 0

http://stackoverflow.com/q/25429115
has comment: http://stackoverflow.com/comment/39673264
has comment: http://stackoverflow.com/comment/39671273
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39673519
score: 0
has comment: http://stackoverflow.com/comment/39673971
answer count: 1
tagged with: jquery
favorite count: 0
has body: I have a list of variable dates that I would like to group together, preferably in javascript. ie. 2014-08-12 2014-08-10 2014-07-28 2014-07-27 2014-01-27 2013-04-27 2003-02-12 This list of days can be completely dynamic, but here is an example resultset. Can anyone think of an elegant way to group dates that are considered to be 'near' each other together, which in this case would be: 2014-08-12 2014-08-10 2014-07-28 2014-07-27 2014-01-27 2013-04-27 2003-02-12
has answer: http://stackoverflow.com/a/25430689
type: UnansweredQuestion
has title: Group nearby dates together

http://stackoverflow.com/a/25416741
has comment: http://stackoverflow.com/comment/39649996
has comment: http://stackoverflow.com/comment/39649171
has comment: http://stackoverflow.com/comment/39648931
has comment: http://stackoverflow.com/comment/39648851
has comment: http://stackoverflow.com/comment/39649089
score: 0
has comment: http://stackoverflow.com/comment/39649700
has comment: http://stackoverflow.com/comment/39648911
has comment: http://stackoverflow.com/comment/39650015
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39649019
has comment: http://stackoverflow.com/comment/39649182
answers question: http://stackoverflow.com/q/25416694
has comment: http://stackoverflow.com/comment/39648892
type: Answer
has comment: http://stackoverflow.com/comment/39649043
accepted answer of: http://stackoverflow.com/q/25416694
has comment: http://stackoverflow.com/comment/39649180
has comment: http://stackoverflow.com/comment/39648918
has comment: http://stackoverflow.com/comment/39650105
has comment: http://stackoverflow.com/comment/39649504
has body: Yes. Just give your event handler a parameter to pass when it is called: function cardClicked(e){ console.log(e.target.id); } Note that you should use console.log() for debugging, not alert(). Logging to the console will show you the actual structure of the element/object/whatever you're logging. Also, there is a simpler way to attach the listeners: var divs = document.getElementsByTagName("div"); for(var i = 0; i &lt; divs.length; i++){ $(divs[i]).click(function(e){ console.log(e.target.id); }); }
has comment: http://stackoverflow.com/comment/39648864
has comment: http://stackoverflow.com/comment/39649200
has comment: http://stackoverflow.com/comment/39648986
has comment: http://stackoverflow.com/comment/39649530

http://stackoverflow.com/comment/39940359
score: 0
type: AnswerComment
has text: Navigate to [html5Rocks](http://www.html5rocks.com/en/tutorials/file/dndfiles/) on iOS 8 beta and attempt their 'Monitoring the progress of a read' example near the bottom of the page. It seems that apple has either changed their file type for photos or some other issue.
type: Comment
comment on: http://stackoverflow.com/a/25554547

http://stackoverflow.com/a/25408841
has comment: http://stackoverflow.com/comment/39634933
has body: Can you try with TypeReference? sample code: TypeReference&lt;Map&lt;String, String&gt;&gt; t=new TypeReference&lt;Map&lt;String, String&gt;&gt;(){}; ObjectMapper mapper = new ObjectMapper(); try { Map&lt;String, String&gt; data = mapper.readValue("{\"view\":\"global\"}", t); System.out.println(data.get("view")); // prints global } catch (Exception e) { System.out.println("There might be some issue with the JSON string"); } The problem might be with the encoded string that is sent from client to server. Try it again after decoding it properly. What exactly JSON.stringify() does? Print the JSON string at server side as SOP and try to debug it.
score: 0
answers question: http://stackoverflow.com/q/25408575
type: Answer

http://stackoverflow.com/comment/39673075
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25428414
type: QuestionComment
has text: where is used `NUM_DOP` + what is `i` in `var divID = DOP_DATES[i][0];` ? Are you sure you have no error thrown? I've got a lot when trying to resolve the firsts…

http://stackoverflow.com/a/25468764
answers question: http://stackoverflow.com/q/25468703
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39745367
has body: Browser will compile line by line in the order you defined your statements. So, you need to include your jquery library before using its functions. That's it.
has comment: http://stackoverflow.com/comment/39745508

http://stackoverflow.com/a/25530661
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39860351
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25530489
downvote count: 0
has comment: http://stackoverflow.com/comment/39859744
has body: You could use the optional character after the 8th digit. $('.phone').mask('99999999Z', {translation: {'Z': {pattern: /[0-9]/, optional: true}}});
type: Answer
has comment: http://stackoverflow.com/comment/39859941
accepted answer of: http://stackoverflow.com/q/25530489

http://stackoverflow.com/comment/39793407
has text: If you understand what `reduce` and `map` do, then you should be able to work out what the whole thing does. Just work from the inside out.
comment on: http://stackoverflow.com/a/25494022
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39884625
score: 0
type: Comment
type: QuestionComment
has text: You are right @Elena . Please check my answer
comment on: http://stackoverflow.com/q/25528282

http://stackoverflow.com/q/25503035
has comment: http://stackoverflow.com/comment/39811362
tagged with: selenium
tagged with: scroll
accepted answer: http://stackoverflow.com/a/25503507
type: Question
has comment: http://stackoverflow.com/comment/39811260
tagged with: javascript
tagged with: mocha.js
has title: selenium webdriver javascript queries
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25503507
has body: I have been recently using selenium webdriver (nodejs module) in combination with mocha, for writing automation tests and these are some of the issues that I faced Scrolling driver.findElement() returns false since it is not able to locate the element since it is not visible in the current window but somewhere below. Reading some blogs, I thought scrolling would solve the issue.But,I cant find an API in selenium that helps me scroll up,down,left,right in the browser. I tried using the scrollBy(xDelta,yDelta) method of javscript inside the it() clause, but it did not work either Reading the text of an element where the text gets updated dynamically from back end. The text is not present in the text attribute of the DOM element. I have the element's xpath, So that is my only means of accessing the element. I have two requirements A.) I need to read and get the value of some elements in the html page and store it B.) I need to read the element and assert it against some text can you please tell me the webdriver nodejs API methods for performing the same. Waiting for a particular text The text of the element that I am trying to read changes over time in response to various events. How do I programatically wait for a particular text using selenium webdriver's javascript API I am new to selenium and though I found many discussions for the above questions, but they were all for other platforms of selenium such as java,etc; there is very less documentation for the nodejs platform of the selenium API . So please help me with the same Much Thanks in advance
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/39692221
type: Comment
has text: 1 Yes!! That's it! actually, I will make expression script for user. as you are saying, that is untrusted script..
comment on: http://stackoverflow.com/a/25425082
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39749482
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25462331
has text: 1) you have serialise, why use the other stuff? 2) you have a hardcoded $deet[0]->id
type: Comment

http://stackoverflow.com/q/25470730
has comment: http://stackoverflow.com/comment/39749194
has answer: http://stackoverflow.com/a/25471564
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39749011
favorite count: 0
has body: I'm creating a Canvas animation, and have managed to position x number of circles in a circular path. Here's a simplified version of the code I'm using: var total = circles.length, i = 0, radius = 500, angle = 0, step = (2*Math.PI) / total; for( i; i &lt; total; i++ ) { var circle = circles[i].children[0], cRadius = circle[i].r, x = Math.round(winWidth/2 + radius * Math.cos( angle ) - cRadius), y = Math.round(winHeight/2 + radius * Math.sin( angle ) - cRadius); circle.x = x; circle.y = y; angle += step; } Which results in this: What I am trying to achieve is for all the circles to be next to each other with no gap between them (except the first and last). The circles sizes (radius) are generated randomly and shouldn't adjust to fit the circular path: function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } I expect there to be a gap between the first and last circle. I'm struggling to get my head around this so any help would be much appreciated :) Cheers!
has comment: http://stackoverflow.com/comment/39750110
has title: Position different size circles around a circular path with no gaps
has comment: http://stackoverflow.com/comment/39749130
accepted answer: http://stackoverflow.com/a/25471492
upvote count: 3
has comment: http://stackoverflow.com/comment/39749155
type: Question
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/39748969
tagged with: math
has answer: http://stackoverflow.com/a/25471492
has comment: http://stackoverflow.com/comment/39749317
possible better answer: http://stackoverflow.com/a/25471564
answer count: 2
tagged with: canvas

http://stackoverflow.com/comment/39666426
type: AnswerComment
has text: @NadavStern if you don't want to convert at server you can create custom filter and use angular date filter to format data inside the custom filter
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25426615

http://stackoverflow.com/q/25516112
has comment: http://stackoverflow.com/comment/39848292
tagged with: laravel-4
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: backbone.js
has body: I recently upgraded to Laravel 4.2 for a new project and created a blade view with a Backbone.js template like I am used to doing. However, I get an exception thrown on all variables I have in my Backbone.js template because apparently Laravel 4.2 tries to interpret the Backbone.js variables. So my question is: How the hell am I supposed to work with my Backbone.js templates if: <%=backbone_variable%> === {{$laravel_variable}}
has answer: http://stackoverflow.com/a/26068018
has title: Laravel 4.2 tries to interpret Backbone.js template variables
type: UnansweredQuestion
upvote count: 1
tagged with: laravel
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39834224

http://stackoverflow.com/a/25392474
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25392385
has body: style.opacity returns a string, += contacts the string instead of increasing the value try this function fadeIn() { console.log("fade in: " + document.getElementById('quotes').style.opacity) var opacity = Number(document.getElementById('quotes').style.opacity) if(document.getElementById('quotes').style.opacity &lt; 0.9) { document.getElementById('quotes').style.opacity = opacity + 0.1; fadeDelay = setTimeout('fadeIn()',100); } else { document.getElementById('quotes').style.opacity = 1; console.log("stopped fade in."); } }
downvote count: 0

postback
tag name: postback
type: Tag
tags question: http://stackoverflow.com/q/25507622

http://stackoverflow.com/comment/39834992
has text: @MadsterMaddness Well, as you may know, we see a curve as a result of [interpolation](http://en.wikipedia.org/wiki/Interpolation) of a few given data. So I'm not sure if chart calculates data for every point. I was working on a similar problem using [highcharts](http://www.highcharts.com/) a few weeks ago and couldn't get to have a (let's say) rounded value on every click. I'll let you know if I menage to find a workaround.
comment on: http://stackoverflow.com/a/25515509
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25489367
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/25564073
favorite count: 0
has body: Please refer to the quick and dirty jfiddle here http://jsfiddle.net/Dano007/b11xarpp/5/ The bounty is to get the below answer working with the an updated jfiddle. Bascially having the drop down menu display the two options for the functions. The when one of those of options is clicked the results are returned on the page. I think the answer below will help with how to approach this, hoever I've hot a brick wall with my attempts. If you click the buttons, this is the end results I'd like to duplicate when using the filter. Code Filter Friends/Requests Connected Friends Friend Requests
type: Question
upvote count: 2
possible better answer: http://stackoverflow.com/a/25489571
tagged with: underscore.js
has title: How do i display multiple separate query results into options in a single drop down box?
answer count: 2
has answer: http://stackoverflow.com/a/25489571
accepted answer: http://stackoverflow.com/a/25564073
tagged with: javascript
linked to: http://stackoverflow.com/q/25555368

http://stackoverflow.com/q/25426337
has title: IE11 Issue: When moving an IFrame with Flash in it, some background leaks through
type: Question
linked to: http://stackoverflow.com/q/1567420
tagged with: css
has body: I have a web page with roughly the following structure: &lt;div class="row"&gt; menu &lt;/div&gt; &lt;div class="row"&gt; optional content &lt;/div&gt; &lt;div class="row"&gt; &lt;iframe src="(some flash application)"&gt;&lt;/iframe&gt; &lt;/div&gt; ...wheere .row is set to width: 100%; After a click on some part of the menu, the optional content div disappears / reappiers via JavaScript. In IE11, when the optional content gets hidden, it seems to actually still exist somehow below the flash content, and parts of it leak through the flash. Sometimes it looks as if the hidden div got doubled, and one part is now where the flash content should be. It all works fine in FF &amp; Chrome. When the user scrolls up and down a bit, the leakage disappears and the flash is displayed as it should. Z-Index didn't change anything. Currently, I'm wiggling the window a bit via JavaScript window.scrollBy(0,1). That fixes it in about 80% of all cases, but not always. (Plus it's decidedly ugly of course.) Any hints as to what causes that behaviour, and how to fix it? Thanks in advance!
has answer: http://stackoverflow.com/a/25745803
score: 0
tagged with: iframe
answer count: 1
tagged with: internet-explorer
tagged with: javascript
type: UnansweredQuestion
tagged with: flash

http://stackoverflow.com/comment/39677442
has text: 12a3567a matches with (\w)\1{1,} only 1234567aa should match
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25432318
type: Comment

http://stackoverflow.com/a/25460014
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25459824
answers question: http://stackoverflow.com/q/25459824
has body: .nodeValue is not a function, you just set it with an assignment $(this)[0].nextSibling.nodeValue = val["carType"]; Also the since you are now using the actual DOM object you are no longer in the jQuery chain, so chaining fadeIn and delay after the call will fail. Even if you were still in the jQuery chain you cannot fadeIn/Out textNodes. You would need to wrap the text in another element like span HTML small js $('#sizeSmall').next().fadeOut(function() { $(this).text(val["cartype"]).fadeIn().delay(3000) });

http://stackoverflow.com/q/25513306
has title: What AngularJS design pattern to use with 2 services that have a common set of fields?
upvote count: 1
has comment: http://stackoverflow.com/comment/39828395
has comment: http://stackoverflow.com/comment/39828393
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39828821
has comment: http://stackoverflow.com/comment/39828568
tagged with: angularjs
has answer: http://stackoverflow.com/a/25514600
accepted answer: http://stackoverflow.com/a/25514600
has comment: http://stackoverflow.com/comment/39829367
type: AnsweredQuestion
downvote count: 0
has body: I've got a situation where every solution I seem to come up with doesn't feel very "Angular" to me, so it makes me wonder if I'm missing an obvious approach somewhere. I have two services that share a common set of fields (in this case paging fields to help with paging data on a screen) - app.service('service1', [function () { var model = this; model.totalItems = 0; model.currentPage = 1; model.itemsPerPage = 10; } app.service('service2', [function () { var model = this; model.totalItems = 0; model.currentPage = 1; model.itemsPerPage = 10; } This isn't too bad with just 3 fields, but as I've added more fields and functions I wind up duplicating a good bit of code. If I was just working with functions here, I could just share a common service between the two, but since I have data I can't use a singleton (both services need their own values in the fields). In an OO language like C# I would solve this with inheritance, but in the JS/Angular world that seems to be frowned upon because it tightly couples the services. Anyone have an approach to this that I'm missing?
score: 1
has comment: http://stackoverflow.com/comment/39854031
type: Question
has comment: http://stackoverflow.com/comment/39828466
has comment: http://stackoverflow.com/comment/39853950
tagged with: javascript
tagged with: inheritance
has comment: http://stackoverflow.com/comment/39828534

http://stackoverflow.com/comment/39761954
score: 0
type: Comment
type: QuestionComment
has text: I dont' think you need a resize function. You just need to add the `if($(window).width() >= 643)` code inside your mainmenu function
comment on: http://stackoverflow.com/q/25477754

http://stackoverflow.com/comment/40166026
comment on: http://stackoverflow.com/q/25511260
score: 0
has text: When I try and test I see "This link is blocked, or you have triggered an excessive amount of scrapes. If you think you're seeing this by mistake, please let us know." Which could be cause by people trying it from here, I guess. Could it be it cached an empty version previously?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25452544
has comment: http://stackoverflow.com/comment/39722416
type: Question
has title: Jquery simplifying multiple if statements related to multiple ids with similar characters
answer count: 2
has body: I am trying to simplify a list of functions down to a single function. Basically I have 6 divs, each with the id #slide_ where the underscore is a number from 1-6 (#slide1, #slide2, etc). My functions are something like this: if ($("#slide1").hasClass('active')) {}); There is one of these if statements for each of the #slide_ ids. What is the best way to simplify this so I have have a single function instead of 6 different if statements?
downvote count: 0
has answer: http://stackoverflow.com/a/25452617
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25452577
type: UnansweredQuestion
upvote count: 1
tagged with: if-statement
score: 1

http://stackoverflow.com/q/25518580
has body: I can Drag and drop the images into the baskets and get the value for the object dropped into the basket. But how to increase the value when a specific image is dropped into the Basket? For example when I try to drag and drop the strawberry and the watermelon image the points increases by 10.Is there a way to increase the points by 30 by each image/meat item when chicken,turkey,Fish or lobster were dropped? Here is a Script &lt;script type="text/javascript"&gt; var myscore=0; function dragStart(ev) { ev.dataTransfer.effectAllowed='move'; ev.dataTransfer.setData("Text", ev.target.getAttribute('id')); ev.dataTransfer.setDragImage(ev.target,0,0); return true; } function dragEnter(ev) { event.preventDefault(); return true; } function dragOver(ev) { return false; } function dragDrop1(ev) { var src = ev.dataTransfer.getData("Text"); ev.target.appendChild(document.getElementById(src)); ev.stopPropagation(); myscore=myscore-10; document.getElementById('Score').innerHTML=myscore; return false; } function dragDrop2(ev) { var src = ev.dataTransfer.getData("Text"); ev.target.appendChild(document.getElementById(src)); ev.stopPropagation(); myscore=myscore+10; document.getElementById('Score').innerHTML=myscore; return false; } &lt;/script&gt; Here is a Fiddle
accepted answer: http://stackoverflow.com/a/25519028
score: 0
answer count: 1
tagged with: javascript
has title: Increase the value when a specific image is dropped
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25519028
type: Question

http://stackoverflow.com/comment/39601571
type: QuestionComment
comment on: http://stackoverflow.com/q/25391591
has text: have you tried $('#theForm').reset();
score: 0
type: Comment

http://stackoverflow.com/comment/39637586
type: QuestionComment
comment on: http://stackoverflow.com/q/25409391
score: 0
type: Comment
has text: Add another `.catch(console.error.bind(console))` and it should show up. Apparently the `promise` module doesn't have logging of unhandled rejections. Or use `.done()` which throws exceptions from the handlers, instead of rejecting the promise.

http://stackoverflow.com/comment/39643713
type: QuestionComment
has text: @RobG do you have a favorite library to use?
comment on: http://stackoverflow.com/q/25413573
score: 0
type: Comment

http://stackoverflow.com/comment/39877386
type: Comment
type: QuestionComment
has text: It's hard to say anything not seeing your code.
score: 1
comment on: http://stackoverflow.com/q/25540195

http://stackoverflow.com/comment/39708241
type: Comment
comment on: http://stackoverflow.com/a/25448987
type: AnswerComment
score: 0
has text: Oh, thank you, i didn't think about this solution and it works perfectly ! Thanks a lot :)

http://stackoverflow.com/q/25523411
favorite count: 0
tagged with: heatmap
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39888941
upvote count: 1
type: Question
has body: Im try to use heatmap.js library, in example code, browser console get error Uncaught TypeError: Cannot read property 'style' of null on line 362 I didn't touch to example code, but its not working &lt;div id="heatmapContainerWrapper"&gt; &lt;div id="heatmapContainer"&gt; &lt;/div&gt; &lt;/div&gt; &lt;script src="/build/heatmap.js"&gt;&lt;/script&gt; &lt;script&gt; window.onload = function() { // create a heatmap instance var heatmap = h337.create({ container: document.getElementById('heatmapContainer'), maxOpacity: .6, radius: 50, blur: .90, // backgroundColor with alpha so you can see through it backgroundColor: 'rgba(0, 0, 58, 0.96)' }); var heatmapContainer = document.getElementById('heatmapContainerWrapper'); heatmapContainer.onmousemove = heatmapContainer.ontouchmove = function(e) { // we need preventDefault for the touchmove e.preventDefault(); var x = e.layerX; var y = e.layerY; if (e.touches) { x = e.touches[0].pageX; y = e.touches[0].pageY; } heatmap.addData({ x: x, y: y, value: 1 }); }; heatmapContainer.onclick = function(e) { var x = e.layerX; var y = e.layerY; heatmap.addData({ x: x, y: y, value: 1 }); }; }; &lt;/script&gt; Thanks for help.
score: 1
downvote count: 0
tagged with: javascript
has title: Heatmap.js error in example
tagged with: plugins

http://stackoverflow.com/comment/39896582
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25550783
type: QuestionComment
has text: You just have to pass it as `ng-mouseover="textlimit(item.id, 900)"` Remove interpolation.

http://stackoverflow.com/a/25506930
score: 2
has body: You should use angular.extend(dst, src) instead of assigning a new object to your $scope.user variable. By doing so, you will be merging the new properties into your older object; this will keep your binding working. In the end, you should have something like this: $http.post('/transaction/send', transaction).success(function(sender) { console.log("http response"); angular.extend($scope.user, sender); console.log($scope.user.balance); }); Mind you, this only does a shallow merge, for a deep merge, you should look at this discussion or this one.
accepted answer of: http://stackoverflow.com/q/25506525
has comment: http://stackoverflow.com/comment/39817363
has comment: http://stackoverflow.com/comment/39816489
answers question: http://stackoverflow.com/q/25506525
downvote count: 0
type: AcceptedAnswer
upvote count: 2
type: Answer

http://stackoverflow.com/q/25408205
answer count: 0
upvote count: 2
type: UnansweredQuestion
has title: Get the polygon of overlapping divs
type: Question
has comment: http://stackoverflow.com/comment/39632450
has comment: http://stackoverflow.com/comment/39632541
has comment: http://stackoverflow.com/comment/39637158
has comment: http://stackoverflow.com/comment/39644738
has comment: http://stackoverflow.com/comment/39632726
tagged with: javascript
has comment: http://stackoverflow.com/comment/39638328
has comment: http://stackoverflow.com/comment/39676000
tagged with: polygon
downvote count: 0
favorite count: 0
has body: How can I get the polygon (point1x point1y, point2x point2y, point3x point3y...) of three overlapping divs? The divs are rotated so the polygon is not a rect. Check the http://jsfiddle.net/Lgff6qv9/ I want the polygon of the deep purple area. Of course in JavaScript :-)
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39632687
score: 2

http://stackoverflow.com/comment/39835860
comment on: http://stackoverflow.com/q/25517201
has text: Don't write inline JavaScript. Require your modules in an external file, then Browserify the whole thing, and just include the `bundle.js` file.
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/a/25433971
answers question: http://stackoverflow.com/q/25391618
score: 0
type: AcceptedAnswer
type: Answer
has body: If you are using ajax to make your request to the remote server, and the remote server's responses, you can get the status code from the XmlHTTPRequest object. After the request is complete, the status property gives you the http status code. You can use something like jquery to simplify things. Warning: this example code is untested var startTime = new Date().value; $.get('http://example.com/some/path', { param1:'value1', param2:'value2'}) .done(function(data, status, jqxhr) { var endTime = new Date().value; var elapsedMS = endTime - startTime; // handle your success things here }) .error(function(jqXHR, textStatus, errorThrown ) { var endTime = new Date().value; var elapsedMS = endTime - startTime; // handle your failure here if (typeof console != 'undefined') { console.log('your url', jqXHR.status, textStatus, errorThrown); } }) ; Note: Some cross-domain ajax requests are blocked. The remote server has to expressly set response headers to allow these sorts of requests.
accepted answer of: http://stackoverflow.com/q/25391618

http://stackoverflow.com/q/25547528
has comment: http://stackoverflow.com/comment/39891321
favorite count: 0
has comment: http://stackoverflow.com/comment/39891259
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: Drop down menu selection ditactes what form will display
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/25547850
has comment: http://stackoverflow.com/comment/39890309
type: Question
possible better answer: http://stackoverflow.com/a/25547816
has answer: http://stackoverflow.com/a/25547850
tagged with: javascript
has answer: http://stackoverflow.com/a/25547816
answer count: 3
upvote count: 1
tagged with: drop-down-menu
has body: I'm currently working on a project that saves details of different types of objects to a database e.g. book, webpage and journal article. To save the different attributes of these objects I am trying to get different forms to display that depend on the selection in a drop down menu. Here's the dropdown menu: Select Reference Type... Book Journal Webpage How to I get a different form to load on screen without redirecting to a different page. I've been trying to do this in php but I get the feeling that php isn't the right way of going about doing this. Also, apologies in advance as I have no previous experience in Javascript, AJAX or jQuery.
tagged with: jquery
has comment: http://stackoverflow.com/comment/39891138
has answer: http://stackoverflow.com/a/25548332

http://stackoverflow.com/comment/39825549
comment on: http://stackoverflow.com/q/25511843
score: 0
has text: You code works fine, provided its in a click handler: http://jsfiddle.net/j08691/5gfosceL/
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25446673
tagged with: dojo
has answer: http://stackoverflow.com/a/25455016
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25455016
type: Question
answer count: 1
tagged with: javascript
score: 1
has body: I am following dojo tutorial here. As per tutorial I should get error but I am getting the output without any error. Am I missing something? Below is my code. index.html moduleA define([ "./moduleB" ], function(moduleB){ return { getValue: function(){ return "oranges"; }, print: function(){ console.log(moduleB.getValue()); } }; }); moduleB define([ "./moduleA" ], function(moduleA){ return { getValue: function(){ return "apples and " + moduleA.getValue(); } }; }); Thanks.
favorite count: 0
upvote count: 2
has title: Not getting dojo circular dependency error as per tutorial
downvote count: 1

http://stackoverflow.com/comment/39713785
score: 0
has text: have you looked into jQuerys' `wrap` or `wrapInner` methods? You can find them here: http://devdocs.io/jquery/wrap | http://devdocs.io/jquery/wrapinner
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25452107

http://stackoverflow.com/q/25395422
upvote count: 2
has comment: http://stackoverflow.com/comment/42839620
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/24982090
has answer: http://stackoverflow.com/a/25413691
tagged with: post
type: Question
tagged with: polymer
answer count: 2
has answer: http://stackoverflow.com/a/25402354
tagged with: arrays
downvote count: 0
tagged with: javascript
has body: I want to send some int array to server but I don't now how realize it. I try to use core-ajax also I know about polymer-ajax but it element deprecated. I did something like this: &lt;template&gt; &lt;paper-fab on-tap="{{sendMethod}}"&gt;&lt;/paper-fab&gt; &lt;core-ajax id="post_ajax" ...some attr... body={"some_array":"{{some_array}}"} &gt; &lt;/core-ajax&gt; &lt;/template&gt; &lt;script&gt; Polymer('el-name',{ ready: function(){ this.some_array = []; }, sendMethod: function(){ this.$.post_ajax.go(); }, someMeth: function(){ this.some_array = data; } }); &lt;/script&gt; But data not riched server. When I look debug I saw that array is not detected in body, but I try to get only one value: body={"some_array":"{{some_array[0]}}"} value was detected but server not get value. I see that I 'm not use form but it seems like not need there or I m wrong. UPDATE: After some test I found some interesting. if I use BODY data not rich server, but if I use PARAMS data is rich server. It work on simple number value, but when I try send array, core-ajax is show error message in log. It say that params not understand simple array. I think array need convert to json. I try to use stringfy but it not working. May be I do something wrong? I have array consist simple numbers. Also my server side use PHP.
tagged with: web-component
score: 2
has comment: http://stackoverflow.com/comment/39608966
favorite count: 0
has title: Polymer send array to server using post method

http://stackoverflow.com/q/25416174
has answer: http://stackoverflow.com/a/25416350
has body: How can we convert this Javascript Array [li.one, li.one, li.one, li.two, li.two, li.two] into a JSON array using JSON.stringify? Using the following Javascript: var stringsToStringify = $('.one, .two'), stringArray = [] $.each(stringsToStringify, function (i, v) { stringArray[i] = v }) console.log(stringArray) var jsonString = JSON.stringify(stringArray) console.log(jsonString) console.log(JSON.parse(jsonString)) Returns: [li.one, li.one, li.one, li.two, li.two, li.two] [{"jQuery110203514890133216494":1},{"jQuery110203514890133216494":2},{"jQuery110203514890133216494":3},{"jQuery110203514890133216494":4},{"jQuery110203514890133216494":5},{"jQuery110203514890133216494":6}] [Object { jQuery110203514890133216494=1}, Object { jQuery110203514890133216494=2}, Object { jQuery110203514890133216494=3}, Object { jQuery110203514890133216494=4}, Object { jQuery110203514890133216494=5}, Object { jQuery110203514890133216494=6}] If we change the stringArray from [] to {} the following is returned: [li.one, li.one, li.one, li.two, li.two, li.two] [{"jQuery110207305097851789301":1},{"jQuery110207305097851789301":2},{"jQuery110207305097851789301":3},{"jQuery110207305097851789301":4},{"jQuery110207305097851789301":5},{"jQuery110207305097851789301":6}] [Object { jQuery110207305097851789301=1}, Object { jQuery110207305097851789301=2}, Object { jQuery110207305097851789301=3}, Object { jQuery110207305097851789301=4}, Object { jQuery110207305097851789301=5}, Object { jQuery110207305097851789301=6}] The desired result is to have [li.one, li.one, li.one, li.two, li.two, li.two] "stringified" into a JSON Array. This looks like a circular reference. What is the best way to supply the array of html elements to JSON.stringify? Fiddle
has comment: http://stackoverflow.com/comment/39647680
upvote count: 1
has comment: http://stackoverflow.com/comment/39647683
type: AnsweredQuestion
has title: JSON.stringify an Array of HTML Elements/Strings
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/39647703
has answer: http://stackoverflow.com/a/25416276
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25416276
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
possible better answer: http://stackoverflow.com/a/25416350
favorite count: 0

http://stackoverflow.com/comment/39730824
has text: try this code, it will take image actual width if its not greater than the container width. If the image is smaller than the image container than it will aligned to center. Same thing happened with height. it will take image actual height if its not greater than the container height. If the image is smaller than the image container than it will aligned vertically center.
comment on: http://stackoverflow.com/a/25460577
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25499073
score: 1
upvote count: 1
has body: Change your click to this one: click: function () { someFunction(item); } This is because you are invoking someFunction immediately on the click. You must set a callback for it. Just like above.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25498982
answers question: http://stackoverflow.com/q/25498982

http://stackoverflow.com/comment/39643208
type: QuestionComment
score: 2
has text: If you could create an example online using jsfiddle, plunk or codepen we can take a look why it is not working. How / When is `preloadPictures` called? How does it not work in Firefox, IE - [what happens and what should happen](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines#Writing_precise_steps_to_reproduce)?
type: Comment
comment on: http://stackoverflow.com/q/25413455

http://stackoverflow.com/q/25505779
has answer: http://stackoverflow.com/a/25506230
tagged with: nvd3.js
tagged with: d3.js
has title: Set zero baseline for D3.js graph
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25506230
type: Question
linked to: http://stackoverflow.com/q/11766879
has comment: http://stackoverflow.com/comment/39814167
tagged with: javascript
score: 0
has body: We have a graph that when all data is zero, shows the zero dollar value in the middle of the y-axis, and a few negative values below. It would be better to have the zero at the bottom, with dollar values up the side. Here's the graph code: nv.addGraph(function() { var chart = nv.models.multiBarChart() .transitionDuration(350) .reduceXTicks(false) .rotateLabels(0) .showControls(false) //Allow user to switch between 'Grouped' and 'Stacked' mode. .groupSpacing(0.1) .tooltipContent(function (key, y, e, graph) { return '&lt;p&gt; Total Cost: $' + graph.value + '&lt;/p&gt;'; }) ; chart.xAxis .tickFormat(function(d) { return d3.time.format('%b, %y')(new Date(d)); }); chart.yAxis .tickFormat(function(d) { return '$' + d3.format(',f')(d) }); d3.select('#hardware_costs_graph svg') .datum(exampleData()) .call(chart); nv.utils.windowResize(chart.update); return chart; }); How can the baseline be changed so that no negative values show?
answer count: 1

http://stackoverflow.com/a/25495906
has body: I figured this out. I don't know why my first approach didn't work, but below is an approach that does work. The general idea is the Html in the templateURL creates a DOM element that will hold tab content. When the user clicks a different tab, then that element is retrieved and then altered using jquery's functionality, e.g. element.html() function. Then Angular is asked to scan the html and make it interactive via $compile(element)(scope). Hope this helps someone. I still wish someone would explain why using .trustAsHtml() method didn't work..... MyApp.directive('tmgTabs', ['$sce', '$compile', '$timeout', function ($sce, $compile, $timeout) { var DirectiveObj = { restrict: 'E', require: '?tabControl', scope: { tabControl: '=', }, templateUrl: 'part/tab_part.html', link: function(scope, element, attrs){ scope.range = RangeFn; scope.CompileContent = function(HtmlStr) { var el = $("#TMG-TAB-"+scope.tabControl.InstanceID+"-CONTENT"); //jquery object el.html(HtmlStr); $compile(el)(scope); }; scope.DisplayContent = function() { scope.CompileContent(scope.tabControl.TabContent()); }; scope.ToggleActive = function(Index){ scope.tabControl.Select(Index); scope.DisplayContent(); }; $timeout(function() { scope.ToggleActive(0); //needs to be done after link() finishes. }); } }; return DirectiveObj; }]); And here is tab_part.html {{tabControl.TabName(i)}} And here is an example of use.
score: 0
answers question: http://stackoverflow.com/q/25472326
type: Answer

http://stackoverflow.com/comment/39603246
has text: @John I have a equivalent file with VBScript, and I can pass the recordset to an array using `.GetRows()` but unable to store that VBScript array to Javascript, if you know a way, I would prefer to use VBScript.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25391877

http://stackoverflow.com/q/25412741
has comment: http://stackoverflow.com/comment/39641433
has comment: http://stackoverflow.com/comment/39641465
tagged with: express
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39641456
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25412994
has comment: http://stackoverflow.com/comment/39641349
favorite count: 0
has title: Function parameters out of nowhere?
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/25412860
has comment: http://stackoverflow.com/comment/39641479
type: Question
has body: I've just begun to work with NodeJS and I find myself puzzled on code such as app.get('/home', function(req, res) { // req and res are objects }) I often see these kinds of function calls where the parameters in the anonymous function seem to come out of nowhere, yet contain various attributes and/or methods within?
tagged with: javascript

http://stackoverflow.com/q/25448213
has title: D3js skips data
type: Question
has comment: http://stackoverflow.com/comment/39750799
has comment: http://stackoverflow.com/comment/39712008
tagged with: arrays
has comment: http://stackoverflow.com/comment/39737349
has comment: http://stackoverflow.com/comment/39709462
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39707026
has comment: http://stackoverflow.com/comment/39734025
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39709930
has body: I have this CSV file (with 4 rows and 6 columns of data). While parsing the values: var headers = d3.keys(data[0]) .filter(function(key) { return key !== ""; }); for(i=0;i&lt;headers.length;i++) data.forEach(function (d){ d[headers[i]] = +d[headers[i]]; }) data.forEach(function (d){ console.log(d[headers[4]]); }) But once I used the console log command to check the data for every column I realised that some data are missing. I noticed that if the values are the same(two 5 for example) somehow they one is skipped. How can I change that? Any ideas?
has comment: http://stackoverflow.com/comment/39937661

http://stackoverflow.com/a/25392867
upvote count: 1
answers question: http://stackoverflow.com/q/25392705
has comment: http://stackoverflow.com/comment/39604099
type: Answer
downvote count: 0
score: 1
has body: Setting the location doesn't work beacuse the browser has already started to post the form. The browser will go to the page specified in the action attribute in the form, and as you don't have one, it will use the current page. Use the preventDefault method to stop the posting of the form: $('form[role="search"]').submit(function(e) { e.preventDefault(); ...
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25392705

http://stackoverflow.com/comment/39893222
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25549096
score: 1
has text: possible duplicate of [JavaScript :How to set a Conditional Break Point in Chrome debugger tools](http://stackoverflow.com/questions/14598561/javascript-how-to-set-a-conditional-break-point-in-chrome-debugger-tools)

http://stackoverflow.com/a/25537202
answers question: http://stackoverflow.com/q/25537152
score: 0
type: Answer
has body: assimp can handle the conversion from x to obj. Afterwards any WebGL framework will do since virtually all of them read Obj - JSC3D is an option, so is the very popular Three.js.

http://stackoverflow.com/q/25483919
favorite count: 0
has body: It's pretty weird that with the same HTML in place, IE9 is opening some links in a new window but others in a new tab. The below ones are being opened in a new window. Gmail Wikipedia And the below link is being opened in a new tab. Google IE9 Version I am using : 9.0.8112.16421 In the tabbed browsing settings, I have selected "Let Internet Explorer decide how pop-ups should open" Any help would be appreciated!
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has comment: http://stackoverflow.com/comment/39772920
score: 1
upvote count: 1
type: Question
tagged with: internet-explorer-9
has title: IE9 opening some links in new tab but some in new window
tagged with: javascript
has comment: http://stackoverflow.com/comment/39773145
has comment: http://stackoverflow.com/comment/39784903
tagged with: window.open
linked to: http://stackoverflow.com/q/2883432
downvote count: 0

http://stackoverflow.com/comment/39936457
type: Comment
type: QuestionComment
has text: Update your plunker?
comment on: http://stackoverflow.com/q/25549883
score: 0

http://stackoverflow.com/q/25513740
has title: Best way to link to javascript
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25513769
accepted answer: http://stackoverflow.com/a/25513789
has answer: http://stackoverflow.com/a/25513769
has comment: http://stackoverflow.com/comment/39829002
has body: Very simple question here that I have not found the answer to despite searching a lot. Whats the easiest way to load/call a piece of java script that is saved outside of the file. So that several pages could use the same piece of java script, as though that piece of script was actually loaded into each page's head?
type: Question
has comment: http://stackoverflow.com/comment/39829045
tagged with: javascript
linked to: http://stackoverflow.com/q/2579883
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25513789
has answer: http://stackoverflow.com/a/25513855
has comment: http://stackoverflow.com/comment/39829171

http://stackoverflow.com/comment/39832177
type: AnswerComment
score: 0
type: Comment
has text: Since I posted the question, I've actually tried a new way of dealing with this situation, but it's not working either. I'm about to update my original question
comment on: http://stackoverflow.com/a/25514766

http://stackoverflow.com/comment/39604121
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25392876
has text: Did you check this answer? Probably same issue? http://stackoverflow.com/questions/25111831/controller-not-a-function-got-undefined-while-defining-controllers-globally/25111942#25111942
score: 0

http://stackoverflow.com/comment/39778336
type: QuestionComment
has text: why do you use raw `HttPRequest` when you have jQuery?
score: 0
comment on: http://stackoverflow.com/q/25486809
type: Comment

http://stackoverflow.com/q/25423465
type: Question
has title: javascript onclick function null
accepted answer: http://stackoverflow.com/a/25423769
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/39660540
tagged with: image
score: 0
answer count: 1
has body: I have the following js function : function Modification_Article() { var photo = document.getElementById("photo_javascript"); photo.innerHTML = ""; document.getElementById("photo_delete_javascript").innerHTML = ""; var loop = 0; for(loop = 0; loop &lt; arguments.length; loop++) { if(loop &lt; 3) { document.getElementById('Modification_Article_Id').value = arguments[loop]; document.getElementById("Modification_Article_Titre").value = decodeURIComponent(arguments[loop + 1]); document.getElementById("Modification_Article_Text").value = decodeURIComponent(arguments[loop + 2]); loop += 2; } else { var image_to_delete = document.createElement('img'); var path = arguments[loop + 1]; var begin = path.substr(0, 32); var end = path.substr(32); var id = arguments[loop]; console.log(id); image_to_delete.id = "image_" + id; image_to_delete.src = "images/Articles/" + begin + "_100x100" + end; image_to_delete.onclick = function(){ console.log(id); }; photo.appendChild(image_to_delete); loop += 1; image_to_delete = null; } } } The fact is when i print "id" the first time it's display "10" and "11" (according to photo's id), but the second time in the onclick function, only "null" is display. I really don't understand why ...
type: AnsweredQuestion
tagged with: onclick
has answer: http://stackoverflow.com/a/25423769

http://stackoverflow.com/a/25870794
has body: You can use a custom layer for your map, but first you will need to convert your data to TopoJSON. I followed these instructions http://bost.ocks.org/mike/map/ to convert my shapefile to TopoJSON. In your ichoropleth function you can specify your map as follows: d1$set(geographyConfig = list(dataUrl = "https://dl.dropboxusercontent.com/file_name.json") For more info on this topic check this post:https://github.com/ramnathv/rMaps/issues/6. or take a look to this repo for a working example https://github.com/Arevaju/shiny-maps. Cheers!
answers question: http://stackoverflow.com/q/25496450
score: 0
type: Answer

http://stackoverflow.com/q/25406090
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39628420
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/25406274
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39628395
has comment: http://stackoverflow.com/comment/39628734
upvote count: 2
downvote count: 3
possible better answer: http://stackoverflow.com/a/25406172
type: Question
has answer: http://stackoverflow.com/a/25406172
accepted answer: http://stackoverflow.com/a/25406170
has comment: http://stackoverflow.com/comment/39629055
has comment: http://stackoverflow.com/comment/39628293
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39628569
linked to: http://stackoverflow.com/q/4282151
has body: I want to check a website that is not under my control that is it working or not when a visitor visit a page. I am an a platform where only HTML/CSS/JAVASCRIPT are allowed so no PHP etc. Now my question is that is this possible via JavaScript to check a website is working or not? I saw many codes likes JQuery, AJAX but that are too complicated and I am new to coding. So can I do it via short and simple JavaScript?
has answer: http://stackoverflow.com/a/25406243
tagged with: jquery
has title: How to check a website is working in JavaScript?
favorite count: 0
has comment: http://stackoverflow.com/comment/39628922
has answer: http://stackoverflow.com/a/25406170

http://stackoverflow.com/comment/39602058
comment on: http://stackoverflow.com/q/25391650
has text: It isn't really clear if you're looking for help with DateTime calculations or jQuery/Ajax or both.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39688717
comment on: http://stackoverflow.com/q/25434020
score: 0
type: Comment
type: QuestionComment
has text: @PatrickEvans Whatever it is.I'd guess you can't get my question.Hard to explain since there's a limitation how I post my question here in SO.

http://stackoverflow.com/comment/39854072
comment on: http://stackoverflow.com/q/25518444
has text: I saw that other question thread; however, it seems as though the proposed solutions in that thread can't handle certain characters. For instance, my script reads a PDF file as a string and these functions can't encode the string as Base64.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/119722589
type: AnswerComment
has text: Finally a solution which actually worked for me, Thanks :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/49724733

http://stackoverflow.com/comment/39723562
has text: There's nothing wrong with just passing the id if you don't need any other data. It all depends on your needs and requirements.
score: 1
comment on: http://stackoverflow.com/q/25456733
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25493110
tagged with: mongoskin
score: 0
has body: I have used $.ajax to send a PUT request through to my Express server. I can retrieve the information just fine but am having difficulties saving the new changes to my mongo (via mongoskin) database. From the top, here is my click event on an edit button: $('#userList table tbody').on('click', 'td a.linkedituser', editUser); And here the function it calls: function editUser(event) { event.preventDefault(); var thisUserID = $(this).attr('rel'); var arrayPosition = userListData.map(function(arrayItem) { return arrayItem._id; }).indexOf(thisUserID); var thisUserObject = userListData[arrayPosition]; $('#editUserName').val(thisUserObject.email); $('#editUserEmail').val(thisUserObject.email); $('#editUserFullname').val(thisUserObject.fullname); $('#editUserAge').val(thisUserObject.age); $('#editUserLocation').val(thisUserObject.location); $('#editUserGender').val(thisUserObject.gender); $('#btnEditUser').on('click', function() { $.ajax({ type: 'PUT', url: '/users/edituser', data: { 'id' : thisUserID, 'username' : $('#editUserName').val(), 'email' : $('#editUserEmail').val(), 'fullname' : $('#editUserFullname').val(), 'age' : $('#editUserAge').val(), 'location' : $('#editUserLocation').val(), 'gender' : $('#editUserGender').val() }, dataType: 'json', success: function(msg) {}, error: function(err) {} }).done(function(response) { if (response.msg === '') { } else { } populateTable(); }); }); }; And finally the router file routes/users.js router.put('/edituser', function(req, res) { var db = req.db; db.collection('userlist').findById(req.body.id, function(err, result) { result.username = req.body.username; result.email = req.body.email; result.fullname = req.body.fullname; result.age = req.body.age; result.location = req.body.location; result.gender = req.body.gender; console.log(result); res.send((result === 1) ? { msg: '' } : { msg: 'error: ' + err + "!!!!" }); }); }); Everything is on git should I have missed anything. It seems like everything should be fine but the resul…
has comment: http://stackoverflow.com/comment/39792993
tagged with: javascript
type: UnansweredQuestion
tagged with: express
tagged with: mongodb
has comment: http://stackoverflow.com/comment/39793860
answer count: 0
tagged with: jquery
type: Question
has title: Unable to save data to mongo(skin) sent via $.ajax PUT

http://stackoverflow.com/a/25535602
type: Answer
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/25534845
downvote count: 0
has body: Well, theoretically, you should be able to use those existing client-side solutions without playing back the audio, using an OfflineAudioContext. Unfortunately, those solutions both use ScriptProcessorNode, and from what I've heard, existing implementations are broken when using ScriptProcessorNode in an OfflineAudioContext, and not likely to be fixed. I suspect AnalyserNode may be broken in OfflineAudioContext too. It would probably work to use an OfflineAudioContext to just "play back" the entire sound file, then draw your canvas based on the output buffer that is created. Or you could use a regular AudioContext, but make sure the output isn't audible (say, by piping the sound through a gain node with gain of zero). This is really ugly, slow, and would interfere with any other Web Audio API usage on your page. You could also try fetching the entire file just as a binary blob into an ArrayBuffer, and parse it yourself. The WAV file format is not all that complicated (or you might be able to find open source code to do this). If you wanted to handle compressed formats like MP3 this way, you would definitely not want to write the decoder from scratch. EDIT: I think the Web Audio-based solutions above are too complicated. You have to set up an AudioBuffer and decode the audio into it using decodeAudioData anyway. Once you've done that, there is no need to even create an AudioBufferSourceNode. You can just get the audio data directly from the AudioBuffer by calling getChannelData on it.

http://stackoverflow.com/q/25432575
type: Question
has comment: http://stackoverflow.com/comment/39677835
linked to: http://stackoverflow.com/q/307179
tagged with: javascript
has answer: http://stackoverflow.com/a/25432620
linked to: http://stackoverflow.com/q/21726932
duplicate of: http://stackoverflow.com/q/307179
answer count: 2
possible better answer: http://stackoverflow.com/a/25432620
has answer: http://stackoverflow.com/a/25432618
favorite count: 0
score: 6
upvote count: 7
has title: Why does JavaScript think 354224848179262000000 and 354224848179261915075 are equal?
has comment: http://stackoverflow.com/comment/39677789
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39678005
has body: So, I started out by trying to find the 100th Fibonacci number using a recursive function and by memoizing the function using the following code. Function.prototype.memoize = function () { var originalFunction = this, slice = Array.prototype.slice; cache = {}; return function () { var key = slice.call(arguments); if (key in cache) { return cache[key]; } else { return cache[key] = originalFunction.apply(this, key); } }; }; var fibonacci = function (n) { return n === 0 || n === 1 ? n : fibonacci(n - 1) + fibonacci(n - 2); }.memoize(); console.log(fibonacci(100)); Now, as you can see in this fiddle, JavaScript logs 354224848179262000000 as the result. The hundredth Fibonacci number is actually 354224848179261915075 according to WolframAlpha which is correct. Now, my question is this. Why does the number compute incorrectly, even though the algorithm is completely sane? My thoughts point to JavaScript because according to Google's calculator1, the two numbers are equal. What is it about JavaScript that causes such an error? The number is safely within limits of the maximum value of an IEEE 754 number, which is 1.7976931348623157e+308. 1In case this could be a bug on my platform, I have tested this on both Chromium and Firefox on Ubuntu.
accepted answer: http://stackoverflow.com/a/25432618
has comment: http://stackoverflow.com/comment/39677829
downvote count: 1

http://stackoverflow.com/q/25452261
answer count: 3
has answer: http://stackoverflow.com/a/25452397
has comment: http://stackoverflow.com/comment/39714346
tagged with: regex
has body: I need to get the data of an SRT file as an array using a regex. Here is my code so far: Javacript: function readSrt() { var srtUrl = 'assets/media/subtitles.srt'; $.get(srtUrl, function(data) { console.log("SRT:", data); // it reads ok var regexp = /(.*)\n(.*),\d\d\d --&gt; (.*)\n(.*)/g; // this regex doesn't work console.log("SUBS:", data.match(regexp)); // outputs null }); } subtitles.srt: 0 00:00:00,000 --&gt; 00:00:01,000 Instructor…All right, let's start off 1 00:00:01,000 --&gt; 00:00:04,000 here. We were, I think, wrapping up kind ... 14 00:00:40,000 --&gt; 00:00:42,000 mound, basically. 15 00:00:42,000 --&gt; 00:00:44,000 If you go to Colossae today, none of it ... Need to get: 1. 0 2. 00:00:00 3. 00:00:01,000 4. Instructor…All right, let's start off Did several attempts in regex101.com but only seems to work well with PHP but not javascript. What am I doing wrong and how do I fix it?
has comment: http://stackoverflow.com/comment/39714325
has title: Make this RegEx work in Javascript?
upvote count: 1
has comment: http://stackoverflow.com/comment/39714425
accepted answer: http://stackoverflow.com/a/25452397
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25452916
tagged with: srt
has comment: http://stackoverflow.com/comment/39714131
type: Question
possible better answer: http://stackoverflow.com/a/25452403
has answer: http://stackoverflow.com/a/25452403
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39714174

http://stackoverflow.com/a/25510646
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25510457
type: Answer
answers question: http://stackoverflow.com/q/25510457
score: 2
upvote count: 2
has body: Easiest way to do it: http://jqueryui.com/sortable/ Here is the code from jQuery example: $(function() { $( "#sortable" ).sortable(); $( "#sortable" ).disableSelection(); });
type: AcceptedAnswer

http://stackoverflow.com/q/25416198
upvote count: 1
has comment: http://stackoverflow.com/comment/39647727
has answer: http://stackoverflow.com/a/25416242
has answer: http://stackoverflow.com/a/25416231
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25416222
favorite count: 0
has body: I am new to javascript and i was wondering can I access the video element thats inside the div element?
has title: How to access video element inside div
has answer: http://stackoverflow.com/a/25416223
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: UnansweredQuestion
score: 1

http://stackoverflow.com/comment/39787080
type: AnswerComment
has text: windows.open or window.open
type: Comment
comment on: http://stackoverflow.com/a/25459498
score: 0

http://stackoverflow.com/comment/39664546
has text: In order to figure out what your action method expects, why not create a method that serializes a `List<ProjectIdea>` as JSON and make sure it looks like what you're sending?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25425674

http://stackoverflow.com/a/39810769
type: Answer
has body: Building from ahmd0's answer. Use a data attribute to allow a hard-coded fallback. My Default Title Default link text Then provide the usual translation in _locales\en\messages.json: { "app_title": { "message": "MyApp", "description": "Name of the extension" }, "link001": { "message": "My link", "description": "Link name for the page" }, "prompt001": { "message": "Click this link", "description": "User prompt for the link" } } And finally your localize.js will perform the actual localization: function replace_i18n(obj, tag) { var msg = tag.replace(/__MSG_(\w+)__/g, function(match, v1) { return v1 ? chrome.i18n.getMessage(v1) : ''; }); if(msg != tag) obj.innerHTML = msg; } function localizeHtmlPage() { // Localize using __MSG_***__ data tags var data = document.querySelectorAll('[data-localize]'); for (var i in data) if (data.hasOwnProperty(i)) { var obj = data[i]; var tag = obj.getAttribute('data-localize').toString(); replace_i18n(obj, tag); } // Localize everything else by replacing all __MSG_***__ tags var page = document.getElementsByTagName('html'); for (var j = 0; j < page.length; j++) { var obj = page[j]; var tag = obj.innerHTML.toString(); replace_i18n(obj, tag); } } localizeHtmlPage(); The hard-coded fallback avoids the i18n tags being visible while the JavaScript does the replacements. Hard-coding seems to negate the idea of internationalisation, but until Chrome supports i18n use directly in HTML we need to use JavaScript.
score: 9
upvote count: 9
answers question: http://stackoverflow.com/q/25467009
downvote count: 0

http://stackoverflow.com/q/25495842
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25495894
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Append to an array made from ul
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25495894
has answer: http://stackoverflow.com/a/25495866
downvote count: 0
accepted answer: http://stackoverflow.com/a/25495866
has body: Hi im trying to append a "s" to each element an array created from a unsorted list. Here is my code and I am not sure what I am doing wrong. Html: Apple Banana Pineapple Orange Javascript to append s to each element var list = document.getElementByClassName('friut'); for(var i=0;i < list.length; i++) { var arrValue = list[i]; list[i] = arrValue.innerHTML + 's'; }
score: 1
type: Question
answer count: 2
tagged with: arrays

http://stackoverflow.com/comment/39892650
type: Comment
type: QuestionComment
has text: You can find something useful here http://stackoverflow.com/questions/5972705/is-it-possible-to-mix-html-form-input-tags-with-svg-or-to-use-svg-to-lay-out-a
comment on: http://stackoverflow.com/q/25548785
score: 0

http://stackoverflow.com/a/25537416
has comment: http://stackoverflow.com/comment/39873339
answers question: http://stackoverflow.com/q/25537377
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39873193
has comment: http://stackoverflow.com/comment/39873100
type: Answer
has body: I have written 2 functions for this: /** * Removes all Tags provided from an Html string * * @param string $str The Html String * @param string[] $tagArr An Array with all Tag Names to be removed * * @return string The Html String without the tags */ function removeTags($str, $tagArr) { foreach ($tagArr as $tag) { $str = preg_replace('#&lt;' . $tag . '(.*?)&gt;(.*?)&lt;/' . $tag . '&gt;#is', '', $str); } return $str; } /** * cleans some html string * * @param string $str some html string * * @return string the cleaned string */ function filterHtml($str) { //Remove Tags $str = removeTags($str, ['script', 'style']); //Remove all Tags, but not the Content $str = preg_replace('/&lt;[^&gt;]*&gt;/', ' ', $str); //Remove Linebreaks and Tabs $str = str_replace(["\n", "\t", "\r"], ' ', $str); //Remove Double Whitespace while (strpos($str, ' ') !== false) { $str = str_replace(' ', ' ', $str); } //Return trimmed return trim($str); } Working Example $fileContent = file_get_contents('http://stackoverflow.com/questions/25537377/filtering-html-from-site-content-php'); $filteredContent = filterHtml($fileContent); var_dump($filteredContent);
has comment: http://stackoverflow.com/comment/39872860
score: 0
accepted answer of: http://stackoverflow.com/q/25537377

http://stackoverflow.com/q/25506539
has body: So I'm building an app with a lot of web content I plan to release it using Phone Gap build but will host all the content online and will link to it. I was wondering if there is a way that the web pages can be downloaded when there is an active internet connection for offline use and when there is a connection again for the data to be refreshed preferably when the user is using a wifi connection. The site will mostly be in html, js, and php. I will be hosting with bluehost Is there any way of doing this? Thanks in advance! Littleswany!
score: 2
linked to: http://stackoverflow.com/q/11784217
type: AnsweredQuestion
upvote count: 2
linked to: http://stackoverflow.com/q/15489511
type: Question
possible better answer: http://stackoverflow.com/a/25610192
tagged with: ios
tagged with: javascript
linked to: http://stackoverflow.com/q/6503574
has answer: http://stackoverflow.com/a/25674402
accepted answer: http://stackoverflow.com/a/25674402
answer count: 3
downvote count: 0
has title: Downloading web pages and refreshing it when connection available
favorite count: 0
has answer: http://stackoverflow.com/a/25610192
has answer: http://stackoverflow.com/a/25614525
tagged with: phonegap-build
tagged with: android
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/8236735

http://stackoverflow.com/comment/39642841
type: QuestionComment
comment on: http://stackoverflow.com/q/25412715
has text: You should rather consider doing this straight from aspx.
score: 0
type: Comment

http://stackoverflow.com/comment/39774956
score: 0
type: QuestionComment
has text: Its very unclear what you are trying to do, can you explain a little better.
type: Comment
comment on: http://stackoverflow.com/q/25484601

automation
tags question: http://stackoverflow.com/q/25524573
tag name: automation
tags question: http://stackoverflow.com/q/25417550
tags question: http://stackoverflow.com/q/25516392
type: Tag
tags question: http://stackoverflow.com/q/25410486
tags question: http://stackoverflow.com/q/25393582
tags question: http://stackoverflow.com/q/25419293

http://stackoverflow.com/q/25428491
type: AnsweredQuestion
tagged with: dos
downvote count: 0
possible better answer: http://stackoverflow.com/a/25458008
tagged with: multithreading
has body: I am using var version = shell.exec('D:\\prompt.bat', {silent:false}).output; Shelljs module of npm to run .bat file this .bat file opens the iexplore.exe and internet explorer opens up BUT The problem is it runs on single thread so untill and unless IE is not bieng closed my server is waitng and not processing any further request, so anyone can please suggest me how to run DOS command on separate thread so that it does not affect my server. thanks in advance. :)
type: Question
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/25428888
accepted answer: http://stackoverflow.com/a/25428888
answer count: 2
has answer: http://stackoverflow.com/a/25458008
has title: How to execute dos command on separate thread in nodejs?
favorite count: 0
has comment: http://stackoverflow.com/comment/39670637
tagged with: npm
upvote count: 4
tagged with: node.js

http://stackoverflow.com/a/25514766
has body: The "exists" condition takes in one argument, the name of a key and sees if it exists for a row. So it will return every row where your "name" column has a value, any value. What you're looking for is something like this: var query = new Parse.Query(Food); query.equalTo("name", name); query.first(...)
has comment: http://stackoverflow.com/comment/39832153
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25485476
has comment: http://stackoverflow.com/comment/39832177

http://stackoverflow.com/comment/39626005
has text: Can you create a fiddle?
comment on: http://stackoverflow.com/q/25404915
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/39816637
score: 0
has text: The only other solution that I could think of would be to refresh the tab (since the URL is updated) and then send the content script again.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25496986

http://stackoverflow.com/comment/39866439
has text: Where is `parentUser` set? why are you using a `return` call inside your find? Why are you using `find` instead of `first` if you expect at most 1 match? Why aren't you calling `set()` on the actual object itself? Why aren't you calling `save()` or `saveInBackground()`?
comment on: http://stackoverflow.com/q/25534366
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25474948
has body: If you have a small number of situations that you want to handle separately (and you are using a number to differentiate), then the Switch statement would provide clearer logic to someone (including you) who tries to read or modify your code. If / else if chains may be mis-perceived later Successive If statements mean you are constantly checking for a situation you know is wrong
has comment: http://stackoverflow.com/comment/39757081
has comment: http://stackoverflow.com/comment/39757358
type: Answer
has comment: http://stackoverflow.com/comment/39757163
answers question: http://stackoverflow.com/q/25474906
has comment: http://stackoverflow.com/comment/39757427
score: 3
has comment: http://stackoverflow.com/comment/39757463
upvote count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39757062
has comment: http://stackoverflow.com/comment/39757638

http://stackoverflow.com/q/25487817
has comment: http://stackoverflow.com/comment/39780698
has body: I'm new to learning javascript and getting strange behaviour that I don't understand So this is printing exactly what I expect. 0,1,2,3,4 var numberOfPlayers = 5; for ( i = 0; i &lt; numberOfPlayers; i++ ) { alert(i); } But when I try the following code where I want to run a function every 1 seconds I get, 5,5,5,5,5 var numberOfPlayers = 5; for ( i = 0; i &lt; numberOfPlayers; i++ ) { setInterval(function () { alert(i); }, 1000); } Can anyone explain to me what is actually happening here. I would expect the same numbers in both parts of code.
has comment: http://stackoverflow.com/comment/39780235
has comment: http://stackoverflow.com/comment/39780320
has answer: http://stackoverflow.com/a/25487916
possible better answer: http://stackoverflow.com/a/25487852
answer count: 4
has answer: http://stackoverflow.com/a/25487852
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39780487
has answer: http://stackoverflow.com/a/25487941
has comment: http://stackoverflow.com/comment/39780295
has answer: http://stackoverflow.com/a/25488060
type: Question
linked to: http://stackoverflow.com/q/1451009
has title: Strange logic with setInterval()
tagged with: javascript
linked to: http://stackoverflow.com/q/7749090
score: 0
accepted answer: http://stackoverflow.com/a/25487941
has comment: http://stackoverflow.com/comment/39780241

angular-ui-bootstrap
tags question: http://stackoverflow.com/q/25546583
type: Tag
tags question: http://stackoverflow.com/q/25390998
tags question: http://stackoverflow.com/q/25395166
tags question: http://stackoverflow.com/q/25422528
tags question: http://stackoverflow.com/q/25432149
tag name: angular-ui-bootstrap

http://stackoverflow.com/q/25431037
has title: How to color the area under a scatter plot with different colors
upvote count: 1
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25432438
has body: I am new to this forum and thankful for all the help I can receive. I tried searching for quite a bit on the shading the area under the graph with different colors but for some reason my code wont work with it. So I had to remove that piece of code. I want to shade the area under my scatter plot with colors based on my data ( example: 0 to 2: red ; 2 to 5 : blue ; >5 : green ). I had found a code that applies a gradient in a vertical manner but I wanted the colors to appear horizontally across the graph. The following is my javascript code: var margin = {top: 20, right: 20, bottom: 30, left: 50}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; //var parseDate = d3.time.format("%d-%b-%y").parse; var x = d3.scale.linear() .range([0, width]); var y = d3.scale.linear() .range([height, 0]); var xAxis = d3.svg.axis() .scale(x) .orient("bottom"); var yAxis = d3.svg.axis() .scale(y) .orient("left"); var area = d3.svg.area() .x(function(d) { return x(d.time); }) .y0(height) .y1(function(d) { return y(d.conc); }); var svg = d3.select("body").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); function make_x_axis() { return d3.svg.axis() .scale(x) .orient("bottom") .ticks(20) function make_y_axis() { return d3.svg.axis() .scale(y) .orient("left") .ticks(20) // load data d3.json("convertcsv.json", function(data) { data.forEach(function(d) { d.conc = +d.conc; d.time = +d.time; }); x.domain(d3.extent(data, function(d) { return d.time; })); y.domain([0, d3.max(data, function(d) { return d.conc; })]); svg.append("area-gradient") .attr("id", "temperature-gradient") .attr("gradientUnits", "userSpaceOnUse") .attr("x1", 0).attr("y1", y(50)) .attr("x2", 0).attr("y2", y(60)) .selectAll("stop") .data([ {offset: "0%", color: "steelblue"}, {offset: "50%", color: "gray"}, {offset: "100%", color: "red"} ])…
tagged with: javascript
downvote count: 0
answer count: 1
score: 1
accepted answer: http://stackoverflow.com/a/25432438
favorite count: 0
tagged with: d3.js

http://stackoverflow.com/comment/39698615
comment on: http://stackoverflow.com/q/25444127
type: Comment
type: QuestionComment
has text: … and doesn't show the problem you are having (which therefore isn't in the code you've put in the question).
score: 1

http://stackoverflow.com/comment/39805131
has text: From the jQuery API documentation: _The load event is sent to an element when it and all sub-elements have been completely loaded. This event can be sent to any element associated with a URL: images, scripts, frames, iframes, and the window object._
comment on: http://stackoverflow.com/q/25501107
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/25415430
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/39646608
tagged with: jqote
has comment: http://stackoverflow.com/comment/39667449
has title: Accessing class object in JSP
type: UnansweredQuestion
tagged with: spring-mvc
answer count: 0
score: 0
tagged with: java
has comment: http://stackoverflow.com/comment/39667706
has body: I am trying to access an object in JSP. The object is :- public class Organization implements IOrganization { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; @Column(name = "name") private String name; @Column(name = "level") private Integer level; @Column(name = "active") private Boolean active; @ManyToOne(optional=true, fetch=FetchType.LAZY) private Organization parentOrganization; @OneToMany(mappedBy="parentOrganization", targetEntity=Organization.class, cascade=CascadeType.ALL, fetch=FetchType.LAZY) private Set<Organization> organization = new HashSet<Organization>(); I wish to ask the user to add an organization and display the parent organizations as a dropdown list. I am currently using the following code for adding an organization. JS file - function addOrganization(){ var organization = {}; organization.id = null, organization.name = null; organization.level = null; organization.active = null; organization.parentOrganization = null; editRow=$("#organizationEditTemplate").jqote(organization); $("#modalMain").empty(); $("#modalMain").append($(editRow)); modal.modal({ keyboard: false, backdrop: "static" }); addEditOrganization(organization); } function addEditOrganization(organization){ $('#modalSave').click(function(event){ console.log("saving organization"); var inputBoxes = $("#modalBody").children().find("input"), issues = false; for(var i=0; i< inputBoxes.length; i++){ var inputBox = $(inputBoxes)[i]; if($(inputBox).val().length == 0){ $(issueList).append(" " + $(inputBox).prop("placeholder") + " can't be empty"); $(alertBlock).show(); issues = true; } else if($(inputBox).val().length > 1024){ $(issueList).append(" " + $(inputBox).prop("placeholder") + " can't be larger than 1024 characters"); $(alertBlock).show(); issues = true; } } console.log("Are there issues? " + (issues ? "YES" : "NO")); if(!issues){ var editedOrganization = {}; editedOrganization.id = organization.id ? organization.id : null; editedOrganiza…
type: Question

http://stackoverflow.com/a/25435182
type: Answer
answers question: http://stackoverflow.com/q/25408666
score: 0
has body: Thank you jfriend00, your solution seems to have solved my issues. Below is the updated version i am now using for anyone interested : click: function () { // validate all rows var $selectedRows = $('#table1).jtable('selectedRows'); LoopSelectedRows($selectedRows, 'Validate').then(function () { // check for any row with an error var $ValidatedRows = $('#table1).jtable('selectedRows'); var boolCheck = checkValidatedRows($ValidatedRows); // if all records are succesfull then add them // else alert user if (boolCheck == true) { LoopSelectedRows($selectedRows, 'Add'); } else { alert("Please correct invalid records and try again"); } }); } // loop function function LoopSelectedRows(SelectedRecords, actionType) { var promises = []; if (SelectedRecords.length &gt; 0) { //Show selected rows SelectedRecords.each(function () { var record = $(this).data('record'); // Actions for loop // Validation Action if (actionType == 'Validate') { promises.push(validaterecord(record)); } // call add function if (actionType == 'Add') { AddRecordToTable(record); } }) }; return $.when.apply($, promises); } // validate function function validaterecord(dataRecord) { var def = $.Deferred(); $.ajax({ url: "./ValidateAddRecord", type: 'POST', contentType: 'application/json', dataType: 'json', data: JSON.stringify(dataRecord), success: function (data) { if (data.Result == "OK") { // update record with message $('#table1).jtable('updateRecord', { record: data.Record }); // resolve token def.resolve(); } else { // display error alert(data.Message); } } }); return def.promise(); }

http://stackoverflow.com/a/25544422
has comment: http://stackoverflow.com/comment/39884819
type: Answer
has body: The element's IDs, class names, and variables in JavaScript cannot start with a number! Please prefix the values with a character and then try it again. for(x=1; x &lt; pg4Data.length; x++) { pg4RowData = pg4Data[x-1].split(','); document.getElementById("s-4-1-"+x).value = pg4RowData[0]; document.getElementById("s-4-2-"+x).value = pg4RowData[1]; document.getElementById("s-4-3-"+x).value = pg4RowData[2]; document.getElementById("s-4-4-"+x).value = pg4RowData[3];
has comment: http://stackoverflow.com/comment/39884799
answers question: http://stackoverflow.com/q/25544194
score: 0

http://stackoverflow.com/comment/39738442
comment on: http://stackoverflow.com/q/25465076
score: 0
type: Comment
type: QuestionComment
has text: @Whisher thanks for that! Is there any explanation as to why this happens?

http://stackoverflow.com/comment/39599671
comment on: http://stackoverflow.com/q/25389859
type: Comment
type: QuestionComment
has text: Can you show the code with the localStorage solution? It might be as easy as `var check=localStorage.getItem("check");`
score: 0

http://stackoverflow.com/a/26000400
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/91792886
accepted answer of: http://stackoverflow.com/q/25432633
upvote count: 2
answers question: http://stackoverflow.com/q/25432633
type: AcceptedAnswer
type: Answer
has body: You can get better performance by changing your marker types and removing shadows. I've been using these options in my plots with pretty good success: seriesDefaults: { lineWidth: 1, shadow: false, rendererOptions: { smooth: false }, markerOptions: { show: true, shadow: false, size: 2 } } Here's an example which adds 50k points to a jqplot: http://jsfiddle.net/xf8d36kc/ We have a project where we are consistently plotting 20-30k points fairly quickly. Once we start getting towards around 100k points it's still quick to display but zooming and interacting with the plot starts to have lag times of 1-3 seconds but still doesn't freeze up the browser. We experience more delay in bringing the data in from our database then actual draw time for jqplot. I haven't looked much in to plotting sets much bigger than 100k, but after that you may want to start grouping the data serverside to limit the number of points and then expand them as you zoom in for more detail.

http://stackoverflow.com/comment/39797125
type: QuestionComment
has text: Also, note that you are making three global variables -- `s`, `i`, and `j`.
score: 1
comment on: http://stackoverflow.com/q/25496564
type: Comment

http://stackoverflow.com/a/25548509
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25548065
has body: Change the select tag onchange() trigger to include this.value: &lt;select onchange="dmo_service_update(this.value)"&gt; Accept the value into the javascript function function dmo_service_update(dmo_selected){ var data = { 'action': 'dmo_service_update_php_2', 'dmo_selected' : dmo_selected }; The PHP can now read the value as a $_POST parameter: function dmo_service_update_php_1() { $selected = $_POST['dmo_selected']; die(); }
accepted answer of: http://stackoverflow.com/q/25548065
type: AcceptedAnswer

http://stackoverflow.com/q/25449947
downvote count: 2
has comment: http://stackoverflow.com/comment/39709493
has comment: http://stackoverflow.com/comment/39709548
accepted answer: http://stackoverflow.com/a/25450024
has comment: http://stackoverflow.com/comment/39709833
type: Question
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39710121
has comment: http://stackoverflow.com/comment/39709423
has comment: http://stackoverflow.com/comment/39709589
has answer: http://stackoverflow.com/a/25450444
has title: How do you add attributes to elements without hard-coding them in HTML?
tagged with: dom
has comment: http://stackoverflow.com/comment/39710280
answer count: 7
has comment: http://stackoverflow.com/comment/39709949
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25450040
has comment: http://stackoverflow.com/comment/39710204
has answer: http://stackoverflow.com/a/25450061
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25450029
favorite count: 0
has answer: http://stackoverflow.com/a/25450029
has body: So, in my specific case, I am trying to make all the &lt;a&gt; elements in a particular div have the attribute target = "_blank" to open them in new tabs. But this could work with any element and any attribute. I'm just wondering if there is a way to add these attributes with Javascript. My first thought was to use CSS, but then I realized that this is not a style issue.
linked to: http://stackoverflow.com/q/804256
has answer: http://stackoverflow.com/a/25450024
has comment: http://stackoverflow.com/comment/39710061
has answer: http://stackoverflow.com/a/25450032
upvote count: 3
has answer: http://stackoverflow.com/a/25450122

http://stackoverflow.com/comment/39706419
comment on: http://stackoverflow.com/q/25448330
type: Comment
type: QuestionComment
has text: when you say "I want to split the contents by " do you mean that you want the break tag to break text inside the alert box?
score: 0

http://stackoverflow.com/q/25514390
tagged with: javascript
has body: I'm making an html5 "web-game-style" and I got a large width background around 7600px. The background is set using the css background-size: 100% 100% in a div who have the 400vw width. Im trying to scroll over that background using the window.scrollBy function inside requestAnimationFrame loop. Ramdomly while the page is autoscrolling the background gets graphical gliches but the rendreing timeline(Chrome) show me times less than 2ms in paintings. dpl = -window.innerWidth*duration; if(next != null){ function move(){ if(window.pageXOffset &gt; next.x){ window.scrollBy(dpl,0); window.requestAnimationFrame(move); }else{ window.scrollTo(next.x,next.y); actual = next; next = null; } }; move(); //Interval callback /*interval = setInterval(function(){ if(window.pageXOffset &gt; next.x){ window.scrollBy(dpl,0); }else{ window.scrollTo(next.x,next.y); actual = next; next = null; clearInterval(interval); } },scrollInterval);*/ } I also tried changing the scrollBy function and using a css tranformation and transition fired changing the class of the element who changes the translate3d property to try to force the gpu..Again the same result... .camLeft{ -ms-transform: translate3d(0,-100%,0) !important; -webkit-transform: translate3d(0,-100%,0) !important; transform: translate3d(0,-100%,0) !important; } and using: $(".btnLeft").click(function(){ $("#background").toggleClass("camLeft"); }); Another try was using a canvas.. Again with the requestAnimationFrame loop and scrolling the background clearing the canvas every frame and repainting the background..(canvas here got 100%/100% and image 400%/100% setted up on window load)...Again the same result. Painting times less than 2ms sometimes 4-5 ms but randomly graphical gliches. I dunno what else to do except try to make the background by tiles or pices what will be alot of work. When the background moves alot of area of the screen got "damanged" so make it by tiles dunno if it will be the solution cuz while scrolling alot of tiles w…
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: scroll
upvote count: 1
score: 1
has title: HTML5 Scrolling background
type: Question
tagged with: requestanimationframe
downvote count: 0

http://stackoverflow.com/comment/39877971
score: 0
type: Comment
type: QuestionComment
has text: I see that in scenario #1 "boxTest" is not being assigned the div object. So the problem must be with this assignment. Just an observation. I could still use some reflection. Thanks. P.S. I didn't notice your answers before I commented Thank you for your replies. I'll look through your answers now.
comment on: http://stackoverflow.com/q/25540425

http://stackoverflow.com/comment/39658345
type: Comment
comment on: http://stackoverflow.com/q/25422225
has text: but it's not drawing the right images :) my main problem is calculating the exact `background-position`
score: 0
type: QuestionComment

http://stackoverflow.com/q/25420271
tagged with: angularjs
has body: Sendind data between controllers use Service. But what better? Use $on at controller and $broadcast at service; Or simply javascript Object? (Exp: myapp.factory('MyService', function(){ var obj = {}; return{ setObject: function(value){ obj.value = value; }, getObject: function(){ return obj; } }; });
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25420764
has comment: http://stackoverflow.com/comment/39654965
tagged with: frontend
score: 1
has comment: http://stackoverflow.com/comment/39654781
upvote count: 1
linked to: http://stackoverflow.com/q/11252780
type: Question
has title: Which method exchange data between controllers better
tagged with: javascript
has comment: http://stackoverflow.com/comment/39654914
has answer: http://stackoverflow.com/a/25420764
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/25409368
has body: Here is my code oTable = $('#userlisttable') .dataTable( { "serverSide" : false, "ajax" : { "url" : context + "user/get", }, "columns" : [ { "data" : "username" }, { "data" : "userpassword" }, { "data" : "usertype" }, { "data" : "firstname" }, { "data" : "lastname" }, { "data" : "emailaddress" }, { "data" : "isactive" }, ], "columnDefs" : [ { "targets" : "7", "data" : "userId", "render" : function(data, type, full, meta) { return '&lt;a href="#" id="row' + data + '" class="btn btn-success" onclick="callModal(id)"&gt;&lt;i class="glyphicon glyphicon-edit icon-white"&gt;&lt;/i&gt;EDIT&lt;/a&gt; &amp;nbsp;&amp;nbsp;&lt;a href="#" id="row' + data + '" class="btn btn-danger" onclick="callDeleteModal(id)"&gt;&lt;i class="glyphicon glyphicon-trash icon-white"&gt;&lt;/i&gt;Deactivate&lt;/a&gt;'; } } ], "sDom" : 'T&lt;"clear"&gt;lfrtip', "oTableTools" : { "sRowSelect" : "single", "sSwfPath" : "../../resources/swf/copy_csv_xls_pdf.swf", "aButtons": [ "csv" ] } }); server returns following Json [{"password":"password","username":"user","lastAccess":1408089626000,"creationDate":1408089626000,"userId":1,"lastName":"reddy","isActive":"y","firstName":"manjari","email":"man@gmail.com","isLdap":"y","ldapQuery":"query","accessType":"any","usertype":"admin"}] but data is not dislpled in datatable.
has title: datatables not binding Json with columns
tagged with: datatable
tagged with: twitter-bootstrap
type: AnsweredQuestion
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25409912
accepted answer: http://stackoverflow.com/a/25409912

http://stackoverflow.com/comment/39623577
has text: @Praveen: Yes innerException can keep on going containing further Exceptions. Haven't seen many above 4 levels though.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25403599
type: QuestionComment

http://stackoverflow.com/comment/39823172
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25510511
has text: Bad solution to the 'replaceAll' problem. Use Regular expression solution... newVideoTitle = newVideoTitle.replace(new RegExp(phrase, 'g'), '');

http://stackoverflow.com/comment/39676359
score: 0
type: QuestionComment
type: Comment
has text: http://jsfiddle.net/Luz0oy3a/ @IanPennebaker
comment on: http://stackoverflow.com/q/25431491

http://stackoverflow.com/comment/39717017
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25451795
type: Comment
has text: By first time you execute, do you mean on page load or the first time you update an agent it works, but each additional time it doesn't? Also can you provide an example of what the getTable() or better the createTable() produces, so I can get an accurate recreation of the page?

http://stackoverflow.com/q/25548328
has comment: http://stackoverflow.com/comment/39892495
has answer: http://stackoverflow.com/a/25549467
has comment: http://stackoverflow.com/comment/39893251
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39892790
has title: arabic language in xml
has body: I have this code: html code: xml code: <?xml version="1.0" encoding="utf-8"?> 25 الاردن 30 مصر And I want to include the html code in another html document like this: html code: <?php include 'users.html'; ?> the output of the javascript code is: 0 while it should be 2 and if I replace the arabic text in the xml document with english text the output become 2. Why is the arabic text breaking the code?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/14220321
tagged with: http://stackoverflow.com/tag/xml
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39893030
linked to: http://stackoverflow.com/q/24045108
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39893921
type: Question

http://stackoverflow.com/comment/39614142
score: 0
type: Comment
type: QuestionComment
has text: The same way I have to add all the special characters like s.replace(/-,:/()@#$%^&*()+$/,'') to do trim at the end of the string.
comment on: http://stackoverflow.com/q/25398395

travis-ci
tags question: http://stackoverflow.com/q/25434794
type: Tag
tag name: travis-ci

http://stackoverflow.com/comment/39800459
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25498402
has text: Hmm, it's a little bit complicated to understand! ;) But why can I get the value with the call to the 'test1' method? Could it be done in another way? I have to leave and I will continue later with this question. Thanks!
score: 0

http://stackoverflow.com/comment/39743210
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25467492
has text: If you use a random global name, then how does the code that needs to access that global resource know what name to access it by? It seems you'd have to store the name you were using somewhere globally in a known global name and that defeats the entire purpose. If you're doing something different than this, then please show the code so we aren't confused as to what you're doing and what you're asking about. Also, the first choice is to put persistent state into a closure anyway so it persists, is accessible as desired, but is not actually global.
type: Comment

http://stackoverflow.com/q/25509660
type: UnansweredQuestion
has body: I'm building cordova + angularjs application (with help of typescript and ng-cordova). I have a problem with a cordova fileReader function which suppose to be async but in my case it blocks the execution of other javascript code including execution of ng-click directives.. While cordova reads a book index which is 10 mb in size all UI components do not respond. loadIndexFromBookFolder(bookFolder: string): ng.IPromise&lt;ft.ILoadIndex&gt; { var currentClass: SearchService = this; var deferred = this.$q.defer&lt;ft.ILoadIndex&gt;(); this.$cordovaFile.readFile(bookFolder + '/index').then(function (idx) { currentClass.$cordovaFile.readFile(bookFolder + '/idMap').then(function (idMap) { deferred.resolve({ index: lunr.Index.load(JSON.parse(idx)), idMap: JSON.parse(idMap) }); }, failed); }, failed); var failed = (err) =&gt; { this.$log.debug('error: ' + err); deferred.reject(); }; return deferred.promise; } If cordova filereader is async then what else could cause such problems with blocking java script?
has comment: http://stackoverflow.com/comment/45468489
has answer: http://stackoverflow.com/a/47535050
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/36283445
score: 0
answer count: 1
has title: cordova filereader blocks execution of javascript code
tagged with: cordova
tagged with: angularjs

http://stackoverflow.com/comment/39877661
comment on: http://stackoverflow.com/a/25496380
has text: @Makromat I've committed my code in [github](https://github.com/manishcm/easyscroller). You can check it out.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25548233
has answer: http://stackoverflow.com/a/25608899
has title: Getting choppy movement using time-based movement
type: Question
answer count: 1
tagged with: javascript
tagged with: createjs
has body: I am using time based movement, but its still super choppy. this code shoots in arrow in the air then calculates the difference in movement to determine to rotation of the arrow. It works most of the time, but sometimes it just jitters. for(i=0;i&lt;this.arrows.length;i++){ a = this.arrows[i]; point0 = [a.x,a.y]; x_speed = e.delta/1000*a.speed * Math.cos(a.angle * Math.PI / 180); y_speed = e.delta/1000*a.speed * Math.sin(a.angle * Math.PI / 180); a.x += x_speed; a.y += y_speed; a.y += a.velocity; a.velocity += e.delta/1000*this.gravity; alert(e.delta); ang = Math.atan2(point0[1]-a.y,point0[0]-a.x); ang = (ang * (180/Math.PI))+180; a.rotation = ang; }
score: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion

http://stackoverflow.com/comment/39767428
type: QuestionComment
score: 0
has text: @VeerShrivastav if I press the down key the page just moves down. So I'm mostly looking for a way to trigger this hover action when it get's highlighted.
comment on: http://stackoverflow.com/q/25480659
type: Comment

http://stackoverflow.com/q/25437671
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25437866
tagged with: javascript
linked to: http://stackoverflow.com/q/563406
type: AnsweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/39687478
has title: function for disabling select elements not always working
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I have this function in javascript that is supposed to generate a table in HTML anddisable. select elements that have an id with a date prior to teoday. It seems to be working fine, except that every now and then, not always,it leaves some of the selects without disabling. Could anyone give me a lead as to why this could be happening? I am completely stuck, please help!!! function llenaDatosTabla(){ _fecha = $("#fechaFinal").val(); _tiendaId = $("#cajaOp_tienda").val(); var errorcampos = 0; if(_tiendaId == 0){ mensajePop("Introduzca una tienda"); errorcampos = 1; }else if(_fecha == "" || _fecha==null){ mensajePop("Introduzca una fecha"); errorcampos = 1; } if(errorcampos==0){ lightboxLoading("loadingData","divLoading"); invocarJSONServiceAction('consultaTurnoXTiendaXFechaGuardadaXPuesto', { tiendaId: _tiendaId, fecha: _fecha},'rh_datosTurnosEmp', null, null); rh_datosTurnosEmp =function(data){ if (data.resultado!=null && data.resultado!=undefined){ datastring = " "; if(data.resultado.indicadorGuardado ==0){ $("#letreroguardados").html("Los horarios NO han sido guardados"); } else{ $("#letreroguardados").html(""); } var subtitran = "" + data.resultado.fechaInicial + " - " + data.resultado.fechaFinal; $("#subtitran").html(subtitran); lideresxtienda = 0; var extcount = 0; var descont = 0; adeshabilitar = new Array(); for (var i=0;i<data.resultado.turnosXUsuario.length;i++){ var rowcolor = i%2; var rowstyle=""; var turnos = data.resultado.turnosXUsuario; var hoy = new Date(); var fi = data.resultado.fechaInicial.split("/"); var finif = new Date(parseInt(fi[2]), parseInt(fi[1])-1, parseInt(fi[0])); var options = ""; var turnosAplicables = new Array(); var tipoEmp = data.resultado.turnosXUsuario[i].puestoId; if(rowcolor==0){ rowstyle = "rblanco"; } else{ rowstyle="rgris"; } if(tipoEmp == 1){ turnosAplicables = turnosOp; }else if(tipoEmp == 2){ turnosAplicables = turnosEn; lideresxtienda++; }else if(tipoEmp == 3){ turnosAplicables = turnosLi; lideresxtienda++; }else{ turno…
has answer: http://stackoverflow.com/a/25437866

http://stackoverflow.com/comment/39762106
comment on: http://stackoverflow.com/q/25405565
score: 0
has text: So far I've been able to finally get everything to work ok. It's just this little bug where they're putting in an .apply and I believe that's what's cutting the first item off somehow. If I had to abandon JayData, which I don't want to do as I have a bit of time into it, any other thoughts on mobile data providers and the sort of cross platform functionality?
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25402316
score: 4
type: Answer
has body: First of all, there is a native Angular service - $timeout which allows you to do timeouts without having to call $scope.$apply. So, you could do something like this: function MyController($scope, $timeout) { $scope.timer = 0; $scope.level = { // I assume this object is declared in a parent $scope in your code. // I define it here just so the sample will work. _seconds_per_question: 10 }; $timeout(increment, 1000); function increment() { if ($scope.timer &lt; $scope.level._seconds_per_question) { console.log($scope.timer); $scope.timer ++; $timeout(increment, 1000); } } } Demo: http://plnkr.co/edit/CAfwGRa5M1BmBC3s8cKa?p=preview
accepted answer of: http://stackoverflow.com/q/25401942
upvote count: 4
answers question: http://stackoverflow.com/q/25401942
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25404106
score: 0
has body: That probably should be because you're creating the element with the first text. You have to create it empty and set the text everytime: function showNotificationBar(message) { /*set default values*/ duration = typeof duration !== 'undefined' ? duration : 3000; bgColor = typeof bgColor !== 'undefined' ? bgColor : "#CAFFC7"; txtColor = typeof txtColor !== 'undefined' ? txtColor : "#51A427"; height = typeof height !== 'undefined' ? height : 40; /*create the notification bar div if it doesn't exist*/ if ($('#notification-bar').size() == 0) { var HTMLmessage = " "; $('#header').prepend(" " + HTMLmessage + " "); } /* add/update the text message */ $(".notification-message").text(message); /*animate the bar*/ $('#notification-bar').slideDown(function() { setTimeout(function() { $('#notification-bar').slideUp(function() {}); }, duration); }); } Notice that it creates the .notification-message empty, then it adds the text message.
answers question: http://stackoverflow.com/q/25404046
type: Answer

http://stackoverflow.com/q/25539043
answer count: 1
tagged with: ajax
has comment: http://stackoverflow.com/comment/39875303
type: UnansweredQuestion
tagged with: php
tagged with: cookies
has body: I am trying to send GoeLocation coordinates from JavaScript to PHP using Cookies and I am getting a Notice as Notice: Undefined index: data in /Applications/XAMPP/xamppfiles/htdocs/samepage.php on line 24 My file name is samepage.php and I want to post this on the same page. My code: Test Geo Location <input type="text" id="getlat" name="getlat" value="<?php echo $_POST['polat']; ?>" /> <input type="text" id="getlon" name="getlon" value="<?php echo $_POST['polon']; ?>" /> <?php $data = json_decode($_COOKIE["data"]); $lat = $data["getlat"]; $lon = $data["getlon"]; ?>
has answer: http://stackoverflow.com/a/25539350
linked to: http://stackoverflow.com/q/1458724
type: Question
has title: Posting GeoLocation From JavaScript to PHP using Cookies
has comment: http://stackoverflow.com/comment/39875264
tagged with: javascript
score: 0

http://stackoverflow.com/q/25514660
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25515053
downvote count: 1
type: Question
tagged with: google-maps
upvote count: 0
tagged with: javascript
score: -1
answer count: 1
has answer: http://stackoverflow.com/a/25515053
favorite count: 0
has title: Undefined property error when refreshing map
has comment: http://stackoverflow.com/comment/39831120
has body: Below is the full code of my Google Maps javascript file. What I'm trying to do is first initialise the map, then dynamically add a marker and refresh the map. // GLOBALS var map; function refreshMap() { google.maps.event.trigger(map,'resize'); map.setCenter(map.get('originalCenter')); } function initialize() { var map_canvas = document.getElementById('map_canvas'); var map_options = { scrollwheel: false, center: new google.maps.LatLng(56.4611388, -2.9719832), zoom: 17, mapTypeId: google.maps.MapTypeId.ROADMAP, originalCenter: new google.maps.LatLng(56.4611388, -2.9719832) } map = new google.maps.Map(map_canvas, map_options) } // Initialise Map google.maps.event.addDomListener(window, 'load', initialize); // Add a Marker marker = new google.maps.Marker({ position: new google.maps.LatLng(56.4611388, -2.9719832), map: map, title: 'Marker' }); // Refresh refreshMap(); I'm getting the following error when refreshMap() is run: Uncaught TypeError: Cannot read property '__e3_' of undefined main.js:15 Is this the correct way to refresh the map?

http://stackoverflow.com/a/25417976
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/47429384
upvote count: 2
answers question: http://stackoverflow.com/q/25405543
has body: Or you could just use javascripts bind function and pass in the correct this you want to use. $http.get('/api/trivia').success(function (data, status, headers, config) { this.options = data.options; this.title = data.title; this.answered = false; this.working = false; }.bind(this));
downvote count: 0

http://stackoverflow.com/comment/39756387
score: 5
has text: `React.DOM` is for creating React components. It doesn't really let access existing DOM nodes.`React.DOM.body` is a constructor, it's not a reference to `document.body`.
comment on: http://stackoverflow.com/q/25474803
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25532307
score: 2
answers question: http://stackoverflow.com/q/25532168
downvote count: 0
type: Answer
has body: var inputs = document.getElementsByTagName('input'); for(var i =0; i&lt;inputs.length; i++){ inputs[i].title = inputs[i].id; } Finds all the html input elements on a page, and adds a tooltip with its id value on mouse over. Dev tools can do this for you though without causing as much fuss!
upvote count: 2

http://stackoverflow.com/q/25463500
has comment: http://stackoverflow.com/comment/39735584
has comment: http://stackoverflow.com/comment/39735316
has comment: http://stackoverflow.com/comment/39735465
has comment: http://stackoverflow.com/comment/39735319
has comment: http://stackoverflow.com/comment/39735441
has comment: http://stackoverflow.com/comment/39735615
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39735539
type: Question
has title: .load callback has been called five times
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25463520
accepted answer: http://stackoverflow.com/a/25463520
score: 0
has comment: http://stackoverflow.com/comment/39735563
tagged with: jquery-callback
has body: The code I am using is shown below, I am pretty sure I am missing a point but could not find out. What I am doing is, when user press the button, a fragment of the page has been loaded. After successful loading I need to do some business(just once ofc.), unfortunately, callback function seems to be called exactly 5 times. I have tried basic google solutions but no chance. Thanks in advance. val = 1; $( "#signup" ).click(function( event ) { event.preventDefault(); $( ".container" ).load("/signup", function(event) { console.log("val: "+val); val++; }); }); and the console log shows val: 1 val: 2 val: 3 val: 4 val: 5 PS: I am not sure if it is related or not but the project also uses laravel and bootstrap.
answer count: 1
has comment: http://stackoverflow.com/comment/39735734

http://stackoverflow.com/a/26128592
has body: if you are using html5 then you can use webSQL to perform data operations,it provides all functions like select,insert,update on data The Web SQL specification defines an API for storing data in databases that can be queried using a variant of SQL. you can use like following function I have used it in my Intel XDK mobile app if you are using html5 then you can use webSQL to perform data operations,it provides all functions like select,insert,update on data > The Web SQL specification defines an API for storing data in databases > that can be queried using a variant of SQL. you can use like following > function Contact Form contact no Name Insert readdata GetByContact Your Data Will Show Here you can get more information from https://github.com/ccoenraets/backbone-directory/tree/master/localdb http://www.tutorialspoint.com/html5/html5_web_sql.htm
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25405565
downvote count: 0
type: Answer

http://stackoverflow.com/q/25500381
has answer: http://stackoverflow.com/a/25504470
has body: I did some research and I couldn't find a post that was specific to the Google Maps V3 Javascript API, so I'm posting a new question. Please let me know if there is a more appropriate place for this question. My Issue: Without touching anything, my website, utilizing the Google Maps V3 Javascript API, started giving me this error: Resource interpreted as Script but transferred with MIME type image/png Refused to execute script from 'http://mt1.googleapis.com/vt?pb=!1m4!1m3!1i15!2i9148!3i11958!1m4!1m3!1i15!2…2m1!1e47!12m3!1e37!2m1!1ssmartmaps!4e3&amp;callback=_xdc_._63mj9u&amp;token=110320' because its MIME type ('image/png') is not executable, and strict MIME type checking is enabled. I started getting this in Chrome's javascript console completely out of the blue. Could this be related to too many requests to Google Maps? I was doing some tinkering on the map page and refreshing somewhat frequently, but never touched any of the working script dealing with how the map or its tiles are rendered - so I'm very confused. Has anyone run into this issue and/or know of a solution? UPDATE As implied in a comment below, this is not an 'ignorable' issue as it is affecting how the map tiles are rendered. Others are beginning to experience this kind of issue as well, as noted in this post. It is also an issue that is affecting other maps I've initiated on other websites (example).
type: Question
answer count: 2
tagged with: google-maps
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25507993
tagged with: google-maps-api-3
favorite count: 0
type: UnansweredQuestion
tagged with: mime-types
score: 6
upvote count: 6
linked to: http://stackoverflow.com/q/25501862
has title: Google Maps - Resource interpreted as Script but transferred with MIME type image/png
has comment: http://stackoverflow.com/comment/39815429
has comment: http://stackoverflow.com/comment/39808720
tagged with: google-chrome

http://stackoverflow.com/comment/39793794
comment on: http://stackoverflow.com/q/25493771
score: 0
type: Comment
type: QuestionComment
has text: Google is your best friend: https://gist.github.com/darryl-snow/3822494

http://stackoverflow.com/a/25437152
score: 2
downvote count: 0
has body: There are a handful of problems, but they share one common denominator: you don't yet understand that Node.js is asynchronous. Just google "node.js asynchronous" and you'll get a handful of resources, or simply look it up here on SO (e.g. How do I get started with Node.js?). The gist of it, is to wait for a callback or an event, for example: var eiot = new EventedIOThing('paaarammm'); // use once, unless you for sure need to listen for the event multiple times eiot.once('open',function onEIOTOpen() { console.log('opened the thing.'); }).once('error',function onEIOTError(err) { console.warn('there were problemzzz'); }).once('end',function onEIOTEnd() { // successfully finished evented IO thing... someAction(this.dep,'anotherparam',function callMeWhenActionIsDone(err,result) { if ( err ) { console.warn('someAction had a problem!',err); return; // exit early if we didn't get an optimal result } anotherDependentAction(result,function callMeWhenSecondActionIsDone(err,result) { if ( err ) { // this 'err' is local to this function's scope console.warn('anotherDependentAction had a problem!',err); return; // exit early again } console.log('All done... what do you want to do next?'); }); }); }); The above code is pretty self explanatory given the variable/function names and comments, but pay close attention to the way methods are invoked, and most notably when they are invoked. Things don't happen in succession, instead code is on "stand-by" until dependent/proper things happen with successful results, and only then does the program flow continue. The down-side to the above coding style, is you'll eventually get many nested functions deep. This is where libs like async come into play. It allows for shallow function program flow: you specify an array of functions, and async handles when the callbacks should be invoked internally, you just have to worry about the sequence. Now, with the code you currently have, what we learned from the first example, and 1-upping it with the i…
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25416170
type: Answer
answers question: http://stackoverflow.com/q/25416170

url
tags question: http://stackoverflow.com/q/25478076
tag name: url
tags question: http://stackoverflow.com/q/25505618
tags question: http://stackoverflow.com/q/25439396
tags question: http://stackoverflow.com/q/25392512
tags question: http://stackoverflow.com/q/25414169
tags question: http://stackoverflow.com/q/25497655
tags question: http://stackoverflow.com/q/25457677
tags question: http://stackoverflow.com/q/25521552
tags question: http://stackoverflow.com/q/25408262
tags question: http://stackoverflow.com/q/25412715
tags question: http://stackoverflow.com/q/25434358
tags question: http://stackoverflow.com/q/25445167
tags question: http://stackoverflow.com/q/25440831
type: Tag

http://stackoverflow.com/q/25512290
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25514578
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39826517
has comment: http://stackoverflow.com/comment/39826644
has comment: http://stackoverflow.com/comment/39826295
type: UnansweredQuestion
downvote count: 2
upvote count: 1
type: Question
has body: EDIT: removed unnecessary information I want to take select element parent when the select Element value is changed, and I want to serialize the parent: jQuery('body').on('change','.shop_table select',function (){ memberid = this.value; parent = $(this).parent().serialize(); console.log(parent); // activity%5B9058%5D%5B0%5D=9145 selector = jQuery(this).find('option:selected'); console.log(selector.val()); // 9183 }); The first output have a value: 9145 and other want, is 9183.. I need to serialize all element in the parent of the selectable element.. (many input and select) but I don't have the good value when I change the value. What missing? Any idea?
has title: Jquery select on change not good value
score: -1
has comment: http://stackoverflow.com/comment/39827328
answer count: 1

http://stackoverflow.com/q/25428879
tagged with: javascript
has answer: http://stackoverflow.com/a/25428959
tagged with: google-maps-api-3
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25448215
linked to: http://stackoverflow.com/q/17363697
has body: OK - this one I'm fairly sure is just me working on something way too late in the evening, and just missing something really simple, so I really apologise if this is something I've missed in research, but I've trawled and trawled... I have a map that shows many many markers perfectly (a few thousand) that is loaded from a nice xml file, however I really want the map to center on the clients current location. If I hard wire it, all fine, however the dynamic bit is proving waaay too hard. I've looked in the Google docs about it, and looked over here, and even tried reverse engineering some other sites... here is my code running on the body.onload.initialize() var myLat = 35.702069; // default location to set centre var myLng = 139.775327; // default location to set centre var myLatlng = new google.maps.LatLng(myLat,myLng); //Set up the options for the map var myOptions = { zoom: 12, // Set the zoom level - 15 is good for a suburb minZoom: 10, // Stop zooming too far out center: myLatlng, // ------ centre on the current location ------ mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); // pop a marker in the place the map is centred... current location var myImage = new google.maps.MarkerImage('./images/markers/arrow.png'); var marker = createMarker(GetHomeLocationPopup(), myLatlng, myImage); I've tried using things like: var myLat = position.coords.latitude; var myLng = position.coords.longitude; however these don't look like they are exposed in this context. Here are my declarations: &lt;body onload="initialize()" onunload="GUnload()"&gt; &lt;section id="content" style="width:70%; height:80%"&gt; &lt;div id="map_canvas" style="width:100%; height:80%"&gt;&lt;/div&gt; &lt;/section&gt; &lt;/body&gt; I'd really not like to use other third-party libraries, and stick a native to the Google code as possible. Any help gratefully received - and it will mean that I can sleep better :-\
has title: how do I center a map on my current location html5
has answer: http://stackoverflow.com/a/25429139
type: AnsweredQuestion
type: Question
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/25429139
possible better answer: http://stackoverflow.com/a/25428959

http://stackoverflow.com/q/25511684
type: Question
has comment: http://stackoverflow.com/comment/39825232
has answer: http://stackoverflow.com/a/25512010
tagged with: http://stackoverflow.com/tag/html
score: -1
has answer: http://stackoverflow.com/a/25512025
answer count: 2
downvote count: 2
has title: javascript replace &reg; and html tags
upvote count: 1
possible better answer: http://stackoverflow.com/a/25512025
has comment: http://stackoverflow.com/comment/39825897
accepted answer: http://stackoverflow.com/a/25512010
has body: I'm trying to remove as many common cases as possible of ® and uniform it across the site. I want all of them to look like: Dashing Company® Here is what I'm working with thus far: HTML Dashing Company® Dashing Company® Dashing Company® Dashing Company® Javascript / jQuery $(document).ready(function() { $("body").html( $("body").html() .replace("®", "®") .replace(' ® ', "®") .replace('®', "®") .replace('®', "®") .replace("®", "®") .replace(/®/g, '®') .replace(/®/g, '®') .replace("\u00AE" , '®') .replace('®', '®') ); }); Fiddle time (updated): http://fiddle.jshell.net/w94z8vf1/8/ How do I make all of the 's contain ® alone (next to the company name)?
has comment: http://stackoverflow.com/comment/39830689
has comment: http://stackoverflow.com/comment/39865417
has comment: http://stackoverflow.com/comment/39825463
has comment: http://stackoverflow.com/comment/39826175
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
favorite count: 0

jquery-callback
tags question: http://stackoverflow.com/q/25463500
type: Tag
tag name: jquery-callback

http://stackoverflow.com/comment/39706320
comment on: http://stackoverflow.com/q/25448239
score: 0
type: Comment
has text: @Brewal 1.11.1, but I tried using 1.6.4 as well based on the solution to an older, but similar problem.
type: QuestionComment

http://stackoverflow.com/comment/39690267
comment on: http://stackoverflow.com/a/25414908
has text: @fpsCplton,yes i am increasing rid after switching bosh connection from server to strope attach() method, can you give me some clarity how log this session persist,means if i disconnect bosh connection from server(apache) and pass sid,rid and jid ,sid i am using will expires or remain alive so that i can attach to that session!!!!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25441451
has comment: http://stackoverflow.com/comment/39694216
score: 0
has title: Modify CKEditor Link feature similar to Gmail by removing pop-up
has answer: http://stackoverflow.com/a/25521451
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39694135
has body: I want to make CKEditor Link feature similar to Gmail 'Insert Link', so that when user click on that it will automatically convert text to link without asking for URL in popup. Please advice.
tagged with: asp.net-mvc
type: Question
tagged with: c#
answer count: 1
tagged with: javascript
tagged with: ckeditor
tagged with: jquery

http://stackoverflow.com/comment/40033761
score: 0
comment on: http://stackoverflow.com/a/25610139
type: AnswerComment
has text: No, actually it removed the `top` value for all the products. So I got only `style="position: absolute; left: 0px` for every `.product`. That's why all are overlapped.
type: Comment

web-services
type: Tag
tags question: http://stackoverflow.com/q/25440360
tags question: http://stackoverflow.com/q/25408233
tags question: http://stackoverflow.com/q/25401886
tags question: http://stackoverflow.com/q/25507023
tags question: http://stackoverflow.com/q/25467512
tag name: web-services

http://stackoverflow.com/comment/39697370
type: AnswerComment
has text: I thought it was, when I added that, it gave no results on the `SELECT` so clicking on the select would show no options
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25442474

http://stackoverflow.com/q/25484268
answer count: 2
tagged with: google-maps
downvote count: 0
has answer: http://stackoverflow.com/a/25484802
tagged with: javascript
favorite count: 0
has title: Function to add marker to existing google map not getting called
type: UnansweredQuestion
upvote count: 1
score: 1
has body: When I call the codeAddress function in initialize function it gets called but when it is somewhere else as in the below example it doesn't get called. What's the error? var geocoder; var map; function initialize() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(-34.397, 150.644); var mapOptions = { zoom: 8, center: latlng } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } function codeAddress() { var marker = new google.maps.Marker({ map: map, position: new google.maps.LatLng(-34.397, 150.644) }); } google.maps.event.addDomListener(window, 'load', initialize); codeAddress();
type: Question
has answer: http://stackoverflow.com/a/25484798

http://stackoverflow.com/a/25416463
type: Answer
accepted answer of: http://stackoverflow.com/q/25412095
answers question: http://stackoverflow.com/q/25412095
score: 0
type: AcceptedAnswer
has body: Scratch this, I had another developer in my office help me debug this and it looks like we found the solution. The way that BX Slider is calculating the individual slider size is taking a measurement of the parent. Because the parent is massive due to the slides being lined up next to each other, the "if" statements for measurement tell the slider that it's already smaller than that measurement, and not to resize smaller. Really, the slider should just measure the actual browser width to make its calculations, but that's part of a larger discussion on the stability of the logic that the author of BX Slider used to measure and apply responsiveness. What fixed the issue in this case is to apply the "fade" mode mode: 'fade' in the BX Slider init. The reason this works is that in "fade" mode the slides are not lined up next to each other and overflow: hidden'd, they're stacked on top of each other and being shown one at a time. Therefore, the container div is resizing correctly and the BX Slider calculations are being made correctly. I hope the author sees this and finds a way to implement a fix as I am not qualified to, and in the meantime use mode: 'fade' as a polyfill if you're having this issue. Hope this helps someone else!

http://stackoverflow.com/comment/39858065
has text: It's not about nested functions, how the function is defined is not what's important, it's how it's called. An IIFE is called right away with no special context, so it uses the global context, hence `this` inside the function is the window.
score: 1
comment on: http://stackoverflow.com/a/25529790
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25402866
has comment: http://stackoverflow.com/comment/39622258
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25402945
favorite count: 0
has comment: http://stackoverflow.com/comment/39622508
answer count: 1
has body: I have an angular $http post service which talks to a WCF service. The http post has a success handler: .success(function (data) { var response = JSON.parse(data); var tsValid = response.Outcome; deferred.resolve(tsValid); } However, tsValid is always 'undefined'. If I add some console logging, i can see that "data" looks like this: "{\"Message\":\"Valid Timestamp\",\"Reference\":\"CheckTimestamp:Completed\",\"Outcome\":true,\"Data\":null,\"MessageCount\":0,\"MessageGUID\":null}" Then "response" looks like this: {"Message":"Valid Timestamp","Reference":"CheckTimestamp:Completed","Outcome":true,"Data":null,"MessageCount":0,"MessageGUID":null} So all JSON.parse did in the success handler was strip out the escape characters. When I then try to access response.Outcome, it is undefined. However, if I open a command prompt and do the JSON.parse manually on the "data" variable, it correctly parses the JSON and I can access response.Outcome. Any ideas why the JSON.parse does not work in the success handler? EDIT - I have amended the console output to remove the "data:" and "response:" tags. They were added to the console log by me so i could identify which one was which.
has comment: http://stackoverflow.com/comment/39652581
type: UnansweredQuestion
upvote count: 1
has title: JSON.parse not working in code, but works fine in developer console
has comment: http://stackoverflow.com/comment/39623142
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39625968

http://stackoverflow.com/comment/39730114
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25460518
has text: So, your problem is Javascript, yes?

http://stackoverflow.com/comment/39722105
type: Comment
comment on: http://stackoverflow.com/a/25456264
has text: oops, included the wrong fiddle. Fixed now. The crux of the question is around teh best way to add those '\n'. I thought angular had more magic around converting the models to a nice display format and back [citation needed].
score: 0
type: AnswerComment

http://stackoverflow.com/a/25472542
downvote count: 0
has body: Change to var x = 0 I'd personally do it like this: var x = 0; var countTimer = setInterval(function () { if(x === 5){ clearInterval(countTimer); }else{ codeValue(); x++; } }, 500);
score: 1
accepted answer of: http://stackoverflow.com/q/25472469
answers question: http://stackoverflow.com/q/25472469
type: AcceptedAnswer
upvote count: 1
type: Answer

http://stackoverflow.com/a/25538485
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25538452
score: 1
upvote count: 1
has body: The += operator appends text to an existing variable -- it is a syntax error to use it in a new variable declaration. So you need either (which is syntactically correct but nonsense): var text = ""; var text = "function "+ funcName + "(){"; var text = "\n"; Or: var text = ""; text += "function "+ funcName + "(){"; text += "\n";

jquery-ui
tags question: http://stackoverflow.com/q/25509682
tags question: http://stackoverflow.com/q/25452943
tags question: http://stackoverflow.com/q/25483501
tags question: http://stackoverflow.com/q/25459665
tags question: http://stackoverflow.com/q/25462575
tags question: http://stackoverflow.com/q/25452131
tags question: http://stackoverflow.com/q/25446566
tags question: http://stackoverflow.com/q/25424261
tags question: http://stackoverflow.com/q/25517160
tags question: http://stackoverflow.com/q/25529685
tags question: http://stackoverflow.com/q/25432624
tags question: http://stackoverflow.com/q/25402542
tags question: http://stackoverflow.com/q/25478729
tags question: http://stackoverflow.com/q/25390841
tags question: http://stackoverflow.com/q/25493225
tags question: http://stackoverflow.com/q/25500729
tags question: http://stackoverflow.com/q/25492587
tags question: http://stackoverflow.com/q/25520590
tags question: http://stackoverflow.com/q/25407235
tags question: http://stackoverflow.com/q/25481571
tags question: http://stackoverflow.com/q/25531386
tags question: http://stackoverflow.com/q/25394518
tags question: http://stackoverflow.com/q/25471088
tags question: http://stackoverflow.com/q/25468018
tags question: http://stackoverflow.com/q/25522573
tags question: http://stackoverflow.com/q/25444036
tags question: http://stackoverflow.com/q/25449507
tags question: http://stackoverflow.com/q/25512094
tags question: http://stackoverflow.com/q/25547091
tags question: http://stackoverflow.com/q/25436547
tags question: http://stackoverflow.com/q/25468886
tags question: http://stackoverflow.com/q/25425294
tags question: http://stackoverflow.com/q/25434484
tags question: http://stackoverflow.com/q/25471421
tags question: http://stackoverflow.com/q/25531793
tags question: http://stackoverflow.com/q/25390329
tags question: http://stackoverflow.com/q/25458011
tags question: http://stackoverflow.com/q/25516389
tags question: http://stackoverflow.com/q/25504506
tags question: http://stackoverflow.com/q/25500595
tags question: http://stackoverflow.com/q/25465504
tags question: http://stackoverflow.com/q/25492768
tags question: http://stackoverflow.com/q/25461339
tags question: http://stackoverflow.com/q/25542827
tags question: http://stackoverflow.com/q/25434244
tags question: http://stackoverflow.com/q/25510147
tags question: http://stackoverflow.com/q/25444100
tags question: http://stackoverflow.com/q/25429109
tags question: http://stackoverflow.com/q/25399487
tags question: http://stackoverflow.com/q/25453181
tags question: http://stackoverflow.com/q/25540102
type: Tag
tags question: http://stackoverflow.com/q/25495540
tags question: http://stackoverflow.com/q/25409305
tag name: jquery-ui
tags question: http://stackoverflow.com/q/25449399
tags question: http://stackoverflow.com/q/25483024
tags question: http://stackoverflow.com/q/25410441
tags question: http://stackoverflow.com/q/25514467
tags question: http://stackoverflow.com/q/25538191
tags question: http://stackoverflow.com/q/25421993

http://stackoverflow.com/comment/39927906
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25531579
has text: Hi, i see. Actually it's logic, since you modify style for whole table. For ex. if you want to change color of id text you can use this selector intead of yours: $(".curPlanTable .myid").css("color","red");
type: AnswerComment

http://stackoverflow.com/q/25409037
tagged with: javascript
favorite count: 0
has body: I have a polymer app, which uses core-pages and core-menu. This is a minimum working example: one two How do I make it so that if I hyperlink to /example.html#bar that the two will be displayed instead of one ?
has title: Using polymer core-pages, select correct page based on url #fragment
score: 4
has answer: http://stackoverflow.com/a/25409221
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25409221
has answer: http://stackoverflow.com/a/25415487
type: Question
tagged with: polymer
accepted answer: http://stackoverflow.com/a/25415487
upvote count: 4
answer count: 2
downvote count: 0

http://stackoverflow.com/a/25443742
has comment: http://stackoverflow.com/comment/39698562
answers question: http://stackoverflow.com/q/25443657
has body: Use function as shown below : function SetMyValue(value){ return value; } var JsModel = SetMyValue(@Html.Raw(Json.Encode(CsModel))); As documented here http://msdn.microsoft.com/en-us/library/gg480740(v=vs.118).aspx:- This method wraps HTML markup using the IHtmlString class, which renders unencoded HTML. The Razor escaping system will not escape anything of type IHtmlString. The Html.Raw() method simply returns an HtmlString instance containing your text. So wrapping it into function and returning from there would work for you.
upvote count: 1
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39651536
comment on: http://stackoverflow.com/q/25418334
type: QuestionComment
has text: What does `RaiseEvent` do? There might be some asynchronous behavior and it "works" with `alert` because `alert` is blocking.
type: Comment
score: 0

http://stackoverflow.com/comment/39831497
type: Comment
type: QuestionComment
has text: possible duplicate of [What is the best way to add options to a select from an array with jQuery?](http://stackoverflow.com/questions/170986/what-is-the-best-way-to-add-options-to-a-select-from-an-array-with-jquery)
score: 0
comment on: http://stackoverflow.com/q/25514761

http://stackoverflow.com/a/65261343
downvote count: 0
upvote count: 8
type: Answer
answers question: http://stackoverflow.com/q/25469972
has body: Pure Javascript ES6 array.map(value =&gt; value.key); Underscore/Lodash _.map(value,'key')
score: 8

http://stackoverflow.com/q/25423249
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has title: The value of the property 'WebForm_AutoFocus' is null or undefined, not a Function object
has body: We have an application which uses a link, on click of that link it opens a jQuery popup window and focus on one text box of popup window. We are facing some issue while opening the pop up window, the steps in which the issue comes while opening are - Initially Pop up jQuery dialog workes fine and we are able to select a value and go ahead to setup the account. Open another portal/application within same browser and do some work and close that portal. Then Again if i go to main portal and clicks on the link for account setup which should open the dialog box is throwing an error: The value of the property 'WebForm_AutoFocus' is null or undefined, not a Function object I captured this error by using the browser's developer tools. In some post I have read that this may be because of- jQuery is not loading properly, but in developer tools I am able to see jquery script.
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26004406
score: 1
type: Question

http://stackoverflow.com/q/25470459
type: Question
has title: javascript/npm install path resolved incorrectly
answer count: 2
tagged with: javascript
tagged with: gruntjs
score: 0
has comment: http://stackoverflow.com/comment/39748827
has answer: http://stackoverflow.com/a/25470702
has comment: http://stackoverflow.com/comment/39749804
has answer: http://stackoverflow.com/a/25909156
accepted answer: http://stackoverflow.com/a/25909156
has body: I'm starting my work on a JS project, where I want to use bower, grunt and so on. qunit-sinon is the main directory of my project: tducin@home:~/Development/qunit-sinon (grunt)$ ll razem 192 drwxrwxr-x 5 tducin tducin 4096 sie 24 11:45 ./ drwxrwxr-x 3 tducin tducin 4096 sie 23 18:00 ../ drwxrwxr-x 5 tducin tducin 4096 sie 23 18:18 bower_components/ -rw-rw-r-- 1 tducin tducin 458 sie 23 18:15 bower.json drwxrwxr-x 8 tducin tducin 4096 sie 24 11:42 .git/ -rw-rw-r-- 1 tducin tducin 552 sie 23 20:46 .gitignore -rw-rw-r-- 1 tducin tducin 1148 sie 24 11:41 Gruntfile.js -rw-rw-r-- 1 tducin tducin 485 sie 23 18:26 index.html -rw-rw-r-- 1 tducin tducin 1079 sie 23 20:45 LICENSE drwxrwxr-x 4 tducin tducin 4096 sie 24 11:46 node_modules/ -rw-rw-r-- 1 tducin tducin 140356 sie 24 11:45 npm-debug.log -rw-rw-r-- 1 tducin tducin 346 sie 24 11:44 package.json -rw-rw-r-- 1 tducin tducin 324 sie 23 18:30 README.md -rw-rw-r-- 1 tducin tducin 1402 sie 24 11:00 tests.js I've got following installed globally: node/npm, bower, grunt-cli. I used grunt-init gruntfile to initialize my Gruntfile.js. The content of my package.json is: tducin@home:~/Development/qunit-sinon (grunt)$ cat package.json { "engines": { "node": "&gt;= 0.10.0" }, "repository": { "type": "git", "url": "git://github.com/tkoomzaaskz/qunit-sinon" }, "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-qunit": "~0.5.2", "grunt-contrib-watch": "~0.6.1" } } Now I want to run npm install to install all missing modules (few grunt plugins there were automatically added to Gruntfile.js), tut then I get following error: tducin@home:~/Development/qunit-sinon (grunt)$ npm install npm ERR! Error: EACCES, mkdir '/home/tducin/.npm/underscore/1.6.0' npm ERR! { [Error: EACCES, mkdir '/home/tducin/.npm/underscore/1.6.0'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: '/home/tducin/.npm/underscore/1.6.0', npm ERR! parent: 'jshint' } npm ERR! npm ERR! Please try running this command again as r…
tagged with: npm
has comment: http://stackoverflow.com/comment/39748798
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25470702

header
type: Tag
tag name: header
tags question: http://stackoverflow.com/q/25409345

http://stackoverflow.com/q/25477795
has title: Stylus: Generate CamelCase Variable
favorite count: 0
linked to: http://stackoverflow.com/q/25375087
accepted answer: http://stackoverflow.com/a/25486977
tagged with: css
tagged with: stylus
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25486977
type: Question
tagged with: javascript
has body: Looking to generate camelCase placeholders in a newly-generated Stylus variable (follow-up question to this one): smallMarginTop normalMarginTop etc. properties = margin padding proportions = mini small normal medium large for property in properties for proportion, i in proportions // Generate basic proportion placeholders: ex. small-padding, medium-padding, etc. define("$" + property + proportion, unit(i / 3, "em")) // should give something like $marginSmall = ... -- thinking something like toUpperCase? How can this be achieved, either with the Javascript API or natively, within Stylus?
upvote count: 2
answer count: 1

http://stackoverflow.com/a/25424922
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25421982
answers question: http://stackoverflow.com/q/25421982
score: 1
upvote count: 1
type: AcceptedAnswer
has body: The short answer is that you cant. What you are asking for is a javascript stack trace. Stack traces are easy enough to force/generate as below: $("#myText").change(function(){ var e = new Error('dummy'); var stack = e.stack.replace(/^[^\(]+?[\n$]/gm, '') .replace(/^\s+at\s+/gm, '') .replace(/^Object.&lt;anonymous&gt;\s*\(/gm, '{anonymous}()@') .split('\n'); console.log(stack); }); }); Where console.log can be read by using your browsers developer tools Ctrl+Shift+I in Chrome. So that's all fine and dandy BUT as you rightly point out, the change event doesn't fire when the value for the input is set dynamically i.e. via code and thus you have nowhere useful to put the stack trace code in order to get a stack trace that will allow you to see what code/ code file is making that change. $(".MySection").children().children().eq(3).val("Text Changed!") There is NO way around this as you simply cannot intercept the events. It WONT work even if you register/bind to the propertychanged, change, input, keydown, paste, DOMSubtreeModified events either as NONE of these will fire in response to a dynamic update of the inputs text value. $("#myText").bind("propertychanged, change, input, keydown, paste, DOMSubtreeModified", function(event){ // call stack trace here, except these bindings WONT be fired whenever the val is set dynamically }); You might head off down the trail of DOM 4 Mutation Observers: MutationObserver = window.MutationObserver || window.WebKitMutationObserver; var observer = new MutationObserver(function(mutations, observer) { // fired when a mutation occurs console.log(mutations); // ... }); var n = $("#myText").get(0); // define what element should be observed by the observer // and what types of mutations trigger the callback observer.observe(n, { subtree: true, attributes: true, childList: true, characterData: true, attributeOldValue: true, characterDataOldValue: true }); but they will not help you as they don't observe individual control properties but rat…
type: Answer

http://stackoverflow.com/comment/39801691
comment on: http://stackoverflow.com/q/25499182
type: Comment
type: QuestionComment
has text: can you post some of your code or illustrate your area of concern via jsfiddle
score: 0

http://stackoverflow.com/q/25469727
type: UnansweredQuestion
has title: bootstrap 3 navbar static top change to fixed top when scroll with animation
has comment: http://stackoverflow.com/comment/39747749
has answer: http://stackoverflow.com/a/25470268
type: Question
tagged with: javascript
tagged with: jquery
has body: i have a script to make bootstrap 3 navbar static top change to fixed top when scroll document.onscroll = function() { if( $(window).scrollTop() &gt; $('header.banner').height() ) { $('header.banner').removeClass('navbar-static-top').addClass('navbar-fixed-top'); } else { $('header.banner').removeClass('navbar-fixed-top').addClass('navbar-static-top'); } }; but how to add the animation when change to fixed top? thx
score: 0
answer count: 1
tagged with: twitter-bootstrap

http://stackoverflow.com/a/25427202
type: Answer
has comment: http://stackoverflow.com/comment/39673415
answers question: http://stackoverflow.com/q/25427070
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39668337
has body: Attaching it like this should do the job: x.onclick = function() {showAlert("foo");}; Demo
upvote count: 1
has comment: http://stackoverflow.com/comment/39669742

http://stackoverflow.com/a/25449374
answers question: http://stackoverflow.com/q/25449229
score: 0
has body: Try creating the select option's this way: $(document).ready( function() { var dd = $('#describe1'); dd.empty(); $.each(listA, function() { $("&lt;option /&gt;", { val: this.value, text: this.name }).appendTo(dd); }); }); Also, make sure that your select is inside the form tag. Since you did not post the PHP code, it is difficult to tell if this advice will help you.
type: Answer

http://stackoverflow.com/q/25550388
has comment: http://stackoverflow.com/comment/39899364
tagged with: javascript
tagged with: jquery
has body: My use case: I want to have a nice AJAX login form. And I want to make it available in separate page and in modal window. I'm new to Angular.js and I wonder - what is the best way to reuse template of the form? Should I make a directive, or should I inject it in DOM from controller, or maybe somhow else? Kindly help.
tagged with: ajax
score: 0
tagged with: single-page-application
has title: Best way to reuse templates in Angular.js
has comment: http://stackoverflow.com/comment/39922129
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39900283
has comment: http://stackoverflow.com/comment/39898950
has comment: http://stackoverflow.com/comment/39900309
type: Question

http://stackoverflow.com/comment/39697938
has text: Oh, thanks! I know theory, but i dont know how made this in Angular.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25443451
type: Comment

http://stackoverflow.com/a/25434329
score: 2
has body: Alternate solution: Make each year a separate series. By default, each year will be a different color. In this case, you will need to specify x values in your data. example: http://jsfiddle.net/jlbriggs/uLo7f6nf/ Another option, which I personally find preferable, is to leave all of the columns the same color, and instead alternate the background each year by adding a plot band: http://jsfiddle.net/jlbriggs/uLo7f6nf/3/ Another method which is perhaps a middle ground between the two: supply only two slightly different colors for the chart, so that each year will alternate between two shades of a color. This approach allows the user to differentiate between the years, but keeps the user from being overloaded by an unnecessary mix of colors: http://jsfiddle.net/jlbriggs/uLo7f6nf/5/
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25428087
answers question: http://stackoverflow.com/q/25428087
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39770520
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25482288
has text: @tommyd456 so you need to choose :) Or unique values based on timestamp without slice. Or really random values but with a little chance of duplicate.
score: 0

http://stackoverflow.com/a/25540899
type: Answer
has body: I don't understand why you need to create dynamic select, even if it's being solved using Struts tag. But, if you need it I can suggest you a non-recommended way to embed struts logic in Javascript. like; function addRow(){ alert("inside addRow"); var list = new Array(); var value = new Array(); var i = 0; &lt;logic:iterate name="countryForm" property="countryList" id="country"&gt; list[i] = '&lt;bean:write name="country" property="countryName" /&gt;'; value[i] = '&lt;bean:write name="country" property="countryId" /&gt;'; i++; &lt;/logic:iterate&gt; var table = document.getElementById('tableID'); var rowCount = table.rows.length; var countval = rowCount; var row = table.insertRow(rowCount); //country var cell1 = row.insertCell(0); var element1 = document.createElement("select"); element1.style.width = "250px"; element1.id = "countryId" + countval; var o = document.createElement('option'); o.value = "0"; o.text = "[SELECT]"; element1.options.add(o); cell1.appendChild(element1); for(i=0; i&lt;list.length; i++){ var item = document.createElement('option'); item.value = value[i]; item.text = list[i]; element1.options.add(item); cell1.appendChild(element1); } }
accepted answer of: http://stackoverflow.com/q/25513305
answers question: http://stackoverflow.com/q/25513305
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/25398293
answers question: http://stackoverflow.com/q/25398005
has body: you use function in function. this is works for me c=5; function yes() { alert("Right"); var ans=0; while(ans==0){ var x=prompt("Your Name?"); var ans=confirm("Your Name is "+x+" right?"); } document.write(' Welcome '+x+' You are being redirected in 3 seconds '); updateShow(); var iAmTimer= setTimeout(function(){ updateShow(); },1000); } function updateShow(){ document.getElementById('show').innerHTML=" You are being redirected in "+c+" seconds "; c=c-1; if(c<0){ document.location='2.html'; } else{ setTimeout(function(){ updateShow(); },1000); } }
downvote count: 1
has comment: http://stackoverflow.com/comment/39613951
score: -1
upvote count: 0
type: Answer

http://stackoverflow.com/comment/39715368
type: AnswerComment
comment on: http://stackoverflow.com/a/25452577
score: 0
type: Comment
has text: @Derek朕會功夫 - "it works good enough" is a terrible way to code, you should be using best practices. @Regent - agree with the former (CSS selectors for this are now slightly faster, 2.91% on jsPerf), however `.each()` is multiples of more than 100x slower so yes ... the `if` statement would still be much faster.

http://stackoverflow.com/a/25458194
type: Answer
has body: The switch concept is fine, the problem is that your text between the &lt;div&gt; YourTextHere &lt;/div&gt; has a return after it, consequently it doesn't match on the switch. See this for a demo: http://jsfiddle.net/z8v25vcj/3/ You need to move the &lt;/div&gt; to after the &lt;%#Eval("MChld") %&gt; like this: &lt;%#Eval("MChld") %&gt;&lt;/div&gt; Or you need to strip trailing returns and white space from xxx.textContent
answers question: http://stackoverflow.com/q/25458029
score: 0

http://stackoverflow.com/q/25426464
tagged with: javascript
linked to: http://stackoverflow.com/q/16491973
has comment: http://stackoverflow.com/comment/39666220
favorite count: 0
has body: I'm trying to have a single JSON file to validate data both in front (JS) and back (PHP). I cannot figure out how to have my pattern in a json string, PHP won't convert it. Here's what I'd like to use (email validation): '{"name":"email", "pattern":"^[a-z0-9]+(\.[_a-z0-9]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,15})$"}' I suppose there's something in pattern that doesn't get treated as a string? This as it is, won't convert to an object in PHP. I shouldn't have to escape anything but I might be wrong... thanks Edit: Tried this as suggested in comments: json_decode('{"name":"email", "pattern":"^[a-z0-9]+(\\.[_a-z0-9]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,15})$"}‌​'); ==&gt; NULL
downvote count: 1
has comment: http://stackoverflow.com/comment/39666125
has comment: http://stackoverflow.com/comment/39666261
tagged with: regex
has comment: http://stackoverflow.com/comment/39666105
has answer: http://stackoverflow.com/a/25426567
accepted answer: http://stackoverflow.com/a/25426567
has comment: http://stackoverflow.com/comment/39666166
tagged with: php
type: AnsweredQuestion
score: 7
tagged with: http://stackoverflow.com/tag/json
upvote count: 8
type: Question
has title: Regex pattern in JSON?
answer count: 1

http://stackoverflow.com/comment/39735955
comment on: http://stackoverflow.com/q/25463653
has text: @FelixKling - it doesn't work because class is not added :)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39772208
score: 0
type: AnswerComment
has text: Well, I can't know what your script environment is. But my answer contains no errors, and answered the question as you initially phrased it.
comment on: http://stackoverflow.com/a/25471411
type: Comment

http://stackoverflow.com/a/25470170
answers question: http://stackoverflow.com/q/25470146
has body: The children function only travels down the immediate children of the element. You can use find to search down the tree of children. This should work: var mem_name = $(mem_item).find("div.mem_name").text(); This is from the jQuery children() documentation: 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. Similarly, your parent().parent() call can be replaced with closest() or parents(): var mem_item = $(btn).parents(".member-item");
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25470146

http://stackoverflow.com/comment/39738708
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25465076
has text: great to see that :)

http://stackoverflow.com/q/25448008
has body: Hello I am working on Internet Explorer automation solution using VBA. After inspecting my webpage and inspecting the element of interest to determine its ID. IE.document.GetElementByID method fails because the ID cannot be found. I should add that the webpage is dynamic. So I thought i should wait a bit to let the javascripts finish running. I halted the execution of the VBA code for 1 min, but that didn't help. I have also assigned the content of .body.innerHTML and .body.outerHTML to a text file to inspect the content but that element was nowhere to be found. I also saved as a complete webpage and looked at the html file generated with a text editor but still that element (and many more) on the page were missing. Edit: Sample Code Added Sub Test_Login() Dim ie As InternetExplorer Set ie = New InternetExplorer ie.Navigate2 "http://www.example.com" Do If ie.ReadyState = 4 Then ie.Visible = True Exit Do Else DoEvents End If Loop Application.Wait Now + TimeSerial(0, 0, 20) ie.document.getElementById("commandSignIn").Click End Sub
has comment: http://stackoverflow.com/comment/39705983
tagged with: javascript
has comment: http://stackoverflow.com/comment/39705715
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/39705735
has title: Why can't I find elements on a page using GetElementById?
has comment: http://stackoverflow.com/comment/39705769
has comment: http://stackoverflow.com/comment/39705650
has comment: http://stackoverflow.com/comment/39706156
answer count: 1
downvote count: 0
tagged with: vba
has answer: http://stackoverflow.com/a/27555819
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
has comment: http://stackoverflow.com/comment/89202661
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39705825
upvote count: 1

http://stackoverflow.com/comment/39788067
comment on: http://stackoverflow.com/q/25460745
has text: Have you added `data-scrollable="y"` attribute to the view's el element?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39631616
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25407718
has text: @briansol Why change it?

http://stackoverflow.com/comment/39851022
type: Comment
comment on: http://stackoverflow.com/a/25509775
score: 0
type: AnswerComment
has text: Maybe it's time for a more user-friendly documentation, since I didn't find the `blur` event either.

autocomplete
tags question: http://stackoverflow.com/q/25438545
tags question: http://stackoverflow.com/q/25393764
tags question: http://stackoverflow.com/q/25414620
tags question: http://stackoverflow.com/q/25496294
type: Tag
tags question: http://stackoverflow.com/q/25401387
tags question: http://stackoverflow.com/q/25419972
tags question: http://stackoverflow.com/q/25402542
tags question: http://stackoverflow.com/q/25518893
tags question: http://stackoverflow.com/q/25481571
tags question: http://stackoverflow.com/q/25462575
tags question: http://stackoverflow.com/q/25519316
tags question: http://stackoverflow.com/q/25529685
tag name: autocomplete
tags question: http://stackoverflow.com/q/25508188
tags question: http://stackoverflow.com/q/25536745
tags question: http://stackoverflow.com/q/25404067
tags question: http://stackoverflow.com/q/25481396

http://stackoverflow.com/comment/39884617
comment on: http://stackoverflow.com/a/25536073
has text: it might not do the actual task you are finding but will help you as its similar to curl.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39693009
comment on: http://stackoverflow.com/q/25440918
type: Comment
type: QuestionComment
has text: Can you provide more info on what exactly you are trying to achieve? The issue, and why you chose this solution
score: 0

http://stackoverflow.com/q/25411030
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25411429
has body: I'm working on a mobile application using html5, css, and javascript which is using side by side scrolling and due to some problems with how -webkit-overflow-scrolling:touch interacts with fixed elements inside of divs I am using .scroller { position: fixed; overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch; height: 100%; } for my css on left side scrolling and simply using the window for the right side scrolling. When scrolling to the top or bottom of the left side or if the right side it still scrolling on mobile devices, the window will be used instead of the left side which has the scroller class. I was wondering if there is something similar to z-index that would allow fixed elements to always be prioritized when scrolling or clicking rather than going to outer elements. An example of this occurring in browsers would be scrolling to the bottom of the fixed element and the outer element then scrolls even though you are still scrolling inside of the fixed element. I would like the scroll to only scroll the fixed element and not change the outer element at all without checking to see if it's at the top of bottom of the fixed element. Here is a fiddle for how I currently have it set up: http://jsfiddle.net/y1hjhLde/2/ Here is a fiddle for how I want the interaction to look like but there can't be an overflow-y:scroll on the right side for scrolling. http://jsfiddle.net/y1hjhLde/3/ I would prefer the solution to be in css but if there is some way to do this in javascript that would be acceptable.
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: Prioritize scrolling in a div with overflow-y:scroll over the window

http://stackoverflow.com/comment/39784841
type: AnswerComment
score: 0
has text: does it make sense to you now?
type: Comment
comment on: http://stackoverflow.com/a/25490074

http://stackoverflow.com/q/25391668
has comment: http://stackoverflow.com/comment/39602841
has comment: http://stackoverflow.com/comment/39603217
has comment: http://stackoverflow.com/comment/39602019
type: Question
has body: I have a webpage that loads thumbnail images (they are around 150) using jquery lazy loading. As we scroll down, more images are added. The issue is, lets say you click on 70th image, it will open a new page showing the full size image, but when user go back to previous page using the browser back button, it doesn't go to that 70th image. Please remember, there are 3 images per row, so when user go backs he is not on the row the thumbnail was present. So is there any way so that when users clicks back on the browser button ( or i can add a back link if necessary) to that same thumbnail ?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39618282
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39603183
has title: Html back link to specific element
answer count: 0
tagged with: lazy-loading
type: UnansweredQuestion

http://stackoverflow.com/q/25474341
answer count: 0
upvote count: 2
has body: There are plenty of examples all over the internet, including stakoverflow, of getting location information. But every single one that I find uses HTML to include the library (&lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=true"&gt;&lt;/script&gt;) and display the information. I need to get the client location from a script, not a web page. I just need to get the location information - I don't need to display it. No HTNML - just javascript. I've tried several of the examples found on this site, but they all use the navigator.geolocation or google.maps classes, neither of which are recognized by Google Scripting. I've tried to include a resource, but maps nor navigator or any of the required APIs are in the list. I've even attempted to find a RESTful way to use the API and get a JSON response; found nothing even close. The example used in several places is this one on developers.google.com, including several appearances in stackoverflow like this one. I suppose it could be a very "newbie" issue, but I'm flummoxed!
has title: How can I get a client location using the Google Map (Geocoding) Javascript API using pure javascript?
type: Question
linked to: http://stackoverflow.com/q/19588940
tagged with: javascript
tagged with: google-maps-api-3
tagged with: google-maps
tagged with: google-geolocation
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39755914
score: 2

http://stackoverflow.com/a/25528752
has comment: http://stackoverflow.com/comment/39886483
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: &lt;script type = "text/JavaScript"&gt; function UserInput(_callback_) { var value = ""; do { value = prompt("Please type a sentence in the box and click OK", ""); } while(value === ""); _callback_(value); } UserInput(function(text){ document.write("The sentence you typed was { " + text + " }"); }); &lt;/script&gt; http://jsfiddle.net/dqda8Lgk/ I hope it will help you :)
answers question: http://stackoverflow.com/q/25526879

http://stackoverflow.com/q/25422531
tagged with: java
tagged with: webview
type: Question
linked to: http://stackoverflow.com/q/25411358
has title: Override existing Javascript function in a webpage
tagged with: javascript
has answer: http://stackoverflow.com/a/25422660
score: 0
tagged with: textarea
answer count: 1
type: UnansweredQuestion
has body: I display a webpage (not mine) in a webview. There is a Textarea, in which I need to put some text. TEXT TO CHANGE Is it possible, with addJavascriptInterface, to rewrite the existing onKeyDown (or another one) function, in order to put my text in the desired place ? Something like : webview1.addJavascriptInterface(new Object() { public void verif(String strl,int i,boolean b) { //Some code ? } }, "ok"); The textarea's name changes at each loading, and I cannot access the html textarea with another way. Any other suggestion would be welcome :-) (my goal: put a value in a webview's textarea : Put text inside a textarea in a webview)

http://stackoverflow.com/comment/39711565
has text: Hi, `$.fn.jquery` returns my jQuery version. `angular.element.fn` is undefined. Does it mean angular is not loading jQuery. I didn't change anything yet. Removing jQuery is not possible as my angular feature is embeded in a page which needs the original jQuery.
comment on: http://stackoverflow.com/a/25441435
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/111510602
type: AnswerComment
comment on: http://stackoverflow.com/a/25558084
type: Comment
has text: I have similar issue. I have two multiselects and for one it works for the other it doesn't...any ideas?
score: 0

http://stackoverflow.com/q/25504710
has comment: http://stackoverflow.com/comment/39812429
has comment: http://stackoverflow.com/comment/39811577
type: Question
has comment: http://stackoverflow.com/comment/39812587
answer count: 1
has body: HTML Element &lt;textarea placeholder="Chat with me" ref="chatInput" onKeyPress={this.handleSendMessage}&gt;&lt;/textarea&gt; JS Handler handleSendMessage: function(event){ var data = this.refs.chatInput.getDOMNode().value; if(event.keyCode == 13 &amp;&amp; data.length &gt; 1){ //sendMessage.... } else if (event.keyCode == 13 &amp;&amp; data.length == 1) { //isEmpty so do nothing } } I have an input field and I want to send a message only when ENTER is pressed and textarea is NOT BLANK. In case text area is blank I want to do nothing...so the input field will remain empty with the place holder. I have omitted the rest of the code as I deemed it irrelevant to what I am trying to achieve. I will add any additional code on request.
has comment: http://stackoverflow.com/comment/39811836
score: 0
has answer: http://stackoverflow.com/a/25505251
has title: OnKeyPress only when Enter and Not Blank
has comment: http://stackoverflow.com/comment/39812022
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39811739
has comment: http://stackoverflow.com/comment/39812527
has comment: http://stackoverflow.com/comment/39811766

http://stackoverflow.com/q/25542603
type: AnsweredQuestion
tagged with: tile
has comment: http://stackoverflow.com/comment/39881565
has answer: http://stackoverflow.com/a/25593408
has comment: http://stackoverflow.com/comment/39973569
type: Question
has body: http://www.jsfiddle.net/raenset/a0Lauk14/17 var scene; var tileset; var ROWS = 20; var COLS = 40; var SCREEN_ROWS = 15; var SCREEN_COLS = 20; var offRow = 0; var offCol = 0; var GRASS = 0; var DIRT = 1; var WATER = 2; var NUMSTATES = 3; var character; function Character(){ tCharacter = new Sprite(scene, "http://www.retroinvaders.net/media/platform/character.png", 20, 20); tCharacter.setSpeed(0); tCharacter.setPosition(10, 50); return tCharacter; } // end character def function Tile(){ tTile = new Sprite(scene, "http://www.retroinvaders.net/media/tile/grass.png", 32, 32); tTile.setSpeed(0); tTile.state = GRASS; tTile.images = new Array("http://www.retroinvaders.net/media/tile/grass.png", "http://www.retroinvaders.net/media/tile/dirt.png", "http://www.retroinvaders.net/media/tile/water.png"); tTile.row = 0; tTile.col = 0; tTile.setState = function(state){ this.state = state; this.setImage(this.images[this.state]); } // end setState tTile.getRow = function(){ return this.row; } // end getRow tTile.getCol = function(){ return this.col; } // end getCol; tTile.getState = function(){ return this.state; } // end getState return tTile; } // end Tile constructor function setupTiles(){ tileset = new Array(SCREEN_ROWS); for (row = 0; row &lt; SCREEN_ROWS; row++){ tRow = new Array(SCREEN_COLS); for (col = 0; col &lt; SCREEN_COLS; col++){ tRow[col] = new Tile(); xPos = 16 + (32 * col); yPos = 16 + (32 * row); tRow[col].setPosition(xPos, yPos); tRow[col].row = row; tRow[col].col = col; } // end col for loop tileset[row] = tRow; } // end row for loop; } // end setupTiles function showMap(){ //displays a piece of the map sized //SCREEN_ROWS x SCREEN_COLS //offset by offRow, offCol for (row = 0; row &lt; SCREEN_ROWS; row++){ for (col = 0; col &lt; SCREEN_COLS; col++){ currentVal = map[row + offRow][col + offCol]; tileset[row][col].setState(currentVal); tileset[row][col].update(); } // end col for } // end row for } // end showMap function loadMap(){ // loads a map from an array map =…
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39970932
score: 0
accepted answer: http://stackoverflow.com/a/25593408
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39881989
has comment: http://stackoverflow.com/comment/39881697
has title: tile-based collision detection in Javascript game

http://stackoverflow.com/q/25443917
has comment: http://stackoverflow.com/comment/39698435
has comment: http://stackoverflow.com/comment/39698244
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39698270
has answer: http://stackoverflow.com/a/25444023
tagged with: css
accepted answer: http://stackoverflow.com/a/25444023
answer count: 4
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25443982
downvote count: 2
type: Question
has title: Escaping double quotes in CSS selector
has comment: http://stackoverflow.com/comment/39698417
upvote count: 5
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25443982
linked to: http://stackoverflow.com/q/210377
has answer: http://stackoverflow.com/a/25444011
has answer: http://stackoverflow.com/a/25444285
linked to: http://stackoverflow.com/q/5455768
favorite count: 0
has body: I have a html tag, &lt;div style="background-image: url("resources/images/test.jpg");"/&gt; I want to target this element using CSS selector. I tried below selector but its throwing error, document.querySelector('*[style*="background-image: url("resources/images/test.jpg")"]') Error: DOM Exception: SYNTAX_ERR (12) I somehow have to escape double quotes around "resources/images/test.jpg". Please let me know if there is anyway I can escape it and target the tag.

http://stackoverflow.com/comment/39793937
comment on: http://stackoverflow.com/q/25493225
score: 0
has text: Take a peek at this and see what you think http://jsfiddle.net/LEwg8/153/
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39626755
score: 4
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25405282
has text: @SilviuBurcea: This ain't about keystrokes. It's about saving bytes.

http://stackoverflow.com/q/25464505
has title: how to show div with slide in jquery mobile?
has comment: http://stackoverflow.com/comment/39742533
has comment: http://stackoverflow.com/comment/39737347
type: Question
has comment: http://stackoverflow.com/comment/39748211
has comment: http://stackoverflow.com/comment/39737257
has comment: http://stackoverflow.com/comment/39742574
linked to: http://stackoverflow.com/q/17584627
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39742498
score: 0
has comment: http://stackoverflow.com/comment/39737308
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39742074
has body: I have Exactly same Question . Navigation tabs with jQuery mobile similar to Google Play store am trying to move one tap another using swipe left and swipe right with slide effect.but I am not able to do that .can you please tell me how we can slide as in Google app store. Here is my fiddle http://jsfiddle.net/ua3zkvwj/5/ $('div[data-role=page]').on('swipeleft, swiperight ', go); function go(event) { switch(event.type) { case 'swiperight': console.log('swiperight'); $('#registrationPage,#faqPage').toggle(false); $('#loginPage').toggle(true); break; case 'swipeleft': console.log('swipeleft'); $('#loginPage,#registrationPage').toggle(false); $('#faqPage').toggle(true); break; } } I need user can't see white screen as we use scroll or swipe js plugin ?
has comment: http://stackoverflow.com/comment/39742070
has comment: http://stackoverflow.com/comment/39738490
answer count: 0

http://stackoverflow.com/comment/39651024
type: AnswerComment
comment on: http://stackoverflow.com/a/25417879
type: Comment
has text: I'd imagine modern means "if you're on a windows that supports IE9, you're on IE11 due to windows updates, and there is literally no reason for you not to be" (ignoring intranet browsers because their requirements are irrelevant when talking about modern browsers)
score: 0

http://stackoverflow.com/q/25423085
type: UnansweredQuestion
answer count: 0
tagged with: javascript
tagged with: aptana
type: Question
has body: I just want to run some example pieces of javascript which only output to the console... just for learning. I can use Aptana OK for editing and I can wrap the js in some HTML and run it in a browser, but I cant figure out how to run it in aptana. I start the debug perspective but I can't see how to run the js file. Can anybody help me understand how to do this?
has title: Debug stand-alone JS in Aptana 3
score: 0
has comment: http://stackoverflow.com/comment/39660718
has comment: http://stackoverflow.com/comment/39660528

http://stackoverflow.com/q/25402949
has body: I've a problem with the onDeviceReady event in PhoneGap. When my app starts, I dynamically fill some fields using jQuery.text() and then I start an animated progress bar. Testing it without listening events (but writing the code in app.initialize()), everything works. Using events, the code behind works, but the DOM doesn't update. I tried to use this jQuery code line: $('.page').trigger('refresh'); and it worked fine, except for the animated progress bar. Is jQuery.trigger('refresh') a clean solution? (I think no!) How could I solve this problem? Thank you! Here's the code: var app = { dateP: "", initialize: function (date) { dateP = date; //this.actions(); this.bindEvents(); }, bindEvents: function () { document.addEventListener('deviceready', this.onDeviceReady, false); }, onDeviceReady: function () { app.receivedEvent('deviceready'); }, receivedEvent: function (id) { if (id == 'deviceready') this.actions(); }, actions: function () { var date = this.getDate(); var id = this.getDayId(date); var perc = Math.ceil((id / 365) * 100); this.shareButtonInizialize(); this.fillDivs(new Date()); $("#mainDayCounter").text("Giorno #" + this.getDayId(date)); $("#dayCounter").text("Giorno #" + this.getDayId(date)); this.setBar(perc); }, setBar: function (perc) { $("#main-page #probar").attr({ "data-pro-bar-percent": perc, "data-pro-bar-text": perc + "% \xa0" }); }, /* OTHER FUNCTIONS */ }
has comment: http://stackoverflow.com/comment/39622642
tagged with: javascript
tagged with: jquery
score: 0
tagged with: events
has comment: http://stackoverflow.com/comment/39622275
tagged with: cordova
answer count: 0
type: UnansweredQuestion
has title: PhoneGap - DOM doesn't update after onDeviceReady event
has comment: http://stackoverflow.com/comment/39623079
tagged with: dom
type: Question

http://stackoverflow.com/q/25523237
has title: How to monitor external widget in Google Analytics
accepted answer: http://stackoverflow.com/a/25523568
type: AnsweredQuestion
tagged with: google-analytics
tagged with: widget
has body: How should I proceed if my webapplication allows users to embed some of its content on 3rd party websites/blogs as an iframe widget? Currently, I have it monitored as a separate site in Google Analytics. Every frame has a GA script in the HEAD section. However this option has several drawbacks: it does not track any goals I set for it it does not show domains next to the URLs, so I do not know which websites embedded my content it shows a lot of information for the parent websites - information that I'm not interested in (i.e. refferers)
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25523568
score: 0
answer count: 1

http://stackoverflow.com/a/25464231
type: Answer
score: 0
has body: First of all seems you are confusing jQuery and php. Your server side code is php's. Now, you should check what mysql_affected_rows is really returning. &lt;?php var_dump(mysql_affected_rows()); ?&gt; And check what your page is receiving: console.log(data); If the php script is throwing a NOTICE or have a character outside php tags, the javascript code would be receiving something more than '1' or '2' Chrome has a nice console. BTW, mysql functions are deprecated. Use mysqli instead. You have procedural versions so its no big deal. http://php.net/manual/en/function.mysql-affected-rows.php
answers question: http://stackoverflow.com/q/25462008

http://stackoverflow.com/a/25454786
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39719227
has comment: http://stackoverflow.com/comment/39719173
has body: IDs are supposed to be unique, and a selector that requests an ID will only return the first one. Use a class instead. Change your HTML to: ...something ...something ...something ...something ...something ...something and change your JS to: $('.r_user').click(function(){ var alt = $(this).attr('alt'); $(this).nextAll('.reply_comment_textarea').first().val(function(i, oldval) { return oldval + alt; }); }); DEMO $(this).nextAll('reply_comment_textara') selects all of the textareas after the element you clicked on. Then .first() picks the first one, so the click will just update the textarea just below the one you clicked on. Also, you should not use your own custom attributes; alt is not a standard attribute for li elements. To store application-specific data in DOM elements, use data-XXX attributes, e.g. data-alt="@tommy ", these are specifically reserved for application use. In jQuery, you can access this with .data(), e.g. $(this).data('alt').
has comment: http://stackoverflow.com/comment/39720110
score: 1
answers question: http://stackoverflow.com/q/25454716
has comment: http://stackoverflow.com/comment/39719154
accepted answer of: http://stackoverflow.com/q/25454716
has comment: http://stackoverflow.com/comment/39720262
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39719283
has comment: http://stackoverflow.com/comment/39720422

http://stackoverflow.com/q/25475265
has comment: http://stackoverflow.com/comment/39757176
has body: I have a large text file, file1.txt(contains many numbers) and I need to access the data inside it would it faster to use an array of the numbers and use array indexing or use an object or whatever accesses the data the fastest. The file is like so, 6.9883, 7.673454, 2.563745, etc...
has comment: http://stackoverflow.com/comment/39757599
has comment: http://stackoverflow.com/comment/39757300
has comment: http://stackoverflow.com/comment/39757372
type: UnansweredQuestion
tagged with: data-access
has comment: http://stackoverflow.com/comment/39757643
has answer: http://stackoverflow.com/a/25475324
type: Question
tagged with: javascript
score: 0
has title: Fastest way to access data
answer count: 1
has comment: http://stackoverflow.com/comment/39757380

http://stackoverflow.com/q/25415450
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25415534
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39646543
tagged with: createjs
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25415534
has title: Javascript object gets set to undefined after function that creates it ends
possible better answer: http://stackoverflow.com/a/25416205
has answer: http://stackoverflow.com/a/25416205
has body: I'm using create.js, but whenever the quequeSetup() ends queque gets set to undefined, as proven by the console.log()'s. Down below is the affected snippet. var queue; function init() { queueSetup(); }; function queueSetup() { var queue = new createjs.LoadQueue(false); console.log(queue); queue.installPlugin(createjs.Sound); console.log(queue); queue.addEventListener("complete", queueLoaded); queue.loadManifest([ {id:"nbckg", src:"images/nbckg.png"}, {id:"newgame", src:"images/newgame.png"} ]); console.log(queue); } function queueLoaded() { //the following console.log logs undefined console.log(queue); compName = "NULLCOMPNAME "; stage = new createjs.Stage("MyCanvas"); createjs.Ticker.addEventListener("tick", tick); //LOAD MAINMANU // loadMainMenu(); initUI(); }

http://stackoverflow.com/comment/39888112
comment on: http://stackoverflow.com/q/25506107
score: 0
type: Comment
has text: Thank you for your suggestions, I will try to do that! : )
type: QuestionComment

http://stackoverflow.com/comment/39676039
type: Comment
has text: Yup, just `1`. I tried longer times, even up to `10000`, but that never changed anything. I'm not sure why `1` works (for the purpose to delaying the screenshot), but it does and I'm not going to question it right now.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25431392

http://stackoverflow.com/q/25467993
has answer: http://stackoverflow.com/a/25468001
favorite count: 0
has comment: http://stackoverflow.com/comment/39743793
tagged with: node.js
type: AnsweredQuestion
score: 2
downvote count: 0
has body: I am serving a page using Node.js and Express. Part of the data for that page is related to a directory of files. First just a single directory read, which means that the server has to be restarted to update the directory. var files; fs.readdir(path, function (err,data) { files = data; }); app.get('/', function (req,res) { res.render('index', {files: files}); }); And second a directory read on every request, which may affect performance. app.get('/icons', function (req,res) { fs.readdir(path, function (err,files) { res.render('index', {files: files}); }); }); Is there a significant performance differences between these two options?
type: Question
has title: Node.js performance- reading files once or on every request
accepted answer: http://stackoverflow.com/a/25468001
has comment: http://stackoverflow.com/comment/39743801
tagged with: javascript
upvote count: 2
tagged with: file-io
answer count: 1

object
tags question: http://stackoverflow.com/q/25444176
tags question: http://stackoverflow.com/q/25467823
tags question: http://stackoverflow.com/q/25456380
tag name: object
tags question: http://stackoverflow.com/q/25493715
tags question: http://stackoverflow.com/q/25414095
tags question: http://stackoverflow.com/q/25416725
tags question: http://stackoverflow.com/q/25494294
tags question: http://stackoverflow.com/q/25437327
tags question: http://stackoverflow.com/q/25499087
tags question: http://stackoverflow.com/q/25408414
tags question: http://stackoverflow.com/q/25495132
tags question: http://stackoverflow.com/q/25466173
tags question: http://stackoverflow.com/q/25399048
tags question: http://stackoverflow.com/q/25434562
tags question: http://stackoverflow.com/q/25468151
tags question: http://stackoverflow.com/q/25456013
tags question: http://stackoverflow.com/q/25529693
tags question: http://stackoverflow.com/q/25403781
tags question: http://stackoverflow.com/q/25391100
tags question: http://stackoverflow.com/q/25392326
tags question: http://stackoverflow.com/q/25535225
tags question: http://stackoverflow.com/q/25409255
tags question: http://stackoverflow.com/q/25524705
tags question: http://stackoverflow.com/q/25529278
tags question: http://stackoverflow.com/q/25500316
tags question: http://stackoverflow.com/q/25475543
tags question: http://stackoverflow.com/q/25440142
tags question: http://stackoverflow.com/q/25413309
tags question: http://stackoverflow.com/q/25457518
tags question: http://stackoverflow.com/q/25492563
tags question: http://stackoverflow.com/q/25424968
tags question: http://stackoverflow.com/q/25421233
tags question: http://stackoverflow.com/q/25478732
tags question: http://stackoverflow.com/q/25501617
tags question: http://stackoverflow.com/q/25439363
tags question: http://stackoverflow.com/q/25476706
tags question: http://stackoverflow.com/q/25505721
tags question: http://stackoverflow.com/q/25424028
tags question: http://stackoverflow.com/q/25517570
tags question: http://stackoverflow.com/q/25506223
tags question: http://stackoverflow.com/q/25472590
type: Tag
tags question: http://stackoverflow.com/q/25522040
tags question: http://stackoverflow.com/q/25422293
tags question: http://stackoverflow.com/q/25460655
tags question: http://stackoverflow.com/q/25432284
tags question: http://stackoverflow.com/q/25471520
tags question: http://stackoverflow.com/q/25412438

http://stackoverflow.com/comment/39643278
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25413617
has text: @jasondavis see this: http://stackoverflow.com/questions/9280720/serialize-multiple-forms-together
score: 0

http://stackoverflow.com/comment/39802365
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25499541
score: 1
has text: @Barmar Thanks I will do that an let you know thanks for the suggestion.

http://stackoverflow.com/comment/39608781
score: 0
has text: Don't you need `$.when.apply($, XHRs).then(f)`?
type: QuestionComment
comment on: http://stackoverflow.com/q/25395341
type: Comment

http://stackoverflow.com/a/25500117
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39803249
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25500084
has comment: http://stackoverflow.com/comment/39805591
has comment: http://stackoverflow.com/comment/39840325
answers question: http://stackoverflow.com/q/25500084
has body: you can use safely .off() before loading the .on() again to remove the previous .on() event handler you issued from the same js script you loaded $('body').off('click'); $('body').on('click', '#select-all', function(event) { console.log('Test'); }); http://api.jquery.com/off/ but as a practice why do you need to load again the event listener? I recommend you to just only load the event listener once as .on() binds event to any dynamically generated element
has comment: http://stackoverflow.com/comment/39805241
has comment: http://stackoverflow.com/comment/39803326

http://stackoverflow.com/q/25533487
downvote count: 0
has comment: http://stackoverflow.com/comment/39864758
type: AnsweredQuestion
score: 1
has body: I have a text in a textarea like this; [Some Text][2][2]:SomeText I want to change first 2 to 1. To do this I try to match [Some Text][1] by following regex regex = new RegExp("(\\[.*\\]\\[)2(\\])"); and replace it by using this code; textarea.val().replace(regex, "$11$2"); However my regex match [Some Text][2][2] and replace second 2 with 1. How can i match [Some Text][2] and replace first 2. JSFiddle
type: Question
has title: jQuery Regex wrong match
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39864723
tagged with: regex
has answer: http://stackoverflow.com/a/25533558
accepted answer: http://stackoverflow.com/a/25533558

http://stackoverflow.com/q/25501275
has comment: http://stackoverflow.com/comment/39805484
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25501592
score: 0
has comment: http://stackoverflow.com/comment/39805378
has comment: http://stackoverflow.com/comment/39805431
type: Question
has comment: http://stackoverflow.com/comment/39811998
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25501592
has body: i want to realize a processbar inside an input field. After sending the input with OK i want to transfer the field and show a short process bar. I have not found any existing solution with jquery but if someone knows something... This is my current solution whick works for scaling a 1px png. http://jsfiddle.net/kaLbrg6w/ I would like to just define a fieldset like this without any other divs behind: &lt;fieldset&gt; &lt;input name="name" type="text"&gt; &lt;/fieldset&gt; and just do the progressbar with css and js. is there a better way, maybe without loading any images, to realize a progress bar and animate it? edit there is no js yet. the plan is to animate (fake like this: http://jsfiddle.net/kaLbrg6w/1/) the progress with the BG image width. i also thought about adding a div behind or over the input field to animate it but i wanted to check for a solution where i dont have to use an extra element.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has title: Background for input field as processbar

http://stackoverflow.com/comment/39703094
has text: Try this function: [searchAndReplace](http://james.padolsey.com/javascript/find-and-replace-text-with-javascript/). Here is a demo of how it works with your given situation: [DEMO](http://jsfiddle.net/jrulle/ynv1yqju/)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25446408
type: QuestionComment

http://stackoverflow.com/a/25436504
has body: I don't think you really want to ignore the offset. That would ultimately just be replacing the offset you provided with one from your local time zone - and that would result in a completely different moment in time. Perhaps you are just looking for a way to have a moment retain the time zone it was given? If so, then use the moment.parseZone function. For example: var m = moment.parseZone("2012-12-31T00:00:00+0000"); var s = m.format(); // "2012-12-31T00:00:00+00:00" You could also achieve this with moment.utc. The difference is that moment.parseZone will retain whatever offset you give it, while moment.utc will adjust to UTC if you give it a non-zero offset.
has comment: http://stackoverflow.com/comment/53582532
has comment: http://stackoverflow.com/comment/53583893
has comment: http://stackoverflow.com/comment/53581610
has comment: http://stackoverflow.com/comment/95290527
has comment: http://stackoverflow.com/comment/53582584
type: Answer
has comment: http://stackoverflow.com/comment/53581452
answers question: http://stackoverflow.com/q/25429568
has comment: http://stackoverflow.com/comment/53582457
downvote count: 2
upvote count: 16
score: 14

http://stackoverflow.com/q/25443693
score: 2
has comment: http://stackoverflow.com/comment/39698259
favorite count: 0
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39698768
has comment: http://stackoverflow.com/comment/39698253
has body: I have a series of buttons that execute different functions when clicked. The function checks whether the user is logged in, and if so proceeds, if not it displays an overlay with ability to log in/create account. What I want to do is re-execute the button click after log-in, without the user having to reclick it. I have it working at the moment, but I'm pretty sure that what I'm doing isn't best practice, so looking for advice on how I can improve... Here's what I'm doing: setting a global variable "pending_request" that stores the function to be re-run and in the success part of the log-in ajax request calling "eval(pending_request)" Example of one of the buttons: jQuery('#maybe_button').click(function() { pending_request = "jQuery('#maybe_button').click()" var loggedin = get_login_status(); if (loggedin == true) { rec_status("maybe"); } }); . success: function(data) { if(data === "User not found"){ alert("Email or Password incorrect, please try again"); }else{ document.getElementById('loginscreen').style.display = 'none'; document.getElementById('locationover').style.display = 'none'; eval(pending_request); pending_request = ""; } }
answer count: 1
has answer: http://stackoverflow.com/a/25443855
has title: re-execute javascript after log-in
downvote count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/25435329
has body: I'm working on an Angular.js project based on ngBoilerplate. I had some environment specific issues that had to be resolved by adding a couple lines to the Angular source. I've got some other teammates who may work on this project, so I want to make sure that when they clone down the repo locally and Bower install, Angular works for them as well. What's a good method for monkey patching my fixes into the app to ensure they'll be available for others?
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: monkeypatching
favorite count: 0
tagged with: angularjs
has title: What's a good method for monkey patching Bower packages in Angular?
has answer: http://stackoverflow.com/a/25435368
upvote count: 1
tagged with: bower
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25435368
score: 1
type: Question

http://stackoverflow.com/a/25502134
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39807240
accepted answer of: http://stackoverflow.com/q/25501955
has body: You will need at least $q service to create deferred, you return deferred.promise from the function. Then you either resolve or reject it based on the result. var deferred = $q.defer(); var req = new XMLHttpRequest(); req.open('GET', url); req.onload = function() { if (req.status == 200) { deferred.resolve(req.response); } else { deferred.reject(req.statusText); } } req.onerror = function() { deferred.reject('error'); }; req.send(); return deferred.promise;
answers question: http://stackoverflow.com/q/25501955
upvote count: 2
has comment: http://stackoverflow.com/comment/39809596
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39810508

http://stackoverflow.com/q/25525467
has title: Sequelize.js create too many callbacks
tagged with: javascript
tagged with: express
score: 0
has body: developping a restful app with nodejs, expressjs and sequelizejs, I found my code doing a lot of callbacks. In particular when I'm dealing with association and creating object in db like so: // db is my database object // here are my db entities : header, line and thing // header has many line // line belongs to header // line has one thing // thing has many line db.line.create().success(function(line){ db.header.find({where:{id : header_id}}).success(function(header){ header.addLine(line).success(function(){ db.thing.find({where:{id : thing_id}}).success(function(thing){ line.setThing(thing).success(function(){ // OK }); }); }); }); }); I wanted to use return statement inside error callback but I wouldn't be able to get the created data. Do you think there is another way to do such operations without all the callbacks?
has comment: http://stackoverflow.com/comment/39862641
tagged with: sequelize.js
answer count: 1
tagged with: callback
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39908137
tagged with: node.js
has answer: http://stackoverflow.com/a/25559278
type: Question

http://stackoverflow.com/q/25436445
type: Question
possible better answer: http://stackoverflow.com/a/33121982
score: 49
has answer: http://stackoverflow.com/a/33121982
tagged with: javascript
tagged with: reactjs
upvote count: 49
tagged with: jquery
has answer: http://stackoverflow.com/a/37363616
has answer: http://stackoverflow.com/a/25514772
accepted answer: http://stackoverflow.com/a/25514772
favorite count: 0
linked to: http://stackoverflow.com/q/21903604
answer count: 4
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/38342097
has title: Using JQuery plugins that transform the DOM in React Components?
has body: Some JQuery plugins don't just add behavior to DOM nodes, but change them. For example, Bootstrap Switch turns &lt;input type="checkbox" name="my-checkbox" checked&gt; into something like &lt;div class="bootstrap-switch bootstrap-switch-wrapper bootstrap-switch-on bootstrap-switch-large bootstrap-switch-animate"&gt; &lt;div class="bootstrap-switch-container"&gt; &lt;span class="bootstrap-switch-handle-on bootstrap-switch-primary"&gt;ON&lt;/span&gt; &lt;label class="bootstrap-switch-label"&gt;&amp;nbsp;&lt;/label&gt; &lt;span class="bootstrap-switch-handle-off bootstrap-switch-default"&gt;OFF&lt;/span&gt; &lt;input type="checkbox" name="download-version" checked="" data-size="large" data-on-text="3" data-off-text="2.0.1"&gt; &lt;/div&gt; &lt;/div&gt; with $("[name='my-checkbox']").bootstrapSwitch(); Which doesn't jive with React: Uncaught Error: Invariant Violation: findComponentRoot(..., .0): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a &lt;tbody&gt; when using tables or nesting &lt;p&gt; or &lt;a&gt; tags. ...&lt;omitted&gt;...`. Is there a recommended technique for incorporating these plugins into React components? Or do they fundamentally break the assumptions of React and cannot work with it?

http://stackoverflow.com/comment/39669745
has text: @Alovchin I agree. The original question is vague enough to answer correctly. :)
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25427889

http://stackoverflow.com/a/25391401
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25391364
has body: Your script might be getting cached, try clearing your cache between refreshes.

http://stackoverflow.com/comment/39794834
has text: “You can't remove the "style" element from a DOM node.” – *citation needed*? Why shouldn’t that be possible? `removeAttribute` is a DOM method, and the element is a DOM element. Surely, you can remove whatever attribute you want from a node.
type: AnswerComment
comment on: http://stackoverflow.com/a/25495263
score: 0
type: Comment

http://stackoverflow.com/comment/39889771
type: Comment
has text: I remember doing this before, but the I didn't like it how I have to search it up completely if I wanted to change the prompt, so I made it a variable outside the function. But I wasn't aware that 'allDestination' didn't get updated inside the prompt unless the whole prompt itself got updated. At least I know now how it works now, thanks for the answer :).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25547033

http://stackoverflow.com/a/25423437
has body: You can use s:url tag to build correct path <script src="<s:url value='/js/jquery-1.11.1.js'/>"> JSTL c:url tag works similar <script src="<c:url value='/js/jquery-1.11.1.js'/>"> or use JSP EL
downvote count: 0
answers question: http://stackoverflow.com/q/25421052
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/39847235
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25519140
has text: can i give images in alert messages.i tried using img tag but it is not working
type: Comment

http://stackoverflow.com/q/25440831
has comment: http://stackoverflow.com/comment/39693201
has body: I'm a newbie and not a JS guru, so please be patient. ;) Basically, I am looking to show some content that exists inside DIV tags based upon what is in a URL string. So, for example, if some form of "window.location" does maybe a "For Each" string match to read a URL like this: /new_contacts_page.htm?Divs=div1,div3, ...in this case, only div1 and div3 would show, but a div1 and div4 would not. So, to complicate this a bit, then I would like to allow for any number of desired Divs to show as either expanded or collapsed, so just a header title might show with a [+] to allow for expanding. So, if we wanted div1 to expand, and div3 to stay collapsed until clicked to expand, the new URL might look like this: /new_contacts_page.htm?Divs=div1,div3&amp;Expand=div1. If the URL looked like this: /new_contacts_page.htm?Divs=div1,div3,div4&amp;Expand=div1,div4, ...then div1, div3, and div 4 would show, but div2 would not, and div1 and div4 would show open/expanded, but div3 would be closed/collapsed. Hope the description is Ok. ;) Thanks for any assistance. :) Erik
score: 0
tagged with: arrays
tagged with: url
tagged with: javascript
tagged with: show
tagged with: string
favorite count: 0
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/39692673
upvote count: 1
downvote count: 1
type: Question
has title: Read URL string using JS array to display output

http://stackoverflow.com/q/25405702
tagged with: javascript
has answer: http://stackoverflow.com/a/25406571
has title: Can't set select value from my controller, Angular JS
linked to: http://stackoverflow.com/q/21545850
accepted answer: http://stackoverflow.com/a/25406571
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25406517
tagged with: angularjs
has body: From this example I'm trying to set the select value from my controller and this doesn't work for me even when I set the id as explained in many questions here. The only difference is that I have a default value set with ng-init. How do I set the value from the controller? DOM: -- All orders -- {{ obj.name }} JS inside a function: $scope.orders = data; $scope.storeorder = parseInt($scope.order); // Tried without parseInt also console.log($scope.storeorder) returns the right value, but it doesn't set the right value in the browser DOM.
type: AnsweredQuestion
tagged with: select
possible better answer: http://stackoverflow.com/a/25406517
tagged with: angularjs-scope
type: Question
has answer: http://stackoverflow.com/a/25406013

http://stackoverflow.com/comment/101395917
score: 0
comment on: http://stackoverflow.com/q/25430589
type: Comment
type: QuestionComment
has text: Did you find any solution yet?

http://stackoverflow.com/comment/107748538
has text: @MehdiSouregi if you're still having this issue in a product, try increasing bufferSize to 16384. That (and reducing the run time of event handlers, as we're using React) mostly solved it for us.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25435720
score: 0

http://stackoverflow.com/comment/39836117
comment on: http://stackoverflow.com/q/25516266
type: QuestionComment
score: 0
has text: @omega You'll have to provide the coordinates of the boundaries to define the polygon — how'd you expect Google to know how the boundary you intend around a single point to be delimited based on a single pair of coordinates?
type: Comment

http://stackoverflow.com/comment/39910626
type: AnswerComment
score: 0
type: Comment
has text: I appreciate the suggestions!
comment on: http://stackoverflow.com/a/25537806

http://stackoverflow.com/q/25531838
has title: How to identify a PushState URL update via Console?
type: UnansweredQuestion
tagged with: history.js
has answer: http://stackoverflow.com/a/25532631
type: Question
tagged with: pushstate
tagged with: javascript
score: 0
answer count: 1
has body: Please could you advise me if there is a method of using the console/inspect-element/dev-tools to determine if a URL has been updated via PushState? For example if I go to http://html5.gingerhost.com/ and click between "Seatle", "London" &amp; "New York" then I know it's being updated via PushState, but how can I 'know' via the console please? A site which is being developed is using a mix of PushState &amp; ReplaceState and I'm keen to be able to see them in the dev tools console.

http://stackoverflow.com/comment/39631350
type: Comment
type: QuestionComment
score: 0
has text: To properly validate the JSON your are receiving in PHP try following: `echo file_get_contents('php://input');`
comment on: http://stackoverflow.com/q/25407347

http://stackoverflow.com/comment/39714407
comment on: http://stackoverflow.com/a/25401305
score: 0
has text: I used your code but after uploading the pages on server I am getting error - `Warning: Cannot modify header information - headers already sent by (output started at /home/cbsecop2/public_html/kv1jamnagar.in/main.php:44) in /home/cbsecop2/public_html/kv1jamnagar.in/main.php on line 48` BUT working fine on localhost For your reference site is uploaded at http://kv1jamnagar.in/main.php
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39632452
score: 0
comment on: http://stackoverflow.com/q/25408131
type: QuestionComment
has text: @Sparky I'm gonna try and disable the slider .js file and see if it'll work.
type: Comment

http://stackoverflow.com/comment/39840777
comment on: http://stackoverflow.com/q/25518424
score: 0
type: QuestionComment
has text: Sure. I have a vb.net app, where we show an html report. That report consists of one main table for each item tested. Now, the report itself consists summary, description etc in separate tables for each item. So, we have a main table for one item, and then child tables for summary, description, test results, and so on. Now, what I want to do is allow user to click an area (summary, or test results, etc) and modify it. Once user modifies everything he needs, he should be able to save the file as XML for future use. So, vb.net accesses the HTML body, and save it to a vb string.
type: Comment

http://stackoverflow.com/comment/39602872
has text: `Thoughts?` Many. Most unrelated to this question.
comment on: http://stackoverflow.com/q/25392198
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25909156
score: 0
has body: Ok, after some time I ran into similar problems. In fact I was the owner of the ~/.npm directory itself, not the root. But my problem was that some of the content of ~/.npm was mine and some was root's. That's why installing some modules worked and installing others failed. It probably happened because of me using npm install in wrong way. Following command fixed the issue: sudo chown -R tducin:tducin ~/.npm
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25470459
accepted answer of: http://stackoverflow.com/q/25470459

http://stackoverflow.com/comment/40036442
comment on: http://stackoverflow.com/a/25549872
score: 0
type: AnswerComment
has text: Say the colors is a property on the model (or controller), I suppose I would have to isolate the colors property to be handled by an ArrayController? http://emberjs.jsbin.com/zujobe/1/edit
type: Comment

jquery-svg
tag name: jquery-svg
type: Tag
tags question: http://stackoverflow.com/q/25403735

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/25413573
tags question: http://stackoverflow.com/q/25473757
tags question: http://stackoverflow.com/q/25510090
type: Tag
tags question: http://stackoverflow.com/q/25531275

http://stackoverflow.com/a/25629130
type: AcceptedAnswer
has body: The obvious answer is your option (2), which is pretty much what a CMS would be doing for you - parsing the HTTP/GET QUERY_STRING, and generating content specific to the QUERY_STRING. If you can't do this and want to keep your HTML static, then this should work, but isn't perfect. First, your HTML/JS needs to understand foo.com?path1=forms&amp;path2=optionN. This is easy - the JavaScript must read window.location and parse it. There's an example here. You can then use the values of path1 and path2 to open your menus, or whatever. Second, you have to arrange for the server to turn foo.com/forms/optionN/ into foo.com?path1=forms&amp;path2=optionN, and return it to the client. This is harder than it looks, because a rewrite like this: RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ /$1/?path2=$2&amp;path3=$3 is only visible to the server. If you do this, the client will still think it's at foo.com/forms/optionN/, and that's what you'll find in window.location, which is no good. To get around this you have to do a redirect: RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ /$1/?path2=$2&amp;path3=$3 [R] The server now explicitly sends a redirect back to the client, and the client then does a GET with the correct URI (foo.com?path1=forms&amp;path2=optionN), and the client sees the 'correct' window.location. Unfortunately, the client's address bar also changes to show the redirect URI, which isn't great, but at least it works. You'll have to modify RewriteRule for your setup - the path that gets substituted depends on your DOCUMENT_ROOT, and whether you do this in .htaccess or the config file, and so on.
accepted answer of: http://stackoverflow.com/q/25524378
type: Answer
answers question: http://stackoverflow.com/q/25524378
score: 0

http://stackoverflow.com/q/25519608
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25519679
tagged with: callback
type: Question
score: 0
has title: Function not defined in javascript object
has body: I'm trying to invoke a method using callbacks and object orientated javascript dealing with google api, but I keep getting an undefined error with the function being called. js: var generateMap = (function(){ var map; return{ offsetCenter: function(lat, lng){ lat = lat; lng = lng + .01; return new google.maps.LatLng(lat, lng); } ,initialize: function(location){ console.log("test"); var latLng = new google.maps.LatLng(location.coords.latitude, location.coords.longitude); var mapOptions = { zoom: 15, center: latLng, mapTypeId: google.maps.MapTypeId.ROADMAP, disableDefaultUI: true, draggable: false, scaleControl: false, scrollwheel: false }; map = new google.maps.Map(document.getElementById('map'), mapOptions); var newCenter = offsetCenter(location.coords.latitude, location.coords.longitude); map.setCenter(newCenter); var marker = new google.maps.Marker({ position: new google.maps.LatLng(location.coords.latitude, location.coords.longitude), title: 'Point A', map: map, draggable: false }); } ,createMap: function(){ navigator.geolocation.getCurrentPosition(initialize); } }; })(); $(document).ready(function(){ var callbacks = $.Callbacks(); callbacks.add( generateMap.createMap ); callbacks.fire(); }) Error: ReferenceError: initialize is not defined Any reason why this could be happening?
answer count: 1
has answer: http://stackoverflow.com/a/25519679
tagged with: google-maps
tagged with: javascript

http://stackoverflow.com/comment/39841716
has text: @Marcus you're welcome. Just to mention: it will work much faster, if instead of creating DOM structure from `data` string (like in your question and my answer) you will use simple JavaScript search (for example, `indexOf`) in string for another string, but code will be much more complicated (especially due to checking that found string is part of class), and in not critical situations this speeding up is not worth trying.
type: AnswerComment
comment on: http://stackoverflow.com/a/25520576
type: Comment
score: 1

http://stackoverflow.com/q/25508145
linked to: http://stackoverflow.com/q/19059580
has body: I have a few related questions about node-gd and Meteor. First couple of questions. I've tried to install node-gd in what I believe is the correct place. Does this look like I've installed it to the correct location for use with Meteor? Should I be worried about the warnings in the output? me@ubuntu:/usr/local/lib$ sudo npm install node-gd npm http GET https://registry.npmjs.org/node-gd npm http 304 https://registry.npmjs.org/node-gd &gt; node-gd@0.2.3 install /usr/local/lib/node_modules/node-gd &gt; node-gyp rebuild make: Entering directory `/usr/local/lib/node_modules/node-gd/build' CXX(target) Release/obj.target/node_gd/cpp/node-gd.o ../cpp/node-gd.cpp: In static member function ‘static v8::Handle&lt;v8::Value&gt; Gd::Image::StringFTBBox(const v8::Arguments&amp;)’: ../cpp/node-gd.cpp:1045:22: warning: variable ‘color’ set but not used [-Wunused-but-set-variable] REQ_INT_ARG(0, color); ^ ../cpp/node-gd.cpp:41:7: note: in definition of macro ‘REQ_INT_ARG’ int VAR; \ ^ SOLINK_MODULE(target) Release/obj.target/node_gd.node SOLINK_MODULE(target) Release/obj.target/node_gd.node: Finished COPY Release/node_gd.node make: Leaving directory `/usr/local/lib/node_modules/node-gd/build' node-gd@0.2.3 node_modules/node-gd me@ubuntu:/usr/local/lib$ ls node_modules python2.7 python3.4 me@ubuntu:/usr/local/lib$ cd node_modules/ me@ubuntu:/usr/local/lib/node_modules$ ls meteorite node-gd I am passing coordinates back to the server and I want to use node-gd to manipulate an image on the server. This is my Meteor method: Meteor.methods({ createImage: function(coords) { console.log('createImage') console.log(coords.x); var gd = require('gd'); } }); When I try to run this function I get this on my terminal: I20140826-06:44:18.166(-7)? Exception while invoking method 'createImage' ReferenceError: require is not defined I20140826-06:44:18.166(-7)? at Meteor.methods.createImage (app/server/server.js:7:15) I20140826-06:44:18.167(-7)? at maybeAuditArgumentChecks (packages/livedata/livedata…
has answer: http://stackoverflow.com/a/25508490
has answer: http://stackoverflow.com/a/32850290
type: AnsweredQuestion
score: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: meteor
accepted answer: http://stackoverflow.com/a/25508490
tagged with: node.js
favorite count: 0
possible better answer: http://stackoverflow.com/a/32850290
has title: Meteor/node-gd & ReferenceError: require is not defined
upvote count: 1

http://stackoverflow.com/comment/39664304
type: Comment
score: 0
has text: so there is no way to get all on the same request?
comment on: http://stackoverflow.com/q/25424986
type: QuestionComment

http://stackoverflow.com/a/25436099
downvote count: 0
has body: It should be sufficient to replace any &lt;s and &gt;s. You can also do better than just removing them - replacing them &amp;lt; and &amp;gt; respectively will allow you to safely print the characters. Try something like this: function html_escape_string(str) { return str.replace(/&lt;/g,'&amp;lt;').replace(/&gt;/g,'&amp;gt;'); }
answers question: http://stackoverflow.com/q/25435992
type: Answer
upvote count: 1
score: 1

jsfiddle
tags question: http://stackoverflow.com/q/25437381
tag name: jsfiddle
type: Tag
tags question: http://stackoverflow.com/q/25446257

http://stackoverflow.com/comment/39791783
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25493715
has text: Yes, the `in` operator.
score: 4

http://stackoverflow.com/comment/39801724
comment on: http://stackoverflow.com/q/25499199
score: 0
type: Comment
type: QuestionComment
has text: well i tried using html helpers but i cant find much difference in this scenario as i am not using any `html.beginform` or other methods to post list to controller . i been trying to construct a list later on click i post it via ajax call

http://stackoverflow.com/q/25523830
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
downvote count: 0
tagged with: jquery-mobile
tagged with: javascript
favorite count: 0
has title: Accessing mobile features by including cordova.js/phonegap.js in jsps
tagged with: android
tagged with: cordova
has body: I built a native android application using cordova and jquery mobile . On start , welcome page is shown and from that page i call a url hosted on some server. Based on the business logic server returns some jsp (designed using jQM). So now I am viewing those jsps in my in-app browser. Since jsps are designed using jquery mobile it doesn't appear that my application is running on browser but it seems to be working fine. I am happy with it. But my question is, is it possible to access native mobile features from these jsps, if I include cordova.js/phoegap.js in them?

http://stackoverflow.com/comment/39718199
comment on: http://stackoverflow.com/q/25449453
score: 0
type: QuestionComment
has text: Show us the jsFiddle.
type: Comment

http://stackoverflow.com/comment/39721439
has text: This will not work as it only binds when the DOM is loaded and not after an ajax call when new content is added.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25455824

http://stackoverflow.com/comment/39893874
comment on: http://stackoverflow.com/a/25549339
has text: I see your point about frequently posting and deleting stories. By fully opening your test site, do you see the potential dangers though? First, if you have to expose a content from test server to the world, you're creating links to content at a different domain name than the actual live content. This would create a duplicate content situation, which is a big SEO no-no. Second it would expose your test site, which may have bugs and/or security flaws to the outside world. Do you know any test endpoint Facebook provides to verify, but not 'really' register likes and such?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39759743
comment on: http://stackoverflow.com/q/25474138
score: 0
has text: @EhsanSajjad still same problem, it is loading everything else correctly but not loading elements in script tag
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39705515
score: 2
comment on: http://stackoverflow.com/q/25447924
type: Comment
type: QuestionComment
has text: You're doing comparison with regex? Why not use `===` or `==`?

http://stackoverflow.com/q/25472132
favorite count: 0
has comment: http://stackoverflow.com/comment/39756538
type: Question
has answer: http://stackoverflow.com/a/25474375
upvote count: 2
answer count: 1
accepted answer: http://stackoverflow.com/a/25474375
tagged with: javascript
has body: I'm wondering if there is an easy way to detect when a user clicks on the Google+ follow button to add us to his circles. I can't find anything in the documentation. For the +1 button, it's easy you just have to define data-callback. But what's the pattern for the Follow button?
has title: Detecting Clicks on Google Plus Follow Button (Add To Circle)
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: google-plus

http://stackoverflow.com/a/25541521
accepted answer of: http://stackoverflow.com/q/25537507
type: Answer
has body: It's working fine for me, are you sure the correct files are loaded (check the response in your browser console). The only thing that you're missing is that you're instantiating the Person widget, but you didn't bind it to a DOM node. This is working fine for me: var p = new Person({}, "person"); And then I added a DOM node called: &lt;div id="person"&gt;&lt;/div&gt; Here you can see it's just working fine: http://plnkr.co/edit/0doWDEB6C7Rbg4kU4Mtp?p=preview
has comment: http://stackoverflow.com/comment/39899080
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25537507

http://stackoverflow.com/q/25456684
tagged with: c#
tagged with: javascript
has comment: http://stackoverflow.com/comment/39783121
has title: Returning value to C# function from Javascript not working in Awesomium
score: 0
type: UnansweredQuestion
has body: My previous question went unaswered; I've made some progress in narrowing down the issue, but I only have a week left in my summer student work term and I would like to resolve this issue before I go. I currently want to return a value from a Javascript function back into C# in Awesomium. Below is the implementation of how I do it in my C# application. private void WebViewOnDomReady(object sender, EventArgs eventArgs) { webView.DomReady -= WebViewOnDomReady; webView.CreateObject("jsobject"); //webView.SetObjectCallback("jsobject", "callNETNoReturn", JSHandler); webView.SetObjectCallback("jsobject", "callNETWithReturn", JSHandler); //webView.ExecuteJavascript("myMethod()"); var result = webView.ExecuteJavascriptWithResult("myMethodProvidingReturn('foo')"); MessageBox.Show("Stuff:" + result.ToString()); } private void JSHandler(object sender, JSCallbackEventArgs args) { var result = webView.ExecuteJavascriptWithResult("myMethodProvidingReturn('foo')"); MessageBox.Show(result.ToString()); MessageBox.Show("Got method call with no return request"); } The Javascript functions in my .HTML file look like this: function myMethod() { document.write("In myMethod, calling .NET but expecting no return value.&lt;br/&gt;"); jsobject.callNETNoReturn(); } function myMethodExpectingReturn() { document.write("In myMethodExpectingReturn, calling .NET and expecting return value.&lt;br/&gt;"); var returnVal2 = jsobject.callNETWithReturn("foo"); document.write("Got value from .NET: " + returnVal2 + "&lt;br/&gt;"); } function myMethodProvidingReturn(whatToReturn) { var returnVal = whatToReturn + "bar"; document.write("Returning '" + returnVal + "' to .NET."); return returnVal; } I have narrowed it down to depending on what I load into the webview in Awesomium as the issue, using webView.LoadHTML(myString); When myString is set to a file's contents that only contain &lt;script type="text/javascript"&gt; function myMethod() { document.write("In myMethod, calling .NET but expecting no return …
tagged with: awesomium
has comment: http://stackoverflow.com/comment/39722981
answer count: 0
type: Question

http://stackoverflow.com/comment/39755737
comment on: http://stackoverflow.com/a/25473143
has text: To setup user login in minutes, `meteor add accounts-password` `meteor add accounts-ui` and invoke `{{> loginButtons}}` somewhere in your app template.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39810563
score: 1
has text: @Ahmad agreed but this is just a simple problem, the addition of a library is overkill in this situation.
comment on: http://stackoverflow.com/q/25503627
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39881498
type: AnswerComment
score: 0
has text: @Izkata yes I added a coda :)
type: Comment
comment on: http://stackoverflow.com/a/25531744

http://stackoverflow.com/comment/39696281
type: Comment
score: 1
has text: "either in the fiddle" - I don't see a jsfiddle.
type: QuestionComment
comment on: http://stackoverflow.com/q/25442833

http://stackoverflow.com/comment/39627332
score: 0
has text: In the Above mentioned Code I am Checking the from data if any entry are there in the Form.then not them to go other Page in between Else if data is not there Form serialize then i am allowing them to go other Page..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25405391

http://stackoverflow.com/comment/39779093
has text: This works, thanks! I just need to tweak it a bit to get it working with mine, I'm having trouble hiding the scrollbars
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25452213

http://stackoverflow.com/q/25412798
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has title: Prop checked checkbox for selected row(s)?
has answer: http://stackoverflow.com/a/25412863
type: UnansweredQuestion
tagged with: checkbox
tagged with: prop
has answer: http://stackoverflow.com/a/25412872
has body: On my table clicking the row will highlight it, and should also check the corresponding checkbox. Furthermore if the checkall checkbox is checked, all rows should be highlighted. If the checks remove, the highlights should be removed. I cannot give ids and would like to do this dynamically with .find() or .closest() or something similar. Any ideas? Thanks in advance! http://jsfiddle.net/7vLdxddr/3/ jQuery $('table').on('click', 'tr', function () { if ($(this).hasClass('selected')) { $(this).removeClass('selected'); } else { $('tr.selected').removeClass('selected'); $(this).addClass('selected'); } }); $("input[type=checkbox].checkall").on("click", function () { $(this).parents('.table:eq(0)').find('input:checkbox').prop('checked', this.checked); });
tagged with: selected
type: Question

http://stackoverflow.com/a/25473065
type: Answer
accepted answer of: http://stackoverflow.com/q/25472248
answers question: http://stackoverflow.com/q/25472248
has body: I solved this problem by simply adding a padding-top with value 15%
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25456106
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39721935
tagged with: css
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/39721901
has title: putting 2 objects side by side, where 1 has a fixed size in css
has body: I'm trying to put 2 elements side by side, where the second element has a fixed width of 100pixels, and the first one is to take up all the space beside it. (So if the width is 900 pixels, it would be 800 pixels). I tried doing it with percents but obviously different screen resolutions will mess it up completely. (Basically, if you've done Android programming, what I'm trying to do is have one object that's 100pixels, and the other to be of match_parent width to fill out the rest of the LinearLayout). Is this possible in pure CSS? I'm using Bootstrap 3 if that helps.
has comment: http://stackoverflow.com/comment/39721883
has comment: http://stackoverflow.com/comment/39721795
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25456168
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25456168
has answer: http://stackoverflow.com/a/25456365
accepted answer: http://stackoverflow.com/a/25456365

http://stackoverflow.com/comment/39719841
score: 1
type: AnswerComment
type: Comment
has text: yeah I discovered the adding `.` before the xpath, otherwise it wouldn't look in the right contextNode.
comment on: http://stackoverflow.com/a/25452610

http://stackoverflow.com/q/25463427
tagged with: jsp
possible better answer: http://stackoverflow.com/a/25463481
has comment: http://stackoverflow.com/comment/39735514
has answer: http://stackoverflow.com/a/25463493
has comment: http://stackoverflow.com/comment/39735705
tagged with: java
has comment: http://stackoverflow.com/comment/39735912
has answer: http://stackoverflow.com/a/25463481
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25463498
tagged with: javascript
tagged with: servlets
score: 0
has answer: http://stackoverflow.com/a/25463498
has title: can not perform form validation
answer count: 3
has body: I tried performing form validation on a registration form in jsp using javascript. I am not able to do it. The page, despite the fields being blank, is directed to next page on clicking the submit button. And strangely, the blank data is entered in the database(row is added with blank entries). Shop Online ShopOnline Home LOGIN REGISTER PRODUCTS CONTACT US <% Class.forName("oracle.jdbc.OracleDriver"); Connection con=DriverManager.getConnection ("jdbc:oracle:thin:@127.0.0.1:1521:xe","system","manhattan"); PreparedStatement ps=con.prepareStatement("select *from uinfo"); ResultSet rs=ps.executeQuery(); int n=0; while(rs.next()) { n=rs.getInt("lid"); } n++; //out.println(n); con.close(); %> REGISTRATION FORM First Name Last Name Address City Mobile No Email Login id <%=n %> Password

http://stackoverflow.com/comment/39637171
type: AnswerComment
has text: so you mean ng-change does not work? Because am essentially changing the value based on the click. right? Am a newbie to angularjs world. So bear with me.
type: Comment
comment on: http://stackoverflow.com/a/25410653
score: 0

http://stackoverflow.com/a/25428010
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25427070
answers question: http://stackoverflow.com/q/25427070
type: AcceptedAnswer
downvote count: 0
has body: First of all, thanks for taking the time to reply. In the end, I took a look at the following answer : https://stackoverflow.com/a/21477793/3186538 and I ended up with this code : TEST Now, when I click on the hyperlink, I do get a dialog box showing the Hello World message. Thanks again to everyone (and, of course, SO).
type: Answer
score: 1

http://stackoverflow.com/q/25470595
answer count: 1
has answer: http://stackoverflow.com/a/25472059
has body: I'm trying to use a module to handle my user sign up and login process. What I'd like to do is have a module with, for example, a "register" endpoint but rather than putting all the code in the one function, I'd split it into separate parts like validUsername, validPassword etc to check if the given values are acceptable. The trouble I have is that whenever this route is run, I get this error: TypeError: Object #&lt;Object&gt; has no method 'validUsername' server.js var user = require('./routes/user.js')(mongoose, bcrypt); express.post('/user', user.create); user.js module.exports = function(mongoose, bcrypt){ return { validUsername: function(username){ // Ensure a username is present if(username == null){ return false; } // Ensure it is at least 2 characters if(username.length &lt;= 2){ return false; } return true; }, validPassword: function(password){ // Ensure a password is present if(password == null){ return false; } // Ensure it is at least 9 characters if(password.length &lt; 9){ return false; } return true; }, create: function(req, res){ // Extract the new user data from the post body var username = req.body.username || null; var password = req.body.password || null; // Ensure the details are acceptable if(!this.validUsername(username)) { res.send(400,{'field':'username','error':'invalid'}); } else if(!this.validPassword(password)) { res.send(400,{'field':'password','error':'invalid'}); } else { // ... Create new user etc ... } } }; }; I'm assuming the reason for the error is because when setting up the route, only the 'create' function is passed in and therefore it is unable to "see" the rest of the functions in the same module. So how can I solve this issue and have the create function still access those validation functions when used as a route endpoint?
tagged with: node.js
type: AnsweredQuestion
has title: Node route module access other module functions
type: Question
tagged with: javascript
tagged with: express
accepted answer: http://stackoverflow.com/a/25472059
score: 0

http://stackoverflow.com/q/25418333
score: 26
accepted answer: http://stackoverflow.com/a/25419566
type: Question
upvote count: 27
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25418411
has answer: http://stackoverflow.com/a/25418411
has answer: http://stackoverflow.com/a/25419566
favorite count: 0
linked to: http://stackoverflow.com/q/44891097
has title: How to draw straight line in d3.js (horizontally and vertically)
has body: I have doubts in drawing the line graph concept. Can anybody explain these coordinates? x1=5,x2=10,y1=10,y2=30 Please explain each attribute and what it represents. Also, please give me an idea about drawing a straight line vertically and also horizontally (like a cross-hair). I am total newbie to d3.js graphs, so please help me. Any help would be appreciated.
tagged with: d3.js
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/39682277
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25434633
has text: My slideToggle no longer appears and .active is active from the beginning for all buttons. Will post html
type: AnswerComment

http://stackoverflow.com/comment/39869882
type: QuestionComment
comment on: http://stackoverflow.com/q/25535797
type: Comment
has text: While the general question is a duplicate, you can actually do exactly what you wanted pretty easily with `onclick="document.getElementsByClassName('popover')[0].remove()"`. Here's a fiddle: http://jsfiddle.net/kh3r9b07/1/
score: 0

http://stackoverflow.com/q/25392324
has comment: http://stackoverflow.com/comment/39603416
score: 1
has title: Canvas createImageData, predicting "out of memory"
tagged with: memory
type: Question
tagged with: canvas
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39603200
tagged with: out-of-memory
has comment: http://stackoverflow.com/comment/39609319
downvote count: 0
answer count: 0
type: UnansweredQuestion
has body: Looks like browsers have a memory limit to ImageData objects (or it's just takes all available to JS memory, I don't know), and when you reach it, browsers handle it differently. Firefox just throws DOMException DOMException [IndexSizeError: "Index or size is negative or greater than the allowed amount" code: 1 nsresult: 0x80530001 out of memory But Webkit-based browsers (Chrome/Opera) just freezes the tab, and then crashed. I need to know, how to predict "out of memory" error, and prevent browser tab from crashing. Here's a living example of how it will be used: http://akira.selfip.org/pj/?input=http://www.pixeljoint.com/files/icons/full/rewind_tape.gif Page will automatically try to load image, that causes out of memory error. It happens because of creating separated ImageData object for every frame of Gif file.

http://stackoverflow.com/q/25395520
accepted answer: http://stackoverflow.com/a/25401820
has body: Are input fields that don’t have name attributes susceptible to MITM attacks (w/o SSL) or any other attack? For example: Submit What I'm doing is using javascript to get the values, then posting to stripe.js, receiving a token and then clearing all the values of the CC fields (even though in my tests the values are never sent) before submitting the form to the server (token field is the only thing received). I understand that SSL would be a "good idea" but is it necessary to prevent attacks (e.g. MITM)? And "why?", if the case.
tagged with: credit-card
possible better answer: http://stackoverflow.com/a/25401891
has title: Are input fields that don’t have name=“” sent via the browser
tagged with: web
tagged with: stripe-payments
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25401820
score: 0
type: Question
answer count: 2
tagged with: ssl
tagged with: javascript
has answer: http://stackoverflow.com/a/25401891

http://stackoverflow.com/a/25489377
has comment: http://stackoverflow.com/comment/39783599
score: 1
has body: Your JavaScript works perfectly, if you give the created elements some content, or specific dimensions in CSS: var numOfWindows = 3; var arrayDiv = new Array(); for (var i = 0; i &lt; numOfWindows; i++) { arrayDiv[i] = document.createElement('div'); arrayDiv[i].id = 'block' + i; arrayDiv[i].style.backgroundColor = 'green'; arrayDiv[i].className = 'block' + i; // setting the textContent to the 'i' variable: arrayDiv[i].textContent = i; document.body.appendChild(arrayDiv[i]); } JS Fiddle demo. Or: var numOfWindows = 3; var arrayDiv = new Array(); for (var i = 0; i &lt; numOfWindows; i++) { arrayDiv[i] = document.createElement('div'); arrayDiv[i].id = 'block' + i; arrayDiv[i].style.backgroundColor = 'green'; arrayDiv[i].className = 'block' + i; // setting the class-name of the created elements: arrayDiv[i].className = 'bordered'; document.body.appendChild(arrayDiv[i]); } JS Fiddle demo.
accepted answer of: http://stackoverflow.com/q/25489308
answers question: http://stackoverflow.com/q/25489308
has comment: http://stackoverflow.com/comment/39783635
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25444332
has title: OnClientClick javascript does not rendered for asp disabled button
possible better answer: http://stackoverflow.com/a/25444884
has answer: http://stackoverflow.com/a/26470420
tagged with: asp.net
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26470420
type: Question
tagged with: onclientclick
has comment: http://stackoverflow.com/comment/39698936
tagged with: javascript
has answer: http://stackoverflow.com/a/25444884
has body: &lt;asp:TemplateField HeaderText="Desc" ItemStyle-CssClass="btnDesc"&gt; &lt;ItemTemplate&gt; &lt;asp:Button ID="btn_desc" runat="server" Enabled="&lt;%# ProcessDescButton() %&gt;" Text="&lt;%# ProcessDescText() %&gt;" OnClientClick="ButtonDescAndNotesClick(this);return false;" /&gt; &lt;/ItemTemplate&gt; &lt;HeaderStyle Width="6%" HorizontalAlign="Center" /&gt; &lt;ItemStyle Width="6%" HorizontalAlign="Center" /&gt; &lt;/asp:TemplateField&gt; This code when rendered in client does not show OnClientClick when ProcessDescButton() method returns FALSE. It only only shows OnClientClick if ProcessDescButton() it returns TRUE! I have been through different posts regarding the same issue and replaced Enabled attribute of asp:Button to generic HTML attribute "DISABLED". That works but I need to enable and disable the button based on some logic implemented in ProcessDescButton(). I am not sure what to write to make the button enabled. Disabling works if i return "disabled" from ProcessDescButton().
score: 0
answer count: 2

http://stackoverflow.com/a/25465435
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: You can also do document.getElementsByName("my_field")[0].type = "text" Which will make the password field cleartext. But the shortest way is to this is: Right click to the password field, click Inspect Element, find the type="password" and make it type="text" Last one requires minimum time and typing, but the rest works too
answers question: http://stackoverflow.com/q/25464947

http://stackoverflow.com/q/25504181
has body: Currently I'm working on a project which performs some client side validation (using Javascript) on a form when submitted and then based on an Ajax request, either makes a window.location.href redirect or submits the form to be handled by the controller. My question, what is the best way to handle this situation? Should the form be directly submitted to the controller where the request will be processed or is the current method a better approach? I feel the redirection based on the Ajax call is completely unnecessary since the controller can do this anyway.
score: 0
tagged with: ruby-on-rails-4
has answer: http://stackoverflow.com/a/25504448
answer count: 1
has title: Rails: Controller redirect vs Javascript redirect
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39810838
accepted answer: http://stackoverflow.com/a/25504448
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39811797
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/39792551
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25494016
score: 2
has text: console.log(jQuery('#' + sites[index].replace('.', '') + 'raw')) ?

http://stackoverflow.com/comment/39688683
type: AnswerComment
has text: The `.on` could be before the append, but it might have to be after the document is ready
score: 0
comment on: http://stackoverflow.com/a/25438467
type: Comment

http://stackoverflow.com/comment/39829593
comment on: http://stackoverflow.com/a/25513038
type: AnswerComment
score: 0
type: Comment
has text: well, you could do a `$("button").each(function(){show(this)})` and then in the show function `jQuery(button).remove()`

http://stackoverflow.com/a/25497914
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25497820
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25497820
has body: You can register an ajaxError event. Here is jQuery's documentation for it. A code example: $( document ).ajaxError(function() { //do your redirect(s) here }); and a JSFiddle example Note that I wanted to simply display the gist of using it, but you can also get which jqXHR object threw the error / re-route depending on which one it was.

http://stackoverflow.com/q/25455009
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39719688
has comment: http://stackoverflow.com/comment/39719756
has comment: http://stackoverflow.com/comment/39719598
score: 1
has answer: http://stackoverflow.com/a/25455155
upvote count: 1
has title: Uncaught TypeError: Cannot read property 'top' of undefined
tagged with: scrolltop
type: Question
tagged with: onscroll
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/33967793
has body: Sorry for my bad English but i've a question with a problem. Here is the message I've : Uncaught TypeError: Cannot read property 'top' of undefined Here is my function : function onScroll(event){ var scrollPos = $(document).scrollTop(); $('#menu-center a').each(function () { var currLink = $(this); var refElement = $(currLink.attr("href")); if (refElement.position().top&lt;= scrollPos &amp;&amp; refElement.position().top + refElement.heig ht() &gt; scrollPos) { $('#menu-center ul li a').removeClass("active"); currLink.addClass("active"); } else{ currLink.removeClass("active"); } }); } I don't understand because I've an other page in local with this function and it's works fine. I've search on the web but nothing correspond to my problem. Thanks for your help
tagged with: typeerror
answer count: 2
has comment: http://stackoverflow.com/comment/39719606
downvote count: 0

http://stackoverflow.com/a/25468045
answers question: http://stackoverflow.com/q/25454889
accepted answer of: http://stackoverflow.com/q/25454889
type: Answer
upvote count: 2
has body: Yes! You can customize the text size and font by overriding styles in the cascading style sheets. Take a look at the styles in https://github.com/dc-js/dc.js/blob/master/dc.css for an idea of what can be customized.
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25935917
has body: With the help of a friend, he just figured out the solution. First, we did a JavaScript postback, passing in the value like this: function ItemSelected(sender, e) { var hdnValueId = $get('&lt;%=hiddenItemId.ClientID %&gt;'); hdnValueId.value = e.get_value(); window.__doPostBack('UpdatePanelOrdersDetails', hdnValueId.value); } Then, in the ASP:Panel that contained the AutoCompleteExtender, we added the "Onload="pnlInputCat_Load" parameter. &lt;asp:Panel ID="pnlInputCat" runat="server" OnLoad="pnlInputCat_Load"&gt; Then, in the code behind, we added the pnlInputCat_Load method to look like this: protected void pnlInputCat_Load(object sender, EventArgs e) { var theId = Request["__EVENTARGUMENT"]; if (theId != null &amp;&amp; !theId.Equals(string.Empty)) { Session["ItemCode"] = Request["__EVENTARGUMENT"]; tbxCatalogQty.Focus(); } } There certainly might be better ways to make this work, but I now have the ItemCode in a session variable for later access and I could then set focus on the Catalog Qty textbox. Thanks for anyone who tried to understand/answer the above question.
accepted answer of: http://stackoverflow.com/q/25488595
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25488595
score: 0

http://stackoverflow.com/a/25431643
type: Answer
has comment: http://stackoverflow.com/comment/39677141
answers question: http://stackoverflow.com/q/25431390
score: 0
has body: (Not enough rep to comment, sorry) Unless you absolutely HAVE to use knockout for your visibility, why not do it with jQuery instead using the .show() and .hide() functions for the div worked in to your AJAX. Check for the observable item length at the end of your AJAX call and .show() if its greater than 0, otherwise it stays hidden.. (unless you need that "empty" message there)

http://stackoverflow.com/q/25545820
tagged with: facebook-javascript-sdk
tagged with: facebook-graph-api
type: UnansweredQuestion
tagged with: facebook
has body: I'm working on a Facebook sharer. It needs to be able to share both regular links (e.g. http://google.com) and Facebook content (e.g. http://facebook.com/10152718496295746). In order to do this I invoke the JS APIs as follow: FB.ui({ method: 'share', href: #LINK#, }, function(response){ console.log(response); }); But while this works just fine with regular links, it returns an error 500 on Facebook contents. EDIT It turns out that Facebook crawler won't scrape Facebook links and thus they can't be shared this way. Does anybody know a workaround for this?
type: Question
score: 0
has answer: http://stackoverflow.com/a/26490604
answer count: 1
tagged with: javascript
has title: Sharing Facebook Link via Javascript SDK returns Error 500

http://stackoverflow.com/comment/39673924
type: Comment
has text: I did this Sql1 = "SELECT COUNT (*) FROM [DYNAMICS].[dbo].[AP_Invoice_Table] WHERE DocumentNumber = '" + invoice +"'"; but that doesn't returned me a numeric value, it returned me the whole sql statement, probably I am doing something wrong or missed an step
type: AnswerComment
comment on: http://stackoverflow.com/a/25430352
score: 0

http://stackoverflow.com/comment/39726145
type: Comment
has text: Yes.., I'm getting expected json when I hit my URL in a browser. So definitly there is no problem in URL and php-script.
comment on: http://stackoverflow.com/a/25446738
type: AnswerComment
score: 0

http://stackoverflow.com/q/25397328
tagged with: datagrid
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has title: How to create a 1px border-collapsed table grid that resizes properly even if zoomed
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39636261
has comment: http://stackoverflow.com/comment/39614195
has answer: http://stackoverflow.com/a/25399370
tagged with: css
answer count: 1
has body: Okay. After much effort and annoyance, I have created a rather competent design of a 1px-bordered 15*15 grid that displays properly at different zoom levels. However, trying to compensate for min-width and min-height is a pain. This is necessary because the grid will become disproportionate at 150+% zoom as as there does not yet exist a css property like `min-width: intrinsic' for inline-block values. And while I can simply specify a default min-width that I feel will not be crossed, that seems like a bit of hack. I want to do this properly. As grids are one of the rare instances where I can and actually probably should use tables, I would like to use a table. (Yay.) If I can get my table to work correctly, I'll simply set min-width as my preferred table width (and height), job done. However, I find tables to be annoyingly quirky and quite unpredictable at different zoom levels. Firefox does not always display table-cell widths equally, and even causes weird irregular variations in the border-width of some cells. Chrome doesn't seem to keep the table square if I don't define widths on tds themselves (which kind of defeats the purpose of using a table in the first place). Display: table has the same sad behavior. And I don't even want to know what the heck IE does. Am I missing something? I would appreciate some help to create a true table that looks like my following code, yet maintains its shape and grid-border PROPERLY at different devicePixelRatios (and on different browsers). &lt;style&gt; .squares { border-left: 1px #bcafaf solid; border-top: 1px #bcafaf solid; float: left; background: black; } &lt;/style&gt; &lt;div id = "board" style = "display: inline-block; border: 1px brown solid;"&gt;&lt;/div&gt; &lt;script src = 'jquery-1.11.1.min.js'&gt;&lt;/script&gt; &lt;script&gt; $(function() { for (var i=0;i&lt;225;i++) { $('#board').append( $('&lt;div/&gt;',{ 'class':"squares", width:'2.0rem', height : '2.0rem', id : 'x'+(i+1) }) ); if (i%15===0) { $('.squares').e…
score: 0

http://stackoverflow.com/comment/39810812
has text: Could you provide part of html with your elements, and selectors which you use to find necessary element? If you need to take text from td element then all is very simple `driver.findElement(webdriver.By.css(".ng-binging")).then(function(elem){ return elem.getText().then(function(text){ expect(text).toBe("FAILED"); });})`
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25503507

http://stackoverflow.com/q/25544474
has comment: http://stackoverflow.com/comment/39885267
has comment: http://stackoverflow.com/comment/39885704
has comment: http://stackoverflow.com/comment/39884846
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39885053
has comment: http://stackoverflow.com/comment/39885365
type: Question
has comment: http://stackoverflow.com/comment/39884939
has comment: http://stackoverflow.com/comment/39885300
has comment: http://stackoverflow.com/comment/39885430
has answer: http://stackoverflow.com/a/25571604
score: 0
has comment: http://stackoverflow.com/comment/39884551
answer count: 1
has body: I'm faced with performance issues when calling an "onFocus" function within an html tag. I normally don't call functions in this manner, but I am not working with my own code. Using: jQuery 1.4.2 I have two questions: 1.) Does calling functions within html tags really decrease performance? For example: &lt;input type="text" onFocus="javascript:moveCursorToEnd(this.id)" /&gt; 2.) What I would like to do is move the cursor to the end of an input when the user focuses on the input field. However, the target device does not react properly(iPad 2 using Safari). The cursor still moves to the position that is clicked and it takes approx. 15 seconds for the function to finish. I have not really found any clean, cross browser compatible ways to move the cursor to the end of an input field. function moveCursorToEnd(id){ var currentElement=$("#"+id); var currentValue=currentElement.val(); currentElement.focus().val(String.fromCharCode(35)).val(currentValue); } Then I call the function like this: &lt;input type="text" onFocus="javascript:moveCursorToEnd(this.id)" /&gt; Is there a better way to do this, while sitll calling the function from an html tag?
tagged with: javascript
has title: Javascript performance when calling functions within html tags
has comment: http://stackoverflow.com/comment/39884701
tagged with: jquery

http://stackoverflow.com/comment/44342201
score: 0
type: AnswerComment
has text: Yep! Should be around. Looking forward to it!
type: Comment
comment on: http://stackoverflow.com/a/27771835

http://stackoverflow.com/a/26818582
score: 2
answers question: http://stackoverflow.com/q/25546094
has comment: http://stackoverflow.com/comment/42245301
has comment: http://stackoverflow.com/comment/42249434
downvote count: 0
has comment: http://stackoverflow.com/comment/43360178
upvote count: 2
type: Answer
has body: You can do this by creating a Hangout app. To have the app automatically launched when the user clicks the Hangout button, add your app_id to initial_apps parameter of the button. &lt;script src="https://apis.google.com/js/platform.js" async defer&gt;&lt;/script&gt; &lt;div id="placeholder-rr"&gt;&lt;/div&gt; &lt;script&gt; gapi.hangout.render('placeholder-rr', { 'render': 'createhangout', 'initial_apps': [{'app_id' : '184219133185', 'start_data' : 'dQw4w9WgXcQ', 'app_type' : 'ROOM_APP' }], 'widget_size': 175 }); &lt;/script&gt; or launch it directly https://plus.google.com/hangouts/_/?gid=&lt;app_id&gt; From within the app, you have to use gapi.hangout.getHangoutUrl() function to get the URL of the Hangout. Send that url using ajax

http://stackoverflow.com/a/25539295
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25537805
downvote count: 0
score: 1
has body: Personally, I would not lean on jQuery for something like this any more than you would absolutely have to. The more you steer away from doing it the knockout way, the more you run the risk of tightly coupling your view with your model (thus reducing re-usability). This becomes apparent the more your model knows about the DOM elements inside the view. It creates a tight coupling between what the model expect to be in the view when, in reality, it shouldn't be designed in such a way that it needs to know. You could just as easily place a submit binding to your form and then sanitize your data right inside of the model and it would be much much cleaner. Here is an example: &lt;form data-bind="submit: ValidateSubmit"&gt; &lt;input data-bind="value: someField" /&gt; &lt;/form&gt; var myModel = { someField: ko.observable(), ValidateSubmit: function() { //sanitize fields within model here //... //... return true; //ensures submit occurs } };

http://stackoverflow.com/a/25409663
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39636361
has comment: http://stackoverflow.com/comment/39638383
answers question: http://stackoverflow.com/q/25409571
has comment: http://stackoverflow.com/comment/39637737
type: Answer
score: 6
upvote count: 6
accepted answer of: http://stackoverflow.com/q/25409571
has comment: http://stackoverflow.com/comment/39637426
has body: When you scroll the content, the offset position actually changes as the elements move so you never get the right position. The solution is to either calculate the correct position using the amount it's already scrolled, or just store the initial offset, which seems a lot easier $(function () { $('.nav a').each(function() { $(this).data('left', $($(this).attr('href')).offset().left); }).on('click', function (event) { var $anchor = $(this); $('#content').stop().animate({ scrollLeft: $anchor.data('left') - 200 }, 1000); event.preventDefault(); }); }); FIDDLE
has comment: http://stackoverflow.com/comment/39637421

http://stackoverflow.com/comment/39859409
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25530520
type: Comment
has text: have you checked the output of it? how is it rendered in your dom?

http://stackoverflow.com/q/25520121
has answer: http://stackoverflow.com/a/25541596
answer count: 2
has answer: http://stackoverflow.com/a/25520292
has title: Show embedded picture using node (nodemailer)
tagged with: email
downvote count: 0
favorite count: 0
tagged with: nodemailer
type: UnansweredQuestion
has body: I use nodemailer to send mail with a embedded picture, var mailOption = { html: 'Embedded image: &lt;img src="cid:unique@kreata.ee"/&gt;', attachments: [{ filename: 'image.jpg', content: '/9j/4AA ... Q==', encoding: 'base64', cid: 'unique@kreata.ee' }] from: '...', to: '...', subject: '...' } var nodemailer = require('nodemailer'); var transporter = nodemailer.createTransport(); transporter.sendMail(mail, function(error, info) { ... }); I can recieved the mail from Outlook, However the picture cannot show in Outlook. I have 2 question, How to show picture in Outlook using nodemailer module (or others) How can I print the entire mail include header and body in above code.
tagged with: node.js
score: 1
upvote count: 1
type: Question
tagged with: outlook
tagged with: javascript

http://stackoverflow.com/comment/39819756
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25506264
type: AnswerComment
has text: Thanks looks great!!! - Still has shift in the month of March - don't know why? Also dates shift between Dec and Jan due to the new year and DOY resets to 1 from 365.

http://stackoverflow.com/a/25547135
answers question: http://stackoverflow.com/q/25539537
has comment: http://stackoverflow.com/comment/39892858
score: 0
type: Answer
has body: Define Your Create and Update as Functions create: function (options) { var newitem=[]; newitem.push({ id:options.data.id, publisherName:options.data.publisherName, active:false }); $.ajax({ url: BASE_URL + "admin/createPublisher.htm", dataType: "json", type: "POST" cache: false, data:{target:Json.stringify(newitem)}, success: function (result) { options.success(result); // Make sure to Return a Json back from the Server }, error: function (result) { options.error(result); } }); }, update: function (options) { // do as the create }, From your Server Method createPublisher Return a Json Back Update Define Your Schema Like this schema: { model: { id: "id", fields: { id: { editable: false, nullable: true }, publisherName: { type: "string", validation: { required: true } }, active: { type: "boolean"} } } },
has comment: http://stackoverflow.com/comment/39892622
has comment: http://stackoverflow.com/comment/39890628

http://stackoverflow.com/comment/39732451
type: QuestionComment
has text: tried both the solutions but not working.
comment on: http://stackoverflow.com/q/25458783
score: 0
type: Comment

http://stackoverflow.com/q/25469294
tagged with: jquery
has comment: http://stackoverflow.com/comment/39746127
favorite count: 0
linked to: http://stackoverflow.com/q/25468389
has answer: http://stackoverflow.com/a/25469341
score: -1
type: AnsweredQuestion
has title: Bootbox javascript confirm dialog box
downvote count: 1
accepted answer: http://stackoverflow.com/a/25469341
type: Question
has body: I have a problem with this line of code : &lt;script type='text/javascript'&gt; function delete_user( id ){ var answer = confirm('Are you sure?'); //if user clicked ok if ( answer ){ //redirect to url with action as delete and id to the record to be deleted window.location = 'delete.php?id=' + id; } } &lt;/script&gt; How to apply the bootbox.js here. i hate the old javascript dialog box. how can i change this? i already did this line : &lt;script src="bootstrap.min.js"&gt;&lt;/script&gt; still not working.
tagged with: bootbox
has answer: http://stackoverflow.com/a/25469348
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/25469337
upvote count: 0
has answer: http://stackoverflow.com/a/25469337

http://stackoverflow.com/q/25534048
tagged with: stringify
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/14645806
has comment: http://stackoverflow.com/comment/39866823
score: 0
answer count: 3
tagged with: attr
has answer: http://stackoverflow.com/a/25534092
linked to: http://stackoverflow.com/q/444080
has body: The following code: &lt;div id='idiv' name='ndiv'&gt; &lt;script&gt; var attrs = $('#idiv').attr({}) var astr = JSON.stringify(attrs) console.log (astr) &lt;/script&gt; produces in the console: {"0":{},"length":1,"context":{"location":{}},"selector":"#idiv"} Why isn't the result: {"id":"idiv","name":"ndiv"} How do I get the latter?
has comment: http://stackoverflow.com/comment/39865895
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has title: Can't get div attributes with jquery's attr()
has answer: http://stackoverflow.com/a/25534156
has comment: http://stackoverflow.com/comment/39866269
has comment: http://stackoverflow.com/comment/39866371
type: Question
accepted answer: http://stackoverflow.com/a/25534092
has answer: http://stackoverflow.com/a/25534289
possible better answer: http://stackoverflow.com/a/25534156

http://stackoverflow.com/comment/39722001
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25456058
has text: Is the syntax `new A` described in the specification?

http://stackoverflow.com/comment/39687783
score: 0
type: AnswerComment
has text: Still, check the console for errors. Also, go into the Network tab, click on the AJAX URL, and look in the Response section to see what it's sending back.
type: Comment
comment on: http://stackoverflow.com/a/25437691

http://stackoverflow.com/comment/39808739
comment on: http://stackoverflow.com/q/25502833
type: QuestionComment
type: Comment
has text: Note: There is no form submit action done in your code
score: 0

http://stackoverflow.com/q/25539183
answer count: 1
type: UnansweredQuestion
has title: CoffeeScript Class PrivateMethod which uses instance property Issue
tagged with: coffeescript
has answer: http://stackoverflow.com/a/25539319
type: Question
tagged with: javascript
has body: I am currently working on CoffeeScript and encountered annoying issue. When I make class privateMethod which is written as privateMethod = -&gt; and If I want to use @ a.k.a this property inside of the method, I get syntax error because of scope issue. see the sample code below class TestClass constructor : (@name = "NoName") -&gt; privateFunc = -&gt; console.log @name callPrivateFunc : -&gt; privateFunc() testClass = new TestClass("John") testClass.callPrivateFunc() # @name is undefined And I found 2 way to avoid the issue so far. case 1 : use .call class TestClass constructor : (@name = "NoName") -&gt; privateFunc = -&gt; console.log @name callPrivateFunc : -&gt; privateFunc.call(this) testClass = new TestClass("John") testClass.callPrivateFunc() # "John" case 2 : pass this arg as function param class TestClass constructor : (@name = "NoName") -&gt; privateFunc = (that)-&gt; console.log that.name callPrivateFunc : -&gt; privateFunc(@) testClass = new TestClass("John") testClass.callPrivateFunc() # "John" my question is, are these methods proper way to use a private method which uses this? or is there any proper way/defacto standard? Thanks for your answer
score: 0

http://stackoverflow.com/q/25487012
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39778632
has comment: http://stackoverflow.com/comment/39779067
has answer: http://stackoverflow.com/a/25487876
has body: I got several buttons created in a loop dynamically. &lt;input class="btn btn-info attribute-button" name="commit" type="button" value="first_name"&gt; And i got a text field. &lt;textarea class="text optional special form-control" data-role="tagsinput" id="campaign_message" maxlength="180" name="campaign[message]"&gt;&lt;/textarea&gt; these are created by my rails application. and this is my js code to add the value of the button into the text field $(document).on("click",".attribute-button", function(){ var value = $('.special').val($('.special').val() + $(this).val());}) what i want to do is this; when a button is pressed i can already write the content on the text are but what i want is to write them as non-editable texts.User shouldn't be able to modify the added text. http://timschlechter.github.io/bootstrap-tagsinput/examples/bootstrap-2.3.2.html i found this lib but it didn't work out for me since it doesn't support a text are.He apply tags to all inputs.But i will have tags and input texts together. how can i achieve this?
tagged with: javascript
linked to: http://stackoverflow.com/q/3297923
has answer: http://stackoverflow.com/a/25488962
type: Question
score: 0
answer count: 2
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has title: How to create a non-editable type(like tags) when a button is pressed
has comment: http://stackoverflow.com/comment/39778860
type: UnansweredQuestion

http://stackoverflow.com/a/25439998
upvote count: 1
has body: Please try this, angular.element('#YOUR-ELEMENT-SELECTOR').scope().$apply(function(scope){ scope.doStuff(); }); Another way, angular.element('.ng-scope').each(function(e, t){ console.log(t,angular.element(t).scope()); });
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25439895

http://stackoverflow.com/a/25482572
answers question: http://stackoverflow.com/q/25482550
upvote count: 1
has body: If it is possible to change markup, you may use label html element instead of span. It is been designed to do what you want (or describing here) without JavaScript. UPD: About "dropped down" select, I suggest you to read related question: How can you programmatically tell an HTML SELECT to drop down (for example, due to mouseover)?
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39659487
score: 0
type: AnswerComment
has text: hi jake745, table-resposive seems to be for bootstrap3 i am using bootstrap 2.1.1.
type: Comment
comment on: http://stackoverflow.com/a/25421471

http://stackoverflow.com/q/25538030
tagged with: angularjs
type: UnansweredQuestion
has body: I am trying to understand how best to achieve the following in angularjs. 1) I have an array of objects: $scope.myArray = [{special:false, name:'alice'}, {special:false, name:'bob'}]; if myArray[0].special changes to true, using $watch how can I detect that this was because of a change in element 0 of the array. Everything I have read on $watch deals with notifying that the array as a whole as changed but there is no way to retrieve the element/index of the array that has changed. I want to have this cope with varying lengths of arrays, so it would not suffice to simply have: $scope.watch('myArray[0].special') 2) I have a dictionary: $scope.myValues = {id1:{special:false, name:'alice'}, id2:{special:false, name:bob'}}; a similar question - if I was to change myValues.id1.special to true, how could I get the corresponding name field (or know it was id1)? I would really appreciate any help and guidance here on best practice and what is actually possible with angularjs and $watch (or $watchcollection) with respect to arrays and maps. I think this is similar to question AngularJS : Watch array of objects and animate the changed property but I'm also interested to see how to watch across all properties in a dictionary. Many many thanks in advance.
upvote count: 3
linked to: http://stackoverflow.com/q/24662600
has comment: http://stackoverflow.com/comment/39873587
has title: AngularJS : $watch property on all objects in array
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25538128
score: 2
linked to: http://stackoverflow.com/q/13980896
tagged with: arrays
answer count: 1
favorite count: 0

http://stackoverflow.com/q/25467426
upvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/16919280
has answer: http://stackoverflow.com/a/25469920
has body: I want to allow the user to switch between the visualisation of two different datasets on click. I am not an expert neither in CSS or JavaScript. I tried to replicate this example. The visualisation works in the sense that the bars are visualised when the page loads. Yet it's totally static, when I click the buttons (which in my mind should call the function bars() depressingly nothing happens. I guess I don't understand the mechanics of the click event... But also why the function exit() is never called on my bars? Here the complete html page: Bar Transition Example Dataset 1 Dataset 2 EDIT: Clicking the button actually produces a JavaScript error Uncaught TypeError: object is not a function which I don't understand since exactly the same line bars(data1) is correctly executed when the page is first loaded.
has title: Simple transition between datasets on click
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25469920
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: d3.js

http://stackoverflow.com/comment/39698277
has text: @ShujaatSiddiqui: it's so by design. If the user types fill the form and makes **an error in some field** for example then the user have chance to fix the problem without discarding **all the changes** by closing the form.
comment on: http://stackoverflow.com/a/25441414
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25507572
downvote count: 0
has comment: http://stackoverflow.com/comment/39817492
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25507412
has body: You can use jquery: $("#myID").attr("style","[Nothing here, or eventually styles to override]"); More info there: http://api.jquery.com/attr/

http://stackoverflow.com/comment/39760529
type: Comment
comment on: http://stackoverflow.com/a/25477063
score: 0
type: AnswerComment
has text: Good job adding the `relDiv` attribute and the fading class for simpler code. Wouldn't it be better to use a `data-related-el` element to stick with standards and have your page still validate? See http://stackoverflow.com/questions/994856/so-what-if-custom-html-attributes-arent-valid-xhtml

http://stackoverflow.com/q/25457421
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25462509
linked to: http://stackoverflow.com/q/20021429
linked to: http://stackoverflow.com/q/17078094
type: Question
has body: I've got an iframe that will play videos between a start and end time. When end time is reached (case 0), I want to load the almost same URL (differing at autoplay=0). The problem is that OnStateChange does not seem to register any changes after the first refresh of the iframe, and thus it doesn't reload after a second viewing and plays the video from the beginning the third time. What do I do to keep the video reloading when hitting the end time? Also, I've looked at this question here on Stack Overflow, but I couldn't make anything out of that unfortunately – though the solution might be there? (Perhaps it seems like an odd thing to do, but for the moment this is the solution I need.) Also — a somewhat unrelated question; I'm having some trouble renaming id="player" ytplayer instead. Is that not supposed to be altered? Update – I've also tried the code below, as from here, but without greater luck.
has title: OnStateChange not working after refresh of iframe
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25462509
answer count: 1
score: 1
favorite count: 0
tagged with: iframe
upvote count: 1
tagged with: youtube-api
tagged with: youtube

http://stackoverflow.com/a/25550899
answers question: http://stackoverflow.com/q/25550792
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/39896991
has body: Use a lookahead in your regex in order to match all the numbers before the first (, \d+(?=[^()]*\() Example: &gt; "10-20 bags (+£1.50)".match(/\d+(?=[^()]*\()/g); [ '10', '20' ] &gt; "20+ bags (+£1.00)".match(/\d+(?=[^()]*\()/g); [ '20' ]
score: 3
downvote count: 0

http://stackoverflow.com/comment/42256984
has text: "12. NUNEZ CHENG, Walter 74 Club Tennis Las Terr 3:44.57 123" is not matching and it doesn't have any special characters or &nbsp;. Although, coincidentally, it would have a special characters if Núñez had been spelled correctly.
score: 0
comment on: http://stackoverflow.com/q/25438846
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25522363
downvote count: 0
has body: Before you can assign a value to locate['London']['England'], you'll have to make sure that locate['London'] is an object: var locate = {}; locate['London'] = {}; locate['London']['England'] = ['Jhon','Mike']; Notice how I used an object literal ({}) instead of an array literal ([]). Arrays don't support string keys like this. You'll need to use objects instead. You can also declare it like this:: var locate = { London:{ England:["Jhon","Mike"] } }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39844540
has comment: http://stackoverflow.com/comment/39844922
answers question: http://stackoverflow.com/q/25522307
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/25522307
score: 2
has comment: http://stackoverflow.com/comment/39844505
has comment: http://stackoverflow.com/comment/39844929

http://stackoverflow.com/comment/39608827
has text: @elclanrs That totally worked! Thank you! I can mark your solution as an answer if you add it instead of a comment.
score: 0
comment on: http://stackoverflow.com/q/25395341
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39716202
has text: I think two things are related to why they cannot use '\' for escape. 1. 'and not containing any occurrences of the delimiting character.' 2. for historical reason, they don't allow '>' to appear in the attribute text. And escape string cannot deal with any of these restrictions.
comment on: http://stackoverflow.com/q/25452736
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25415985
type: Question
has title: Recline JS - Grid shows Headings but not the Data
score: 0
answer count: 1
tagged with: javascript
has body: So I'm attempting to use Recline. I've followed the tutorial and I can get the grid to show the headings but it doesn't show the data within I currently have: var data = [ {id: 0, date: '2011-01-01', x: 1, y: 2, z: 3, country: 'DE', geo: {lat:52.56, lon:13.40} }, {id: 1, date: '2011-02-02', x: 2, y: 4, z: 24, country: 'UK', geo: {lat:54.97, lon:-1.60}}, {id: 2, date: '2011-03-03', x: 3, y: 6, z: 9, country: 'US', geo: {lat:40.00, lon:-75.5}}, {id: 3, date: '2011-04-04', x: 4, y: 8, z: 6, country: 'UK', geo: {lat:57.27, lon:-6.20}}, {id: 4, date: '2011-05-04', x: 5, y: 10, z: 15, country: 'UK', geo: {lat:51.58, lon:0}}, {id: 5, date: '2011-06-02', x: 6, y: 12, z: 18, country: 'DE', geo: {lat:51.04, lon:7.9}} ]; var dataset = new recline.Model.Dataset({ records: data }); var $el = $('#mygrid'); var grid = new recline.View.SlickGrid({ model: dataset, el: $el }); grid.visible = true; grid.render(); And I have all of the dependencies they list in the tutorial. I was wondering what could be causing this to not work as expected?
has answer: http://stackoverflow.com/a/25456950
type: UnansweredQuestion

http://stackoverflow.com/comment/39872860
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25537416
has text: Still getting blank white screen, not sure what the issue is

http://stackoverflow.com/comment/39603754
type: QuestionComment
comment on: http://stackoverflow.com/q/25392512
has text: Woaa! The double || was the killer for me, all fixed! Thanks!
score: 0
type: Comment

http://stackoverflow.com/a/25456010
accepted answer of: http://stackoverflow.com/q/25455971
answers question: http://stackoverflow.com/q/25455971
type: Answer
has body: You can use the readonly attribute instead of disabled. While disabled elements do not respond to events (such as click or hover), readonly elements behave just like regular elements, although they are not editable. Disabled elements are also not sent on form submits. JSFiddle
upvote count: 15
score: 15
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40372206
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25554547
has text: I did notice that Ray, but the issue with the FileReader still is.

http://stackoverflow.com/a/25502149
type: Answer
downvote count: 0
score: 1
has body: You could compare your code to Stemkoski here: http://stemkoski.github.io/Three.js/Model-Animation-Control.html It's a model from Blender to Threejs using javascript.
upvote count: 1
answers question: http://stackoverflow.com/q/25458168

http://stackoverflow.com/comment/39803555
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25500293
has text: Show us your code in http://jsfiddle.net/
score: 0

http://stackoverflow.com/q/25526491
has comment: http://stackoverflow.com/comment/39851768
type: Question
has body: I want to show timer after user login here is code : Demo : Fiddle function startTimer_session() { var today = new Date(); var h=today.getHours() - login.getHours(); var m=today.getMinutes() - login.getMinutes(); var s=today.getSeconds() - login.getSeconds(); // add a zero in front of numbers&lt;10 h=checkTime(h); m=checkTime(m); s=checkTime(s); $('#user-timer').html(h+":"+m+":"+s); timer=setTimeout(function(){startTimer_session()},1000); } but it does not show properly, why?
has answer: http://stackoverflow.com/a/25526722
tagged with: javascript
tagged with: jquery
has title: How to show timer after user logged?
has comment: http://stackoverflow.com/comment/39851904
score: 0
answer count: 1
tagged with: jsp
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39851882

http://stackoverflow.com/a/25456726
type: Answer
upvote count: 5
answers question: http://stackoverflow.com/q/25456663
score: 5
accepted answer of: http://stackoverflow.com/q/25456663
type: AcceptedAnswer
downvote count: 0
has body: this represents the context of who called the function. When you call resetColor, it's implicitly using the top level this which is the window object. If you would like maintain context to through function calls, you can use call(). $('.class').click(function() { resetColor.call(this); }); The other obvious option is to not use this, but rather pass the element as an argument. function resetColor(e) { $(e).css({color: 'red'}); } $('.class').click(function() { resetColor(this); });

http://stackoverflow.com/a/25472919
type: Answer
answers question: http://stackoverflow.com/q/25472835
has body: You may better include html from file, not insert it as a string. You will see possible mistakes and it is a lot better editable. Or you may include it on page and hide it via css on the begining, then on clicking the "New lead" link just call $('form').show();. When you click update button, you want probably do an AJAX call, which can be easily done with the jQuery form plugin. Just include it and on the "Update" button click call $('form').ajaxForm({url: 'filethatsavesyourpostdata.php', type: 'post'})
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39752917
downvote count: 0
has comment: http://stackoverflow.com/comment/39759456
has comment: http://stackoverflow.com/comment/39753783

http://stackoverflow.com/q/25499818
type: Question
has comment: http://stackoverflow.com/comment/39802745
has body: I am trying to search a JSON from client to get specific value , linear search is working if i go with specific keys but when i search from a key in middle of json it returns nothing. Here is what i am trying $.each(jsonStr, function (i, v) { var folderID = '1408614499420'; if (v['@id'] == folderID) { alert(v.folder.file['@id']); } }); I want to search a specific folder by its id and get all files in that specific folder. Here is the Fiddle with actual json.
has comment: http://stackoverflow.com/comment/39803151
tagged with: javascript
has comment: http://stackoverflow.com/comment/39802762
has comment: http://stackoverflow.com/comment/39802709
has comment: http://stackoverflow.com/comment/39803056
has title: Search through JSON to find sepcific values
accepted answer: http://stackoverflow.com/a/25500305
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25500305
upvote count: 1

http://stackoverflow.com/a/25534840
has body: If your markup is structured as nested ul tags, I would guess something along these lines would do it: $("ul.nav li").removeClass("active"); $("#aps_menu ul.nav li:has(a[href='" + window.location + "'])").addClass("active").closest("li").addClass("active"); In pseudo: Remove all active tags Find li with matching a tag with correct href Add active to that li and also any other li tags it's nested inside of up the ancestry tree.
has comment: http://stackoverflow.com/comment/39867350
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25534638

http://stackoverflow.com/a/25413055
answers question: http://stackoverflow.com/q/25412425
has body: Instead of JavaScript, use Java to generate the image and save it to the file server. I've not used it, but zxing seems to be a popular Java based QR Code library.
type: Answer
score: 0

http://stackoverflow.com/q/25482772
type: Question
answer count: 2
tagged with: javascript
score: 0
has body: It's really hard to form my question title... I'm writing my own windows sidebar gadget , I want to show current moon phase , so I searched in internet for that and I got a websites that shows that : http://www.iceinspace.com.au/moonphase.html if I take the image url (http://www.iceinspace.com.au/moon/images/phase_150_095.jpg) and set it in image src attribute: &lt;img id="CurrentMoon" src="http://www.iceinspace.com.au/moon/images/phase_150_095.jpg"&gt;&lt;/img&gt; and I set it again when html document loads in javascript: function showFlyout(event) { document.getElementById("CurrentMoon").src = "http://www.iceinspace.com.au/moon/images/phase_150_095.jpg"; } does the picture change if it is changed in internet ??
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25483178
has title: does setting image's url in src attribute enables image to change if it is changed in internet
type: UnansweredQuestion
tagged with: windows-desktop-gadgets
has answer: http://stackoverflow.com/a/25487161
tagged with: image
tagged with: src

http://stackoverflow.com/comment/39831120
has text: what event triggers the refreshMap function? The way your code currently runs is it sets up the initialize function to run when the page load event fires, then creates a marker (map is not yet initialized as the page load event has not fired), then calls refreshMap (again before the page load event so the map is _still_ not initialized).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25514660

http://stackoverflow.com/a/31397167
downvote count: 1
has comment: http://stackoverflow.com/comment/63858130
answers question: http://stackoverflow.com/q/25509471
has body: You can just use the DedupePlugin. It looks for if the module has already been included in your build and if so, doesn't include it again. It's easy to set up and you don't need to require or install anything extra. var webpack = require("webpack"); module.exports = { // more of your config // ... plugins: [ new webpack.optimize.DedupePlugin() ] };
type: Answer
score: 2
upvote count: 3

http://stackoverflow.com/comment/39637840
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25410990
has text: http://www.w3schools.com/jsref/jsref_obj_date.asp
score: 0

http://stackoverflow.com/q/25475543
upvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25475711
has body: I need implement this in one line, if possible: I have an object var object1 = {}; object1['key_1'] = "value_1"; object1['key_2'] = "value_2"; object1['key_3'] = "value_3"; I need pass to an function one item from object (not only value ), key - only string value for (var key in object1) FunctionTemp({key:object1[key]}); // - this don't work as I need, and eval() method I don't want maybe there is something like this FunctionTemp((new {})[key]=object1[key]) - its don't work!!! :)
has answer: http://stackoverflow.com/a/25475625
has answer: http://stackoverflow.com/a/25475711
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39757898
downvote count: 0
possible better answer: http://stackoverflow.com/a/25475625
score: 1
has title: Create object with key:value in one line
type: Question
tagged with: object
tagged with: javascript
answer count: 2

http://stackoverflow.com/q/25486808
tagged with: force-layout
tagged with: javascript
has comment: http://stackoverflow.com/comment/39865965
has title: d3 force layout with node groups
has comment: http://stackoverflow.com/comment/39778385
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25535175
favorite count: 0
tagged with: d3.js
score: 2
type: AnsweredQuestion
has body: I want to achieve something like this: With the following attributes: groups are rounded rects, which never overlap every node group has a horizontal centered title at the top, at least one node, and at least one link every node has a label a type: source or target and a group every node can have multiple links the source of a link is always a source node, and the target is always a target node I have hard time to figure out how to implement this, since I started with d3.js yesterday... Currently I have something like this: js: var GraphView = Class.extend({ init: function (data) { this.data = data; }, render: function () { var width = 960; var height = 500; var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); var force = d3.layout.force() .gravity(.05) .distance(100) .charge(-500) .size([width, height]) .nodes(this.data.nodes) .links(this.data.links) .start(); var link = svg.selectAll(".link") .data(this.data.links) .enter().append("line") .attr("class", function (d) { return d.group.join(" "); }); var node = svg.selectAll(".node") .data(this.data.nodes) .enter().append("g") .attr("class", function (d) { return d.group.join(" "); }) .call(force.drag); var component = node.filter(function (d) { return d.group[1] == "component"; }); var port = node.filter(function (d) { return d.group[1] == "port"; }); var input = port.filter(function (d) { return d.group[2] == "input"; }); var output = port.filter(function (d) { return d.group[2] == "output"; }); component.append("rect") .attr("x", -8) .attr("y", -8) .attr("width", 103) .attr("height", 64) .attr("rx", 15) .attr("ry", 15); port.append("circle") .attr("r", 6); component.append("text") .attr("dx", 24) .attr("dy", "1em") .text(function (d) { return d.label }); port.append("text") .attr("dx", 12) .attr("dy", ".35em") .text(function (d) { return d.label }); force.on("tick", function () { link .attr("x1", function (d) { return d.source.x; }) .attr("y1", function (d) { return d.source.y; …
tagged with: http://stackoverflow.com/tag/svg
upvote count: 2
accepted answer: http://stackoverflow.com/a/25535175
type: Question

http://stackoverflow.com/comment/39876683
has text: Sorry I'm new to Node; but console.log("parse"); shouldnt be callback("parse");?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25539627
type: AnswerComment

http://stackoverflow.com/a/25488245
has body: Python has all(iterable) and any(iterable). So if you make a generator or an iterator that does what you want, you can test it with those functions. For example: some_is_b = any(x == 'b' for x in ary) all_are_b = all(x == 'b' for x in ary) They are actually defined in the documentation by their code equivalents. Does this look familiar? def any(iterable): for element in iterable: if element: return True return False
has comment: http://stackoverflow.com/comment/122226264
score: 76
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25488148
upvote count: 76
type: Answer
answers question: http://stackoverflow.com/q/25488148
downvote count: 0

http://stackoverflow.com/q/25444280
answer count: 1
tagged with: famo.us
has title: famo.us - garbage collection - issue
has answer: http://stackoverflow.com/a/25499439
tagged with: javascript
type: UnansweredQuestion
type: Question
score: 0
tagged with: garbage-collection
has body: I'm authoring a desktop web application using famo.us. The nature of the application is to run some animation based on user input and server responses. After running the application for some time and inspect heap, it reveals that, every single famo.us object (surfaces, views) that is created is still in memory. I have ensured that there exist no references to any of these objects from my application, but, of no use. Following is a sample code, which creates 4 surface objects (no further actions or animations). As my application does not hold reference to any of the Surface objects, I'm expecting these to be released, but, you can see there exists 4 Surface objects in heap (chrome profiling). define(function(require, exports, module) { var Engine = require("famous/core/Engine"); var Surface = require("famous/core/Surface"); var RenderController = require('famous/views/RenderController'); var mainContext = Engine.createContext(); function addSurface(){ var surface = new Surface({ size: [200, 200], content: "Hello World", classes: ["red-bg"], properties: { lineHeight: "200px", textAlign: "center" } }); mainContext.add(surface); } addSurface(); addSurface(); addSurface(); var surface = new Surface({ size: [200, 200], content: "Hello World", classes: ["red-bg"], properties: { lineHeight: "200px", textAlign: "center" } }); var rc = new RenderController(); mainContext.add(rc); rc.show(surface); rc.hide(); surface = null; mainContext = null; rc = null; Engine = null; Surface = null; RenderController = null; }); Please help me figuring out what am I missing.

http://stackoverflow.com/comment/73911507
score: 0
has text: I think from the user experience this is not entirely nice since in the event of an error, the popup has to be closed again, but it is nevertheless also the best solution we could come up with and what we ended up doing for now. So I'll mark this as the accepted answer. Thanks for the example code.
type: Comment
comment on: http://stackoverflow.com/a/39730240
type: AnswerComment

http://stackoverflow.com/q/25517662
has answer: http://stackoverflow.com/a/25517740
favorite count: 0
type: UnansweredQuestion
has title: how to call python script from javascript?
tagged with: python
score: 3
downvote count: 0
has answer: http://stackoverflow.com/a/46269858
tagged with: sqlalchemy
type: Question
has body: I have a backend python script where it retrieves the data from the sqlalchemy engine. And I would like to show the data in a search box where you can scroll down the list of data and select it. I read some answers to the similar questions like mine, (use ajax to call python script). But I'm still not clear about this. Here is my python script. # models.py from sqlalchemy import create_engine from sqlalchemy.engine.url import URL from sqlalchemy.ext.declarative import declarative_base import pandas as pd aURL = URL(drivername='mysql', username='chlee021690', database = 'recommender') engine = create_engine(aURL, echo=True) sql_command = 'SELECT product_id FROM bestbuy_data' results = pd.read_sql(sql = sql_command, con = engine) Can anybody tell me how to create javscript code to retrieve that results and render it in my form? Thanks.
tagged with: javascript
linked to: http://stackoverflow.com/q/46210672
upvote count: 3
answer count: 2
tagged with: sql

http://stackoverflow.com/a/25453610
type: Answer
score: 2
upvote count: 2
has body: The issue you encounter is due to the asynchronous nature of your code. $scope.message4 = $scope.ptfs[0]; is executed before items get pushed to $scope.ptfs. At the time of assigning message4, your array is empty. $http.get('trades.json') returns a promise. Once that promise is resolved, ie. once the server responds to your request, the callback of the then function is executed $scope.ptfs is populated.
answers question: http://stackoverflow.com/q/25453548
accepted answer of: http://stackoverflow.com/q/25453548
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39717075
has comment: http://stackoverflow.com/comment/39716974

http://stackoverflow.com/comment/39712359
comment on: http://stackoverflow.com/q/25451039
has text: @StephanWagner: *"Is there a way to find out if an data- attribute is set to an empty value or if it is not set at all?"* Not set **at all** would be not having `data-test` in the tag **at all**: ` completely missing ` If you have `data-test` in the tag but you don't give it a value, its value is `""`. E.g., ` ` and ` ` are **exactly** the same thing (with `data-*` attributes).
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/q/25500595
has comment: http://stackoverflow.com/comment/39804175
tagged with: ember.js
has answer: http://stackoverflow.com/a/25507929
score: 3
has answer: http://stackoverflow.com/a/25501803
downvote count: 1
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
upvote count: 4
answer count: 3
has body: I saw example code on https://github.com/lukemelia/jquery-ui-ember. Can some one tell me what is this.$() you can see this on jquery-ui-ember-master\jquery-ui-ember-master\js\app.js
has title: What is this.$() in Ember or JQuery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25500676

http://stackoverflow.com/a/25535251
has body: var whatKey = 'top'; var whatValue = 20; var myObject = {"chart": { "height": 400, "width": 600, "margin":{"top": 0, "right": 0, "bottom": 0, "left": 0}, "padding":{"top": 0, "right": 0, "bottom": 0, "left": 0}, "grid" : { "xEnabled":"yes", "yEnabled":"yes", "color": "#ddd" } } }; myObject.chart.padding[whatKey] = whatValue; alert(JSON.stringify(myObject)); See: http://jsfiddle.net/qc18kfmj/
has comment: http://stackoverflow.com/comment/39868466
answers question: http://stackoverflow.com/q/25535154
score: 0
has comment: http://stackoverflow.com/comment/39868961
has comment: http://stackoverflow.com/comment/39868430
has comment: http://stackoverflow.com/comment/39868169
has comment: http://stackoverflow.com/comment/39869508
type: Answer
has comment: http://stackoverflow.com/comment/39869061
has comment: http://stackoverflow.com/comment/39868534

http://stackoverflow.com/a/25495734
type: Answer
has body: This issue seems to be solved by rolling back handlebars to @1.3.0. I changed one line of code above from: to: Then I rolled back the handlebars CLI to @1.3.0: $ npm install -g handlebars@1.3.0 and re-compiled the external template: $ handlebars ./templates/name_with_partial.handlebars -f external_template_with_partial.js I'm guessing there is either an issue with partials and @v2.0.0-alpha.4 OR the partials functionality in this latest version has changed. I deserve what I get for using something with "alpha" in the name. :) Oh well, thanks for listening.
answers question: http://stackoverflow.com/q/25493950
score: 0

http://stackoverflow.com/a/25499304
has comment: http://stackoverflow.com/comment/39801829
has comment: http://stackoverflow.com/comment/39801943
has comment: http://stackoverflow.com/comment/39802200
answers question: http://stackoverflow.com/q/25499245
has comment: http://stackoverflow.com/comment/39802054
score: 0
has body: You are calling the reduce function on the content of the input array. When you have array of arrays of numbers, arr[i] is an array, and hence has the reduce method When you have array of strings, arr[i] is a string, and do not have the reduce method you tried to use. So you end up with errors
type: Answer

http://stackoverflow.com/q/25468650
has body: I have &lt;%= form_for(@lesson_feedback, remote: true) do |f| %&gt; &lt;%= f.select :feedback, options_for_select([["Great and helpful", "Great and helpful"], ["Clear and interesting but not what I'm looking for", "Clear and interesting but not what I'm looking for"], ["Okay but not interesting","Okay but not interesting"], ["Unclear or confusing", "Unclear or confusing"] ]) %&gt; &lt;!-- Lesson ID --&gt; &lt;%= f.hidden_field :lesson_id, :value =&gt; @lesson.id %&gt; &lt;%= f.submit :class =&gt; "btn btn-success" , :value =&gt; "Send feedback" %&gt; &lt;!-- :confirm =&gt; 'Your confirm message' --&gt; &lt;!-- :onclick =&gt; "clearContents();" --&gt; &lt;% end %&gt; Specifically for the below line... &lt;%= f.submit :class =&gt; "btn btn-success" , :value =&gt; "Send feedback" %&gt; The above works fine. However, when I add &lt;%= f.submit :class =&gt; "btn btn-success" , :onclick =&gt; "clearContents();", :value =&gt; "Send feedback" %&gt; the clearContents JS executes but the data doesn't get set anymore. The JS is: &lt;script&gt; function clearContents() { document.getElementById("feedback_module").innerHTML = "Thanks for your feedback! We appreciate you taking the time to leave us feedback, and we're doing our best to improve our content."; } &lt;/script&gt;
has title: How to get onclick working with form submit button?
has answer: http://stackoverflow.com/a/25471983
upvote count: 1
tagged with: ruby-on-rails
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25471983
type: Question
has comment: http://stackoverflow.com/comment/39746504
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39746850
favorite count: 0

http://stackoverflow.com/comment/39612106
type: QuestionComment
comment on: http://stackoverflow.com/q/25390467
has text: To get those CSVs open with Excel per Doubleclick or File-Open, the list separator has to be comma but the decimal separator then cannot also be comma.
score: 0
type: Comment

http://stackoverflow.com/q/25471693
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39750728
favorite count: 0
has title: I can't convert binary using this method in javascript but it works in java
has comment: http://stackoverflow.com/comment/39750683
type: Question
has body: Click me!
has answer: http://stackoverflow.com/a/25471757
score: 0
upvote count: 1
answer count: 1
downvote count: 1

http://stackoverflow.com/q/25494836
tagged with: javascript
tagged with: mocha.js
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/2801601
has title: How to check if function has a parameter and if it's number
has answer: http://stackoverflow.com/a/25495617
type: UnansweredQuestion
has body: I am new to unitTesting and using Mocha/Chai. I am trying to test if the function has a parameter and if it's a number. // Main Function function Sh(partnerUserId) { function validPartnerId(partnerUserId) { if (!partnerUserId); throw new Error("Missing partnerId"); if (isNaN(partnerUserId)); throw new Error("Not a number"); return true; } } // Unit Test var expect = chai.expect; describe("Sh", function() { it('should check if the partnerId is provided', function(){ ???? }); it('should check if the partnerId is a number', function(){ ???? }); }); I am open to suggestions if there is a better way to do it. I am trying to find how to capture the value of an argument and validate it in unit testing.
has comment: http://stackoverflow.com/comment/39795182
has answer: http://stackoverflow.com/a/25494950
tagged with: chai
has comment: http://stackoverflow.com/comment/39794617
tagged with: unit-testing
type: Question

http://stackoverflow.com/q/25428069
has comment: http://stackoverflow.com/comment/39678482
has title: startAt and endAt not working as expected using angularfire : 0.8.0
answer count: 1
has body: Using AngularFire 8.0 Bellow is the code which uses startAt and endAt to limit the data from firebase. $rootScope.$on('$firebaseSimpleLogin:login', function(e, authUser){ var queryRef = ref.startAt(authUser.uid).endAt(authUser.uid); var queryArray = $firebase(queryRef).$asArray(); queryArray.$loaded().then(function() { setCurrentUser(queryArray.$keyAt(0)); }); }); The data returned should be a single element from firebase but queryArray is empty when I use console.log for debugging. Without the use of startAt and endAt, the queryArray contains all the elements stored in the firebase.Therefore, logging queryArray.$keyAt(0) gives the First elements name as output. Which is as expected. I have checked the release notes of Firebase 8.0 as well and I don't see any changes in these limiters. Please point out if any syntactical mistake or any alternative solution which can achive the desired result. I basically want single record from the Firebase, which is my current user , authUser is the authorized user with authUser.uid as its priority. Following is the JSON file which is populated in the Firebase when a user registration happens. { "users" : { "User A" : { "md5_hash" : "d10ca8d11301c2f4993ac2279ce4b930", "setPriority" : "simplelogin:69", "username" : "User A" }, "User B" : { "md5_hash" : "2076105f6efe7c11e285add95f514b9a", "setPriority" : "simplelogin:70", "username" : "User B" }, "User C" : { "md5_hash" : "a6d14de05d7b2c3cf4fae7ae14cfa7f3", "setPriority" : "simplelogin:71", "username" : "User C" } } } After Edit Using the bellow code to get the priority: queryRef.once('value', function(nameSnapshot) { var val = nameSnapshot.getPriority(); console.log("Priority is: " + val ); }); Log output is: Priority is: null The method used to add user to the Firebase is: create: function (authUser, username) { users[username] = { md5_hash: authUser.md5_hash, username: username, setPriority: authUser.uid }; users.$update(username, { md5_hash: authUser.md5_hash, username: username,…
tagged with: angularfire
favorite count: 0
has answer: http://stackoverflow.com/a/25433303
tagged with: firebase
type: AnsweredQuestion
score: 3
tagged with: firebasesimplelogin
upvote count: 3
accepted answer: http://stackoverflow.com/a/25433303
has comment: http://stackoverflow.com/comment/39675867
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25528963
score: 1
has body: The results of all the promises are available as the $.when promise's result. They're given as the arguments to your handler: $.when.apply($, deferreds).done(function() { var products = new Products(); _.forEach(arguments, function(product) { products.add(product); }); that.trigger("claimed", products); //fire fully resolved collection });
has comment: http://stackoverflow.com/comment/39856832
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39856552
accepted answer of: http://stackoverflow.com/q/25528761
answers question: http://stackoverflow.com/q/25528761
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39856333

http://stackoverflow.com/q/25542835
favorite count: 0
has title: Best way to apply css using jQuery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: For applying CSS with '!important', we need to use looping currently since following code is not supported in IE8 and IE9 $('.YourClass').css('width','100px !important'); I come up to following solution which works in all browsers(tested on IE 8 - 11, Chrome, Firefox and Safari running on windows machines) $('.YourClass').each(function(){this.style.setProperty('width', '100px', 'important')}); Advantages: Avoid checking for existing property declaration. No need to append your css code. No need to iterate using looping. Same function can be used without using '!important'. So no need to use two different functions for same purpose. Doesn't overwrite existing inline style declaration like setting 'style' attribute by various ways. Can we make this solution better?
has answer: http://stackoverflow.com/a/25542860
type: Question
downvote count: 5
tagged with: javascript
upvote count: 0
score: -5
answer count: 1
has comment: http://stackoverflow.com/comment/40002782
tagged with: jquery

http://stackoverflow.com/comment/39856397
comment on: http://stackoverflow.com/q/25528606
score: 0
type: Comment
type: QuestionComment
has text: your codes please...

http://stackoverflow.com/a/25512617
has comment: http://stackoverflow.com/comment/39827217
type: Answer
has body: Chrome Canary has a handy feature just for this https://developer.chrome.com/devtools/docs/device-mode It will let you pick a lot of different devices and while its not a true emulator it is a useful tool for previewing.
score: 0
accepted answer of: http://stackoverflow.com/q/25512510
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25512510
has comment: http://stackoverflow.com/comment/39826978

http://stackoverflow.com/comment/39815605
comment on: http://stackoverflow.com/a/25506591
has text: thanks for your jsfiddle its a cool start, but it need to be images since i need to be able to remove them in the next step
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39855662
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25477651
has text: @JNF They do not share same HTMl, so could be 0-100px difference in height. That's why I am calculating percentage scrolled and scrolling accordingly.
score: 0

http://stackoverflow.com/q/25393091
has comment: http://stackoverflow.com/comment/39606518
has title: jQuery Sticky Waypoints Direction option not working
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins
has comment: http://stackoverflow.com/comment/39634306
score: 0
has answer: http://stackoverflow.com/a/25516515
answer count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/39605050
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25516515
has body: I am using the combination of jQuery Waypoints and it's plugin "sticky elements". Based on the documentation (http://imakewebthings.com/jquery-waypoints/shortcuts/sticky-elements/) I am using the following code $('#nav').waypoint('sticky', { direction: 'up', stuckClass: 'stuck' }); The plugin functions and the element becomes sticky, the problem is it does not seem to take in to account the direction in which the user scrolls (up or down); and it becomes sticky regardless of the direction. According tot he documentation it should only be becoming sticky on upward scrolling.
tagged with: jquery-waypoints
type: Question
has comment: http://stackoverflow.com/comment/39604894

http://stackoverflow.com/a/25479788
has comment: http://stackoverflow.com/comment/39769390
upvote count: 1
has comment: http://stackoverflow.com/comment/39765989
type: Answer
has body: Try this: $('#ContentPlaceHolderRight_FrameProjectQuickView').parent().siblings('.FrameProjectQuickView').find('#DivFirstQ‌​VTable').html("PRINT SOME TEXT");
has comment: http://stackoverflow.com/comment/39766052
has comment: http://stackoverflow.com/comment/39766061
has comment: http://stackoverflow.com/comment/39767115
downvote count: 0
answers question: http://stackoverflow.com/q/25479655
has comment: http://stackoverflow.com/comment/39765958
score: 1

http://stackoverflow.com/a/25423651
has body: i tried using the same ng-click for two elements with same name showDetail2('abc') it is working for me . can you check rest of the code which may be breaking you to move further. here is the sample jsfiddle i tried:
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25422584
score: 1
downvote count: 0

http://stackoverflow.com/a/25405465
has body: No, '===' means identical. "1" and 1 aren't identical because "1" is a string and 1 is a integer. Using '==' would return true.
type: Answer
answers question: http://stackoverflow.com/q/25405437
upvote count: 2
score: 1
downvote count: 1

http://stackoverflow.com/a/25459430
type: Answer
answers question: http://stackoverflow.com/q/25459397
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39728213
has comment: http://stackoverflow.com/comment/39728269
has body: This should work $('td &gt; textarea').length; It will give all textareas that fall under any td, if you want to specific td you can have id for td &amp; do $('#tdid &gt; textarea').length;
accepted answer of: http://stackoverflow.com/q/25459397
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39728357

http://stackoverflow.com/a/25525838
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25525782
has body: add quote(") if using padding-left or change first latter into upper case if properly have - then use paddingLeft $(".number_1").stop().animate({paddingLeft: '10px' ,height: '295px' ,width: '210px' ,opacity: 1}, 100); OR $(".number_1").stop().animate({"padding-left": '10px' ,height: '295px' ,width: '210px' ,opacity: 1}, 100);

http://stackoverflow.com/comment/39869097
comment on: http://stackoverflow.com/q/25530800
score: 0
type: Comment
has text: @Teemu I looked at that answer. Very informative. Thanks! But I still have no luck. Its funny how it works in IE but not in Chrome.
type: QuestionComment

http://stackoverflow.com/a/25432454
has comment: http://stackoverflow.com/comment/39677773
type: Answer
has body: Only apply the regex to the correct values, and use parseFloat to parse the numbers: var toReplace = ["displayAd_imp", "videoAd_imp", "tv_imp"]; and later in the code if(toReplace.indexOf(n) &gt; -1) { g[n] = parseFloat(g[n].replace(/,/g, "")); } Fiddle: http://jsfiddle.net/a8w8suo0/
answers question: http://stackoverflow.com/q/25432284
score: 0
has comment: http://stackoverflow.com/comment/39677723

http://stackoverflow.com/comment/39860559
comment on: http://stackoverflow.com/q/25531071
has text: @Satpal: Please elaborate.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39740758
has text: [`supertest` module](https://github.com/visionmedia/supertest) is the perfect tool for unit-testing REST API in node.js.
comment on: http://stackoverflow.com/q/25403164
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39653059
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25419086
has text: @Pumbaa80 you are correct. I was saying that ```_``` returns a function. By making ```someLibrary``` a function, I can type in the command ```someLibrary(someVar)```, as a opposed to ```someLibrary.someFunction(someBar)```. A framework like Ember uses an object at the top level, which means you can't type in ```Ember()```.
score: 0

http://stackoverflow.com/a/25456946
answers question: http://stackoverflow.com/q/25456894
score: 0
type: Answer
has body: Sounds like the data you're using only wraps arrays with result sets of >1. Simply wrap your result in an array: if (!location.length) { location = [location]; }
has comment: http://stackoverflow.com/comment/39724068

http://stackoverflow.com/a/25529529
has body: Rather than producing the html with server code, I assume that that's the way you're doing it, I would create and array (with the number concatenated) and after your translator executes I would user Array.sort() and then split each value. var taskType = ["Unknown|1", "Problem|2", "Incident|3", "Change Request|4"]; taskType.sort();
has comment: http://stackoverflow.com/comment/39864676
downvote count: 0
has comment: http://stackoverflow.com/comment/39879642
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39864829
answers question: http://stackoverflow.com/q/25529287

http://stackoverflow.com/comment/39752268
type: QuestionComment
comment on: http://stackoverflow.com/q/25472590
has text: [MDN: Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
score: 0
type: Comment

http://stackoverflow.com/q/25543939
has body: I have created a responsive jquery mobile menu. The problem that I am having is the jquery coding by default hides the menu and only when the image is clicked the navigation expands. This functionality is fine except when being viewed on a desktop. Because it is set up by default to not appear it is not shown. I was hoping someone could help me to show the navigation on the desktop version and when a width threshold is crossed by default the navigation doesn't appear until it is clicked. This is so when someone visits the website on a mobile device the screen isn't covered with the menu. I was also having problems retracting the menu when the image is pressed again. I have have uploaded my projected onto jsfiddle. link http://jsfiddle.net/bLbdavqu/ Thanks
tagged with: css
type: UnansweredQuestion
type: Question
tagged with: responsive-design
tagged with: javascript
has answer: http://stackoverflow.com/a/25545900
score: 0
answer count: 1
has title: Responsive Mobile Menu - Jquery Toggle
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39871068
type: QuestionComment
has text: so do you want to make tooltip or popover? :)
score: 0
comment on: http://stackoverflow.com/q/25536717
type: Comment

http://stackoverflow.com/q/25510281
tagged with: jquery
has answer: http://stackoverflow.com/a/25510353
has comment: http://stackoverflow.com/comment/39822676
has comment: http://stackoverflow.com/comment/39823067
has answer: http://stackoverflow.com/a/25512291
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39822693
has body: I have a function that runs when hovering a parent div and it should stop working when hovering a child div because there is another function for that. //Here the function should work Text // here it should stop working //Here the function should work I am conditioning it to work on parent div with if ($('.parent').is(':hover')) {do stuff} and I am interested in having something like this: if ($('.parent').is(':hover') AND NOT $('.child').is(':hover')) { do stuff }. How can I achieve this? Thanks!
tagged with: css
tagged with: hover
has title: Make function stop when hovering over an element
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39822813
has comment: http://stackoverflow.com/comment/39822714
has answer: http://stackoverflow.com/a/25510455
type: Question
tagged with: javascript
score: 0
answer count: 3

http://stackoverflow.com/comment/39618638
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25400299
has text: "Make an XHR request to your bank?" — Yes. "why would it give away your information?" — Because I'm logged in and the request is coming from my browser.
type: Comment

http://stackoverflow.com/q/25441078
has answer: http://stackoverflow.com/a/25441414
type: Question
tagged with: jqgrid
tagged with: javascript
has comment: http://stackoverflow.com/comment/39693413
possible better answer: http://stackoverflow.com/a/25441553
answer count: 2
has answer: http://stackoverflow.com/a/25441553
accepted answer: http://stackoverflow.com/a/25441414
tagged with: jquery
has comment: http://stackoverflow.com/comment/39693499
has body: i am using jqgrid and here is script. var lastsel; jQuery(document).ready(function () { jQuery("#list").jqGrid({ // url: 'TestGrid/GridData', url: 'TestGrid/GridDataLoadOnce', datatype: 'json', colNames: ['COM_NAME', 'COM_CODE', 'DELV_UNITS', 'LOT_SIZE', 'TICK_SIZE', 'TICK_VALUE'], PostData: { "id": "4" }, colModel: [ { name: 'COM_NAME', index: 'COM_NAME', width: 90, editable: true }, { name: 'COM_CODE', index: 'COM_CODE', width: 100, editable: true }, { name: 'DELV_UNITS', index: 'DELV_UNITS', width: 80, align: "right", editable: true }, { name: 'LOT_SIZE', index: 'LOT_SIZE', width: 80, align: "right", editable: true }, { name: 'TICK_SIZE', index: 'TICK_SIZE', width: 80, align: "right", editable: true }, { name: 'TICK_VALUE', index: 'TICK_VALUE', width: 150, sortable: false, editable: true } ], // multiselect:false, // select multiple rows //rowNum: 50, //pgbuttons : true, //rowTotal: 2000, // rowList: [20, 30, 50], // number of records show rowList: ReturnRowList(), // /* Event Trigger after every database hit */ // loadComplete: function (data) { // alert(jQuery.stringify(data)); // }, //rowList: "rowList" , loadonce: true, // hit only once on the server // mtype: "GET", rownumbers: true, // show the numbers on rows rownumWidth: 40, // row number's column width gridview: true, pager: '#pager', sortname: 'COM_NAME', viewrecords: true, // show the total records on the end of the page jsonReader: { page: "page", total: "total" }, // url to be called on edit editurl: "TestGrid/EditRecord", mytype: "POST", caption: "JSON Example" }); }); $(document).ready(function () { jQuery("#list").jqGrid('navGrid', '#pager', { del: true, add: false, edit: true, save: false, cancel: false, cancelicon: "ui-icon-cancel" }, {reloadAfteSubmit:true, closeAfterDelete: true, closeAfterEdit: true }, { afterSubmit: function (response) { // you should return from server OK in sucess, any other message on error alert("after Submit"); if (response.responseText == true) { alert("Update is succe…
type: AnsweredQuestion
has title: AfterSumbit event in jqgrid not working
score: 0
tagged with: asp.net-mvc-3

http://stackoverflow.com/comment/39824194
has text: http://plnkr.co/edit/JwL7yb?p=preview Like this?
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25510771
type: QuestionComment

http://stackoverflow.com/comment/39827683
type: Comment
type: QuestionComment
has text: I did try it.. after i changed the api explorer to the Graph Explorer application it did work so I guess the problem is in the app itself.. any ideas?
score: 0
comment on: http://stackoverflow.com/q/25478825

html5-video
tags question: http://stackoverflow.com/q/25455679
tags question: http://stackoverflow.com/q/25482395
tags question: http://stackoverflow.com/q/25487550
tags question: http://stackoverflow.com/q/25451687
tag name: html5-video
tags question: http://stackoverflow.com/q/25415704
tags question: http://stackoverflow.com/q/25394543
type: Tag
tags question: http://stackoverflow.com/q/25430333
tags question: http://stackoverflow.com/q/25457283
tags question: http://stackoverflow.com/q/25509713
tags question: http://stackoverflow.com/q/25514002

combobox
tags question: http://stackoverflow.com/q/25430222
tags question: http://stackoverflow.com/q/25454321
tags question: http://stackoverflow.com/q/25482554
type: Tag
tag name: combobox
tags question: http://stackoverflow.com/q/25498923

http://stackoverflow.com/q/25500031
upvote count: 0
has answer: http://stackoverflow.com/a/25500141
downvote count: 5
tagged with: javascript
tagged with: ajax
has body: I want to make an web chat system with PHP and AJAX with jQuery library, but if I do an XMLHttpRequest with a delay of 0~50ms to update the messages, I don't know if it'll work. I searched over the web trying to find a system to do this, and I found the websocket system that works great with PHP and can solve my problem, but it doesn't work on certain web browsers like IE9-. Other question, maybe I'd have about ~300 rooms running with 5~20 users online on each room, and I want to keep all the messages on my DB. Can MySQL do it fine? And how about the CPU and RAM usage?
has comment: http://stackoverflow.com/comment/39803068
has comment: http://stackoverflow.com/comment/39803041
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25500141
has title: What technology I have to use to make a web chat system?
tagged with: php
type: AnsweredQuestion
score: -5
tagged with: mysql
type: Question
tagged with: chat

http://stackoverflow.com/comment/39667116
type: Comment
comment on: http://stackoverflow.com/a/25426320
has text: yes that happens when we use the directive but we do not have that controller written there.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39709609
type: Comment
comment on: http://stackoverflow.com/q/25450036
type: QuestionComment
score: 0
has text: where is "html" variable?

http://stackoverflow.com/comment/39637274
comment on: http://stackoverflow.com/q/25410332
has text: Maybe this would make a better meta-post, but why would this question be considered a duplicate just because it involves a similar topic matter?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25394441
downvote count: 1
type: Question
has title: accessing returned promise object array values
has comment: http://stackoverflow.com/comment/39607238
has body: I'm trying to access the length of an array returned from the promise object. However, I'm not getting any luck for it to work as it returns undefined when i check the array itself, and i try to access the specific element its says cannot read property from the chrome console f {$promise: Object, $resolved: false, $get: function, $save: function, $query: function…} $promise: Object $resolved: true address: "1600 amphitheatre way , Mountain View, CA 94043" address_1: "1600 amphitheatre way " address_2: "Mountain View, CA 94043" affiliation_attributes: Array[0] award_attributes: Array[0] certification_attributes: Array[0] description: "" description_read_more: false education_attributes: Array[1] id: 1 lat: "37.422003" lng: "-122.083978" name: "Gio Wong" phone: "650-701-6411" photos: Array[3] practice_name: "Super Doctor" rating: null rating_url: null salutation: "DDS" services: Array[4] specialty: "Pediatrician" __proto__: f I'm trying to access education,affiliation, award and certification attributes. The following code is how i print to console and how the promise object is get $scope.provider = Provider.get($routeParams.name); console.log($scope.provider) how do i access $scope.provider.education_attributes.length? or even $scope.provider.education_attributes[0]? both returned cannot read property.
tagged with: arrays
tagged with: javascript
score: 0
answer count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25394600

http://stackoverflow.com/comment/39785002
type: QuestionComment
comment on: http://stackoverflow.com/q/25490000
score: 0
has text: If the server-side part can remain server-side, try node-webkit: https://github.com/rogerwang/node-webkit
type: Comment

http://stackoverflow.com/q/25514510
has answer: http://stackoverflow.com/a/25515139
favorite count: 0
possible better answer: http://stackoverflow.com/a/25514631
tagged with: handlebars.js
upvote count: 1
has answer: http://stackoverflow.com/a/25514631
type: Question
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25515139
has comment: http://stackoverflow.com/comment/39830989
answer count: 2
downvote count: 0
has body: I'm looking to implement UI binding in a Backbone application using handlebars. I've put together a simple example to demonstrate the design pattern but I've noticed it is not going to scale very well because it requires rendering the entire template every time a model value is changed. Is there a way to update individual values in a handlebars template instead of needing to re-render the entire template? HTML: JS: var TestModel = Backbone.Model.extend({ defaults: { title: "Test", description: "This is a test description!", active: false } }); var TestView = Backbone.View.extend({ template: Handlebars.compile($("#entry-template").html()), events: { "click [data-class='toggleActive']": "toggleActive" }, initialize: function(){ this.model = new TestModel(); this.render(); this.model.on("change", this.renderUI, this); }, render: function(){ var self = this; $('body').html(self.$el.html(self.template(self.model.toJSON()))); }, renderUI: function(){ this.$el.html(this.template(this.model.toJSON())); }, toggleActive: function(){ var isActive = this.model.get("active"); this.model.set("active", !isActive); } }); var testView = new TestView();
tagged with: javascript
has title: Backbone UI Model binding with Handlebars
tagged with: backbone.js

http://stackoverflow.com/comment/43975849
has text: This merely seems to create a vmxxx.js file on the stack in chrome. not saying that it came from x.js
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27555963
type: AnswerComment

http://stackoverflow.com/comment/39599199
type: QuestionComment
comment on: http://stackoverflow.com/q/25390392
has text: Why a text file if you're trying to target client-side only? Have you considered local storage of some sort?
score: 2
type: Comment

http://stackoverflow.com/comment/39845346
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25522772
has text: they used drop down option instead of input tag..
score: 0

http://stackoverflow.com/comment/39832388
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25515348
has text: $(window).load(function() { /your code here });

http://stackoverflow.com/a/25543324
has comment: http://stackoverflow.com/comment/39953350
upvote count: 5
has comment: http://stackoverflow.com/comment/39967068
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39948852
score: 5
has body: if you are using Angular.js 1.2 or above, you have access to the Strict Contextual Escaping Service, $sce. SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for security vulnerabilities such as XSS, clickjacking, etc. a lot easier. within $sce, you can pass a variable to $sce.trustAsUrl(value) to obtain it's original value. So you should be able to use: $scope.action = $sce.trustAsUrl("http://www.somesite.com");
answers question: http://stackoverflow.com/q/25543129
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25543129

http://stackoverflow.com/comment/39820260
type: Comment
comment on: http://stackoverflow.com/q/25506827
score: 1
type: QuestionComment
has text: [Here's a plunker](http://plnkr.co/edit/b33Ow1RVsVFQE5FXXVqB) to what I am trying to do but it still doesnt seem to be working and again, I am unsure why.

http://stackoverflow.com/comment/39813498
has text: Thanks. I corrected, but it still doesn't work. I tried to replace [+= document.getElementsByTagName("input")[0].value] for [+= "some text"] - nothing happens either.
comment on: http://stackoverflow.com/a/25504146
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39858444
comment on: http://stackoverflow.com/a/25529963
type: AnswerComment
score: 0
type: Comment
has text: haw sorry for the mistake

http://stackoverflow.com/comment/39891086
comment on: http://stackoverflow.com/a/25510666
score: 1
type: AnswerComment
has text: For scrolling the table, I would guess instead of $(window).scrollBy(x, y); you could do $('table.selector').scrollBy(x,y);
type: Comment

http://stackoverflow.com/q/25538860
tagged with: hashtag
possible better answer: http://stackoverflow.com/a/25538889
has answer: http://stackoverflow.com/a/25538889
has answer: http://stackoverflow.com/a/47536084
type: Question
has answer: http://stackoverflow.com/a/52713023
linked to: http://stackoverflow.com/q/18268256
tagged with: javascript
has answer: http://stackoverflow.com/a/25538880
has answer: http://stackoverflow.com/a/68614838
linked to: http://stackoverflow.com/q/35102342
has answer: http://stackoverflow.com/a/75242330
has title: Extracting hashtags out of a string.
has body: If I had a string as such var comment = "Mmmm #yummy #donut at #CZ" How can I get a list of hash tags that exist in the string variable? I tried using JavaScript split() method but I have to keep splitting all strings created from the initial split string. Is there a simpler way of doing this?
has comment: http://stackoverflow.com/comment/39874933
downvote count: 0
answer count: 7
has comment: http://stackoverflow.com/comment/39874931
favorite count: 0
has answer: http://stackoverflow.com/a/56954025
accepted answer: http://stackoverflow.com/a/25538880
score: 13
upvote count: 13
type: AnsweredQuestion

http://stackoverflow.com/comment/39816621
comment on: http://stackoverflow.com/q/25506827
has text: Can you put all three directives in a fiddle or plunker? The only thing I see wrong is in the link function the function receives an array of controllers, not each controller individually (unless that's changed).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25422529
has comment: http://stackoverflow.com/comment/39658978
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39658893
answers question: http://stackoverflow.com/q/25422225
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25422225
has body: Here's a working version: http://jsbin.com/tepocevakolo/3/edit You need negative background positions to shift down/right. function loademoji(RowCount,ColumnCount){ var toAppend = " "; for (i = 0; i < RowCount; i++) { toAppend += " "; for (j = 0; j < ColumnCount; j++) { toAppend += " "; } toAppend += " "; } toAppend += " "; return toAppend; } EDIT (changed 19 -> 17). Also note the CSS is slightly modified width:17px; height:17px;
has comment: http://stackoverflow.com/comment/39658802
type: AcceptedAnswer

http://stackoverflow.com/a/25522260
has comment: http://stackoverflow.com/comment/39844776
has body: First of all it's not a stupid question. You need to have the selected choices, you can check them one by one or store them first in an array then calculate score (like i did): var questionArr = [ { 'questionId' : 'Question1', 'question' : 'Q1: How many Objects are there? ', 'choices' : [ {"id" : "10", "tf" : false, "points" : 0}, {'id' : "11", "tf" : false, "points" : 0}, {'id' : "12", "tf" : false, "points" : 0}, {'id' : "15", "tf" : true, "points" : 10}, {'id' : "16", "tf" : false, "points" : 0} ], 'Mchoice' : false, 'completed' : false }, { 'questionId' : 'Question2', 'question' : 'Q2: some Question will go here? ', 'choices' : [ {'id' : "answer1", "tf" : true, "points" : 5}, {'id' : "answer2", "tf" : false, "points" : 1}, {'id' : "answer3", "tf" : false, "points" : 1}, {'id' : "answer4", "tf" : true, "points" : 10} ], 'Mchoice' : true, 'completed' : false } ] var selectedChoicesArray = ["10", "answer4"] //choices that user selected as answers var sum = 0; for(var i=0; i&lt;questionArr.length; i++) { for(var j=0; j&lt;questionArr[i].choices.length; j++){ if(questionArr[i].choices[j].id == selectedChoicesArray[i]) //the choice which user selected sum += questionArr[i].choices[j].points //matched choice's points will be added to the sum } } alert("Sum: "+sum); in this case, as selectedChoicesArray presents, user selected first choice for question1 and fourth choice for answer 2, hence, the sum will be 10! if you change it to: var selectedChoicesArray = ["15", "answer1"]; sum will be 15 in this case. Hopefully you'll understand those loops they're fairly straightforward. See the demo here
has comment: http://stackoverflow.com/comment/39844471
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25521858
answers question: http://stackoverflow.com/q/25521858
type: Answer

http://stackoverflow.com/comment/39681003
type: Comment
comment on: http://stackoverflow.com/a/25433620
type: AnswerComment
has text: @Maverick2007:- You may try this regex then:- `/^\S+$/`
score: 0

credit-card
tags question: http://stackoverflow.com/q/25395520
tag name: credit-card
type: Tag

http://stackoverflow.com/q/25486097
has title: Toggle 2 div with one onclick
has answer: http://stackoverflow.com/a/25486206
upvote count: 1
type: Question
has body: I have 2 divs which i need to toggle them with one button, the first one slide Up and the second one slide down. HTML dasdasdasdasd Toggle 'em JQuery $( "button" ).click(function() { $( "#nav" ).slideUp(); }); Can anybody help me out? JSFIDDLE
has answer: http://stackoverflow.com/a/25486251
score: 1
has answer: http://stackoverflow.com/a/25486171
answer count: 6
has answer: http://stackoverflow.com/a/25486190
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25486122
has answer: http://stackoverflow.com/a/25486160
has comment: http://stackoverflow.com/comment/39776997
type: UnansweredQuestion

http://stackoverflow.com/q/25426358
tagged with: javascript
has title: automatization of web browsing with JavaScripts under python
tagged with: python
tagged with: web
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25427795
upvote count: 1
score: 1
type: Question
answer count: 1
downvote count: 0
has body: I'm looking for a package/way to automatize web browsing. For example, I have these results of the search (sorry for Russian): http://www.consultant.ru/search/?q=N+145-%D0%A4%D0%97+%D0%BE%D1%82+31.07.1998 I want to retrieve a value of the variable “item.n” (line 399) from python? It looks like it’s an internal variable of the Javascript function “onSearchLoaded” but if you put the mouse pointer on the result of the search you will see that n=160111 - that’s the value of item.n I’m trying to get What are the packages in python that could help me to do that?

http://stackoverflow.com/comment/39647276
comment on: http://stackoverflow.com/a/25415915
has text: Ok, so would I change the manifest.json to `"background": { "scripts": ["check.js"] }` ?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25445836
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39702045
score: 1
has body: This is part of my iPhone weather widget. My touch event seems to work fine, i.e when the user taps the touch area everything does what it should, the problem is when the user swipes the screen (to go to next springboard page) it swipes ok but the swipe also triggers my touch event. How can I stop the native swipe from firing my touch event? Thank you for any help. BTW, "touch" is my defined touch area and "ChangeToClick" just makes it workable on the Mac/PC. function init() { if ((EnableTouch == true) &amp;&amp; (AnimationsOnly == false)) { StartTouch(); } if (ChangeToClick == false) { var touchmode = "touchend"; } else { var touchmode = "click"; } function StartTouch() { document.getElementById("touch").addEventListener(touchmode, touchAnimation, false); } var forecastdisplay = true; var hourlyForecastDisplay = false; function touchAnimation() { if (forecastdisplay == false) { document.getElementById("forecastContainer").className = "scaleNormal"; document.getElementById("hourlyForecastContainer").className = "scaleZero"; document.getElementById('WeatherInfoContainer').className = "normal"; document.getElementById('clockContainer').className = "normal"; document.getElementById('goldClockGlass').className = "normal"; document.getElementById('goldClockRing').className = "normal"; document.getElementById('sunriseSunsetGlass').className = "normal"; document.getElementById('fullmoon').className = "normal"; forecastdisplay = true; hourlyForecastDisplay = false; }else{ document.getElementById("forecastContainer").className = "scaleZero"; document.getElementById("hourlyForecastContainer").className = "scaleNormal"; document.getElementById('WeatherInfoContainer').className = "moveUp"; document.getElementById('clockContainer').className = "moveUp"; document.getElementById('goldClockGlass').className = "moveUp"; document.getElementById('goldClockRing').className = "moveUp"; document.getElementById('sunriseSunsetGlass').className = "moveUp"; document.getElementById('fullmoon'…
has comment: http://stackoverflow.com/comment/39701667
type: Question
has title: How to stop my touch event from firing when users swipe iPhone screen
tagged with: iphone
downvote count: 0
tagged with: javascript
tagged with: ios7.1
favorite count: 0

http://stackoverflow.com/comment/39970957
has text: I did the jsfiddle, and posted it as a comment on the other question of mine...and it should also be considered as an update to same question, removing unnecessary code. if you can help me, that would be much appreciated, thank you again.
comment on: http://stackoverflow.com/a/25549563
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39669545
type: QuestionComment
has text: You can't really "zoom in" or "zoom out" in most common browers. All you can do is change the zoom level of your CSS, and there are many topics about it in SO.
score: 0
comment on: http://stackoverflow.com/q/25428323
type: Comment

http://stackoverflow.com/comment/39780776
comment on: http://stackoverflow.com/q/25487811
score: 0
type: QuestionComment
has text: @Tim Sure then there is another option. You can cache the promise so that the backend call is not made again. You can use eventing. but eventing for achieving synchronization issue is not good IMHO.
type: Comment

http://stackoverflow.com/a/25493423
score: 0
answers question: http://stackoverflow.com/q/25493225
type: Answer
has body: You may have forgotten to load the jquery UI framework. On panel, under "Frameworks and Extensions", make sure jquery UI is checked.

onclicklistener
tag name: onclicklistener
tags question: http://stackoverflow.com/q/25483851
type: Tag

http://stackoverflow.com/comment/39678866
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25433146
score: 0
has text: Looking at your fiddle code, you're changing the background color on the links divs successfully. Is that not what you were wanting?

http://stackoverflow.com/comment/39867512
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25534950
has text: @Mritunjay , I am very new to javascript and jquery, I am more knowledgeable with php . I am still learning sorry :)

http://stackoverflow.com/q/25546185
type: Question
tagged with: javascript
tagged with: jquery
answer count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/39887714
favorite count: 0
has title: regex - find all occurrences within a string
has answer: http://stackoverflow.com/a/25546221
accepted answer: http://stackoverflow.com/a/25546221
tagged with: regex
upvote count: 4
has comment: http://stackoverflow.com/comment/39887598
has comment: http://stackoverflow.com/comment/39887597
possible better answer: http://stackoverflow.com/a/25546229
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25546229
has body: I have a string: "[2-0]>5&amp;&amp;[3-0]&lt;21" I would like to pull out an array of: 2-0 and 3-0 The resulting array should look like this: ["2-0", "3-0"] Does anyone know some fancy regex that will do this, or perhaps another method?

http://stackoverflow.com/q/25456212
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39727992
type: Question
score: 0
tagged with: jquery-animate
tagged with: javascript
tagged with: jquery
has body: I've build a sticky navigation that disappears when the user scrolls down, and re-appears when he/she scrolls back up. This is so there's more content visible on smaller screens when, for example, reading an article. The problem I had was animations queue build-up, but I was able to fix it using .stop() However, this created another problem, which is no smooth animations. When you keep scrolling up, the .stop() gets executed, and then the scroll-up animation continues, creating a weird animation effect. $(document).ready(function() { $(window).load(function() { var $menu = $('.mobile-menu'); var previousTop = $menu.offset().top; $(document).scroll(function() { // Determine scroll position var top = $(this).scrollTop(); // Check if user is scrolling up if (top &lt; previousTop) { // .stop() prevents animation queue build-up $menu.animate({ top: 0 }, 200); } else { // .stop() prevents animation queue build-up $menu.animate({ top: -$menu.outerHeight() }, 200); } previousTop = top; }); }); }); Fiddle: http://jsfiddle.net/8wwtLda3/ I know I can fix this using CSS transitions, but the script has to be reusable, and editing the CSS files isn't always an options. Any tips on how to get smooth jQuery animations, without a queue building up? SOLUTION: Thanks to Fonzy for telling me about .queue() I was able to fix this. http://jsfiddle.net/8wwtLda3/1/
has title: jQuery no smooth .animate() transitions when using .stop()
has comment: http://stackoverflow.com/comment/39723396
tagged with: animation
answer count: 0

http://stackoverflow.com/comment/39728152
type: AnswerComment
comment on: http://stackoverflow.com/a/25458891
score: 0
type: Comment
has text: w3schools is a very poor resource since it has many errors and bad habits. MDN and quirksmode are much better.

http://stackoverflow.com/a/43650284
upvote count: 1
downvote count: 0
type: Answer
has body: The date format is a combination of d, dd, D, DD, m, mm, M, MM, yy, yyyy. d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05. D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday. m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07. M, MM: Abbreviated and full month names, respectively. Eg, Jan, January yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012. You can specify this format on data-date-format, but a better place to add format is in the schema: some_date: { type: Date, autoform: { type: "bootstrap-datepicker", datePickerOptions: { autoclose: true, format: 'dd M yyyy' } } }, For example, dd M yyyy give you 27 Apr 2017. I found the documentation at http://bootstrap-datepicker.readthedocs.io/en/latest/options.html
score: 1
answers question: http://stackoverflow.com/q/25391014

http://stackoverflow.com/comment/40242137
type: QuestionComment
comment on: http://stackoverflow.com/q/25511260
has text: @elzi can you post your code
score: 0
type: Comment

http://stackoverflow.com/a/25539279
has comment: http://stackoverflow.com/comment/39907170
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/25539106
answers question: http://stackoverflow.com/q/25539106
type: AcceptedAnswer
downvote count: 0
has body: "but when i have a subfolder within my localhost folder called "SriMeru" where i have my actual html file" You say your folder is named SriMeru On many systems (including UNIX/LINUX), SriMeru and srimeru are not the same thing; they are case-sensitive. Therefore, either rename your folder to be all in lowercase letters, or change srimeru/forumSubmit.php to SriMeru/forumSubmit.php
type: Answer

http://stackoverflow.com/comment/41575514
has text: I really like this solution. Very lightweight and gets the job done. Thanks for sharing!
type: AnswerComment
comment on: http://stackoverflow.com/a/25474755
score: 0
type: Comment

http://stackoverflow.com/q/25477324
linked to: http://stackoverflow.com/q/7210507
has answer: http://stackoverflow.com/a/25477402
score: 0
has title: XMLHttpRequest no return value
answer count: 1
has comment: http://stackoverflow.com/comment/39761100
has body: i am unable to receive a response from the php file. Javascript var http = new XMLHttpRequest(); var url = "http://localhost/php_bollywood_romance.php"; var params = "film="+movie_name_entered; http.open("POST", url, true); //Send the proper header information along with the request http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", params.length); http.setRequestHeader("Connection", "close"); http.onreadystatechange = function() {//Call a function when the state changes. if(http.readyState == 4 &amp;&amp; http.status == 200) { alert(http.responseText); } } http.send(params); I have even tried to do this..... var http = new XMLHttpRequest(); if ("withCredentials" in http) { var url = "http://localhost/php_bollywood_romance.php"; var movie_name_entered="hi"; var params = "film="+movie_name_entered; http.open("POST", url, true); } else if (typeof XDomainRequest != "undefined"){ http = new XDomainRequest(); var url = "http://localhost/php_bollywood_romance.php"; var movie_name_entered="hi"; var params = "film="+movie_name_entered; http.open("POST", url); } else { http = null; } if (http){ http.onload = function(){ http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", params.length); http.setRequestHeader("Connection", "close"); http.onreadystatechange = function() {//Call a function when the state changes. if(http.readyState == 4 &amp;&amp; http.status == 200) { document.write(http.responseText); callback(http.responseText); alert("hey"); } } http.send(params); }; PHP &lt;?php { $name = $_POST["film"]; $file ='data_bollywood_romance.txt'; $current=file_get_contents($file); //gets existing content from the file $current ="$current \n $name \n"; file_put_contents($file,$current); //put newstuff echo 'hi'; return 'yes'; } ?&gt; However this also does not seem to work... if i do alert("http.response") after http.send(params)...it alerts an alert wi…
type: UnansweredQuestion
tagged with: xmlhttprequest
tagged with: php
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39761063

http://stackoverflow.com/comment/39876417
type: Comment
comment on: http://stackoverflow.com/a/25493226
has text: Yes that's the document root so htdocs/steamapi. I've never used Apache on Windows so you'll need to look up how to enable the mod_rewrite and mod_proxy Apache modules
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39785526
type: QuestionComment
has text: Please provide more detail and/or some relevant code.
comment on: http://stackoverflow.com/q/25490500
score: 0
type: Comment

http://stackoverflow.com/comment/39605393
has text: @CaspNZ I'd like to add that you can use "constant" to save your blacklist as a constant array and inject that into a filter. Compared to the accepted answer, this is more extensible since the filter function will only work inside the $scope and child $scopes where the function was declared.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25393329

http://stackoverflow.com/a/25530535
accepted answer of: http://stackoverflow.com/q/25491256
answers question: http://stackoverflow.com/q/25491256
downvote count: 0
has body: You dont need the when function here, as it just prompts the user to answer another question. You can simply use arrays in the prompts callback function to get multiple values for one prompted answer, like so //prompt user to answer questions this.prompt([{ type: 'list', name: "fruit", message: "What is your favourite fruit", choices: [{ name: 'Apple', value: ['apple', 'Apple Juice', 'Apple Pie' ] }, { name: 'Banana', value: ['banana','Banana Juice','Banana Bread'] }, { name: 'Oranges', value: ['oranges','Orange Juice','Orange Pudding'] }] }]); //confirming the prompts and storing answers - pull required value from array number this.prompt(prompts, function(answers) { this.fruitChoice = answers.fruit[0]; this.fruitDrink = answers.fruit[1]; this.fruitDessert = answers.fruit[2]; }
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/58365051
upvote count: 7
type: AcceptedAnswer

http://stackoverflow.com/a/25547438
has comment: http://stackoverflow.com/comment/39891849
has comment: http://stackoverflow.com/comment/39902794
answers question: http://stackoverflow.com/q/25547122
has comment: http://stackoverflow.com/comment/39892723
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39891531
score: 0
accepted answer of: http://stackoverflow.com/q/25547122
has comment: http://stackoverflow.com/comment/39896835
type: Answer
has body: You should better test the value instead of dealing with errors. function selectcampaign(account) { var selectCampaigns = document.getElementById("campaignSelect"); var urlstrg = "http://localhost:8080/SalesPoliticalMapping/OrgChart?account=" + account; if(selectCampaigns.options[selectCampaigns.selectedIndex]) { urlstrg += "&amp;campaign=" + selectCampaigns.options[selectCampaigns.selectedIndex].text; } window.location.href = urlstrg; };

http://stackoverflow.com/a/25420046
upvote count: 3
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0
has body: If the plugin doesn't give you any event to hook to before the click is raised, you could use mousedown instead: $(".datepicker-button").on("mousedown", function(){ // your operations... }); The click event of the plugin will then be fired when the mouse button is released.
accepted answer of: http://stackoverflow.com/q/25419866
answers question: http://stackoverflow.com/q/25419866

http://stackoverflow.com/q/25413313
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25416487
has comment: http://stackoverflow.com/comment/39652040
score: 0
has comment: http://stackoverflow.com/comment/39647151
tagged with: backbone.js
has title: Postpone Synchronize Backbone.js Collection with Server
tagged with: backbone-model
has comment: http://stackoverflow.com/comment/39644145
has body: I have a Backbone Collection that users are performing CRUD-type activities on. I want to postpone any changes from being propagated back to the server — the Collection.sync() should not happen until the user initiates it (like POSTING a form). As it stands, I have been able to implement on-the-fly updates with no issue (by calling things like Model.destroy() on the models when deleted, or Collection.add() to add new models to the collection. As I understand, I could pass the {silent:true} option to my models, preventing .sync() from being called during .add()/.destroy(), but from what I can tell, that could lead to some headaches later. I have considered overriding Backbone.sync, but I am not sure if that is the best route — I feel like there is some way to hook into some events, but I am not sure. Of course I have read through the Backbone docs, annotated source, and relevant SO questions before posting this, but I have hit a wall trying to extrapolate for this particular situation. Eventually I will need to implement this in many places in my application, which is why I am concerned about best-practices at this stage. I am looking for some guidance/suggestions/thoughts on how to proceed with preventing the default behavior of immediately syncing changes with the remote server. Any help is appreciated — thank you for your time! EDIT: I went with Alex P's suggestion of refactoring: in my collection I set up some attributes to track the models that have been edited, added, or deleted. Then, when the user triggers the save action, I iterate through the lists and do the appropriate actions.
tagged with: backbone.js-collections
has answer: http://stackoverflow.com/a/25416487
type: AnsweredQuestion
tagged with: backbone-events
type: Question
answer count: 1

http://stackoverflow.com/q/25508167
type: Question
has title: How to remove variable number of p tags from a string in jQuery
has body: I have a string that contains variable HTML content. The string can contain one, more or no p tags which may also have classes on them. What is the best way to remove all p tags from this using jQuery while keeping the HTML content of each of them. I first tried the following but of course this only works if I have the whole string wrapped in a paragraph and it would not cover if the paragraphs have classes or other attributes on them: str.substring(3).slice(0, -4); Edit Here is an example but the number of p tags can vary and there can also be none at all. Example before: Some text Some other text Some more text Example after: "Some text Some other text Some more text"
linked to: http://stackoverflow.com/q/4232961
has comment: http://stackoverflow.com/comment/39818560
has comment: http://stackoverflow.com/comment/39818790
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25508275
has comment: http://stackoverflow.com/comment/39820373
upvote count: 3
has answer: http://stackoverflow.com/a/25508267
has answer: http://stackoverflow.com/a/25508662
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25508571
answer count: 5
has comment: http://stackoverflow.com/comment/39818770
has answer: http://stackoverflow.com/a/25508571
possible better answer: http://stackoverflow.com/a/25508275
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/39818618
tagged with: paragraph
has comment: http://stackoverflow.com/comment/39818596
has answer: http://stackoverflow.com/a/25508279

http://stackoverflow.com/comment/39787663
type: Comment
comment on: http://stackoverflow.com/a/25486375
has text: `I think that is not possible to open up inline div and another page` @DinoPrašo : if that's not possible, how come this is the correct answer?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25408751
downvote count: 0
accepted answer: http://stackoverflow.com/a/25409209
tagged with: javascript
has comment: http://stackoverflow.com/comment/39633802
has body: I am trying to do a simple fade in of an element when a boolean variable is set to true. It was working fine earlier, until I changed my AngularJS version to 1.2.15. Am I doing something incorrectly? Here is a sample JSFiddle. {{ready}} hello $scope.ready = false; function displayBox() { $scope.ready = true; $scope.$apply(); } setTimeout(displayBox, 1000);
answer count: 1
has comment: http://stackoverflow.com/comment/39633494
score: 1
favorite count: 0
tagged with: ng-animate
has comment: http://stackoverflow.com/comment/39633695
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39633510
tagged with: ng-show
tagged with: css
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25409209
type: Question
has title: ng-animate not working as expected
has comment: http://stackoverflow.com/comment/39633549

http://stackoverflow.com/comment/39741082
type: AnswerComment
has text: Thanks. It makes sense. I guess that "closure" function for the `chrome.storage.sync.set` method will be called in any case, right?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25466523

google-maps
tags question: http://stackoverflow.com/q/25428546
tags question: http://stackoverflow.com/q/25484268
tags question: http://stackoverflow.com/q/25410874
tag name: google-maps
tags question: http://stackoverflow.com/q/25534584
tags question: http://stackoverflow.com/q/25499935
tags question: http://stackoverflow.com/q/25488545
tags question: http://stackoverflow.com/q/25442446
tags question: http://stackoverflow.com/q/25447770
tags question: http://stackoverflow.com/q/25496625
tags question: http://stackoverflow.com/q/25454476
tags question: http://stackoverflow.com/q/25471315
tags question: http://stackoverflow.com/q/25466169
tags question: http://stackoverflow.com/q/25391357
tags question: http://stackoverflow.com/q/25453409
tags question: http://stackoverflow.com/q/25428879
tags question: http://stackoverflow.com/q/25428973
tags question: http://stackoverflow.com/q/25474683
tags question: http://stackoverflow.com/q/25474341
tags question: http://stackoverflow.com/q/25398378
tags question: http://stackoverflow.com/q/25549709
tags question: http://stackoverflow.com/q/25519608
tags question: http://stackoverflow.com/q/25391193
tags question: http://stackoverflow.com/q/25448556
tags question: http://stackoverflow.com/q/25508049
tags question: http://stackoverflow.com/q/25534266
tags question: http://stackoverflow.com/q/25411766
tags question: http://stackoverflow.com/q/25536203
tags question: http://stackoverflow.com/q/25411714
tags question: http://stackoverflow.com/q/25529966
tags question: http://stackoverflow.com/q/25447698
tags question: http://stackoverflow.com/q/25484488
tags question: http://stackoverflow.com/q/25546576
tags question: http://stackoverflow.com/q/25413294
tags question: http://stackoverflow.com/q/25500381
tags question: http://stackoverflow.com/q/25419809
tags question: http://stackoverflow.com/q/25472198
tags question: http://stackoverflow.com/q/25502549
tags question: http://stackoverflow.com/q/25424603
tags question: http://stackoverflow.com/q/25533537
tags question: http://stackoverflow.com/q/25547817
tags question: http://stackoverflow.com/q/25424986
tags question: http://stackoverflow.com/q/25495657
tags question: http://stackoverflow.com/q/25431214
tags question: http://stackoverflow.com/q/25516266
tags question: http://stackoverflow.com/q/25533192
tags question: http://stackoverflow.com/q/25408667
tags question: http://stackoverflow.com/q/25514660
tags question: http://stackoverflow.com/q/25410056
type: Tag
tags question: http://stackoverflow.com/q/25490252
tags question: http://stackoverflow.com/q/25447541
tags question: http://stackoverflow.com/q/25534352
tags question: http://stackoverflow.com/q/25525572
tags question: http://stackoverflow.com/q/25425364
tags question: http://stackoverflow.com/q/25511114

http://stackoverflow.com/comment/39856427
type: Comment
comment on: http://stackoverflow.com/q/25494729
type: QuestionComment
has text: @SebastianBochan, is there an example fo useHTML to format tooltip?
score: 0

http://stackoverflow.com/comment/53582532
type: Comment
has text: Oh! Actually now I remember. I did check that out but it doesn't matter because I'm using .Net and it just handles the Date fields as DateTime objects with time set to 00:00:00 when deserialized. And my server conversion to UTC is for DateTime types, so there isn't a way around it really for people running .Net webservers except an additionally complicated pattern for per-property exceptions to the UTC conversion based on some attribute added to the property.
type: AnswerComment
comment on: http://stackoverflow.com/a/25436504
score: 0

http://stackoverflow.com/comment/39688914
type: AnswerComment
score: 0
type: Comment
has text: Yes, that's right. What a mistake! hahaha. I was mixing it with jQuery.
comment on: http://stackoverflow.com/a/25438564

http://stackoverflow.com/comment/39719314
type: Comment
type: AnswerComment
has text: using this keyword, please view DEMO
score: 0
comment on: http://stackoverflow.com/a/25454886

weinre
type: Tag
tag name: weinre
tags question: http://stackoverflow.com/q/25392480

http://stackoverflow.com/q/25436244
has comment: http://stackoverflow.com/comment/39685342
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39685500
has body: I have a JAVA object where I save a HTML string value I call message. The saved data looks like the below, You have received a new Rental Request 5282053859835904. Please view your open orders. But when printed to the JSP file and displayed at runtime using <%=pm.getMessage()%> or <%out.print(pm.getMessage());%> The actual html code comes out all messed up, You have received a new Rental Request 5282053859835904 . Please view your open orders. Any thoughts on why the displayed string does not match the saved string? JAVA code for saving is note.setMessage("You have received a new Rental Request " + requestId + ". Please view your open orders.");
tagged with: java
has comment: http://stackoverflow.com/comment/39685362
has comment: http://stackoverflow.com/comment/39685489
type: Question
has comment: http://stackoverflow.com/comment/39685751
has answer: http://stackoverflow.com/a/25436826
tagged with: jsp
tagged with: javascript
has title: Printing saved HTML to jsp keeps getting corrupted
score: 0
has comment: http://stackoverflow.com/comment/39685696
tagged with: http://stackoverflow.com/tag/html
answer count: 1

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/25514802
tags question: http://stackoverflow.com/q/25510090
type: Tag
tags question: http://stackoverflow.com/q/25422859

http://stackoverflow.com/comment/39650323
score: 0
type: Comment
has text: Thank you very much! The code needs not explaining I have figured out how you have done it. If you'd like to, you can add explanations for possible future viewers of the question, although it isn't necessary. The division by zero is not an issue for me as these elements will remain at 0.7 opacity, so no fixing needed there for me. Thanks a ton
type: AnswerComment
comment on: http://stackoverflow.com/a/25417502

http://stackoverflow.com/comment/39729527
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25460165
has text: OMG, seriously that was the problem!. Codeacademy should fix this there was no error in the code! Thanks by the way

http://stackoverflow.com/comment/39607507
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25394518
has text: There is no `select` event for button. There are, however, [`click`](http://api.jquery.com/click/), [`mouseover`](http://api.jquery.com/mouseover/), [`focus`](http://api.jquery.com/focus/) etc.
score: 0

http://stackoverflow.com/q/25538851
upvote count: 2
has answer: http://stackoverflow.com/a/25540859
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: extjs
has body: I have an extjs Panel component that contain a dataview item. I use this to display the images from a store. It works as expected during the first load. But later when I reload the imgStore with new image url's (which occurs when user searches and loads a different city) the view does not refresh. Can someone point me in the best way to refresh the panel/dataview item when the associated datastore is refreshed? The actual code has more than one item in the panel and many other buttons and toolbars. Please see the relevant part of the code below: init: function() { // image store this.imgStore = new Ext.data.JsonStore({ idProperty: 'imgId', fields: [{ name: 'imgId', type: 'integer', mapping: 'imgId' }, { name: 'url', mapping: 'url' }], data: [], }); // load images Ext.each(myImgStore.data.items, function(itm, i, all) { this.imgStore.loadData(itm.data, true); }); // add to a dataview in a panel this.myPanel = new Ext.Panel({ autoScroll: true, items: [{ xtype: 'dataview', store: this.imgStore, autoScroll: true, id: 'imgList', tpl: new Ext.XTemplate( ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ), listeners: { afterrender: function() { // do something } } }] }); // add this to the center region of parentpanel Ext.getCmp('parentPanel').add([this.myPanel]); this.myPanel.doLayout(); } Everytime the store is reloaded, I want the dataview to be refreshed. I'm using extjs 3.4 version. Thanks!
has title: Refreshing a dataview in Panel in extjs 3.4
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: extjs3
type: Question
accepted answer: http://stackoverflow.com/a/25540859

http://stackoverflow.com/a/25445874
downvote count: 0
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39701867
answers question: http://stackoverflow.com/q/25445615
has body: This is more of an HTML-thing than MVC/Razor, as you are essentially asking on how to embed templates into your website. AFAIK html doesn't Support templating out of the box just yet, so you'd Need some JavaScript for that (in your case right now, you're probably using jquery) Most template engines like knockoutjs, handlebars, etc. (maybe even jquery) support embedding templates similar to this: The browser would not render that html, but a JavaScript library would use it (optionally doing some runtime data-binding) and display it. Note: you can obviously put the html from that template into a partial view: _MyTemplate.cshtml: My template View: Most template engines also support loading templates asynchronously, in which case you just render them the partial view alone. Hope this helps a little.
has comment: http://stackoverflow.com/comment/39732022

http://stackoverflow.com/comment/39877030
has text: That's just an array item thats used later on. My problem is any variable leaving the error scope reverts.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25539922

http://stackoverflow.com/comment/39816940
comment on: http://stackoverflow.com/q/25507234
has text: Yes there is a way: you need to use an array. But what is your end goal? Why an array is not a solution for you?
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/39730949
type: Comment
comment on: http://stackoverflow.com/a/25460879
has text: Yes, I thought you were looping if you have multiple values, so each item will be different object. You must loop on the values to get this working
type: AnswerComment
score: 0

http://stackoverflow.com/q/25475737
favorite count: 0
has body: I am looking for a way to find instances of a certain character within a certain element. I am aware of doing something like: var string = 'this is a string'; string.indexOf('a'); however, i want indexOf to look at a particular tag within a particular html file. (in this case, p tags). I have commented out what i tried to use in order to achieve this. function findQuestion() { // var string1 = document.getElementsByTagName('p'); var string2 = '??'; if (string2.indexOf('?') !== -1) { console.log('foundQuestion'); } else { console.log('nothing'); } } findQuestion(); This code obviously just checks to see that there is a '?' in string2, but how do i write this to find all instances of '?' within p tags and return all content preceding that up to the opening p tag in which the '?' was found? thanks.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25475778
downvote count: 2
accepted answer: http://stackoverflow.com/a/25475778
type: Question
score: -2
tagged with: indexof
tagged with: javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/25475801
upvote count: 0
has title: Find occurrences of a string in a given element.
has answer: http://stackoverflow.com/a/25475801

http://stackoverflow.com/q/25391149
has body: I have a basic bar chart. I want to change the color of the lines in the background. Is there any way to do that? I looked over their API and the internet. Seem like I can only change the background color JS fiddle $(function () { $('#container').highcharts({ chart: { type: 'column' }, colors: ['#00A7E5'], legend: { enabled: false }, xAxis: { categories: ['Tue','Wed','Thur','Fri','Sat','Sun', 'Mon']}, yAxis: { title: {text: ''}, tickInterval: 10 }, series: [{ name: 'TOTAL APPTS.', data: [25, 30, 35, 27, 33, 20, 10] }], exporting: { enabled: false }, credits: { enabled: false } }); });
favorite count: 0
accepted answer: http://stackoverflow.com/a/25392051
upvote count: 2
has title: highcharts.js change color of the lines in the background
tagged with: css
type: AnsweredQuestion
score: 2
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/42018582
tagged with: highcharts
has answer: http://stackoverflow.com/a/25392051
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/42018582
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25458806
has comment: http://stackoverflow.com/comment/39727197
favorite count: 0
has comment: http://stackoverflow.com/comment/39726900
has comment: http://stackoverflow.com/comment/39726919
has comment: http://stackoverflow.com/comment/39726950
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/39726873
score: -1
has comment: http://stackoverflow.com/comment/39726930
has comment: http://stackoverflow.com/comment/39726971
type: Question
has comment: http://stackoverflow.com/comment/39726881
tagged with: javascript
has comment: http://stackoverflow.com/comment/39726927
has body: Can some please help me to tell me where i am going wrong in my code. I have been working on it for a little while but i am still stuck please help. this is my code so far. Thanks for the help in advance. This is my javascript var bottles; var beerNum = 99; // This program will count to 99 for us // Set up a counter variable, and start it on zero (good place to start) var counter = 0; // While loop while (counter &lt; 99) { // This line increments (or adds 1) to our counter each time the loop goes around. counter--; // This line finds the HTML element with an ID of "output" and puts the value of our counter in it, followed by a line break &lt;br /&gt; // The += operator takes what's already stored and appends our new value to it document.getElementById('output').innerHTML += counter + "&lt;br /&gt;"; } if (bottles = beerNum){ document.getElementById('output')&gt;innerHTML += bottles + beerNum + "of beer on the wall"; } And this is my HTML. &lt;p id="output"&gt;&lt;/p&gt; and i have a fiddle to accompany it http://jsfiddle.net/Matt1990/X4UHD/39/
has title: 99 Bottle song code in pure js
has comment: http://stackoverflow.com/comment/39726929
has answer: http://stackoverflow.com/a/25458891
has comment: http://stackoverflow.com/comment/39726898
has comment: http://stackoverflow.com/comment/39727015
accepted answer: http://stackoverflow.com/a/25458891
has comment: http://stackoverflow.com/comment/39727217
has comment: http://stackoverflow.com/comment/39726908
answer count: 1
downvote count: 1

http://stackoverflow.com/comment/39651633
comment on: http://stackoverflow.com/a/25418411
type: Comment
has text: Can you explain something more about line co-ordinates and how d3.js plot it with the points?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25413693
tagged with: http://stackoverflow.com/tag/html
has body: I use Bootstrap in my Rails app, in it I have a navbar that contains some elements. When I press one of these elements I present a modal popup. When I close this popup, the clicked element for some reason gets highlighted. This isn't the experience I'm looking for. See image below: I wonder how I can get rid of this unwanted effect?
has title: Bootstrap navbar showing border after modal popup have been hidden
tagged with: css
accepted answer: http://stackoverflow.com/a/25416144
tagged with: twitter-bootstrap
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/31333027
has answer: http://stackoverflow.com/a/31333027
has answer: http://stackoverflow.com/a/25416144
answer count: 2
has comment: http://stackoverflow.com/comment/39645373
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/25482029
has comment: http://stackoverflow.com/comment/39771963
has comment: http://stackoverflow.com/comment/39770817
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39769650
has comment: http://stackoverflow.com/comment/39769884
has comment: http://stackoverflow.com/comment/39769922
has comment: http://stackoverflow.com/comment/39770109
has answer: http://stackoverflow.com/a/25483850
has comment: http://stackoverflow.com/comment/39772319
has answer: http://stackoverflow.com/a/25484043
linked to: http://stackoverflow.com/q/1894009
type: Question
answer count: 2
has title: show no of fields depending on number selected in dropdown
tagged with: javascript
tagged with: jquery
has body: I am looking at this post: Using jQuery to dynamically add form fields (or fieldsets) based on a dropdown box value is there not an easier way? my code: No. of Minor Children* 0 1 2 3 4 <option value="<?php echo $row_list['nochildren']; ?>"> <?php if($row_list['nochildren']==$select){ echo $row_list['nochildren']; } ?> Child Full names* if no children don't show the div if 4 children show 4 div tags
score: 0
has comment: http://stackoverflow.com/comment/39770369

http://stackoverflow.com/comment/39707809
type: QuestionComment
has text: U can just write a custom handlebars helper for this. But do u use handlebars without a MVC Framework (like ember.js)?
comment on: http://stackoverflow.com/q/25448929
score: 0
type: Comment

http://stackoverflow.com/comment/39692011
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25440366
has text: In button click inside a form
score: 0

http://stackoverflow.com/comment/39847214
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25523696
has text: Well I posted it first so... :) Anyway, glad it works. You could also consider @illfang's for a non-underscore solution.

apache
tag name: apache
tags question: http://stackoverflow.com/q/25462280
tags question: http://stackoverflow.com/q/25452586
tags question: http://stackoverflow.com/q/25488197
tags question: http://stackoverflow.com/q/25548622
type: Tag

http://stackoverflow.com/q/25473659
accepted answer: http://stackoverflow.com/a/25473956
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Checkbox state change not working
has comment: http://stackoverflow.com/comment/39754707
answer count: 3
possible better answer: http://stackoverflow.com/a/25473665
tagged with: checkbox
has answer: http://stackoverflow.com/a/25473665
favorite count: 0
has comment: http://stackoverflow.com/comment/39754233
has answer: http://stackoverflow.com/a/25473806
upvote count: 1
has body: In the below code initially checkbox unchecked and textboxes disabled.when i click checkbox then textboxes enabled BUT after the enabled when i again unchecked checkboxes it need to be disabled.But that partis not working(else part) Code $(function(){ $("#txtres").attr("disabled", "disabled"); $("#txtres2").attr("disabled", "disabled"); $("#chknew").click(function () { if("#chknew").is(:checked) { $("#txtres").removeAttr("disabled"); $("#txtres2").removeAttr("disabled"); } else { $("#txtres").attr("disabled", "disabled"); $("#txtres2").attr("disabled", "disabled"); } }); }
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25473956
score: 1

http://stackoverflow.com/comment/39731734
comment on: http://stackoverflow.com/q/25461497
score: 0
has text: do not try to parse html with regex
type: QuestionComment
type: Comment

http://stackoverflow.com/a/28307471
type: Answer
downvote count: 0
score: 1
has body: The mssql.open function returns an object of node-sqlserver.open; it's just been piped with your connection string. We're working on updating this documentation. You can look at the github project for node-sqlserver and look at the unit tests: https://github.com/Azure/node-sqlserver Working on actively getting the documentation fixed up for this - sorry for the trouble.
upvote count: 1
answers question: http://stackoverflow.com/q/25486480

http://stackoverflow.com/comment/39617689
type: AnswerComment
type: Comment
has text: Just the function i needed to find. Thanx Man!
comment on: http://stackoverflow.com/a/25400348
score: 0

http://stackoverflow.com/q/25500247
answer count: 1
has answer: http://stackoverflow.com/a/25596686
tagged with: javascript
tagged with: extjs
has title: Treepanel expand/collapse on a node without children Extjs
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/25596686
favorite count: 0
type: Question
upvote count: 2
has body: I am using ExtJs 4.2. Am using property useArrows:true in my tree panel. How to show the collapse/expand icon on a node without children in a tree panel.On expand and collapse it should fire all the events related to the tree panel. I tried adding 1-children:[{}] gave me undefined property. 2-loaded:true nothing happened 3-singleExpand:true nothing happened 4-allowChildren:true nothing happened
tagged with: tree

http://stackoverflow.com/comment/39850915
score: 0
type: AnswerComment
has text: I'm pretty sure you can see and click on the link "add a comment" on above question.
type: Comment
comment on: http://stackoverflow.com/a/25525823

http://stackoverflow.com/comment/39651537
has text: all the jquery files and the javascript at the same place?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25418334

http://stackoverflow.com/a/25466971
has body: If you want a new image each day, you should use days since the epoch as base for your calculation. Then use modulo 5: &lt;script&gt; var backImg = ['http://example.com/path/image.gif', ..]; var today = new Date(); var day = Math.floor(today/8.64e7); document.getElementById('daily').style.backgroundImage = 'url('+backImg[day%5]+')'; &lt;/script&gt; Edit: I'm dividing by 8.64e7 (8.64 * 10^7) which is the number of milliseconds per day.
downvote count: 0
answers question: http://stackoverflow.com/q/25466888
has comment: http://stackoverflow.com/comment/39751626
type: Answer
has comment: http://stackoverflow.com/comment/39751877
has comment: http://stackoverflow.com/comment/39752107
upvote count: 1
score: 1

http://stackoverflow.com/a/25481299
upvote count: 2
answers question: http://stackoverflow.com/q/25481213
has body: Maybe that? $('h1').each(function(){ var test = $(this); test.html( test.text().replace(/(^[^\s,\.\:\;\"]+)/,'$1') ); });
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/25471456
answer count: 3
has comment: http://stackoverflow.com/comment/39760320
tagged with: google-chrome-extension
tagged with: dom-events
has body: Is it possible to get an event (or other way of knowing) when a specific script is loaded into a page? E.g. I have a page action that should perform action if jQuery is present and have finished loading.
accepted answer: http://stackoverflow.com/a/25585309
has answer: http://stackoverflow.com/a/25493697
linked to: http://stackoverflow.com/q/16230886
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25496285
has title: Chrome extension - script loaded event?
has answer: http://stackoverflow.com/a/25496285
type: Question
has comment: http://stackoverflow.com/comment/39793017
has answer: http://stackoverflow.com/a/25585309
tagged with: javascript
score: 0

http://stackoverflow.com/comment/116378127
score: 6
has text: The second argument to `pickBy` defaults to `identity`, so this can be simplified to `const cleanedObject = pickBy(originalObject)` if desired.
type: AnswerComment
comment on: http://stackoverflow.com/a/37836669
type: Comment

http://stackoverflow.com/q/25491320
tagged with: javascript
tagged with: jquery
has title: jQuery - animations, queues, stop() and notifications
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25492022
has body: When user clicks any link on website, I want to show him a notification, which will disappear in 2 seconds. But when he clicks next link when previous notice is still visible, next notification shouldn't be showed and visible notice from first click should be visible for 2 seconds after second click. How to do it? I tried a lot of things, jQuery's delay(), jQuery's stop(), setTimeout() etc. but always notice disappears in 2 seconds after first click.
type: Question
accepted answer: http://stackoverflow.com/a/25492022
answer count: 1

http://stackoverflow.com/comment/39650346
comment on: http://stackoverflow.com/a/25417310
has text: In every click function, don't forget to put something like `$("a.active").removeClass('active');` to remove all active button.. I guess you haven't checked my last edited answer..
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25533390
has body: You can do this easily using jQuery animate function: http://api.jquery.com/animate/ &lt;div id="screenshot"&gt; &lt;img src="scanner.png" alt="" id="scanner" style="position:relative; left:0px;" /&gt; &lt;/div&gt; and call javascript when you want the image to move: &lt;script&gt;$("#scanner").animate({left:50}, 5000);&lt;/script&gt; you can animate using margins instead of position too. another question from stack overflow... Moving from position A to position B slowly with animation
answers question: http://stackoverflow.com/q/25533054
type: Answer
has comment: http://stackoverflow.com/comment/39864920
score: 0

http://stackoverflow.com/q/25489342
linked to: http://stackoverflow.com/q/572897
tagged with: javascript
score: 0
has body: Is it possible to use the following data of a webapp source with a chrome extention? var listConfig = { data: {"___focus":0,"model":{"instance":[{ "___italic":"false", "status":"open", "priority_code":"3 - Medium", "number":"IM000000001", "problem_status":"Open", "open_time":"25/08/14 16:56:13", "assignment":"MY GROUP", }, I would like to check if the "status" contains "open" and "priority_code" contains "3 - Medium" and if they do contain these strings, beep a sound. So can I use it like something like this? listConfig.data.model.instance("status"); listConfig.data.model.instance("priority_code");
answer count: 1
has title: Use data of website in chrome extension
type: UnansweredQuestion
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/25489550

http://stackoverflow.com/q/25429525
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39671874
type: Question
has title: Detecting Browser Plugin via Javascript
answer count: 1
has answer: http://stackoverflow.com/a/25429728
tagged with: javascript
has body: How to check wheather a particular plugin is installed into the client's browser via javascript , and if it is not installed then show user a title Bar (just like in it comes in all kind off browser if some plugin is missing to download that Plugin ) for Example : like below
score: 0

google-geolocation
tags question: http://stackoverflow.com/q/25529358
type: Tag
tag name: google-geolocation
tags question: http://stackoverflow.com/q/25474341

http://stackoverflow.com/q/25516838
tagged with: javascript
has body: hello Whenever I click on the button that says "Get External Content" I get a javascript alert that says "Not Found" (this is the error's status text). Why can it not find the text file I am trying to load via ajax? This is my folder hierarchy: --public_html --app --ajaxTestHome.php --ajaxTestText.txt And this is the file I am trying to load (via ajax) the text file into. //ajaxTestHome.php Let jQuery AJAX Change This Text Get External Content EDIT: I had a typo in the question. the file is called "ajaxTestText.txt" not "ajaxTestTest.txt"
has comment: http://stackoverflow.com/comment/39835331
has title: JQuery AJAX "Not Found" Error
answer count: 3
has answer: http://stackoverflow.com/a/25516856
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25516877
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25516877
upvote count: 2
tagged with: php
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25536317
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39835287
accepted answer: http://stackoverflow.com/a/25536317

http://stackoverflow.com/q/25477495
has title: Can't upload file with XMLHttpRequest
has comment: http://stackoverflow.com/comment/39762109
has comment: http://stackoverflow.com/comment/39761385
tagged with: upload
downvote count: 0
linked to: http://stackoverflow.com/q/10475313
tagged with: javascript
duplicate of: http://stackoverflow.com/q/166221
favorite count: 0
has comment: http://stackoverflow.com/comment/87661177
has comment: http://stackoverflow.com/comment/39761547
duplicate of: http://stackoverflow.com/q/10475313
has comment: http://stackoverflow.com/comment/39761430
has comment: http://stackoverflow.com/comment/39772412
tagged with: xmlhttprequest
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: php
has body: I want to upload a file in background using JavaScript and XMLHttpRequest but my page "upload.php" receive empty $_POST and $_FILES. var formData = new FormData(); formData.append("file", file); xhr.open("POST", "upload.php", true); xhr.setRequestHeader('Cache-Control','no-cache'); xhr.setRequestHeader("Content-Type","multipart/form-data"); xhr.send(formData); I have try a lot a things in xhr.setRequestHeader() but nothings work.
type: Question
linked to: http://stackoverflow.com/q/166221
score: 1

http://stackoverflow.com/a/25413819
score: 3
type: AcceptedAnswer
downvote count: 0
has body: Replace direction: "vertical" with direction: "down": $("#viewport").hide("blind", {direction: "down"}, 4000, function (){ //do something $("#viewport").fadeIn(3000); }); Example: http://codepen.io/paulroub/pen/qtfdm
upvote count: 3
answers question: http://stackoverflow.com/q/25413757
accepted answer of: http://stackoverflow.com/q/25413757
type: Answer

http://stackoverflow.com/comment/39666659
comment on: http://stackoverflow.com/a/25426784
has text: @shennan, I'm not sure I understand. `eval` does what it does. The string the OP is passing in is a valid function expression, but is not a valid expression statement.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39822643
type: Comment
has text: Answer a question with an answer, not another question. I suggest explaining the difference between your version and his and explaining why his is wrong and your's is right.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25510277

http://stackoverflow.com/a/25471505
has body: here is my solution : $(document).ready(function () { $("#acc1").accordion({ heightStyle: "fill", active: false, autoheight: false, collapsible: true, alwaysOpen: false, activate: function (event, ui) { } }); $("h3").click(function(){ var txt = $(this).find('a').text(); $(".ui-widget-header").html(txt); }); }); JSFIDDLE DEMO
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25471421
answers question: http://stackoverflow.com/q/25471421
upvote count: 1

http://stackoverflow.com/comment/39721444
comment on: http://stackoverflow.com/q/25454808
score: 0
has text: Yeah, its a weird little bug. I am trying to think of a workaround, but nothing seems to work
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39890044
has text: Is the ID still actually set to `message` when it renders, or has asp.net changed it to something else?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25547552

http://stackoverflow.com/q/25505778
has answer: http://stackoverflow.com/a/46962227
has answer: http://stackoverflow.com/a/41202430
has answer: http://stackoverflow.com/a/65428683
has body: I have this code, to load chat function getMessages(letter) { var div = $('#messages'); $.get('msg_show.php', function (data) { div.html(data); }); } setInterval(getMessages, 100); What I have to add, to automatically scroll down #messages div on page load, and again with every new chat post? This doesn't work: function getMessages(letter) { var div = $('#messages'); $.get('msg_show.php', function (data) { div.html(data); $('#messages').scrollTop($('#messages')[0].scrollHeight); }); } setInterval(getMessages, 100);
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/75292807
upvote count: 45
downvote count: 0
has answer: http://stackoverflow.com/a/60383341
tagged with: scroll
has answer: http://stackoverflow.com/a/48568939
type: Question
tagged with: chat
has title: Automatically scroll down chat div
has answer: http://stackoverflow.com/a/25506464
has comment: http://stackoverflow.com/comment/39814158
has answer: http://stackoverflow.com/a/25506249
has answer: http://stackoverflow.com/a/53683218
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/66859703
has comment: http://stackoverflow.com/comment/39813868
has answer: http://stackoverflow.com/a/76979686
has answer: http://stackoverflow.com/a/78857453
has answer: http://stackoverflow.com/a/69420868
has answer: http://stackoverflow.com/a/58043210
has answer: http://stackoverflow.com/a/49724733
possible better answer: http://stackoverflow.com/a/25506249
score: 45
has answer: http://stackoverflow.com/a/25505864
has answer: http://stackoverflow.com/a/46958879
accepted answer: http://stackoverflow.com/a/41202430
answer count: 17
favorite count: 0

http://stackoverflow.com/q/25499334
has body: here is my demo http://jsfiddle.net/JingXiao/2k3eba6w/ it works in chrome and safari, but not work in IE or ff. Or any other solution to achieve in IE/ff? Thanks!
answer count: 0
has comment: http://stackoverflow.com/comment/39803439
score: 0
has title: IE10 can't support :after/:before when the element is "input type='radio'"?
has comment: http://stackoverflow.com/comment/39802212
tagged with: javascript
has comment: http://stackoverflow.com/comment/39802216
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39804246
has comment: http://stackoverflow.com/comment/39801962
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39801871
linked to: http://stackoverflow.com/q/4574912
has comment: http://stackoverflow.com/comment/39801888
has comment: http://stackoverflow.com/comment/39805100
type: Question
duplicate of: http://stackoverflow.com/q/4574912
tagged with: css

http://stackoverflow.com/a/25495114
type: Answer
answers question: http://stackoverflow.com/q/25494970
has body: If the iframe is on the same domain, just create a script and add it to the head. $('&lt;script /&gt;', {html: code}).appendTo($('iframe').contents().find('head')) or $('&lt;script /&gt;', {src: srcUrl}).appendTo($('iframe').contents().find('head')) Sources: https://stackoverflow.com/a/4975050/3969707 https://stackoverflow.com/a/1639342/3969707
score: 0

http://stackoverflow.com/q/25490126
answer count: 1
has comment: http://stackoverflow.com/comment/39785296
has comment: http://stackoverflow.com/comment/39784870
accepted answer: http://stackoverflow.com/a/25490986
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I cannot get a HTML form tag to display as code on my website using the syntax highlighter library. Here is my code: Your Name Your E-mail Your message {% autoescape false %} {{captcha}} {% endautoescape %} It displays in on my webpage like this: I want it to display as code like this example: The syntax highlighting is working fine on other snippets in the same blog post I am creating so I know that the library is loading okay. It just doesnt like the tags
has comment: http://stackoverflow.com/comment/39785368
type: Question
has title: Displaying html form tag in using SyntaxHighlighter
has comment: http://stackoverflow.com/comment/39785429
has answer: http://stackoverflow.com/a/25490986
tagged with: javascript
score: 0
tagged with: syntaxhighlighter

bundling-and-minification
tags question: http://stackoverflow.com/q/25531905
tags question: http://stackoverflow.com/q/25404041
tags question: http://stackoverflow.com/q/25531780
tag name: bundling-and-minification
tags question: http://stackoverflow.com/q/25404598
type: Tag
tags question: http://stackoverflow.com/q/25478207
tags question: http://stackoverflow.com/q/25428952

http://stackoverflow.com/q/25424802
type: Question
has title: How to show Dropdownlist by another Dropdownlist using Array
linked to: http://stackoverflow.com/q/3364493
tagged with: magento
tagged with: javascript
has comment: http://stackoverflow.com/comment/39675038
has comment: http://stackoverflow.com/comment/39675126
score: 0
has comment: http://stackoverflow.com/comment/39662828
tagged with: drop-down-menu
has body: Sorry because I ask a stupid question. But I have lacked the knowledge about this. Can someone help me. My "big boy" ask me to do the website by HTML only (not USE DATABASE), but he want me to make the Product Page to show the product. (Products are not many) I have 2 inputs to choose. 1. Style of product 2. Product list (depend on Style of product) => when we choose style the list of product will be list as condition. SelectBoxOptions Product Style Product Name For this example. When I choose List 1 = "BBBBBBBBBB", List 2 will be ["1111111111","1222222222","1333333333","1444444444"] => 4 products And I chooseList 1 AGAIN = CCCCCCCCCC. List 2 will be ["1111111111","1333333333","2111111111","2222222222","2333333333","2444444444"]; => 6 products I don't want it be....I want it JUST SHOW 4 products as List 1 was chose. Can anyone help me to solve this. Thank for all. SOLUTION Thank for give me the suggestion. I have found and tried much but I don't get it. Now everything is ok. The solution for this is add do function like this to remove by "loop for" for the selectors. function removeOptions(selectbox) { var i; for(i=selectbox.options.length-1;i>=0;i--) { selectbox.remove(i); } } //using the function: removeOptions(document.getElementById("pro_name")); And my completed code is: SelectBoxOptions Product Style Product Name I have edited this entry for documents. Hope my stupid question will be help...
has comment: http://stackoverflow.com/comment/39675070
favorite count: 0
has comment: http://stackoverflow.com/comment/39675166
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39662909
has comment: http://stackoverflow.com/comment/39663114
answer count: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/25507412
has comment: http://stackoverflow.com/comment/39817298
tagged with: javascript
tagged with: jquery
tagged with: inline
tagged with: css
has title: Replace or even better remove inline styles with Javascript or jQuery?
has answer: http://stackoverflow.com/a/25507572
has comment: http://stackoverflow.com/comment/39817219
has comment: http://stackoverflow.com/comment/39817217
has body: Before I posted this question I searched Google (and Stackoverflow) and though there are quite some results for this, I simply don't understand most offered solutions. Problem I am experiencing is that I use a script which fetches RSS feeds from our main website. This works perfectly, however it also displays the used inline styles, which are being used sometimes. Ofcourse this messes up the way things looks and looks rather, lets say, unprofessional. I checked the source of what's being loaded and as far as I can tell, the main culprit is an inline style called: text Less frequent are the following ones (but still rather see them go as well): text text text text Can these all be removed with jQuery or Javascript? Apparently it's possible, but I don't know how. And should I put everything in a seperate div-container? I can live with the unnecesarry 'p's and 'br's, but rather see the other ones removed. Anyone out there who is willing to help me with this? My gratitude! //edit Thank you all for the quick responses... Highly appreciated. I use a script called MagicParser to fetch those RSS feeds. I don't know much about coding like PHP, jQuery and Javascript, but I will try to use the solutions. I hope it will work. The first one didn't though :/
accepted answer: http://stackoverflow.com/a/25507503
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25507503
tagged with: replace
has comment: http://stackoverflow.com/comment/39819593
type: Question
possible better answer: http://stackoverflow.com/a/25507572
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39817265

http://stackoverflow.com/q/25508002
type: Question
has body: I use typeahead (by angular-ui) that has an typeahead-editable attribute which decides if typeahead should restrict model values to the ones selected from the popup only. I want to toggle this behavior when a $scope variable changes value. typeahead-editable="{{ allowEdit }}" The problem I have is that it doesn't update after it has been initialized. Does anyone have an idea how to achieve this? Here is the plunker!
tagged with: javascript
score: 0
answer count: 1
tagged with: angular-ui
has title: Change behavior of angular-ui typeahead on demand
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25511753
tagged with: angular-ui-typeahead

http://stackoverflow.com/a/25527210
type: Answer
has comment: http://stackoverflow.com/comment/39853537
score: 1
accepted answer of: http://stackoverflow.com/q/25527174
has comment: http://stackoverflow.com/comment/39853469
upvote count: 1
answers question: http://stackoverflow.com/q/25527174
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39853294
has body: You don't print the result of json_encode. Change the code in addproject.php to: echo json_encode($res);

http://stackoverflow.com/q/25416767
answer count: 2
accepted answer: http://stackoverflow.com/a/25416865
has answer: http://stackoverflow.com/a/25416838
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Disable certain keys, but not for textarea and input
favorite count: 0
has comment: http://stackoverflow.com/comment/39648854
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39648857
has comment: http://stackoverflow.com/comment/39648827
upvote count: 2
has comment: http://stackoverflow.com/comment/39648883
has answer: http://stackoverflow.com/a/25416865
tagged with: preventdefault
has body: I've checked this wonderful websites database and somehow provided answers does not work. To prevent glitches, by default I must disable arrow keys and spacebar. That works with this code: window.addEventListener("keydown", function(e) { if([32, 37, 38, 39, 40].indexOf(e.keyCode) &gt; -1) { e.preventDefault(); } }, false); But arrow keys and space bar are necessary for certain areas of website (input and textarea fields). To allow, I did as follows: window.addEventListener("keydown", function(e) { if([32, 37, 38, 39, 40].indexOf(e.keyCode) &gt; -1) &amp;&amp; ($(event.target)[0]!=$("textarea, input")[0])) { e.preventDefault(); } }, false); But it does not seem to work. Help much appreciated!
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39648804
type: Question
possible better answer: http://stackoverflow.com/a/25416838

http://stackoverflow.com/comment/39732027
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25461550
has text: It says [object Object] when I alert the messages array after parsing it.
type: AnswerComment

http://stackoverflow.com/comment/39808199
has text: no, only see `cust_fname[]=Ron`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25501643

http://stackoverflow.com/comment/39736422
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25463970
has text: well this one looks better but how can I stop occuering the boxes out of wrapper!
type: AnswerComment

http://stackoverflow.com/comment/39602146
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25391799
has text: So why don't you show what you have tried and explain what is going wrong?

http://stackoverflow.com/a/25437514
answers question: http://stackoverflow.com/q/25437485
score: 3
has body: Yes, you can, your attempt will have the same effect as just writing for (var row = r-1; row &gt;= 0; row++) since the comma operator only returns the result of the last expression. Maybe you want to use a logical AND instead: for (var row = r-1; row &lt; r+2 &amp;&amp; row &amp;&amp; numRows &amp;&amp; row &gt;= 0; row++) FYI, you can use any expression in each "section" in a for statement (almost, you can't directly use the in operator in the first section).
accepted answer of: http://stackoverflow.com/q/25437485
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3

http://stackoverflow.com/a/25479522
type: Answer
answers question: http://stackoverflow.com/q/25474196
has body: You need to add async:false. if you Setting async to false means that the statement you are calling has to complete before the next statement in your function can be called. If you set async: true then that statement will begin it's execution and the next statement will be called regardless of whether the async statement has completed yet. Please try this code $.ajax({ type: 'POST', url: '@Url.Action("GetCountry/" + ViewBag.Id.ToString(), "RequestList")', async:false, data: { Direct: isDirect }, success: function (data, textStatus, jqXHR) { if (textStatus != "success") { alert("There was an error processing your request."); return; } $.each(data, function (i, item) { $('#Country').append($('&lt;option&gt;').val(item.Id).text(item.Text)); }); }, error: function (jqXHR, textStatus, errorThrown) { alert("There was an error processing your request."); }, complete: function () { $("#Country").enable(); $("#ORG_ID").enable(); $('#Country option[value="@TempData["Country"]"]').prop('selected', true).change(); } })
score: 0

http://stackoverflow.com/comment/39806362
score: 0
type: Comment
type: QuestionComment
has text: isn't jqlite is doing that for you?
comment on: http://stackoverflow.com/q/25501763

http://stackoverflow.com/comment/39870636
comment on: http://stackoverflow.com/q/25536350
score: 0
type: Comment
type: QuestionComment
has text: Worked perfectly. I'd never used `console.error` before.

http://stackoverflow.com/q/25501255
type: AnsweredQuestion
score: -5
accepted answer: http://stackoverflow.com/a/25501273
has comment: http://stackoverflow.com/comment/39805293
type: Question
has body: why is my dropdown not triggering .change event and not getting the value of the option that was selected? Philippines Malaysia Indonesia Thailand Vietnam Singapore $(document).ready(function(){ $('#venture').change(function(){ alert($(this).val()); }); } here is the jsfiddle: http://jsfiddle.net/j0xc79bm/
has comment: http://stackoverflow.com/comment/39805295
upvote count: 0
downvote count: 5
tagged with: javascript
tagged with: jquery
has title: jquery .change() not triggering on select
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25501273
has comment: http://stackoverflow.com/comment/39805348

http://stackoverflow.com/a/25414883
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25414734
has comment: http://stackoverflow.com/comment/39645528
accepted answer of: http://stackoverflow.com/q/25414734
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39645558
has body: The problem is not with injecting the $socket service, but with creating it. In its definition, you define a dependency called '', that angular cannot create. app.factory('$socket', ['', function(){... Should be: app.factory('$socket', function(){... Since your method has no parameters, it has no dependencies to declare.

http://stackoverflow.com/comment/39858349
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/gdr7Ljvt/ here is the fiddle, but I'm not sure it helps
comment on: http://stackoverflow.com/q/25529321
score: 0

http://stackoverflow.com/comment/39607667
score: 0
type: Comment
has text: @LcSalazar jquerymobile add classes to the elements based on data- attribute. But this happens on pageload (or other event), so after an Ajax call, any new elements wouldn't have any of these classes (i.e: ui-header ui-btn, etc) because jquery mobile had already gone through the page. Hope that's clearer. I just don't know which event to use in this instance.
type: QuestionComment
comment on: http://stackoverflow.com/q/25393164

http://stackoverflow.com/a/29284298
upvote count: 6
has body: I couldn't get the onclick method to work. But I finally managed to run it using the click method: $("#canvas_id").click(function(e) { var activeBars = myBarChart.getBarsAtEvent(e); console.log(activeBars[0]); }); Note: this example if for the Bar chart - other charts have slightly different methods to retrieve the points (see the documentation).
has comment: http://stackoverflow.com/comment/63277765
answers question: http://stackoverflow.com/q/25514802
downvote count: 0
score: 6
type: Answer

http://stackoverflow.com/q/25518707
tagged with: facebook
has answer: http://stackoverflow.com/a/25521590
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/25521590
has title: facebook liked page (new API)
type: Question
tagged with: javascript
tagged with: api
has body: The liked field will no longer be returned in the page property of the signed_request object for Page Tab apps created from today onwards. For apps created before today, from November 5, 2014 (90 days from today), the liked property will always return true regardless of whether or not the person has liked the page. Facebook has updated the API.. I cannot get the property of liked now. How can I still check like now ?
answer count: 1

http://stackoverflow.com/a/25538289
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39886850
type: Answer
has body: Since the response from the server is an array with a single element, you will need to add a parse function that returns the first element of the array: var UserModel = Backbone.Model.extend({ urlRoot: '/users', parse: function(response){ if(response &amp;&amp; response.length) return response[0]; } }); That should allow the model to correctly parse the attributes in this response from the server: [{"name":"john","email":"john@bb.com"}]. By the way, you are creating the users collection in the success function, so it won´t be available outside that function. It might just be the sample code you posted, but you could create the users collection outside and just add the model in the success function: var users = new UserModels(); var user = new UserModel({id:1}); user.fetch({ // get the model success: function (user) { users.add(user); // add the model to a collection } }); I have created a fiddle so you can give it a try. (I have used fiddle echo service, so thats why I have changed the url and it is using a POST). If you run it and check the console, you will see the users collection being logged and you can check its models property.
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25536147
answers question: http://stackoverflow.com/q/25536147
score: 3
has comment: http://stackoverflow.com/comment/39907396
has comment: http://stackoverflow.com/comment/39906358

http://stackoverflow.com/a/25393522
score: 0
answers question: http://stackoverflow.com/q/25392150
type: Answer
has comment: http://stackoverflow.com/comment/39605318
has body: yes i forgot this part, this comes below the body: Laden van Consulenten Following the error it must be in this line: document.getElementById("status_online").innerHTML= req_online.responseText;

http://stackoverflow.com/comment/39653102
has text: Your code doesn't work at all. The `var` declaration inside the function is creating a new local variable, so you're not updating the outer variable.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25419277

http://stackoverflow.com/q/25545733
has body: I have a dojo require as window.config= { async: false, paths: { 'thirdParty' : 'https://s3.amazonaws.com/thirdPartyJSSrc' } }; In Page Javascript I am using thirdParty as require([ 'thirdParty' ], function(){ }); Now if my thirdPartyJSSrc returns 404 the other buttons handlers from JS is not working..It is showing the following error Failed to load resource: the server responded with a status of 404 (Not Found) Error {src: "dojoLoader", info: Array[2], stack: (...), message: "scriptError"} Because of this error no JS is working on other elements of page.. I don't want to include the JS if particular JS returns 404 on the page..Anyway to do this?
has answer: http://stackoverflow.com/a/25569490
tagged with: dojo
downvote count: 0
type: UnansweredQuestion
tagged with: requirejs
score: 1
tagged with: javascript
type: Question
has title: Dojo RequireJS 404 error handling from thirdparty URL
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39914500
favorite count: 0

http://stackoverflow.com/comment/39723216
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25456493
has text: Have you tried setting an explicit timezone?
type: Comment

http://stackoverflow.com/a/25456900
score: 0
type: Answer
has body: You have an empty arguement in your DI: angular.module('Demo').factory('firebaseRefFactory', function(){ return function getRef(){ var text = "132"; return text; }); Maybe try that? What you have there should work other than that. Try to avoid the array notation for DI and use ng-annotate if minifying your JS.
answers question: http://stackoverflow.com/q/25456045

http://stackoverflow.com/comment/39636928
score: 0
has text: @BOSS Thanks it works, But it doesn't works on Firefox 30.0 . Please help
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25410492

http://stackoverflow.com/comment/39737911
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25464332
type: Comment
has text: Have you seen my answer? Is this what you are doing? (i.e. posting AJAX to same page the ajax code block is on?)

http://stackoverflow.com/a/25536060
type: Answer
has comment: http://stackoverflow.com/comment/39870096
upvote count: 3
answers question: http://stackoverflow.com/q/25535988
score: 3
has body: HTML is escaped (&lt;br&gt; becomes something like &amp;lt;br&amp;gt;) when it comes in via JSON. You need to download and inject the HTML Sanitizer. https://docs.angularjs.org/api/ngSanitize
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39870768
accepted answer of: http://stackoverflow.com/q/25535988

http://stackoverflow.com/q/25543052
has comment: http://stackoverflow.com/comment/39882298
type: AnsweredQuestion
has body: I have code like the following: window.history.back(); myFunction(10); Is history.back() a blocking / non-blocking call? Is there an assurance that myFunction() will be executed? or will not be executed? Is this a possible race condition where history.back() happens asynchronously and whether myFunction() is called depends on timing of uncontrollable events?
score: 10
tagged with: concurrency
upvote count: 10
type: Question
has comment: http://stackoverflow.com/comment/39882497
has comment: http://stackoverflow.com/comment/39882453
has answer: http://stackoverflow.com/a/25543725
has title: What happens to code after history.back()?
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39882332
answer count: 1
tagged with: asynchronous
favorite count: 0
accepted answer: http://stackoverflow.com/a/25543725

http://stackoverflow.com/comment/39638704
type: Comment
has text: That doesn't fix the original problem either. The footer stays in the middle of the page for pages with little content and does not go down to the bottom for some reason. It also further places the footer in the middle for large, scrollable pages.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25411277

http://stackoverflow.com/a/25529933
answers question: http://stackoverflow.com/q/25529832
downvote count: 0
has comment: http://stackoverflow.com/comment/39860564
type: Answer
has body: jQuery's :empty finds elements with no children, not elements without a value, and as an input can't have children it finds nothing. And jQuery's is() returns a boolean, not a collection. jQuery's replaceWith replaces the entire element, not just the value. Check the value instead. $('#form input[type=text]').val(function(_, val) { return val.length === 0 ? '------' : val; }); or $('#form input[type=text]').filter(function() { return this.value.length === 0; }).val('------'); Throw in a $.trim to trim off whitespace if needed
upvote count: 3
has comment: http://stackoverflow.com/comment/39860418
score: 3

http://stackoverflow.com/a/25497444
has body: There's no way to block the developer tools, you can block the rigth click and other things, but if the user wants to edit that, he will make a way to do it. What you should do it's avoid to get this data from the front-end, if you show the user a score as example: 10 You need to get a way to get the same value on the backend, preventing the user to edit that data, otherwise the user will send anything that he wants to. I've read your comment, and what you could make to dificult the user to hack the score, it's send it encripted, and on the backend you could decrypts it... (But, this still doesn't solve your problem, as the logic of the encrypt data will be at the frontend, the user can check it and reverse the logic)
type: Answer
answers question: http://stackoverflow.com/q/25497362
score: 0

http://stackoverflow.com/comment/39734337
comment on: http://stackoverflow.com/a/25462832
score: 1
has text: And according to phpMyadmin the query doesn't work, but that up to me now :) Thanks for helping me out !
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25477409
has title: Fetching webkit-transform of an image
answer count: 1
has comment: http://stackoverflow.com/comment/39761609
has comment: http://stackoverflow.com/comment/39761330
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25478317
type: Question
has comment: http://stackoverflow.com/comment/39761340
has comment: http://stackoverflow.com/comment/39761677
tagged with: javascript
has body: I'm trying to get the -webkit-transform value of an image on my page. When I inspect the element, I see the following: &lt;img src="https://camera.JPG" style="-webkit-transform: rotate(270deg); height: 337px; margin-left: -131px;" class="753 rotated_odd"&gt; You can see that the image clearly has a rotation being applied to it. However, when I attempt to fetch the webkit-transform with the following (where image is $('img.753'): $(image).css('-webkit-transform') I get the value "none" What's going on? Additionally, I tried the following: style = window.getComputedStyle($(image).get(0)); matrix = new WebKitCSSMatrix(style.webkitTrans); But I get 0. Any help would be greatly appreciated!

http://stackoverflow.com/comment/39648793
comment on: http://stackoverflow.com/a/25416522
type: Comment
has text: Unless there's an option like `async: false` in the Stripe API, yes.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46295758
has text: You have probably solved this but just wanted to mention. Your error is most likely related to HTTP package not being added. Just do a: `meteor add http`
type: Comment
comment on: http://stackoverflow.com/a/25426497
score: 0
type: AnswerComment

http://stackoverflow.com/a/25471105
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39751066
has comment: http://stackoverflow.com/comment/39751751
answers question: http://stackoverflow.com/q/25471037
has comment: http://stackoverflow.com/comment/39749561
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25471037
score: 1
has body: This is my explanation. In the change1 this creates a new object, lets call it object1, and keeps a reference in the local variable C: people.c = {}; var C = people.c; In change2 let change the name of C in B (for avoiding confusion) people.c = {}; var B = people.c; This creates another new object, lets call it object2, that overrides the reference in people.c (so people.c points to this new object) and stores a reference to the local variable B. So the local variable C in change1 points to object1, the local variable B points to object2 and people.c points to object2. C.number = 2 will define the number property of object1 in change1 meanwhile console.log(B.number) //console.log(C.number) in the original code will try to output the property of object2 that is undefined. Basically C in change1 and C in change2 are pointing to two different objects. setTimeout does not have any effect in this.

http://stackoverflow.com/comment/39653703
type: Comment
has text: It seems to be a little faster, but still there is a time lag between the styling changes being applied.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25412419

http://stackoverflow.com/comment/39650555
has text: @Dan Thanks, I saw that one before posting mine, if you try that in JSFiddle, it still doesn't work :(
comment on: http://stackoverflow.com/q/25417629
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39775767
type: Comment
has text: if you have existing project then its possible that its happen with CSS or Any JS file , you need to find that Class which make your link or button hilight. and then check in solution , i am sure you will get it.
comment on: http://stackoverflow.com/q/25485475
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39768783
type: Comment
type: QuestionComment
has text: There are complex lines of code as the server involvement is also there. so, creating a jsfiddle is a big stuff for me. I have edditted it please go through it once more, and it would be much appreciable if you could help me.
comment on: http://stackoverflow.com/q/25446041
score: 0

http://stackoverflow.com/comment/39740832
type: QuestionComment
score: 1
has text: This is perfectly fine.
comment on: http://stackoverflow.com/q/25466280
type: Comment

http://stackoverflow.com/q/25479636
tagged with: http://stackoverflow.com/tag/html
has title: onclick function replicates after edit HTML
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/39765434
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25480373
has comment: http://stackoverflow.com/comment/39765696
has comment: http://stackoverflow.com/comment/39765538
has comment: http://stackoverflow.com/comment/39765566
type: Question
has comment: http://stackoverflow.com/comment/39765658
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39765778
has body: I have inside my html view a list of articles with a link like this: Article info The function open_modal() is suppoused to launch a bootstrap modal and populate it with the information of the article with id = 11 via ajax (the "event" parameter is to preventDefault()). But when I edit the HTML directly on the browser(F12) and change the id with another(ex. 10), when the modal is launched, it is populated with the information of article 11 and article 10 below it... And so on... It's like the function is triggering for each time I've edited the id on the HTML... Why is that happening? is there some javascript concept that I'm missing? The code for open_modal() is like this: function open_modal(event, id){ event.preventDefault(); $("#modal").modal("show"); $.ajax({ url: the-url, type: 'POST', data: { 'id' : id }, success: function(response) { // Here I append the response inside the modal $('#modal .modal-dialog').append(response); }, error: function(){ // Do something } }); }
tagged with: ajax
score: 0

http://stackoverflow.com/a/25435642
answers question: http://stackoverflow.com/q/25435238
has comment: http://stackoverflow.com/comment/39683785
score: 0
type: Answer
has body: Or maybe just a list with plain'ol css like so: http://jsfiddle.net/barrycrous/sawun9ct/ HTML: AB AB AB AB AB AB AB AB AB AB AB AB AB CSS: ul, li { list-style:none; padding:0; margin:0; } li { background:teal; font-size:12px; color:#fff; width:20px; line-height:20px; text-align:center; margin:2px; float:left; }

http://stackoverflow.com/q/25455977
has title: Primefaces JSF Opening a dialog multiple times slowly increases browser memory
has comment: http://stackoverflow.com/comment/39785130
has comment: http://stackoverflow.com/comment/39722606
has answer: http://stackoverflow.com/a/25459607
tagged with: jsf
has body: I am using Primefaces 4.0, JSF 2.1.11 I have a page with a button that calls a prime-faces dialog.show() and a dialog appears after filling it out click done and it refreshes the page with the new item added into a prime-faces dataTable. Everytime I click the button to open the dialog and fill it out then hit done my browser memory goes up. In automation testing once the dialog has been opened 125 times (our users could do this up to 800 times in a row) the browser runs out of memory. In IE8 at 125 items the memory usage was at 880 MB. So my question is how do I prevent this? more Info: Beans are viewscoped, using Glassfish 3, this issue happens in all browsers but worse in older browsers. Steps I have taken: 1. I am doing a .show() .hide() each time on the dialog. 2. I have tried to call javascript to empty out the divs in the DOM without any success. I have looked on primefaces issues and I dont see any memory leak reports, also if I let the page sit open the memory doesn't go up, its only when I am using the page and opening and closing the dialog. UPDATE: Here is some code this form is outside the other form &lt;h:form id="lineItemForm"&gt; &lt;p:dialog id="addLineItemDialogId" widgetVar="lineItemDialog" header="Line item" width="900" resizable="false" modal="true" showEffect="fade"&gt; ... ... &lt;p:commandLink value="Done" onclick="actionStarted($(this))" action="#{lineItemView.save}" update=":wizardForm:lineItemWizardPanel" oncomplete="actionComplete(); saveLineItem(args);"/&gt; &lt;/h:form&gt; The saveLineItem(args) is a javascript method that calls .hide() after validation check Here is the call to .show() it is in the form wizardForm. &lt;h:form id="wizardForm"/&gt; ... ... &lt;p:commandLink value="Add Item" action="#{lineItemView.loadLineItemFromRequest(requisitionView.request)}" process="@this" update=":lineItemForm" oncomplete="lineItemDialog.show()"/&gt; UPDATE So It ended up being a red hering. I removed the backend method call and the memory leak wen…
tagged with: java
upvote count: 1
answer count: 1
tagged with: primefaces
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39722200
has comment: http://stackoverflow.com/comment/39737027
has comment: http://stackoverflow.com/comment/39728165
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: memory-leaks

http://stackoverflow.com/a/25574784
upvote count: 2
has comment: http://stackoverflow.com/comment/39981685
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25522573
has comment: http://stackoverflow.com/comment/39943325
has body: What about something like this? It's a workaround for what you're asking, but it does basically the same thing, just fix the styling, spaces, etc. as you'd like HTML Age Job Person 1 18 Clerk Person 2 23 Policeman Age Job Person 3 17 Student Person 4 46 Firefighter CSS td, th { border:1px solid #222 } .red { background:red } .ui-state-disabled { opacity:1 } .sortableContainer>div { display:inline-block; } table { border-spacing:0px; border-collapse:collapse; } JS $(function () { $(".sort").sortable({ connectWith: ".connect" }).disableSelection(); });
has comment: http://stackoverflow.com/comment/39942787
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39980704
answers question: http://stackoverflow.com/q/25522573
has comment: http://stackoverflow.com/comment/39989978

http://stackoverflow.com/q/25459147
favorite count: 0
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/39818610
tagged with: wiselinks
upvote count: 1
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39836825
has comment: http://stackoverflow.com/comment/39836914
tagged with: javascript
type: UnansweredQuestion
tagged with: ruby-on-rails-4
answer count: 0
downvote count: 0
has title: Rails Wiselinks & Angular : How can I make the angular code load after the page loads?
score: 1
has body: When I use the data-push the Angular code shows up as this {{user.name }} How can I make the page request so the Angular code gets triggered ? Turbolinks is a bad mix with Angular and jQuery on Rails, I took it out, because it caused so much trouble, I decided not to go there and use Wiselinks instead. This is what I'm doing: I have the @users being passed to $resource to the data to Angular side: App.factory('User', [ '$resource', function($resource) { return $resource('/users/:id.json', { id: '@id' }); } ]); and I have the template working when I enter the Page localhost:3000/users as address however when I click the link with data-push enabled: &lt;a href="&lt;%= users_path %&gt;" data-push="true"&gt;Users&lt;/a&gt; It only loads to the console and the empty Angular template shows up in the view {{user.name}} from the ng-repeat Again I know this is a bad mixture, but this is the only way I know to make this Web app like style work and I feel like I'm hitting bottleneck and I missing something, I guess the page Have to be LOADED without push, wiselinks and turbolinks one way or another. Is that true ? please say no. Code Update: app.js window.App = angular.module('UsersApp', ['ngResource']) user_ctrl.js ` App.controller('UserCtrl', [ '$scope', 'User','$compile', function($scope, User,$compile) { $scope.users = User.query(); } ]); user.js App.factory('User', [ '$resource', function($resource) { return $resource('/users/:id.json', { id: '@id' }); } ]); Now in the view I have this inside users/index.html.erb &lt;div class="row" ng-controller="UserCtrl" ng-cloak ng-app="UsersApp"&gt; &lt;div ng-repeat="user in users | filter:searchText"&gt; &lt;strong&gt;{{ user.full_name }}&lt;/strong&gt; &lt;/div&gt; &lt;/div&gt; ` In the actuall code, ng-cloak ng-app="UsersApp" is defined on the body

http://stackoverflow.com/q/25524729
answer count: 1
has answer: http://stackoverflow.com/a/25524788
accepted answer: http://stackoverflow.com/a/25524788
favorite count: 0
type: AnsweredQuestion
has body: I want to decorate a function of a JavaScript "class" (prototype): SomeClass = function() { this.someVar = 5; }; SomeClass.prototype = { foo: function(arg) { /* do something with this.someVar */ } } However, I cannot change the source of SomeClass nor am I able to influence the instance creation of SomeClass instances. Therefore I thought about doing the following: var oldFoo = SomeClass.prototype.foo; SomeClass.prototype.foo = function(arg) { console.log("Yey, decorating!"); oldFoo(arg); }; This seems to work fine, however, due to function scoping oldFoo cannot access someVar anymore (the this object is now window). How to overcome this issue?
has title: JavaScript prototypes: replace a function
downvote count: 0
score: 1
type: Question
tagged with: javascript
upvote count: 1

http://stackoverflow.com/q/25431214
has comment: http://stackoverflow.com/comment/39683440
has title: google maps javascript api v3 spanish language issue
type: AnsweredQuestion
upvote count: 0
has body: The official Google Maps API Coverage spreadsheet says spanish language / labels are enabled. http://spreadsheets.google.com/spreadsheet/pub?key=0Ah0xU81penP1cDlwZHdzYWkyaERNc0xrWHNvTTA1S1E&amp;gid=1 And using google.com/maps, when enabling spanish language, falkland islans are labeled "islas malvinas": https://www.google.com.ar/maps/@-51.5082093,-59.8635691,8z?hl=es but the thing is, when using google maps javascript api v3, this spanish enabled (following the official spreadsheet) does not work, is not enabled: fiddle for test code: function initialize() { var mapOptions = { zoom: 7, center: new google.maps.LatLng(-51.5082093,-59.8635691) }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } function loadScript(lang) { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;' + 'callback=initialize'; if (lang) { script.src += '&amp;language=' + lang; } script.id = "google-maps-script"; document.body.appendChild(script); } window.onload = loadScript; function ChangeGoogleMapsLanguage() { var lang = document.getElementById('language').value, oldScript = document.getElementById("google-maps-script"); oldScript.parentNode.removeChild(oldScript); delete google.maps; loadScript(lang); } so the question is: why google.com/maps tiles with spanish language enabled does label "islas malvinas", but when i try the same using the api this does not work and its forcing english labels? (though this DO work using google web maps) ? Anyone knows why? How can i work this out? thanks.
type: Question
has answer: http://stackoverflow.com/a/25435638
accepted answer: http://stackoverflow.com/a/25435638
tagged with: google-maps
tagged with: javascript
score: -1
tagged with: google-maps-api-3
tagged with: google-apps-script
has comment: http://stackoverflow.com/comment/39676555
answer count: 1
downvote count: 1
favorite count: 0

http://stackoverflow.com/q/25517896
linked to: http://stackoverflow.com/q/2444430
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/9384444
has body: I am currently working on a Chrome Extension that requires a way to acquire the word under the cursor. One common solution I found is to wrap every single word in the html with tags. However, doing this will strip out any previous HTML and thus remove all the styles and hyperlinks. I used the following code snippet from this answer to recursively add span to every word in str, but there are still many cases where it fails when different formatting appears on webpages. var regex = /(\(*&lt;.+?&lt;\/.+?&gt;|\S+)/g; var spannedStr = str.replace(regex, function(a) { var m = (/&lt;(\w+)([^&gt;]*)&gt;([^&lt;]*)&lt;\/\w+&gt;/).exec(a); if (m !== null) { return "&lt;" + m[1] + m[2] + "&gt;" + m[3].replace(regex, arguments.callee) + "&lt;/" + m[1] + "&gt;"; } return "&lt;span class = \"toTranslate\"&gt;" + a + "&lt;/span&gt;"; }); I looked at some other Chrome Extensions, and one of them seemed to have been able to retrieve the word under the cursor without injecting the span tag to every word in the html. My question is: is there another way to find the word under the cursor? Or is there a better way to wrap the words in spans that does not interfere with the original html styles and hyperlinks?
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25518288
has title: How to get a word under a cursor without wrapping every word with tag?
upvote count: 2
accepted answer: http://stackoverflow.com/a/25518288
type: Question

http://stackoverflow.com/q/25528559
has comment: http://stackoverflow.com/comment/39866565
accepted answer: http://stackoverflow.com/a/25535822
type: Question
has answer: http://stackoverflow.com/a/25535822
answer count: 1
upvote count: 6
tagged with: javascript
tagged with: jquery
has body: I have a div with a fixed height and a fluid width (15% of body width). I want the paragraph text inside to totally fill the div; not overflow and not underfill. I've tried with jQuery to increment the text size until the height of the paragraph is equal to the height of the container div. At that point, the text should be totally covering the div. The only problem is that font-size increments in 0.5px values. You can't do 33.3px; it has to be either 33.0px or 33.5px. So at 33px, my text is far too short to cover the div, and at 33.5px it overflows. Does anyone have any ideas on how to remedy this? There are lots of plugins for making text fill the whole width of a container, but not for text that has to fill both the width and height. At least, none that I've seen. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius nibh quis urna porttitor, pharetra elementum nisl egestas. Suspendisse libero lacus, faucibus id convallis sit amet, consequat vitae odio. Text set at 33px. It is too short. Text set at 33.5px. It overflows.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39856231
tagged with: css
has comment: http://stackoverflow.com/comment/39856899
has comment: http://stackoverflow.com/comment/39856132
favorite count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/39857456
score: 6
has comment: http://stackoverflow.com/comment/39855786
has title: Resize text to totally fill container
has comment: http://stackoverflow.com/comment/39857444
type: AnsweredQuestion

http://stackoverflow.com/a/25550610
downvote count: 0
score: 1
has body: @CMS is right that preloading the content helps -- the issue you are seeing is likely that the image is not loaded when you update the stage, and it is only updating once. You can use your approach in the original question, as long as you update the stage once the image is loaded. You can do this simply by waiting for a load event from the image. Something like this: image.onload = function() { update = true; // OR stage.update(); } Using PreloadJS is a better approach for a larger app, since it gives you way more control of when assets are loaded, etc -- but its not necessary to get your code working.
upvote count: 1
answers question: http://stackoverflow.com/q/25520575
type: Answer

http://stackoverflow.com/comment/120066884
comment on: http://stackoverflow.com/q/25445377
has text: Also [date-fns](https://date-fns.org) has `startOfToday` which does what you want, and `isToday` which is also useful.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25418223
has body: Add this in your code: /*added for validate*/ $('#frm_managedeal input').on('change', function() { $(this).valid(); }); Demo
type: Answer
upvote count: 2
score: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25401695
accepted answer of: http://stackoverflow.com/q/25401695
type: AcceptedAnswer

http://stackoverflow.com/comment/39607815
type: Comment
comment on: http://stackoverflow.com/a/25394845
score: 1
type: AnswerComment
has text: how did you know i had that gem installed?

http://stackoverflow.com/a/25398032
answers question: http://stackoverflow.com/q/25397628
score: 0
type: Answer
has body: Please make sure that you have configured the routing for the navigation url '/about'?

http://stackoverflow.com/comment/39642085
type: AnswerComment
comment on: http://stackoverflow.com/a/25394724
type: Comment
has text: Send your mail in the `if ($errors) {}` part. The rest of the code is not affecting the $_POST vars at all, or getting in the way of the submission process.
score: 0

http://stackoverflow.com/a/25729736
answers question: http://stackoverflow.com/q/25452586
has body: The fact that you have a 406, and also the fact that this is based on the presence of the &lt; before the word script, leads directly to a security filter in action. So mod_security and apache configuration files would be more useful than the js/php code to find the root blocking rule. This looks like an anti-xss filter. Maybe a very simple one like: SecFilter "&lt;( |\n)*script" If you can alter this mod_security configuration, then do that... or don't. It's about security. Maybe you should keep theses filter in place to protect your application for really unwanted script injections. Maybe the real solution is that your official application forms should manage communications with the server without being suspicious for mod_security. And here your POST is too much like a Cross Site Scripting attack for a tool which is only reading the stream and detect a javascript call inside. You could for example add a base64 encoding on the POSTed value (from the js) and decode the result on the PHP side, some base64 encoding js libraries are available on github. You could in fact apply any transformation on your data that render this data HTML-free (and Javascript-free), at least for the HTTP filtering tools. And Base64 is usually the solution, but check how the used library manage encoding of utf-8 characters, the real base64 was ascii only.
has comment: http://stackoverflow.com/comment/40265574
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40238943
has comment: http://stackoverflow.com/comment/40262687
accepted answer of: http://stackoverflow.com/q/25452586
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40231914
has comment: http://stackoverflow.com/comment/122764076

http://stackoverflow.com/comment/39733979
has text: he already stated that he has removed them. _You may see a JS below which is now commented which is now copied in all-set.js without two lines._
type: Comment
comment on: http://stackoverflow.com/a/25462290
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40163567
has text: Sorry for delay, its static and i m not using ajax. It is a single file rendered through Smarty contains the js also. Is it possible to separate the js and create via php using Smarty.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25542836
type: Comment

http://stackoverflow.com/q/25467512
has comment: http://stackoverflow.com/comment/39743769
has body: I have a mobile application which communicates with my soap web service through ajax. The user have to insert 2 fields to login (uname and password) and when he press the login button, a javascript method is been called to post the data to the web service via ajax. I can get the input values from the html page, but when I debug the web service I see that the arguments that were received are null instead the values that the user entered, and I don't see why.. function login() { var uname = document.getElementById('uname').value; var pass = document.getElementById('password').value; var soapRequest = '&lt;?xml version="1.0" encoding="utf-8"?&gt; \ &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\ xmlns:xsd="http://www.w3.org/2001/XMLSchema"\ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;\ &lt;soap:Body&gt;\ &lt;Login xmlns="http://service.webservice.org/"&gt;\ &lt;Name&gt;' + uname + '&lt;/Name&gt;\ &lt;Password&gt;' + pass + '&lt;/Password&gt;\ &lt;/Login&gt;\ &lt;/soap:Body&gt;\ &lt;/soap:Envelope&gt;'; $.ajax({ type : "POST", url : "http://localhost:8080/WebService/Service", contentType: "text/xml", dataType: "xml", data: soapRequest, success : function(data, status, req, xml, xmlHttpRequest, responseXML) { var xmlText = $(req.responseXML).find('LoginResult').text(); alert(xmlText); }, error: function () { alert("error"); } });
answer count: 1
has title: Getting NULL instead the string value in soap request
has comment: http://stackoverflow.com/comment/39743182
tagged with: soap
tagged with: web-services
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25494532
type: Question
has comment: http://stackoverflow.com/comment/39746250
accepted answer: http://stackoverflow.com/a/25494532
has comment: http://stackoverflow.com/comment/39742932
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39742972
tagged with: ajax
score: 0

http://stackoverflow.com/comment/39877820
type: Comment
type: QuestionComment
score: 1
has text: You have a syntax error in the line with the `if` on it. You also apparently don't know the meaning of `===`.
comment on: http://stackoverflow.com/q/25540302

http://stackoverflow.com/a/25395235
has body: Use the onerror event of the XMLHttpRequest: function aGet(url, cb) { var x = new XMLHttpRequest(); x.onload = function(e) { cb(x.responseText) }; x.onerror= function(e) { alert("Error fetching " + url); }; x.open("GET", url, true); x.send(); } var dmp = console.log.bind(console); // Dummy callback to dump to console aGet("/", dmp) // Ok, uses onload to trigger callback aGet("http://dgfgdf.com/sdfsdf", dmp); // Fails, uses onerror to trigger alert
accepted answer of: http://stackoverflow.com/q/25395119
has comment: http://stackoverflow.com/comment/39608667
score: 20
upvote count: 20
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39608650
has comment: http://stackoverflow.com/comment/44068738
type: Answer
answers question: http://stackoverflow.com/q/25395119
has comment: http://stackoverflow.com/comment/52928243

http://stackoverflow.com/comment/40084312
score: 0
type: AnswerComment
has text: No problem. I am working on a lot of mysql right now so anything jQuery-ish to give me a break is great.
type: Comment
comment on: http://stackoverflow.com/a/25492291

http://stackoverflow.com/comment/39755931
type: AnswerComment
has text: Unfortunately I don't know anything about jquery mobile; you may need to check their documentation. I expect that this will appear differently in a proper browser window (as opposed to the small JSFiddle results window).
comment on: http://stackoverflow.com/a/25472364
type: Comment
score: 0

http://stackoverflow.com/comment/39754434
score: 0
comment on: http://stackoverflow.com/a/25473416
has text: Didn't seem to work. If I put the checked abbr on the checkbox it does not toggle the classes
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39817687
comment on: http://stackoverflow.com/a/25507684
type: Comment
has text: Is it possible to change colour to white from a certain index? Example: Index is 40. I want everything white beyond that point..
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39736337
type: AnswerComment
comment on: http://stackoverflow.com/a/25463970
has text: It works exactly as intended, but probably not as you're expecting. What did you expect would happen ?
score: 0
type: Comment

http://stackoverflow.com/comment/39738481
comment on: http://stackoverflow.com/q/25463643
has text: Maybe it sounds a bit like too much, but would you consider a solution like this: in case the sub menu that would be displayed next would not fit in the screen, the active sub menus slide mid-tempo to the left ("under" sub menu level 1 which stays in place) and the critical sub menu is then displayed on the previous sub menu's position? Don't know if it's described clear enough but overlapping sub menus are somehow evil from user experience view.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39874639
comment on: http://stackoverflow.com/q/25523350
score: 0
type: Comment
type: QuestionComment
has text: Well, which Node.js library are you using ? This one ? https://github.com/thingdom/node-neo4j

http://stackoverflow.com/comment/39716160
type: QuestionComment
has text: This is not possible. You can however use [iframes to do this](http://stackoverflow.com/questions/1451208/access-iframe-elements-in-javascript?lq=1). The other alternative is to design your site as a Single Page Application (SPA). Another solution is not to go full-blown SPA but to make use of AJAX to load page fragments dynamically.
comment on: http://stackoverflow.com/q/25452751
score: 0
type: Comment

http://stackoverflow.com/comment/39873844
comment on: http://stackoverflow.com/a/25536431
type: AnswerComment
type: Comment
has text: @CasimiretHippolyte I think you are missing the point of my answer. The answer is more about how to filter input text using the recommended AngularJs approach (i.e. using a directive with $parsers), than on the actual RegEx pattern. I thought that was clear given the fact that I clearly indicated I used the pattern from the already accepted answer. Just a suggestion, why dont you post an answer with your super-lean pattern?
score: 1

http://stackoverflow.com/q/25535588
accepted answer: http://stackoverflow.com/a/25535639
has title: Appending text from textarea to div on button click
downvote count: 0
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39868889
possible better answer: http://stackoverflow.com/a/25535732
has answer: http://stackoverflow.com/a/25535732
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25535639
has body: I have a button that on a click event generates a div. The newly createded div is draggable and stays contained within another div. The issue: As the div is being created I am trying to append text to it. Nothing is getting appended due to not properly grabbing the value from the textarea and appending to the div. JSFIDDLE Jquery $('#button').click(function(e) { $(' ').draggable({ containment: "parent" }).appendTo('.middle-side'); $('textarea').val().appendTo('.draggable'); }); HTML
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25533777
has comment: http://stackoverflow.com/comment/39865618
has comment: http://stackoverflow.com/comment/39865824
type: Answer
answers question: http://stackoverflow.com/q/25533747
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39865427
has body: Try this: var $navyyLi = $(".navyy li"); $navyyLi.click(function() { $navyyLi.removeClass('highlight') $(this).addClass('highlight'); }); Check JSFiddle Demo
has comment: http://stackoverflow.com/comment/39867540
accepted answer of: http://stackoverflow.com/q/25533747
type: AcceptedAnswer
downvote count: 0

size
type: Tag
tags question: http://stackoverflow.com/q/25542634
tags question: http://stackoverflow.com/q/25412959
tag name: size

http://stackoverflow.com/comment/39816126
has text: Post your html, not your php.
type: QuestionComment
comment on: http://stackoverflow.com/q/25506912
type: Comment
score: 3

http://stackoverflow.com/comment/39892013
has text: add another div with `id="fade"` in the markup, have it hidden by default, set its position to absolute, 100% width and height, set its background to black , set its opacity to 0.5 and right before `$('#spinner').show()` add `$('#fade').fadeIn()` and to hide it `$('#fade').fadeOut()`
score: 1
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25548164

http://stackoverflow.com/comment/39647724
comment on: http://stackoverflow.com/a/25413040
has text: I see your logic. I actually tried adding a 4th variable and changed the src to point to the video. It failed to load, perhaps the reason I didn't add play() on fadeIn. I did a few searches, not much luck.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39863723
comment on: http://stackoverflow.com/q/25532888
score: 0
type: Comment
type: QuestionComment
has text: can you post more code?

http://stackoverflow.com/comment/39736296
type: AnswerComment
comment on: http://stackoverflow.com/a/25463970
score: 0
type: Comment
has text: Thank adeneo but this is causing some issues as well. can you please take a look at here :http://jsfiddle.net/Behseini/k7mmybje/1/

http://stackoverflow.com/a/50680736
has body: jquery is not a good thing to get into. Better in pure javascript for (x = 0; x &lt;= document.getElementsByClassName("YOURCLASSNAME").lenght -1; x++){ document.getElementsByClassName("YOURCLASSNAME")[x].parentNode.removeChild(document.getElementsByClassName("YOURCLASSNAME")[x]); }
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25403774

http://stackoverflow.com/comment/39611372
type: AnswerComment
type: Comment
has text: sorry, I'm not sure if you understood. I just wanted on button click, it does some javascript and then redirects to a urlpage in rails.
score: 0
comment on: http://stackoverflow.com/a/25396464

http://stackoverflow.com/comment/39896145
score: 0
type: Comment
has text: @ Brian: Perhaps there's a misunderstanding. The OP has `$('#courseTab li').on('click', function(event) {/*...*/});` and you've said you're not sure that's correct and suggested `$('#courseTab li').click(function(event) {/*...*/});` That is functionally identical to what the OP did. `.on("click", function...)` and `.click(function...)` are two ways of writing the same thing.
type: AnswerComment
comment on: http://stackoverflow.com/a/25537139

http://stackoverflow.com/comment/39797822
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25496827
has text: I copy and paste your code into JSFiddle and I don't see any animation at all.. So, your goal is to change the above code into plain JS or create slideToggle without using it ?

http://stackoverflow.com/comment/39876108
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25531067
type: Comment
has text: It's a little hidden, but it's implied in this statement `Note andThen has a single argument of the function that contains the code to execute after the other test helpers have finished.`, but this statement `The andThen helper will wait for all preceding asynchronous helpers to complete prior to progressing forward.` is misleading, really you need to read them together for an accurate statement. It really means the code inserted won't execute until the current global promise completes, but it will continue on with the code outside of the andThen.

http://stackoverflow.com/comment/39649839
type: Comment
has text: That didn't work unfortunately, the active class (which is just an all color set of buttons vs monochrome when off) is on all the time now not just on the click event...@user26409021
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25417310

http://stackoverflow.com/q/25547533
accepted answer: http://stackoverflow.com/a/25549616
tagged with: http://stackoverflow.com/tag/json
has body: I want to use AJAX and the SoundCloud API to get the tracks of a user. jQuery.ajax({ url: 'http://api.soundcloud.com/resolve?url=http://soundcloud.com/[SOME USER]/tracks/&amp;format=json&amp;consumer_key=[MY KEY]&amp;callback=?' , dataType: 'jsonp' , success: function( data ) { console.log( data ); } }); I can see that chrome gets the json data but I get the error Uncaught SyntaxError: Unexpected token ILLEGAL in the console. The issue is probably that the json file is an json array. Could that be the error? And if yes, how can I convert the array into single objects?
has comment: http://stackoverflow.com/comment/39893690
has comment: http://stackoverflow.com/comment/39892097
tagged with: soundcloud
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39892072
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39892131
has answer: http://stackoverflow.com/a/25549616
score: 2
upvote count: 2
has title: Why do I get Uncaught SyntaxError: Unexpected token ILLEGAL
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/39608762
comment on: http://stackoverflow.com/q/25394797
has text: @RobG: it's very reliable that if navigator.online===false, you don't have internet. if it's true, then the OP's 2nd step should handle the potential false positives.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25409804
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
score: 3
downvote count: 0
tagged with: cookies
has body: I use $resource to login to a (Yii) php backend. After the login I want to retreive all cars (for example). BUT the received cookie, contains a different PHPSESSID every request. How can this problem be fixed? (it works when I use a RESTclient (browser addon), but not in angularJs) An usecase: (login + get all cars) [LOGIN]: $var user = $resource(conf.HOST+'/user/login',{},{'login':{method:'POST',isArray: false}}); user.login({username:username,password:password}).$promise.then(function(resp,head){ // GOES WELL}; we should be authenticated now The server response cookie contains TWO received PHPSESSID's lets say A &amp; B [GET CARS]: var client = $resource(conf.HOST+'/api/client',{},{'all':{method:'GET',isArray:false}}); var clients = client.all(); The server response cookie contains ONE received PHPSESSID's lets say C if i invoke the client.all() function again, the received PHPSESSID changes again to lets say D. How can this problem (changing sessionId over requests) be fixed?
type: Question
tagged with: angularjs-service
tagged with: yii
tagged with: javascript
has comment: http://stackoverflow.com/comment/73863359
upvote count: 3
has title: angularjs - $resource cookie phpsessid changes every server request
favorite count: 0

http://stackoverflow.com/q/25502206
has answer: http://stackoverflow.com/a/25502256
upvote count: 4
has answer: http://stackoverflow.com/a/25502271
has answer: http://stackoverflow.com/a/25502223
has comment: http://stackoverflow.com/comment/39808640
downvote count: 0
has answer: http://stackoverflow.com/a/25502266
has comment: http://stackoverflow.com/comment/39807870
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25502254
has answer: http://stackoverflow.com/a/25502342
accepted answer: http://stackoverflow.com/a/25502223
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39808945
has title: Clear Input Fields on button click
has comment: http://stackoverflow.com/comment/39808961
has answer: http://stackoverflow.com/a/25502257
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25502701
has comment: http://stackoverflow.com/comment/39807943
has comment: http://stackoverflow.com/comment/39808030
has comment: http://stackoverflow.com/comment/39807189
has body: I have got a input field where in user enters data. There are 2 buttons next to it upon click any one of them or both the input fields get reset. Now since these buttons and field is not inside a form I can't go for a instead how can i clear it with JQuery. The point is, now I have displayed only 2 buttons, the JQuery must also work if there where more buttons..Fiddle link below and the code i tried $('button').each(function(){ $('button').click(function(){ find('input[type="text"]').val() = "0"; }); }); [Fiddle link] http://jsfiddle.net/vineetgnair/1s22gcL5/ Thanks to all for help.
has comment: http://stackoverflow.com/comment/39808525
type: Question
possible better answer: http://stackoverflow.com/a/25502256
answer count: 8

http://stackoverflow.com/q/25531868
tagged with: css
possible better answer: http://stackoverflow.com/a/25531982
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39861988
score: -5
upvote count: 2
has title: Use a span tag to change div background-color onclick
has comment: http://stackoverflow.com/comment/39861892
has comment: http://stackoverflow.com/comment/39862355
has comment: http://stackoverflow.com/comment/39862185
downvote count: 7
type: Question
has comment: http://stackoverflow.com/comment/39862396
tagged with: javascript
has comment: http://stackoverflow.com/comment/39862526
has answer: http://stackoverflow.com/a/25532195
accepted answer: http://stackoverflow.com/a/25532195
has answer: http://stackoverflow.com/a/25531982
answer count: 2
has body: I have following html code: Text 1 Text 2 Text 3 If I click on specific , the div parent's background color should be changed. How this can be done using jQuery? I've tried this: $('ul li span').click(function(){ $('.parent').css('background-color', $(this).data-color); });
tagged with: jquery
has comment: http://stackoverflow.com/comment/39862667
favorite count: 0
has comment: http://stackoverflow.com/comment/39862084
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39861917

http://stackoverflow.com/comment/39692377
score: 0
type: AnswerComment
has text: another question, So i just can use The code you provided at the very top as a replacement in the code that i used right?
type: Comment
comment on: http://stackoverflow.com/a/25440373

http://stackoverflow.com/q/25428436
has comment: http://stackoverflow.com/comment/39670093
type: Question
has comment: http://stackoverflow.com/comment/39698507
tagged with: highcharts
tagged with: javascript
has comment: http://stackoverflow.com/comment/39783948
score: 0
has title: How to take from database names for Highcharts Pie Chart Slices
has body: I just managed to make the Pie chart on Highcharts as i want to display the data. Like this: data.php <?php $con = mysql_connect("localhost","user","psw"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("ftsosticket", $con); $result = mysql_query("SELECT COUNT(ticket_id) FROM ost_ticket GROUP BY dept_id") or die ("Error in query: $query. ".mysql_error()); $rows = array(); while($r = mysql_fetch_array($result)) { $row[0] = $r[0]; /*$row[1] = $r[1];*/ array_push($rows,$row); } print json_encode($rows, JSON_NUMERIC_CHECK); mysql_close($con); ?> So for the display, i used this example index.html Test Pie Graphics So in the final display i just obtains Slice and % as result I used this code to take the data from the database, in order to use as Slice names instead the $.getJSON default, but, didn't work. $.ajax({ url: 'data.php', success: function(jsonData) { chart = new Highcharts.Chart({ <snip> series: [{ type: 'pie', name: 'Content', data: jsonData }] <snip> }, cache: false }); So, the question is, how to take the name directly from the database? i know that it's gonna be like (1,2,3,4, etc...) because that are the departments names, but, with that solved, i can override it to the real departments names. Thanks in advance. Edit I tested the Query and i discovered that only conts the tickets per id, w/o taking the respective dept_id, so i changed the sentence to: "SELECT COUNT(ticket_id), dept_id FROM ost_ticket GROUP BY dept_id" And now i have this from the query: COUNT(ticket_id):1,2,2. dept_id:18,2,11. But i don't know how to take that dept_id onto the slices names.
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39673925
tagged with: php
tagged with: charts
has comment: http://stackoverflow.com/comment/39852355
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39672274

http://stackoverflow.com/comment/39648733
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25416616
has text: Ok, I see what you mean. Then ignore my previous comment. Agreed, yes it's not a syntax error.

http://stackoverflow.com/comment/39867554
comment on: http://stackoverflow.com/q/25534950
type: Comment
type: QuestionComment
score: 0
has text: @JasonP , sorry I type it wrongly when I enter here. I will remove away the extra ;

http://stackoverflow.com/q/25466062
has answer: http://stackoverflow.com/a/25466118
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39740278
tagged with: http-redirect
tagged with: php
score: 0
upvote count: 1
has body: Hey I've been trying to look for a script that does this but haven't had any luck. I am sending traffic to subdomain.domain.com and want to redirect desktop traffic to subdomain.domain.com/desktop/ and mobile traffic to subdomain.domain.com/mobile/ Is there an easy way to do this, I've only found scripts that redirect users away from your desktop site.
downvote count: 1
type: Question
has title: Redirecting mobile/desktop users through javascript/php
tagged with: mobile
tagged with: javascript
tagged with: desktop

http://stackoverflow.com/q/25393794
has comment: http://stackoverflow.com/comment/39605911
has comment: http://stackoverflow.com/comment/39606107
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39605912
has comment: http://stackoverflow.com/comment/39605974
has answer: http://stackoverflow.com/a/25403842
type: Question
answer count: 1
tagged with: javascript
tagged with: express
has body: I am trying to wrap my head around Promises, then , when, and everything else that goes along with it. I am not having much success. Here is what I'm trying to accomplish in English, and maybe somebody can crack the code because so far nothing I've written works. I am writing a SPA (single page app) for mobile devices. Essentially all the content is is one giant HTML page with a bunch of DIV's. However, only one DIV is shown at a time. The user will have a tab bar to click on each of the icons to show/hide DIV's. Think of something like the Apple App Store interface with "Featured", "Top Charts", "Explore", "Search", and "Updates" at the bottom. Parse database query of table Businesses for 1 business with AppUrl=example.com Resulting business objectId is used to query table Navigation for all pieces of the navigation. Things like "Home", "About Us", "Menus", "Events", "Contact", etc. Resulting navigation items are looped to render DIV's with content in them. The content comes from the tables below depending on the Module column: "Home" = Photos table "About Us" = Pages table "Menus" = Lists table "Event" = Lists table That's basically it. Pretty simple, but obviously there are nest queries within #4. I don't know if I should be creating one giant object in my queries and then outputting that? Or creating a bunch of different objects with arrays inside of them? Really kind of lost since this style of syntax is different than say PHP. Advice? Here is my non-database connected version: app.get('/', function(req, res){ var frontpageImages = [ { caption:"Eggplant, Prosciutto, and Pesto Pressed Sandwiches.", file:"image01.jpg", position:"15%" }, { caption:"Pico de Gallo", file:"image02.jpg", position:"75%" }, { caption:"B.L.A.T Croque Madame", file:"image03.jpg", position:"20%" }, { caption:"Double Oreo Brownie Cupcake", file:"image04.jpg", position:"80%" }, { caption:"Baked Chicken Chimichangas with Monterey Jack Cheese Sauce", file:"image05.jpg", position:"20%" } ] var …
has comment: http://stackoverflow.com/comment/39607717
score: 0
has title: Parse: JavaScript Promises issue
has comment: http://stackoverflow.com/comment/39606564
accepted answer: http://stackoverflow.com/a/25403842
favorite count: 0
has comment: http://stackoverflow.com/comment/39607529
tagged with: parse-platform
upvote count: 2
downvote count: 2
tagged with: node.js

http://stackoverflow.com/a/25522208
accepted answer of: http://stackoverflow.com/q/25521654
type: Answer
has comment: http://stackoverflow.com/comment/39844613
upvote count: 2
has body: I would suggest using Regex and running a check on each Like so: function validateStr(str) { var regex = new RegExp("[A-Z]+"); // Check for uppercase first if(regex.test(str) == true) { regex = new RegExp("[0-9]+"); // Now we check for numbers if(regex.test(str) == true) { regex = new RegExp("[a-z]+"); // checking now for lowercase if(regex.test(str) == true) { return 1; } else return 2; } else return 3; } else return 4; } I haven't included the "Special Character" parameter because you have to include those individually in to one regular expression which I don't recommend you do. I am struggling to get it to work on JSFiddle so I haven't included one but just post a comment if you need me to explain further.
has comment: http://stackoverflow.com/comment/39844465
score: 2
answers question: http://stackoverflow.com/q/25521654
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25449031
downvote count: 0
has comment: http://stackoverflow.com/comment/39708619
accepted answer of: http://stackoverflow.com/q/25444403
score: 4
type: AcceptedAnswer
type: Answer
upvote count: 4
has body: It's true that, generally, an FFT of size N will give you N frequency bins. When you're analyzing "real" signals, though, half of these bins will be redundant. Specifically, the first half of the FFT will mirror the second half: bins [2..(N/2)+1] will equal bins [N..(N/2)+1]. Since all audio signals are "real", this symmetry property will hold for any FFT you do in the Web Audio API. The result will only contain N/2 unique values. In other words, the analysis array has size N/2 because that's the size of the result. A larger array would be wasteful. A more rigorous discussion of FFT symmetry is here: https://dsp.stackexchange.com/questions/4825/why-is-the-fft-mirrored
answers question: http://stackoverflow.com/q/25444403

http://stackoverflow.com/q/25438773
has comment: http://stackoverflow.com/comment/39689252
has comment: http://stackoverflow.com/comment/39689227
has answer: http://stackoverflow.com/a/25438804
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25438808
upvote count: 0
accepted answer: http://stackoverflow.com/a/25438806
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39689285
linked to: http://stackoverflow.com/q/1732348
answer count: 3
has body: I need your help to remove all characters using a Javascript Regex in string HTML Document except and whole string inside body tag. I tried to use this but doesn't work: var str = " my content " str.replace(/[^\<body\>(.+)\<\\body\>]+/g,''); I need the body content only, other option will be to use DOMParser: var oParser = new DOMParser(str); var oDOM = oParser.parseFromString(str, "text/xml"); But this throws an error parsing my string document loaded via Ajax. Thanks in advance for your suggestions!
has comment: http://stackoverflow.com/comment/39689207
has answer: http://stackoverflow.com/a/25438806
has comment: http://stackoverflow.com/comment/39689499
has comment: http://stackoverflow.com/comment/39689448
favorite count: 0
possible better answer: http://stackoverflow.com/a/25438808
has comment: http://stackoverflow.com/comment/39689236
has comment: http://stackoverflow.com/comment/39689270
tagged with: regex
has title: Regex for remove all string except an range of specific characters
type: AnsweredQuestion

http://stackoverflow.com/comment/39673151
has text: @HMR Sure, if you want to get pedantic about it. `__proto__` is still on the `child` prototype, even if it isn't the first link in the chain. This is still a valid explanation of the situation.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25429831
type: Comment

http://stackoverflow.com/comment/39643465
type: Comment
comment on: http://stackoverflow.com/q/25413766
score: 0
has text: filename.js is just an example. Ive called that function multiple times for different scripts.
type: QuestionComment

http://stackoverflow.com/q/25512094
has title: jQuery Draggable + Droppable + nesting
has comment: http://stackoverflow.com/comment/39825936
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery-ui-droppable
downvote count: 0
has body: I am completely new to jQuery, but have managed to put together a nice little app that drags, drops, and rotates items. Looking for any guidance suggestions on finding a function that would let me do the following (apologize for any terminology issues): Create a div that is the droppable, such as a small box (done) Create a div that is the draggable, such as an icon (done) Drag the icon into the larger div Then be able to drag the larger div while also carrying the icons, and doing an AJAX post to my PHP script on everything that is moved. I found this: http://boagworld.com/dev/creating-a-draggable-sitemap-with-jquery/ however, it snaps everything to the structure, and doesn`t really allow free movement. I also couldn't figure out which function in there causes the parent to move the child. Thanks for any guidance, articles, or links to examples! A couple days of searching in my downtime has not led to anything. Here are some code snippets from my project: Parent item: $( ".box" ).resizable({ stack: "#set .box", start: function(){ ifr = $('iframe'); var d = $('&lt;div&gt;&lt;/div&gt;'); $('.room').append(d[0]); d[0].id = 'temp_div'; d.css({position:'absolute'}); d.css({top: ifr.position(), left:0}); d.height(ifr.height()); d.width('100%'); }, stop: function(event, ui) { var w = ui.size.width; var h = ui.size.height; var hdvzth = ui.helper.data("hdvzth"); var fid = ui.helper.data("fid"); var rid = ui.helper.data("rid"); var hid = ui.helper.data("hid"); $.ajax({ type: "POST", url: "&lt;?php print $position; ?&gt;", data: { h: h, w: w, fid:fid, hid:hid, rid:rid } }).done(function( msg ) {}); $('#temp_div').remove(); } } ).draggable({ stop: function(event, ui) { var pos_x = ui.position.left; var pos_y = ui.position.top; var hdvzth = ui.helper.data("hdvzth"); var hid = ui.helper.data("hid"); var fid = ui.helper.data("fid"); var rid = ui.helper.data("rid"); //Do the ajax call to the server $.ajax({ type: "POST", url: "&lt;?php print $position; ?&gt;", data: { x: pos_x, y:…
tagged with: jquery
has comment: http://stackoverflow.com/comment/39826404
tagged with: jquery-ui-draggable
favorite count: 0
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/39872928
comment on: http://stackoverflow.com/q/25537377
score: 0
has text: Those aren't tags, those are part of Javascript that's between tags.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25686416
has body: You cannot upload the live stream itself while it is running. This is because it is a LIVE stream. So, this leaves you with a handful options. Record the audio stream using one of the many recorders out there RecordRTC works fairly well. Wait until the stream is completed and then upload the file. Send smaller chuncks of recorded audio with a timer and merge them again server side. This is an example of this Send the audio packets as they occur over websockets to your server so that you can manipulate and merge them there. My version of RecordRTC does this. Make an actual peer connection with your server so it can grab the raw rtp stream and you can record the stream using some lower level code. This can easily be done with the Janus-Gateway. As for waiting to send the stream vs sending it in chunks, it all depends on how long you are recording. If it is for a longer period of time, I would say sending the recording in chunks or actively sending audio packets over websockets is a better solution as uploading and storing larger audio files from the client side can be arduous for the client. Firefox actually has a its own solution for recording but it is not supported in chrome so it may not work in your situation. As an aside, the signalling method mentioned is for session build/destroy and really has nothing to do with the media itself. You would only really worry about this if you were using possibly solution number 4 shown above.
type: Answer
accepted answer of: http://stackoverflow.com/q/25523289
upvote count: 71
answers question: http://stackoverflow.com/q/25523289
downvote count: 1
type: AcceptedAnswer
score: 70

http://stackoverflow.com/comment/39646840
score: 0
comment on: http://stackoverflow.com/a/25415516
type: AnswerComment
has text: sorry I can't seem to follow what the code is doing, would you mind explaining a bit? I've worked with the individual functions but can't seem to piece them together like you've done.
type: Comment

http://stackoverflow.com/comment/39821460
score: 0
comment on: http://stackoverflow.com/a/25508916
has text: I'm not sure there's a "default_script" field in browser action. You better include the script in through html with ' '. Then put a `console.log('blah')` in your function to debug it. Finally you'll need to read text field value in the function also
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39848292
type: Comment
type: QuestionComment
has text: Yep, it's so strange, checked the docs and I think the change logs too but it wasn't mentioned. My colleague confirmed it on his Laravel 4.2 install.
score: 0
comment on: http://stackoverflow.com/q/25516112

http://stackoverflow.com/comment/39866269
type: Comment
comment on: http://stackoverflow.com/q/25534048
has text: I was using semicolons religiously until I found out they are entirely optional in javascript. Now I happily never use them, since I don't have to.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25473194
has answer: http://stackoverflow.com/a/25473519
has answer: http://stackoverflow.com/a/25478610
has comment: http://stackoverflow.com/comment/39761184
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/39753772
has body: There's an animation done in jQuery within jsfiddle. I do not have a website as of now to "implant" it and share the URL. I also can't give the jsfiddle. So how can I share my animation to the audience without showing the code? Does github or any other facility tools allow locking the code and showing the final product without having a website, yet I could get a URL for the audience to view it? I regret for the rookie-question in this context as I am still new to web stuff. EDIT: jsFiddle shows 3 code windows along the results :html, css, js. My requirement is to only show the results window to the audience and by all means to hide codes and leads via URL to the codes. Ideal solution demands a results to be shown and URL that is encrypted (at best).
linked to: http://stackoverflow.com/q/25334820
has answer: http://stackoverflow.com/a/25473396
has title: How to show the animation without exposing the code?
accepted answer: http://stackoverflow.com/a/25473519
downvote count: 1
has comment: http://stackoverflow.com/comment/39753352
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25473292
has answer: http://stackoverflow.com/a/25473292
score: -1
has comment: http://stackoverflow.com/comment/39753653
type: Question
tagged with: jquery-animate
upvote count: 0
has comment: http://stackoverflow.com/comment/39757013
has comment: http://stackoverflow.com/comment/39753510
tagged with: javascript
has comment: http://stackoverflow.com/comment/39754509
tagged with: jquery

http://stackoverflow.com/comment/39680781
score: 0
type: Comment
has text: Thank you for your answer, but it still doesn't update. The navigation bar is outside ng-view, does that change anything?
type: AnswerComment
comment on: http://stackoverflow.com/a/25433589

http://stackoverflow.com/q/25395336
has title: How to make a progress bar using HTML and JavaScript
score: 0
accepted answer: http://stackoverflow.com/a/25395410
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/25395449
downvote count: 2
has answer: http://stackoverflow.com/a/25395449
has body: I am trying to make a progress bar just for looks, but it doesn't work. Here is the code: Page 1 Site Loading... I have a div for the loader, a div for the progress, and some script containing a loop (that might not work), changing the width of the progress div. Fixed code: Page 1 Site Loading... Thanks, Cameron!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39608879
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25395410
tagged with: javascript

http://stackoverflow.com/a/25546780
has body: I assume you are using angular-ui bootstrap. Use tab-headingdirective and put your icon there. sapiente doloribus deserunt et nam obcaecati recusandae possimus aperiam similique. Tab 2 ded Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur ipsam consectetur sint. Nobis facere illo iste quaerat sapiente doloribus deserunt et nam obcaecati recusandae possimus aperiam similique.
upvote count: 14
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25546583
score: 14
accepted answer of: http://stackoverflow.com/q/25546583
downvote count: 0

http://stackoverflow.com/q/25428605
has comment: http://stackoverflow.com/comment/39670344
has comment: http://stackoverflow.com/comment/39670178
has comment: http://stackoverflow.com/comment/39670770
type: Question
has answer: http://stackoverflow.com/a/25429382
possible better answer: http://stackoverflow.com/a/25428735
tagged with: php
has title: How to get ID and change background
tagged with: laravel
has answer: http://stackoverflow.com/a/25428815
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39670537
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25428815
has comment: http://stackoverflow.com/comment/39670372
has body: I'm trying to change a background color of a div when the user click on the button. How I have 5 divs, each ID will be different. PHP <?php $valorPremio = 0; ?> @foreach($premios as $premio) {{$premio->titulo}} {{substr($premio->data,8,2);}}{{'/'.substr($premio->data,5,2)}}{{'/'.substr($premio->data,0,4)}} {{$premio->subtitulo}} {{$premio->olho}} {{$premio->texto}} imagem}}" alt="{{$premio->titulo}}" class="pure-img"/> VER MAIS + @endforeach Javascript $(function() { $('.leiaMais').click(function(){ var textoPremioEscondido = $(this).parent().parent().find('.textoPremioEscondido'); if(!textoPremioEscondido.hasClass('show')) { // Exibe o conteúdo do texto oculto textoPremioEscondido.slideDown(function() { textoPremioEscondido.addClass('show').removeClass('hide'); textoPremioEscondido.parent().parent().find('.pure-u-6-24').css('background-color', '#004351'); textoPremioEscondido.parent().css('background-color', '#004351'); textoPremioEscondido.parent().find('.textoPremio').css("color","#fff"); textoPremioEscondido.parent().find('.textoPremioEscondido').css("color","#fff"); $(this).parent().parent().find('.leiaMais').html("VER MENOS -"); }); } else { // Remove qualquer texto que esteja sendo mostrado $('.pure-u-17-24').find('.show').slideUp(function() { $(this).addClass('hide').removeClass('show'); $(this).parent().css('background-color', '#9BAAAF'); $(this).parent().find('.textoPremio').css("color","#004351"); $(this).parent().find('.textoPremioEscondido').css("color","#004351"); $(this).parent().parent().find('.pure-u-6-24').css('background-color', '#9BAAAF'); $(this).parent().parent().find('.leiaMais').html("VER MENOS +"); }); } }); }); Explaining this Javascript For now, this javascript only shows a text and change bg colour of 2 divs. The class ".pure-u-17-24" is inside of div that has the ID "premioCaixa+NumberofCounter". What I've tried I put this 2 variables immediately after "var textoPremioEscondido..."; dataIdDiv obtain a number, and I've use it for get the …
type: AnsweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/25428735

http://stackoverflow.com/a/38947244
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25447698
has body: You're using the wrong API for this, try using the Google Places API. This sorts by popularity (preferred). Or you can use some code to loop through the results and find the distance from the original location. Then you can sort by distance (works, but I think popularity is what you want)
type: Answer
upvote count: 1

http://stackoverflow.com/q/25422400
has comment: http://stackoverflow.com/comment/39658798
has answer: http://stackoverflow.com/a/25422965
has comment: http://stackoverflow.com/comment/39658920
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
possible better answer: http://stackoverflow.com/a/25422687
downvote count: 1
accepted answer: http://stackoverflow.com/a/25422965
type: AnsweredQuestion
has title: onclick="function()" not working but href="javascript: function()" works fine?
score: -1
has comment: http://stackoverflow.com/comment/39658620
has body: I have written a function which quite simply changes the style attributes of an image when clicked. document.getElementById("normal" + current).setAttribute('style', 'display: block;'); current is a parameter for the function. e.g. changeImage(10) and the element image which we want to change the style for has a resultant id of "normal10". To make it display, basically as it's set as display: none obviously to begin with, we need to change that to block. So, I have two instances where I call the method changeImage(current). One which is: and another which is: Both of these function correctly on Chrome & Opera, the display attribute is changed both times. However on any other browser such as IE or Firefox, the display attribute only seems to get changed where we have and not where the method is called upon via the onclick. I tried to change to: document.getElementById("normal" + current).style.display="block"; Unfortunately to no avail. I don't think there is an issue with the javascript itself. Since the function executes fine when called within the href. Does anybody have any ideas? Thanks! EDIT: Done with jQuery, code executes but the style of the image still doesn't change. Works in Chrome & Opera still but not in firefox & IE. I gave the image that is clicked to execute the function an id of "img". and the code to execute the function is placed in the following tags (in document ready function): $('#img').click(function(){} Code is executed, but style is only changed from none to block on specific browsers.
type: Question
has comment: http://stackoverflow.com/comment/39658777
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/39659359
has comment: http://stackoverflow.com/comment/39658865
tagged with: javascript
has comment: http://stackoverflow.com/comment/39658821
has comment: http://stackoverflow.com/comment/39658599
has answer: http://stackoverflow.com/a/25422687

http://stackoverflow.com/q/25411714
answer count: 1
linked to: http://stackoverflow.com/q/19960634
favorite count: 0
has answer: http://stackoverflow.com/a/25980146
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
tagged with: google-maps
downvote count: 0
tagged with: javascript
has body: I am making a program that uses the Google Maps Directions Service. In my Directions Service Request I have set avoidTolls to false. But, I would like to know if the route contains tolls just like Google Maps: I have seen this SO question: Return if route has Tolls Google Maps API xml request But because the question is over a year old, I am wondering if the Google Maps API has added a toll feature, might there be a different answer? Is this possible? If so, how?
tagged with: google-maps-api-3
has title: Google Maps Directions - Find Out if Route Contains Toll

http://stackoverflow.com/a/25416616
has comment: http://stackoverflow.com/comment/39648758
has comment: http://stackoverflow.com/comment/39648717
answers question: http://stackoverflow.com/q/25416611
has body: Your syntax is incorrect. You have to add the 1 to the i, which you are not currently doing. for(var i=0; i&lt;4; i+=1){ console.log(i); } The classic way, of course is to just do, but I think the first one is more elegant and passes JSLint (which is, of course, the only right way to write javascript). for(var i=0; i&lt;4; i++){ console.log(i); } If you want your loop to fully pass JSLint, you can do as follows: var i; // at the top of your function // ... for (i = 0; i &lt; 4; i += 1) { console.log(i); }
downvote count: 0
has comment: http://stackoverflow.com/comment/39648660
has comment: http://stackoverflow.com/comment/39648716
has comment: http://stackoverflow.com/comment/39648690
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39648593
has comment: http://stackoverflow.com/comment/39648733
has comment: http://stackoverflow.com/comment/39648578

http://stackoverflow.com/a/25429855
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25429471
answers question: http://stackoverflow.com/q/25429471
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39698255
type: Answer
has comment: http://stackoverflow.com/comment/39680231
has body: The data in your JSON file is stored as an array within an array. Try this: $(document).ready(function() { $.ajax({ type: 'GET', url: 'http://url', dataType: 'json', success: function(data) { for (var i = 0; i &lt; data.length; i++) { var items = data[i]; $('#results').append('&lt;div class="block"&gt;&lt;/div&gt;'); var $block = $('#results').find('.block').last(); for (var j = 0; j &lt; items.length; j++) { var item = items[j]; var label = item.label; var value = item.value; $block.append('&lt;p&gt;' + label + '&lt;/p&gt;' + '&lt;p&gt;' + value + '&lt;/p&gt;'); } } } }); return false; });

angularfire
tags question: http://stackoverflow.com/q/25431766
tag name: angularfire
tags question: http://stackoverflow.com/q/25479619
tags question: http://stackoverflow.com/q/25428069
type: Tag
tags question: http://stackoverflow.com/q/25445360

http://stackoverflow.com/comment/39859730
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25530541
type: Comment
has text: If my answer was the solution to the problem, you should accept the answer.

http://stackoverflow.com/comment/39859551
type: Comment
type: QuestionComment
score: 0
has text: Is jQuery loaded on your page? Is the error a result of calling `$(...)`, or `.unwrap()`? Try doing `var $vid = $('video'); $vid.unwrap();` and see on which line that error occurs.
comment on: http://stackoverflow.com/q/25530547

http://stackoverflow.com/comment/39866610
comment on: http://stackoverflow.com/q/25534335
has text: Hope my answer helped. Not sure what you're thinking of but "namespace" is not the word you're looking for.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25508275
upvote count: 4
downvote count: 0
has body: Use Unwrap: $('p').contents().unwrap() It is the opposite of wrap in that it removes the parents of the selector. The p tags are the parent elements of the content, selecting the content before unwraping will unwrap the p tags. jsFiddle
has comment: http://stackoverflow.com/comment/39818890
type: Answer
has comment: http://stackoverflow.com/comment/39818998
has comment: http://stackoverflow.com/comment/39819018
has comment: http://stackoverflow.com/comment/39819423
has comment: http://stackoverflow.com/comment/39819016
has comment: http://stackoverflow.com/comment/39819705
has comment: http://stackoverflow.com/comment/39819650
answers question: http://stackoverflow.com/q/25508167
has comment: http://stackoverflow.com/comment/39821022
has comment: http://stackoverflow.com/comment/39819735
score: 4

http://stackoverflow.com/comment/39751464
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25472117
has text: But if he removes all duplicates before the Math.Max.. he will get the max every time. Lets its. 2,1,2,2. Only 2,1 will be back, and then 2 is max.
score: 0

http://stackoverflow.com/comment/39664921
comment on: http://stackoverflow.com/q/25425958
has text: You can create includes/constant_variables.php, store all constant variables in there that are shared and include it in every file you need, just don't expect any changes to this value will affect anything except the current file.
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39657445
comment on: http://stackoverflow.com/q/25421072
score: 0
type: QuestionComment
type: Comment
has text: It is a vb.net form in an existing desktop application. So, I need to add some way for user to edit the HTML document in vb.net's control. I couldn't think of anything better than using javascript. And now, I can get the user to edit the HTML, but can't post it back. :(

http://stackoverflow.com/comment/39615294
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25399048
has text: Are you looking fro bracket notation? See here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors
type: Comment

http://stackoverflow.com/q/25496751
has title: Change a Tag's Class through getElementsByTagName
accepted answer: http://stackoverflow.com/a/25496779
tagged with: twitter-bootstrap
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39797454
has answer: http://stackoverflow.com/a/25496779
answer count: 1
has body: I want to change the class of all elements with a tag 'input' by using getElementsByTagName. I dont know how to change it's class.I'd tried something but it does'nt work.Please help me. var myList = document.getElementsByTagName("input"); for(i = 0;i &lt; mylist.length; i++){ //it doesnt work myList[i].className = "btn btn-success"; }
type: AnsweredQuestion

http://stackoverflow.com/comment/39795066
score: 0
type: Comment
has text: do you have any other way to assign new property in existing class but without inline style?
comment on: http://stackoverflow.com/a/25495326
type: AnswerComment

http://stackoverflow.com/a/25457549
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25457471
type: Answer
score: 2
upvote count: 2
has body: There are a number of frameworks that provide this type of "hash" based navigation, or you could implement something on your own using the jQuery hashchange plugin, or using the Backbone.js Router class. You could even implement something on your own: var myTabClicked = function() { // display mytab }; $('.mytab').bind('click', myTabClicked); $(function() { if (window.location.hash == "#mytab") { myTabClicked(); } else { // display default tab unless already displayed by default } });
has comment: http://stackoverflow.com/comment/39724510
answers question: http://stackoverflow.com/q/25457471
type: AcceptedAnswer

http://stackoverflow.com/comment/39755914
comment on: http://stackoverflow.com/q/25474341
score: 0
type: Comment
type: QuestionComment
has text: Do you mean "geolocation" rather than ["geocoding"](https://developers.google.com/maps/documentation/javascript/geocoding) in the title?

http://stackoverflow.com/q/25442462
has body: I am trying to include jquery dynamically and i have used the following code- index.php includejquery.js if(!window.jQuery) { var script = document.createElement('script'); script.type = "text/javascript"; script.async = true; script.src = "http://code.jquery.com/jquery-2.1.1.min.js"; document.getElementsByTagName('head')[0].appendChild(script); jQuery.noConflict(); } But jquery functionality is not working it is not printing the paragraph tag :-( Please help me out. Thanks in advance
has answer: http://stackoverflow.com/a/25442530
has answer: http://stackoverflow.com/a/25442550
favorite count: 0
has answer: http://stackoverflow.com/a/25442594
answer count: 9
upvote count: 5
has answer: http://stackoverflow.com/a/25442619
downvote count: 0
has answer: http://stackoverflow.com/a/25442586
has answer: http://stackoverflow.com/a/25442645
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25442530
type: Question
score: 5
accepted answer: http://stackoverflow.com/a/25442522
tagged with: javascript
has title: How to include jQuery dynamically in any website using pure javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/42818393
has answer: http://stackoverflow.com/a/25442515
has answer: http://stackoverflow.com/a/25442522

http://stackoverflow.com/q/25446593
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25459079
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25446738
type: Question
has title: Is it possible to call PHP-Script from JavaScript section of JSP page..?
accepted answer: http://stackoverflow.com/a/25459079
possible better answer: http://stackoverflow.com/a/25446738
tagged with: jsp
tagged with: javascript
has body: I have written following script on server- &lt;?php //Create an array $json_response = array(); // include db connect class require_once __DIR__ . '/db_connect.php'; // connecting to db $db = new DB_CONNECT(); $status = "In Progress"; $con = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE); if (!$con) { die('Could not connect to database: ' . mysql_error()); } //Query to select pending queries database $result = mysqli_query($con, "SELECT * FROM tbl_query_master WHERE status='".$status."' ORDER BY query_date DESC"); while ($row = mysqli_fetch_array($result, MYSQL_ASSOC)) { $row_array['query_id'] = $row['query_id']; $row_array['sender_mobile_no'] = $row['sender_mobile_no']; $row_array['sender_name'] = $row['sender_name']; $row_array['query_string'] = $row['query_string']; $row_array['action_taken'] = $row['action_taken']; $row_array['status'] = $row['status']; $row_array['query_date'] = $row['query_date']; $row_array['action_date'] = $row['action_date']; $row_array['view_status'] = $row['view_status']; $row_array['read_status'] = $row['read_status']; //push the values in the array array_push($json_response,$row_array); } echo json_encode($json_response); ?&gt; Above script returns one JSON object which is useful for me in JavaScript section of my JSP page, but I don't know how to call php-script from the java script section, so need your guidance for the same. Hope you understand what I'm saying Thank you..!

http://stackoverflow.com/q/25461405
has answer: http://stackoverflow.com/a/25470004
has title: canvg doesn't work with svg already placed in body?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25470004
upvote count: 3
tagged with: canvg
has body: I want to converty my SVG into CANVAS and then save it as image. I have svg already genereated by javascript in my page. I use this code: $("#menu-save-image").click(function () { var svg = document.getElementsByTagName('svg'); var canvas = document.getElementById("test"); canvg(canvas, svg); // or second way var c = document.getElementById('test'); var ctx = c.getContext('2d'); ctx.drawSvg(svg, 0, 0, 500, 500); }); Both ways doesn't work. Why?
downvote count: 1
type: Question
tagged with: canvas
tagged with: javascript
score: 2
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/q/25455573
has answer: http://stackoverflow.com/a/25455755
has comment: http://stackoverflow.com/comment/39720941
tagged with: javascript
tagged with: http-headers
has body: Consider the code: somepage.php &lt;?php header('Location: index.php'); ?&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script&gt; doSomething(); // does the browser run this? &lt;/script&gt; &lt;/head&gt; &lt;/html&gt; I am trying to put Google Analytics there, but I am not sure if people are actually loading the analytics JS at all. Does the browser actually look at the output after the Location header has been sent? If so, does it actually run the JavaScript?
accepted answer: http://stackoverflow.com/a/25455755
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: php
has comment: http://stackoverflow.com/comment/39720922
has comment: http://stackoverflow.com/comment/39721056
has comment: http://stackoverflow.com/comment/39720918
has title: How do clients handle JavaScript after they receive the "Location" HTTP header?
upvote count: 1
answer count: 1
tagged with: http
tagged with: google-analytics

http://stackoverflow.com/comment/39867700
comment on: http://stackoverflow.com/q/25534950
has text: The accompanying HTML code would help us ensure that you don't also have errors within it.
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/25521674
tagged with: jquery-dropkick
answer count: 2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25522345
has title: jquery event been called twice - dropkick.js
has answer: http://stackoverflow.com/a/25522831
score: 0
has answer: http://stackoverflow.com/a/25522345
possible better answer: http://stackoverflow.com/a/25522831
has body: So I have this problem where I have a dropdown and then I create it using dropkick.js. (I am just learning dropkick.js so I am now thinking that I misunderstood something.) The Problem When I bind an on change event like so $('.pizza_size').on('change', 'select[name=pizza_size]', function() { alert(this.value); }); The alert is called twice. Fiddle here My initial problem was that the select dropdown was changed dynamically, so the $(".default").dropkick(); didn't apply anymore, so I created this dynamic selector above. (If there is a better way to bind the call dynamically than this please do tell! :D) Helpful information: (based on some of my debugging) The initial html/script was like this fiddle here where it created two dropdowns, (though they dont seem to be related)The one I create with code &lt;select&gt;...&lt;/select&gt; and the one dropkick.js creates with the class=dk_container dk_theme_default class. So I commented this html to avoid this (in first fiddle), but it still seems to exist 2 select dropdowns!
has comment: http://stackoverflow.com/comment/39843675
has comment: http://stackoverflow.com/comment/39844002
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39844155
type: Question

http://stackoverflow.com/comment/39816478
has text: You see nothing is because there is no `console.log` in the click event for button 2.
type: Comment
comment on: http://stackoverflow.com/q/25507016
type: QuestionComment
score: 0

http://stackoverflow.com/q/25514665
has body: Trying to make a call to github which requires JSON post requests only. Trying to get my form on my angularjs application to submit via JSON. I have this so far: &lt;form ng-submit="postComment(issue.issue.number)" enctype='application/json'&gt; &lt;textarea name="body" id="" cols="30" rows="5" ng-model="$parent.issueComment" class="form-control"&gt;&lt;/textarea&gt; &lt;input type="submit" class="btn btn-default" id="submit" value="Submit"&gt; &lt;/form&gt; Controller: $scope.postComment = (issueNumber) -&gt; repo.postComment(issueNumber, $scope.issueComment).then (issue) -&gt; console.log issue Service: postComment: (issueNumber, body) -&gt; console.log body # body = JSON.stringify({body: body}) console.log body $rootScope.githubToken.post("/repos/#{@owner}/#{@name}/issues/#{issueNumber}/comments", { data: { body: body, hi: "hello" }, dataType: "json" }).done (response) -&gt; console.log response I keep getting error: message: "Problems parsing JSON" FIXED postComment: (issueNumber, body) -&gt; $rootScope.githubToken.post("/repos/#{@owner}/#{@name}/issues/#{issueNumber}/comments", { data: JSON.stringify({ "body": "#{body}" }), dataType: "json", contentType:'application/json' }).done (response) -&gt; console.log response
tagged with: angularjs
type: UnansweredQuestion
type: Question
has title: Angularjs form json submision
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25514771
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/a/25452722
has comment: http://stackoverflow.com/comment/39718414
score: 1
has comment: http://stackoverflow.com/comment/39718060
has comment: http://stackoverflow.com/comment/39718201
has comment: http://stackoverflow.com/comment/128753568
has comment: http://stackoverflow.com/comment/128753877
has comment: http://stackoverflow.com/comment/39750949
has comment: http://stackoverflow.com/comment/39719190
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25452107
has body: UPDATED : to include highlight functionality Here's the jsFiddle : DEMO $("#highlight").click(function(){ var flag = 0; sel = window.getSelection(); for (var i = 0; i &lt; sel.rangeCount; i++) { var $sNode = $(sel.getRangeAt(i).startContainer.parentNode); var $eNode = $(sel.getRangeAt(i).endContainer.parentNode); if ($sNode.prop("class") == "comment" &amp;&amp; $eNode.prop("class") == "comment"){ $sNode.html($sNode.html().replace(sel,"&lt;span class='selectedText'&gt;"+ sel + "&lt;/span&gt;")); } } }); Will only highlight if text is selected from comment class div only
type: Answer
has comment: http://stackoverflow.com/comment/39718460
upvote count: 1
answers question: http://stackoverflow.com/q/25452107
has comment: http://stackoverflow.com/comment/39718656

http://stackoverflow.com/comment/39770781
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25482229
score: 0
has text: Hi tommyd456. I think that what you want is something to be done at server side, because you need to guarantee your ID to be unique. I mean, you shouldn't do this by JS in client side.

http://stackoverflow.com/comment/39701540
type: Comment
comment on: http://stackoverflow.com/a/25443249
score: 1
has text: @Ben: A promise is not "*resolved anew*" (it can only be resolved a single time), but it still allows you to add new handlers after it was resolved (and automatically calls them with the result then). The resolution is triggered by whatever the `getFromService()` in the original call did.
type: AnswerComment

http://stackoverflow.com/q/25490731
answer count: 1
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/14514461
has title: Remove "checked" from json
has answer: http://stackoverflow.com/a/25490835
accepted answer: http://stackoverflow.com/a/25490835
tagged with: angularjs
type: AnsweredQuestion
has body: I have followed this post: How do I bind to list of checkbox values with AngularJS? To retrieve data from checkbox list and pass it as a Json. My code is this: &lt;span ng-repeat="b in neighborhood"&gt; &lt;input id="{{b.Id}}" class="checkcheck" type="checkbox" ng-model="b.checked" ng-change="selection.indexOf(b) &gt; -1" ng-click="toggleSelection(b)"&gt; {{ b.Name }} And this my controller code: $scope.toggleSelection = function toggleSelection(b) { var idx = $scope.selection.indexOf(b); if (idx &gt; -1) { $scope.selection.splice(idx, 1); } else { $scope.selection.push(b); } console.log($scope.selection); ProgramsWS.GetByNeighborhood({ neighborhoodList: $scope.selection }, function (resp) { console.log(resp); }) }; The thing is that in the final json, I'm getting something like this: 0 b { Name="Name1", Id=51, checked=true, more...} 1 b { Name="Name2", Id=43, checked=true, more...} The problems is: Web Service doesn't recognize the "checked" that has been added there in all this process. How can I remove it?
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/39603334
score: 0
type: QuestionComment
has text: really you don't want to validate the URL?
comment on: http://stackoverflow.com/q/25392512
type: Comment

http://stackoverflow.com/a/25506447
score: 1
has body: Parameters in an Apex URI are colon separated, but multi-value parameters, such as lists of page items to set, are comma separated. Apex thinks you are trying to set the value of P202_TEXT_FIELD to "LatLng(48.30247" and the value of a second, unspecified page item to ", 16.02837)". You can escape commas in an Apex URI by enclosing the value in backslashes, ie: "\"+popup_coord+"\"
has comment: http://stackoverflow.com/comment/39843427
has comment: http://stackoverflow.com/comment/39844223
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25502300
type: Answer

http://stackoverflow.com/comment/39665515
type: Comment
comment on: http://stackoverflow.com/a/25426091
has text: I want to note that the use of while can become a problem of indeterminate execution time.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25461073
has answer: http://stackoverflow.com/a/29768506
type: Question
accepted answer: http://stackoverflow.com/a/29768286
answer count: 2
possible better answer: http://stackoverflow.com/a/29768506
downvote count: 0
tagged with: javascript
score: 1
has title: Send data from browser to C#/Java via socket
favorite count: 0
has answer: http://stackoverflow.com/a/29768286
has body: How can I send packets of data from HTML and javascript running locally to a C# application running locally? I can't get a HTML page to handshake with a C# implementation of websockets because the handshakes in node are version specific - I don't know enough about how to examine the network traffic to tweak any of the C# server examples I've found. It keeps failing on the initial handshake. When I try to send data straight from a browser to a javascript implementation of websockets it works straight away, but that's not what I need. The version of node I'm running in javascript to try this is v0.10.29. Is there any other way to do this without websockets? Could I send UDP packets from a webpage running locally (in the null origin) to a C# app if I disable some security features of Opera or Chrome? Any suggestions appreciated.
upvote count: 1
type: AnsweredQuestion
tagged with: c#

http://stackoverflow.com/comment/39789909
type: AnswerComment
comment on: http://stackoverflow.com/a/25492708
type: Comment
has text: It might be simpler to use a closure scope here.
score: 0

http://stackoverflow.com/a/25522345
has body: I think I found the issue : Inside your dropkick.js plugin you have select triggered twice. Search for these lines inside your plugin $select.trigger('change'); $select.val(value).trigger('change'); Comment the first line here $select.trigger('change'); // comment this line in your dropkick.js file and try. "The alert is called twice." this will be fixed.
score: 2
accepted answer of: http://stackoverflow.com/q/25521674
answers question: http://stackoverflow.com/q/25521674
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39845568
upvote count: 2
type: Answer

http://stackoverflow.com/q/25440393
has comment: http://stackoverflow.com/comment/39691799
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39691827
accepted answer: http://stackoverflow.com/a/25440473
has title: Get value of parse JSON from php array
tagged with: php
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: http://stackoverflow.com/tag/json
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/25440473
has body: $query = "SELECT Item_Name from item_details"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $optionValue[] = "&lt;option value='" . $row['Item_Name'] . "'&gt;" . $row['Item_Name'] . "&lt;/option&gt;"; } $query1 = "SELECT Item_Name from item_addon"; $result1 = mysql_query($query1); while ($row = mysql_fetch_array($result1)) { $optionValue1[] = "&lt;option value='" . $row['Item_Name'] . "'&gt;" . $row['Item_Name'] . "&lt;/option&gt;"; } return json_encode(array("a" =&gt; $optionValue, "b" =&gt; $optionValue1)); I need to parse the data of a and b optionDetails = $.parseJSON(data); for (i = 0; i &lt; optionDetails.length; i++) { det_item_name = optionDetails[i]; $('#det_item_name').append(det_item_name); } optionAdd = $.parseJSON(data) for (i = 0; i &lt; optionAdd.length; i++) { det_item_name = optionAdd[i]; $('#add_name').append(add_name); } How do I parse the data of a and b in optionDetails and optionAdd ?
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39922794
has text: Unfortunately, no. The `window.onpopstate` event is only triggered when the user navigates between two history entries for the same document. I'm trying to listen to every click on 'back' and 'forward' at the browser level not for a specific document.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25559400
type: AnswerComment

twitter-bootstrap
tags question: http://stackoverflow.com/q/25402444
tags question: http://stackoverflow.com/q/25434193
tags question: http://stackoverflow.com/q/25412604
tags question: http://stackoverflow.com/q/25480468
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/25458750
tags question: http://stackoverflow.com/q/25439620
tags question: http://stackoverflow.com/q/25510176
tags question: http://stackoverflow.com/q/25474269
tags question: http://stackoverflow.com/q/25455704
tags question: http://stackoverflow.com/q/25403449
tags question: http://stackoverflow.com/q/25536717
tags question: http://stackoverflow.com/q/25464562
tags question: http://stackoverflow.com/q/25418860
tags question: http://stackoverflow.com/q/25414342
tags question: http://stackoverflow.com/q/25418048
tags question: http://stackoverflow.com/q/25422446
tags question: http://stackoverflow.com/q/25490923
tags question: http://stackoverflow.com/q/25476342
tags question: http://stackoverflow.com/q/25499315
tags question: http://stackoverflow.com/q/25496751
tags question: http://stackoverflow.com/q/25522328
tags question: http://stackoverflow.com/q/25396006
tags question: http://stackoverflow.com/q/25436093
tags question: http://stackoverflow.com/q/25443952
tags question: http://stackoverflow.com/q/25461774
tags question: http://stackoverflow.com/q/25472198
tags question: http://stackoverflow.com/q/25507317
tags question: http://stackoverflow.com/q/25548086
tags question: http://stackoverflow.com/q/25462025
tags question: http://stackoverflow.com/q/25443346
tags question: http://stackoverflow.com/q/25468389
tags question: http://stackoverflow.com/q/25516022
tags question: http://stackoverflow.com/q/25440794
tags question: http://stackoverflow.com/q/25469727
tags question: http://stackoverflow.com/q/25436042
tags question: http://stackoverflow.com/q/25438545
tags question: http://stackoverflow.com/q/25425587
tags question: http://stackoverflow.com/q/25447135
tags question: http://stackoverflow.com/q/25409181
tags question: http://stackoverflow.com/q/25476837
tags question: http://stackoverflow.com/q/25461821
tags question: http://stackoverflow.com/q/25455668
tags question: http://stackoverflow.com/q/25508266
tags question: http://stackoverflow.com/q/25412212
tags question: http://stackoverflow.com/q/25518706
tags question: http://stackoverflow.com/q/25421465
tags question: http://stackoverflow.com/q/25404148
tags question: http://stackoverflow.com/q/25520208
tags question: http://stackoverflow.com/q/25422312
tags question: http://stackoverflow.com/q/25541524
tags question: http://stackoverflow.com/q/25395785
type: Tag
tags question: http://stackoverflow.com/q/25390939
tags question: http://stackoverflow.com/q/25409368
tags question: http://stackoverflow.com/q/25412293
tags question: http://stackoverflow.com/q/25419972
tags question: http://stackoverflow.com/q/25427049
tags question: http://stackoverflow.com/q/25452944
tags question: http://stackoverflow.com/q/25429108
tags question: http://stackoverflow.com/q/25460343
tags question: http://stackoverflow.com/q/25537559
tags question: http://stackoverflow.com/q/25490500
tags question: http://stackoverflow.com/q/25467999
tags question: http://stackoverflow.com/q/25420470
tags question: http://stackoverflow.com/q/25487384
tags question: http://stackoverflow.com/q/25510796
tags question: http://stackoverflow.com/q/25431182
tags question: http://stackoverflow.com/q/25525992
tags question: http://stackoverflow.com/q/25479636
tags question: http://stackoverflow.com/q/25426271
tags question: http://stackoverflow.com/q/25442886
tags question: http://stackoverflow.com/q/25453798
tags question: http://stackoverflow.com/q/25456106
tags question: http://stackoverflow.com/q/25413693
tags question: http://stackoverflow.com/q/25494153
tags question: http://stackoverflow.com/q/25521644
tags question: http://stackoverflow.com/q/25459453
tags question: http://stackoverflow.com/q/25541055
tags question: http://stackoverflow.com/q/25458074

http://stackoverflow.com/comment/39712133
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25440462
has text: I just followed OP rules to make that input.

http://stackoverflow.com/comment/39842966
has text: I remember reading that there can be issues with inline block on IE8 there was a fix { *display:inline; } but not sure that would be it if it's only when the field has focus. Also why are you declaring two width's in the css?
score: 0
comment on: http://stackoverflow.com/q/25520747
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25423732
has body: The callback should return false to prevent the href action: $('#someid').bind('click',function(){alert('hello'); return false;}) It's asked and answered here: https://stackoverflow.com/questions/5222466/how-to-stop-href-going-anywhere
answers question: http://stackoverflow.com/q/25423555
score: 0
type: Answer

http://stackoverflow.com/a/25505773
has comment: http://stackoverflow.com/comment/39814377
upvote count: 3
has comment: http://stackoverflow.com/comment/39814151
has comment: http://stackoverflow.com/comment/39817344
downvote count: 0
has body: That is because the click event is getting bound everytime you enter #blah with the mouse, causing duplicate events. function readURL(input) { if (input.files &amp;&amp; input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah').attr('src', e.target.result).width(300).height(300) $('#blah').mouseenter(function (e) { /*code for mouseenter*/ }); }; reader.readAsDataURL(input.files[0]); } } $(document).ready(function () { $('#blah').on('click', function (e) { var offset = $(this).offset(), pageX = e.pageX, pageY = e.pageY; var imgX = pageX-offset.left, imgY = pageY-offset.top; alert(imgX + ' , ' + imgY); }); });
has comment: http://stackoverflow.com/comment/39813981
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39813907
accepted answer of: http://stackoverflow.com/q/25505671
has comment: http://stackoverflow.com/comment/39817461
answers question: http://stackoverflow.com/q/25505671
type: Answer
has comment: http://stackoverflow.com/comment/39813857
score: 3

http://stackoverflow.com/q/25390047
tagged with: angularjs-scope
has title: Select in Angular JS - I need the element and value attribute to be the same
type: Question
tagged with: javascript
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have a json like this, stored in $scope.result: { "tips":["p1","p2","p3","p4"],"actualTip":"p4"} And I need to do a comboBox with Angular. I did this: And its puts me a combobox like this: p1 p2 p3 I need that the text and value of the option have the same "value". For ex: p1 p2 Edit: I forgot to say that I need the combobox starts with the option selected that is in "actualTip" How can I do this?
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39598675
type: UnansweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25390273
score: 1

http://stackoverflow.com/q/25516486
type: Question
has body: I'm trying to intercept specific calls and show an alert to the user. There's already existing code on our project that looks like: myModule.config([ '$routeProvider', '$locationProvider', "$httpProvider", ($routeProvider: ng.route.IRouteProvider, $locationProvider: ng.ILocationProvider, $httpProvider: ng.IHttpProvider) =&gt; { console.log("in my module"); if (history.pushState) { $locationProvider.html5Mode(true); $routeProvider.when('/projects', { template: Templates.projects, controller: projectsListControllerName }); } else { $routeProvider.when('/', { template: Templates.projects, controller: projectsListControllerName }); } } ]); Is there something wrong with console.log("in my module"); in the config method of myModule? My routes still work going to /projects and /, but I never see "in my module" in the console.
has answer: http://stackoverflow.com/a/25516770
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25516770
has title: cannot run log method in config method for angular
answer count: 1
has comment: http://stackoverflow.com/comment/39835081
tagged with: angularjs
type: AnsweredQuestion
tagged with: typescript
score: 0

http://stackoverflow.com/a/25427871
downvote count: 0
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25423384
has body: While this will obviously not work: &lt;li ng-repeat="item in items"&gt; &lt;div ng-bind-html="item.template"&gt;&lt;/div&gt; &lt;/li&gt; Since you are telling angular to display html that is inside item.template but what you really want is to tell it to treat item.template as it would be markup that should be parsed in a similar way to a template inside directive. What you can do however is to define custom directive that will treat item.template in a desired manner. For instance: &lt;li ng-repeat="item in items"&gt; &lt;div dynamic-template="item.template" /&gt; &lt;/li&gt; Where dynamic-template is defined as follows: module.directive('dynamicTemplate', function($compile){ return { scope: { dynamicTemplate:'=' }, replace:true, transclude: true, link: function($scope, $element, $attrs, _, $transcludeFn){ // since we have isolate scope - transclude the element so it has access // to item and anything else available inside ng-repeat $transcludeFn(function($childElement, $childScope){ var link = $compile($scope.dynamicTemplate); var bound = link($childScope); $element.append(bound); }); } }; }); Of course this is not ideal since changes to item.template wont be reflected but you can easily extend this by adding $watch. You can find working example here.
answers question: http://stackoverflow.com/q/25423384
has comment: http://stackoverflow.com/comment/39799748
type: AcceptedAnswer

http://stackoverflow.com/comment/39708400
has text: @epascarello I don't bother about the 50 images that load when page loads, because I'll only be using this locally using local images.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25449343

http://stackoverflow.com/q/25529287
has answer: http://stackoverflow.com/a/25529529
favorite count: 0
linked to: http://stackoverflow.com/q/17308818
has title: Translate "Multilanguage" enum javascript/c#
type: Question
upvote count: 2
answer count: 1
tagged with: enums
tagged with: c#
score: 2
downvote count: 0
tagged with: javascript
tagged with: sorting
type: UnansweredQuestion
has body: I have following problem. In my server side code I have an enumeration that defines the Type of Task I have. In my front en webpage I show all my tasks in a table that contains the column "Task Type". This column actually shows the enumeration value translated with lingua JavaScript library. So in my JavaScript Library I have something like this for English enumTaskType_0 =&gt; "Unknown" enumTaskType_1 =&gt; "Problem" enumTaskType_2 =&gt; "Incident" enumTaskType_3 =&gt; "Change Request" and for German enumTaskType_0 =&gt; "Unbekannt" enumTaskType_1 =&gt; "Problem" enumTaskType_2 =&gt; "Ticket" enumTaskType_3 =&gt; "Änderungsantrag" my c# enumeration obviously is then public enum SupportTaskType { Unknown = 0, Problem= 1, Incident= 2, Change Request= 3 } Now my Problem: All columns in my table should be Sortable. It sorts alright.. but the sorting is done with the Value of the enumeration, so in all languages it's sorted differently.. I mean it is technically sorted, but for the user its is more like "grouped" and not alphabetically sorted. Any suggestions? I was thinking that I could send a JSON from my JavaScript to my Server and implement something like in this Question... But there must be a better way! Any help would be appreciated.

http://stackoverflow.com/comment/39984135
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25532970
type: Comment
has text: This worked totally fine. It feels a little hacky, but hey, it gets the job done.

http://stackoverflow.com/comment/39824045
has text: that's what I thought I've been giving that a go but it's throwing Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! for some reason it's running through for each individual column within my table first
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25510771
score: 0

http://stackoverflow.com/a/25455714
accepted answer of: http://stackoverflow.com/q/25455684
score: 1
has comment: http://stackoverflow.com/comment/39721836
upvote count: 1
has body: you can use google's reCaptcha. in a single page application you can display the captcha via javascript when ever you need it. you can than authenticate server-side via ajax. http://www.google.com/recaptcha/ there are plugins available for several backend environments like asp.net or classic asp. but you can also implement the backend yourself through a simple api: https://developers.google.com/recaptcha/docs/verify
type: AcceptedAnswer
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25455684

http://stackoverflow.com/a/25414498
answers question: http://stackoverflow.com/q/25414342
upvote count: 1
type: AcceptedAnswer
has body: @ My comment above, it looks like you're adding the class to the child, and not the parent. If you're using jquery, you could explore using more of it http://jsfiddle.net/evanbriggs/6us0dLyL/ or just have it add a class where a fadeIn animation is stored http://jsfiddle.net/evanbriggs/1gr9k0sq/. Your preference!
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25414342

http://stackoverflow.com/q/25475078
score: 0
linked to: http://stackoverflow.com/q/3396754
possible better answer: http://stackoverflow.com/a/25475368
has answer: http://stackoverflow.com/a/25475318
tagged with: javascript
type: AnsweredQuestion
has title: Execute JavaScript function when period key pressed
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39756855
has comment: http://stackoverflow.com/comment/39756906
accepted answer: http://stackoverflow.com/a/25475318
type: Question
answer count: 2
has body: I want to fire a javascript function called 'faster' whenever the period key is pressed. I first tried a method which had worked for other keys: document.onkeydown = function(evt) { evt.preventDefault(); evt = evt || window.event; switch (evt.keyCode) { case 190: faster(); break; } }; I also tried this with the code 46, but still no luck. One post said that Mac keyboards are less reliable and suggested using onkeypress instead of onkeydown. I couldn't find a directly relevant example, but I tried this: JavaScript periodetect () { var c = e.which || e.keyCode; if (c=46) { faster(); } }; HTML &lt;BODY BGCOLOR="#CCCCCC" onkeypress="periodetect()"&gt; Can anyone spot my beginner mistake or suggest alternative?
has comment: http://stackoverflow.com/comment/39756810
has answer: http://stackoverflow.com/a/25475368

http://stackoverflow.com/a/25466785
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25466618
answers question: http://stackoverflow.com/q/25466618
type: Answer
upvote count: 1
has body: Firstly, my apologies; I didn't mean to update your Fiddle, I meant to fork it, but alas Update it I did... Anyway, add: e.preventDefault(); http://jsfiddle.net/ga5f86mm/2/
score: 1
has comment: http://stackoverflow.com/comment/52180396

http://stackoverflow.com/comment/39885221
comment on: http://stackoverflow.com/q/25544468
score: 0
has text: `has!` can help with conditional loading on known conditions. But I see two differences : **1/** here my condition is simply whether `mayExist` exists or not. The existence of this file will not be related to anything functional that can be test with `has!`, and it's not anything I can control. It'll be up to the user of my framework to have this file or not. **2/** The `has!` plugin expects a ternary expression that has to resolve to a module in any case. I don't see a clear documented way to resolve to `undefined`
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39873254
comment on: http://stackoverflow.com/a/25512089
has text: While this makes the checkValidated run, it won't run the ViewAuctionsButtonUnchecked_Click.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/90217336
has text: SO isn't a code-golfing site - clean, readable code is much more important than *as short as possible* code. The conditional operator is appropriate when you need to do something with the result of the expression, which is not the case here. If you just need to imitate `if/else`, I think it would be best to just use `if/else`.
score: 16
type: AnswerComment
comment on: http://stackoverflow.com/a/38340374
type: Comment

http://stackoverflow.com/comment/39900912
type: AnswerComment
has text: add a class to the triggerable tables... like then check for e.target.parentNode.parentNode.parentNode.classList.contains('colorbox') inside the getVal / handler function.....there is no need for loops. the e.target.nodeName=='TD' was just an example....we are here to help, give tips ... not to write everything. if you want to be specific you need to specify that in your question.
type: Comment
comment on: http://stackoverflow.com/a/25550505
score: 1

http://stackoverflow.com/a/25517450
type: Answer
answers question: http://stackoverflow.com/q/25501391
upvote count: 6
has comment: http://stackoverflow.com/comment/39874226
has comment: http://stackoverflow.com/comment/78489977
has comment: http://stackoverflow.com/comment/39898683
has body: Your best bet would be to create an App that installs a simple ScriptTag in the shop. That script can then report the customer ID back to the App securely. Very simple to do that. Forget the front-end API as there is no secure way to call your App using that.
score: 6
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25501391

http://stackoverflow.com/comment/39773407
comment on: http://stackoverflow.com/q/25481908
has text: related, if not duplicate of: [How to define method in javascript on Array.prototype and Object.prototype so that it doesn't appear in for in loop](http://stackoverflow.com/q/13296340/1048572)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25533486
has body: I have a class called Vec. (Vector) function Vec (x_or_vec,y) { this.x; this.y; switch (arguments.length) { case 0: this.x = 0; this.y = 0; break; case 1: this.x = x_or_vec.x; this.y = x_or_vec.y; break; default: this.x = x_or_vec; this.y = y; } } Sometimes I want to make a new object without specifying any information about it, then, I want x and y to be zero. Other times I want to input a vector for the new vector to copy, and some times I want to specify x and y coordinates for the new vector. I don't like the method I use in the example, and for some of the classes I make, this method cannot be used. function Box (pos,color,size) { this.pos = new Vec(pos); this.color = color; this.size = new Vec(size); } In some cases I want to specify color, but not size, and in other cases, size but not color, and in some cases both, and some none of them.
tagged with: class
score: 0
answer count: 1
tagged with: constructor
has answer: http://stackoverflow.com/a/25533679
type: UnansweredQuestion
tagged with: arguments
has title: Using varied types of arguments when making a new object
has comment: http://stackoverflow.com/comment/39865175
has comment: http://stackoverflow.com/comment/39864833
type: Question
has comment: http://stackoverflow.com/comment/39865065
tagged with: javascript

http://stackoverflow.com/comment/39759356
has text: Hi, I got the following error: request is not defined
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25474237

http://stackoverflow.com/comment/39793517
has text: @Pointy, it logs something like '[img#cjshnameraw, context: document, selector: "#cjshnameraw", jquery: "1.11.1", constructor: function, toArray: function…]'. If I inspect the element in question, I get ' '. That is what I want (the rest of) it to be, modulo the absence of a z-index.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25494016
type: Comment

http://stackoverflow.com/comment/39870278
has text: Not sure I am following. Could show that in Jsfiddle?
comment on: http://stackoverflow.com/q/25536233
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25456398
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39722571
upvote count: 3
type: Answer
has body: Your code: button.onclick = clickHandler(button); Is not assigning the function clickHandler to the event, it is assigning the result of the return value of invoking clickHandler. The result is undefined or null since there is no explicit return for the function. This is what you need. Many buttons I would have to double check event.target.value, but that is the gist of what you need.
downvote count: 0
answers question: http://stackoverflow.com/q/25456336
score: 3
accepted answer of: http://stackoverflow.com/q/25456336

http://stackoverflow.com/q/25520451
has body: I have a form and I add divs here dynamically using append(). It is successful in creating the divs, and that divs have input fields inside. But the problem is, after serializing the the data from the form, it doesnt include the data from the dynamically created divs. This is my createDiv function: function createDiv() { var count = 5; for (var i = 0; i < count; i++) { $('#userQues').append(" " + " Question A " + " " + " "); } }; Is there a problem in creating my div? Why does serialize doesnt include the data from my created div? Thanks in advance! Here is where is serialize the data. When the form is submitted: $('#explorer_form').submit(function(e){ var serializedData = $('#explorer_form').serialize(); alert(serializedData); $.ajax({ url : url + api, type : method, data : serializedData, success : function(response){ $('#response').val(JSON.stringify(response)); } }); e.preventDefault(); //STOP default action e.unbind(); //unbind. to stop multiple form submit. }); And the form: Submit</submit> And now, the alerted data is only the data from the input 'uname' only. It doesn't serialize the data from the created div.
has answer: http://stackoverflow.com/a/25520779
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39841149
type: Question
has comment: http://stackoverflow.com/comment/39841178
tagged with: javascript
has answer: http://stackoverflow.com/a/63706865
score: 0
answer count: 3
tagged with: jquery
has title: Ajax serialize() doesn't include data from dynamically created divs
has comment: http://stackoverflow.com/comment/39841741
tagged with: javascriptserializer
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25521063

http://stackoverflow.com/q/25483401
has comment: http://stackoverflow.com/comment/39814545
tagged with: jsdoc
has title: Is there possible in WebStorm to generate callback function code from JSdoc @callback
score: 2
has body: I have defined documentation for function callback using JSDoc @callback: /*** * My Function description * @param {String} myFirstParam My first param * @param {File} file My second pparam * @param {MyModule~StandardCallback} cb The callback that handles function result */ /** * Standard callback. * @callback MyModule~StandardCallback * @param {Error} err Exception object */ Webstorm can correctly handle @callback tag: Ctrl + Click on {MyModule~StandardCallback} works as "Go To Callback documentation" and {MyModule~StandardCallback} cb is shown in Ctrl+Space list. Can WebStorm also generate function expression body with parameter list from this documentation?
has comment: http://stackoverflow.com/comment/51353495
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
tagged with: phpstorm
downvote count: 0
tagged with: javascript
tagged with: callback
tagged with: jetbrains-ide
favorite count: 0

http://stackoverflow.com/q/25434747
has body: I have a programming problem which I don't know how to handle in order to make what I want :) I want to create a web-based software for my "real-life" escape the room business with the main functionality being the countdown timers in each of the two rooms (games). I have 3 computers with separate monitors in LAN network: A (server / control panel), B (room 1), C (room 2). What I want to achieve is to be able to start the countdown timer from the server on computer B in a way, that when I open a specific url on this computer using e.g. remote desktop, the counter will be already running. Right now I have: index.html file as the "Control panel", room1.html with counter for room 1 (computer B) room2.html with counter for room 2 (computer C). Currently I have the basic functionality written in jQuery/Javascript using the jQuery Timer and window.open() function. Index.html has the Start/Stop/Reset buttons for controlling the timers in each room. However, it works only when I open the index.html page on the computer B or C and open the room1.html/room2.html page directly from it. I want to be able to open index.html on server, start the timer in room 1 and then when I log in to computer B, enter the room1.html URL in the browser and the timer will be already running. Same with stopping and resetting. How can I achieve that? Is jQuery/Javascript enough? If so, how to do that? If not, how can I write that? With the use of PHP maybe? Thanks for any help!
has comment: http://stackoverflow.com/comment/39765058
type: Question
tagged with: javascript
tagged with: jquery
has title: How to control a function (countdown timer) on a different computer
tagged with: window.open
score: 0
has comment: http://stackoverflow.com/comment/39720331
linked to: http://stackoverflow.com/q/18876270
tagged with: timer
answer count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39768993

http://stackoverflow.com/a/25625427
answers question: http://stackoverflow.com/q/25502298
accepted answer of: http://stackoverflow.com/q/25502298
type: AcceptedAnswer
score: 0
has body: There's no general answer for this. Your backend will present an API, and you'll pull from that API here. Ideally your backend produces GeoJSON, and you can simply use a L.mapbox.featureLayer to consume it with the .loadURL function. If your backend produces something different, you'll have to do something different, but since we don't know what it produces, we can't tell you what.
type: Answer

http://stackoverflow.com/comment/39797158
type: Comment
score: 0
type: AnswerComment
has text: Thank you! So typically one way bindings are used to pass methods? is that my understanding of when you say "generally used to invoke a method on the parent"? - and if so, is it bad practice for me to have it setup the way i do? I really don't need two way binding on those attributes.
comment on: http://stackoverflow.com/a/25496569

http://stackoverflow.com/comment/39822691
has text: When I see the the generator URL its something like this: "host:port/pwd.html?type=Msg=8 APP_REQ=324823823" Do you know why does the content like this and whats it called or any other information ?
comment on: http://stackoverflow.com/a/25509881
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39826759
comment on: http://stackoverflow.com/q/25512340
type: Comment
type: QuestionComment
score: 2
has text: WHY would you validate captcha via JavaScript? It makes it possible for someone to bypass captcha.

http://stackoverflow.com/a/25456129
upvote count: 1
answers question: http://stackoverflow.com/q/25456048
type: AcceptedAnswer
has body: all your searches query the dom. this takes time and performs bad. on application start copy your table data into an array and perform the search there. you can either populate the array from the table like: var data = new Array(); than iterate over all the table's rows and fill the data like this data.push([item-name, code, unit-size]); or load the data through other means (json) and create the table from the data. this way you would have less data transfered over the wire, because the json file does not contain all the redundant html tags for each row. later do your search algorith on the data. the position of the entry are the same as the table rows. for example jQuery selector nth-child to find access the row. an better performing approach would be to save a reference to the row's in the data aswell: data.push([THE_ROW, item-name, code, unit-size]); this way you can directly address them without searching for them in the DOM every time. have in mind that THE_ROW has to be a jQuery element for jQuery methods to work. you can create a jQuery Element from a HTMLElement like this: $(htmlElement)
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25456048

http://stackoverflow.com/comment/39774131
has text: Add an error handler to your ajax call!
comment on: http://stackoverflow.com/q/25484599
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/25503490
has body: currently I have different javascript onload commands for each of my web pages. Is it possible to compile all of them in one javascript file and assign the functions to a specific web page? I'm currently working with an ASP.net MVC project, so I load a Layout.html when I start my application. I guess what I want is to only have a single javascript file and load it in my layout.html, and when I open another page a specific javascript function will run.
has comment: http://stackoverflow.com/comment/39809776
has answer: http://stackoverflow.com/a/25503562
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25503562
has comment: http://stackoverflow.com/comment/39809459
type: Question
tagged with: asp.net-mvc
possible better answer: http://stackoverflow.com/a/25504514
tagged with: javascript
has answer: http://stackoverflow.com/a/25504514
has title: javascript for specific web page
score: 0
answer count: 2
tagged with: jquery

http://stackoverflow.com/comment/39708820
has text: Why do you want to do this? If it's just a one-off transformation, then Crossfilter is probably the wrong solution.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25422423

http://stackoverflow.com/q/25397475
type: Question
has title: how to get JQeasy Slide panels to not overlap?
accepted answer: http://stackoverflow.com/a/25398477
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am using jquery slide found here: http://web.archive.org/web/20150227082803/http://www.jqeasy.com/jquery-slide-panel-plugin The problem I am having is that if you have multiple triggers and panels the panels will overlap each other rather then leave the panel and open the new panel. Now I am using the "clickOutsideToClose: true" function which does work but not if you click another tab directly. Here is the script in use: &lt;script&gt; $('#panel1').slidePanel({ triggerName: '#trigger1', position: 'fixed', triggerTopPos: '0px', panelTopPos: '0px', panelOpacity: 1, clickOutsideToClose: true }); $('#panel2').slidePanel({ triggerName: '#trigger2', position: 'fixed', triggerTopPos: '55px', panelTopPos: '0px', panelOpacity: 1, clickOutsideToClose: true }); &lt;/script&gt; The code is being used here in the top left corner so you can test and see what I mean: http://w11.zetaboards.com/SWGTest/index/ Basically I just want it so the panel's don't overlay each other and when you click on another trigger and one is already active the already active one will close and the new one will open. Any help would be much appreciated. Thanks, Dylan
has answer: http://stackoverflow.com/a/25398477
tagged with: css
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/comment/39650042
score: 0
type: Comment
type: QuestionComment
has text: there are a lot of ways to break your browser if you so choose. how breaking your own page provides security, i don't quite get. besides, there's several other ways to run a string as code besides eval(). in "use strict", you can make eval() safe: it's Function() that you still need to disable...
comment on: http://stackoverflow.com/q/25417034

http://stackoverflow.com/q/25417378
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25419249
score: 0
answer count: 3
tagged with: css
type: UnansweredQuestion
has body: I am enqueueing script which applies the class "first-half" to the first half of all the li elements under ul#menu-main. The class is not showing. What I have: In "themes/responsive-child/js/menu.js": $(document).ready(function(){ var menuItems = $("ul#menu-main li"); menuItems = menuItems.slice(0, Math.floor(menuItems.length/2)).addClass("first-half"); }); In "functions.php" of child theme: add_action('init', 'menuscript_init'); function menuscript_init() { wp_enqueue_script( 'menuscript_init', '&lt;?php get_stylesheet_directory_uri() ?&gt;/js/menu.js'); } Please point out what I did wrong
tagged with: php
has answer: http://stackoverflow.com/a/25420428
tagged with: wordpress
has title: Wordpress child theme not applying style via JQuery
has answer: http://stackoverflow.com/a/25417406
type: Question

http://stackoverflow.com/comment/39796829
type: QuestionComment
score: 0
has text: i remove it and still show value
comment on: http://stackoverflow.com/q/25496294
type: Comment

http://stackoverflow.com/q/25511048
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25511251
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25511251
tagged with: asp.net-mvc
tagged with: javascript
score: 0
has title: Is it possible to switch to previously opened tab instead of opening a new one?
has body: In the website I am building I have a link to another webpage set with a target of _blank to open in a new tab. If I click the link and then switch back to the 1st page and click the link again it opens a 3rd tab. Is there any way to get the browser to just switch back to the already open tab for the 2nd webpage?
answer count: 1

http://stackoverflow.com/a/25437462
type: Answer
accepted answer of: http://stackoverflow.com/q/25436634
has comment: http://stackoverflow.com/comment/39693874
downvote count: 0
answers question: http://stackoverflow.com/q/25436634
has comment: http://stackoverflow.com/comment/39687265
score: 1
has comment: http://stackoverflow.com/comment/39694290
has body: Join is not recursive var str=treeOfStrings.join(""); console.log(str); //"abc,def,ghij,k,l,mnop,qrst,uv,wxyz" So @Pointy's method uses map to do a recursive join. toString on an array will make a call to join instead, which will use join's default delimiter, a comma. (See here for reference) For the nested arrays, it will automatically join recursively, even if you override toString: Array.prototype.toString=function() { return this.join(""); }; then var str=treeOfStrings.toString(); console.log(str); //"abcdefghijklmnopqrstuvwxyz" Since the toString is done recursively to the nested array elements, so is the join. JS handles the recursion for you, so I would assume it is a fast algorithm, but I haven't benchmarked. Overriding toString may not be desirable in all situations, but it is just another option.
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39689033
has comment: http://stackoverflow.com/comment/39689851

http://stackoverflow.com/a/25461117
type: Answer
answers question: http://stackoverflow.com/q/25461061
has comment: http://stackoverflow.com/comment/39731099
has comment: http://stackoverflow.com/comment/39731138
score: 0
has body: I'd suggest applying display: none; to the .element's css as probably the simplest way to hide the element straight away.
has comment: http://stackoverflow.com/comment/39732502

http://stackoverflow.com/comment/39897427
type: Comment
has text: Anyone? We're particularly worried about this one - the goal of this message queue is basically to reduce our required server resources and, obviously, our server bills. We can't have it leaking memory as it basically defeats the purpose of the queue entirely.
comment on: http://stackoverflow.com/q/25451691
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39877577
comment on: http://stackoverflow.com/a/25539627
has text: I suggest you move this to the next question (about Redis). This one (about undefined functions) seems to be resolved.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25450425
answers question: http://stackoverflow.com/q/25449857
score: 0
has body: You can use sessions. The important thing to remember is that in the header bellow (header('Location: http://www.yoururl.com/displaypage.php');) must be the same url you acessed the site with along with /displaypage.php. So if you accessed with 'yoururl.com' then must be: header('Location: http://yoururl.com/displaypage.php'); but if you accessed with 'www.yoururl.com' then must be: header('Location: http://www.yoururl.com/displaypage.php');. This is nescessary to preserve your access to the session. session_start(); $_SESSION['TitleImageInfo'] = array(); for($i = 1; $i &lt; 4; $i++) { $title=$xml-&gt;page[$i]-&gt;title; $image=$xml-&gt;page[$i]-&gt;image; //Add title, image html to the $_SESSION['TitleImageInfo'] session array. $_SESSION['TitleImageInfo'] = "&lt;div class=\"sec\"&gt;&lt;img src=" . $image . "/&gt;" . $title . "&lt;/div&gt;"; } header("Location: http://www.yoururl.com/displaypage.php"); On displaypage.php: &lt;?php session_start(); for($i = 1; $i &lt; count($_SESSION['TitleImageInfo']); $i++) { echo($_SESSION['TitleImageInfo'][i]); } ?&gt;
type: Answer
has comment: http://stackoverflow.com/comment/39711131

http://stackoverflow.com/q/25520749
has comment: http://stackoverflow.com/comment/39843772
has answer: http://stackoverflow.com/a/25521560
has comment: http://stackoverflow.com/comment/39842259
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39841842
possible better answer: http://stackoverflow.com/a/25521560
tagged with: css
has body: I want to change the Thumb color for my slider, but I need to select the thumb with '.topcoat-range-input::-webkit-slider-thumb'. This selector is not working with css, I think because it includes a vendor prefix. Is there a possibility to fix that issue? I want to pick the color dynamically, so I can't simply append a class. $('.button').on('click', function (e) { $('.topcoat-range-input::-webkit-slider-thumb').css('background', 'rgba(255, 208, 255, 0.75)'); }); http://jsfiddle.net/qcn6tmpz/3/ A possible solution would be this one, but i hoped on simple way to do this: $('.button').on('click', function (e) { $("&lt;style type='text/css'&gt;.topcoat-range-input::-webkit-slider-thumb{background:rgba(255, 208, 255, 0.75)}&lt;/style&gt;").appendTo($("head")); });
has answer: http://stackoverflow.com/a/25520907
accepted answer: http://stackoverflow.com/a/25520907
has title: Is it possible to select attributes with vendor prefixes with jquery?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1720320

http://stackoverflow.com/q/25428267
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has title: jQuery image resizing according to resolution
has comment: http://stackoverflow.com/comment/39669652
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39669379
has body: I have the following jQuery snipper but it seems not to be working. The script is supposed to resize (with an animation) all the images with the 'img' id as soon as the window's width is lower than 960px. Here's the jQuery code: The HTML code for the images: {IMG1_FOOTER} Any idea why this isn't working as expected? Regards and thanks in advance!
has comment: http://stackoverflow.com/comment/39669518
has comment: http://stackoverflow.com/comment/39669479
type: Question
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/99558035
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/35834458
has text: See also `gulp-hub`

http://stackoverflow.com/q/25545495
answer count: 2
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39886743
favorite count: 0
linked to: http://stackoverflow.com/q/25772161
has comment: http://stackoverflow.com/comment/39886495
possible better answer: http://stackoverflow.com/a/25546771
accepted answer: http://stackoverflow.com/a/25952289
has answer: http://stackoverflow.com/a/25546771
score: -1
type: AnsweredQuestion
has body: Ruby 2.0.0, Rails 4.0.3 When the year select is triggered, JavaScript currently passes the name of the instance variable (@car) from the view to the controller as a string. I need to pass a reference to the instance variable instead of just the string name. Is this possible? I'd appreciate the help. EDIT: I've tried replacing the reference to car as follows, but I receive a syntax error. var car = $("#&lt;%= @car %&gt;"); Error: Syntax error, unrecognized expression: #&lt;%= @car %&gt; The view is: &lt;div class="span8"&gt; &lt;%= simple_form_for [:admin, @car], defaults: {label: false}, html: {id: 'new_admin_car', class: 'form-vertical'}, wrapper: :vertical_form, wrapper_mappings: { check_boxes: :vertical_radio_and_checkboxes, radio_buttons: :vertical_radio_and_checkboxes, file: :vertical_file_input, boolean: :vertical_boolean } do |f| %&gt; &lt;%= f.input(:stock_number, {input_html: {form: 'new_admin_car', car: @car}, autocomplete: :off, placeholder: 'Stock number?'}) %&gt; &lt;%= f.input(:ymm_year_id, {input_html: {form: 'new_admin_car', car: @car}, collection: YmmYear.all.order("year desc").collect{|c| [c.year, c.id]}, prompt: "Year?"}) %&gt; &lt;%= render partial: "makes", locals: {form: 'new_admin_car', car: @car} %&gt; &lt;%= render partial: "models", locals: {form: 'new_admin_car', car: @car} %&gt; &lt;input type="submit" form="new_admin_car" value="Create Car" class="btn btn-default btn btn-primary"&gt; &lt;% end %&gt; &lt;/div&gt; The current script is: // when the #year field changes $("#car_ymm_year_id").change(function () { // make a GET call and replace the content // First select identifies what has been selected, or fired var year = $('select#car_ymm_year_id :selected').val(); // Pull the variables from the input_html tag var form = $('select#car_ymm_year_id').attr("form"); var car = $('select#car_ymm_year_id').attr("car"); // Routes to the controller action $.post('/admin/cars/make_list/', { form: form, year: year, car: car }, function (data) { $("#…
downvote count: 1
type: Question
has title: Passing instance variable from view to controller via JavaScript
tagged with: ruby-on-rails
linked to: http://stackoverflow.com/q/4935632
has comment: http://stackoverflow.com/comment/39887334
has answer: http://stackoverflow.com/a/25952289

http://stackoverflow.com/comment/39893644
comment on: http://stackoverflow.com/q/25548313
score: 0
type: Comment
type: QuestionComment
has text: @rolind, check my answer below using associative arrays. I included a [JSfiddle Demo](http://jsfiddle.net/jrulle/bpk4e0pe/) to show you that it outputs your desired formatting as well.

http://stackoverflow.com/comment/39747597
comment on: http://stackoverflow.com/q/25469941
score: 0
type: Comment
has text: DOC: I thought about trying the query string approach, but could not get anything to work... I don't have much experience with doing that. How could I add a cue to toggle a radio into the destination URL?
type: QuestionComment

http://stackoverflow.com/a/25479925
score: 0
has comment: http://stackoverflow.com/comment/39784451
has comment: http://stackoverflow.com/comment/39765969
type: Answer
answers question: http://stackoverflow.com/q/25479871
upvote count: 1
downvote count: 1
has body: You can change the css rules depending on the media used with CSS media types. For example: @media print { body { font-size: 10pt } } @media screen { body { font-size: 13px } } @media screen, print { body { line-height: 1.2 } }

http://stackoverflow.com/a/25531529
accepted answer of: http://stackoverflow.com/q/25531328
answers question: http://stackoverflow.com/q/25531328
type: Answer
upvote count: 2
score: 2
has body: Wow, it took me awhile to figure out what you were doing wrong. First of all viewBox is with a capital B. So you get .attr("viewBox",'0 0 1000 1000'); Note, I claimed it had to be with spaces rather than comma's. That's actually not the case, my bad, as per spec: separated by whitespace and/or a comma It's just that spec always uses spaces... See here: http://jsfiddle.net/4tjoevqo/1/
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25501273
score: 4
has body: You havent closed ready function properly: $(document).ready(function(){ $('#venture').change(function(){ alert($(this).val()); }); }); //^---- typo here Demo
has comment: http://stackoverflow.com/comment/39805325
type: Answer
has comment: http://stackoverflow.com/comment/39805720
accepted answer of: http://stackoverflow.com/q/25501255
answers question: http://stackoverflow.com/q/25501255
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25530374
has body: To identify your element, use this : $(document).ready(function() { $(document).scroll(function() { $('section#test.third_third').css("display", "inline-block").fadeIn(2000); }); });
answers question: http://stackoverflow.com/q/25527807
score: 0
type: Answer

http://stackoverflow.com/q/25392150
has body: I get a TypeError: document.getElementById(...) is null but cant find the solution... Uncaught TypeError: Cannot set property 'innerHTML' of null GotAsyncOnline this error occor in firefox and chrome This is the script: &lt;script language=javascript type="text/javascript"&gt; &lt;!-- Hide script from non-JavaScript browsers var req_online; // GetAsyncOnline sends a request to read the status. function GetAsyncOnline() { url = "../../../../../../ivr/consulenten-overzicht.php"; // branch for native XMLHttpRequest object if (window.XMLHttpRequest) { req_online = new XMLHttpRequest(); req_online.abort(); req_online.onreadystatechange = GotAsyncOnline; req_online.open("POST", url, true); req_online.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); req_online.send(null); // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { req_online = new ActiveXObject("Microsoft.XMLHTTP"); if (req_online) { req_online.abort(); req_online.onreadystatechange = GotAsyncOnline; req_online.open("POST", url, true); req_online.send(); } } } // GotAsyncStatus is the read callback for the above XMLHttpRequest() call. // This routine is not executed until data arrives from the request. // We update the "fifo_data" area on the page when data does arrive. function GotAsyncOnline() { // only if req_online shows "loaded" if (req_online.readyState != 4 || req_online.status != 200) { return; } document.getElementById("status_online").innerHTML= req_online.responseText; // Schedule next call to wait for fifo data setTimeout("GetAsyncOnline()", 40000); return; } --&gt; &lt;body onLoad="GetAsyncOnline()"&gt;
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39602751
has title: TypeError: document.getElementById(...) is null GetAsyncOnline
has answer: http://stackoverflow.com/a/25393522
has comment: http://stackoverflow.com/comment/39602992
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/a/25433449
type: Answer
has body: This question sparked a lot of debate at the office, but we came up with a solution. Use a button click event to submit the form (instead of a normal submit button). Then populate your hidden field, remove the value of the visible field and submit. JSFIDDLE Click event sample: $('#post').click(function(e) { var password = $("#password"); var realPassword = $("#therealdeal"); realPassword.val(password.val()); password.val(''); $('#form').submit(); }); It appears that on a submit event the browser will serialize the form and use the serlized objects values to submit. This is why you can't simply do something like Not working sample: $('#form').submit(function(e) { var password = $("#password"); var realPassword = $("#realpassword"); realPassword.val(password.val()); password.val(''); }); even though the value on the dom is cleared out before a true submit happens it still reads from the serialized form object. Tested this in IE, Firefox, and Chrome
downvote count: 1
has comment: http://stackoverflow.com/comment/50452525
score: 3
upvote count: 4
answers question: http://stackoverflow.com/q/25418059
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25418059

http://stackoverflow.com/q/25397195
linked to: http://stackoverflow.com/q/20154423
type: Question
has answer: http://stackoverflow.com/a/25397623
accepted answer: http://stackoverflow.com/a/25417681
has title: How to pass safely text with URLs as a parameter to a CodeIgniter controller?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25397422
has answer: http://stackoverflow.com/a/25397421
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/25397421
has body: I'm trying to send from JavaScript, by using jQuery, via AJAX, a string that might contain one or more URL's. That text will be recieved by a CodeIgniter controller. I'm having some errors. Sometimes it's a 404 error or other times is a 406 error depending on the way I send the data. Right now I send it like this: var dsPost = encodeURIComponent(base64_encode(postContent)); $.ajax({ url: "/posts/createTextPost/" + dsPost, type: "POST", data: "userIdWall" + "=" + userIdWall, success: function(data, textStatus, jqXHR) { }, error: function (jqXHR, textStatus, errorThrown) { } }); The base64_encode fn is the phpjs implementation. In the CI controller I do this: public function createTextPost($dsPost) { $dsPost = base64_decode(urldecode($dsPost)); } The thing is, the data can be saved to the database but I can't understand why the 404 error. Any ideas? Thanks.
has answer: http://stackoverflow.com/a/25417681
upvote count: 1
answer count: 4
type: AnsweredQuestion
score: 1
tagged with: codeigniter

http://stackoverflow.com/q/25431620
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
has title: fadeOut on scroll at pixel height
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25432719
tagged with: css
type: AnsweredQuestion
tagged with: fadeout
upvote count: 1
has comment: http://stackoverflow.com/comment/39676138
type: Question
accepted answer: http://stackoverflow.com/a/25432719
tagged with: javascript
has body: i'm trying to achieve a Scroll to Top button that fades in at a certain point on the page and fades out at a certain point...I have the fadeIn function working properly but can't seem to get the proper syntax for the click event fadeOut; it just disappears once you get to the top, instead of fading out if you're <= 675px. Any help is greatly appreciated! HTML: BACK TO LOGIN jQuery: $(document).ready(function() { //Check to see if the window is top if not then display button $(window).scroll(function() { if ($(this).scrollTop() > 675) { $('.scrollToTop').fadeIn(500); } else { $('.scrollToTop').fadeOut(500); } }); //Click event to scroll to top $('.scrollToTop').click(function() { $('html, body').animate({ scrollTop : 0 }, 800); return false; }); });

http://stackoverflow.com/q/25548238
downvote count: 0
tagged with: javascript
has title: Does leafletjs support non square tiles
favorite count: 0
has answer: http://stackoverflow.com/a/28928260
type: UnansweredQuestion
upvote count: 1
tagged with: maptiler
has body: I have a rectangular PNG image which gets converted to tiles using a tool "Maptiler". MapTiler itself renders an html with leaflet script added to it which in turn lets me zoom in and zoom out. The issue I am currently facing is since the image isn't square,So while creating the tiles,the maptiler is generating a transparent grey image to cover up the rest of the image as it doesn't fit onto the edges.Hence I am getting a grey border as described in the image below. So my question is if there is any tool that can stretch the last tile instead of adding a grey border to cover up the image which "maptiler" is doing ?? or if leaflet js supports non square tiles ?? Thanks
tagged with: leaflet
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25553515

http://stackoverflow.com/comment/39717856
has text: There you go: http://api.jquery.com/length/
type: Comment
comment on: http://stackoverflow.com/q/25454086
type: QuestionComment
score: 2

http://stackoverflow.com/q/25522328
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I Have the modal set like this x This Modal title Add some text here Close Submit changes Show Modal I've added the latest jquery, bootstrap js and css for only the modal plugin. The problem I have is that the modal backdrop shows, however the modal header body and etc isn't showing up. My Code Please provide solution, thank you
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25522603
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39844479
has answer: http://stackoverflow.com/a/25522562
has answer: http://stackoverflow.com/a/25522670
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25522562
answer count: 3
accepted answer: http://stackoverflow.com/a/25522603
downvote count: 0
favorite count: 0
has title: Bootstrap - Modal isn't working

http://stackoverflow.com/comment/39885713
comment on: http://stackoverflow.com/a/25544779
has text: It starts to make sense little by little. Hmmmmmm... So, there is no chance in the world that the controller will ever know when the data will arrive. From what I understand from your say, is that I pose the question $log.info($scope.data) too soon from the controller's point of view? The question is how to avoid putting the code exploiting the data in the callback? I need to work with it in the controller in order to bind to the view...
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25402011
has title: execCommand in internet explorer saves the csv file using USC-2 Little endian encoding, how to save it with UTF-8 format?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25486011
tagged with: character-encoding
type: Question
tagged with: javascript
score: 0
has body: The execCommand always save the .csv file in USC-2 little indian format, but I want it in UTF-8 format. Also when I change the file name to .txt, the encoding is properly UTF-8. How can I achevie UTF-8 encoding for csv file? I did try to set charset to UTF-8 but it did not work. var oWin = window.open("about:blank", "_blank"); oWin.document.open("application/csv", "replace"); oWin.document.charset = "utf-8"; oWin.document.write(csvText); oWin.document.close(); var success = oWin.document.execCommand('SaveAs', true, 'fileName.csv'); oWin.close(); alert(success); The file is generated with proper contents but the encoding is not UTF-8 and hence excel does not recognize columns and entire row is displayed in single column. Produced file (fileNam.csv): "Column One","Column Two","Column Three" "row1 Col1","row1 Col2" "row2 Col1","row2 Col2","row2 Col3" "row3 Col1","row3 Col2","row3 Col3" I want to do this using javascript and specifically for IE. I know that for other browsers the HTML5 download tag can be used.
tagged with: http://stackoverflow.com/tag/csv
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: utf-8
has answer: http://stackoverflow.com/a/25486011

http://stackoverflow.com/comment/39879939
has text: Hi Guys, please be quick, i need its solution asap.
type: AnswerComment
comment on: http://stackoverflow.com/a/25541359
score: 0
type: Comment

http://stackoverflow.com/a/25482398
score: 0
type: Answer
has body: The fadeIn and fadeOut functions in jQuery are shorthands for animating the opacity. jQuery animates properties as putting them inline and changing it untill it reaches a specific point. In your case it's changing the opacity to lets say 0.35677 and the browser animates this change. In order to have a more sleek animation use CSS class (visible for instance) to modify the opacity. body { height:2000px; background:red; } #scroll-top { position: fixed; right:30px; bottom:30px; width: 30px; height:30px; color: #38555e; z-index: 99; border-radius: 50%; border:2px solid #38555e; text-align: center; background:#fff; -webkit-transition:all 0.2s linear; -moz-transition:all 0.2s linear; -o-transition:all 0.2s linear; transition:all 0.2s linear; opacity: 0; } #scroll-top:hover { background:#38555e; color:#fff; border-color:#fff; } #scroll-top.visible { opacity: 1; } And use the following code to change it: if ($(this).scrollTop() &gt; 100) { $('#scroll-top').addClass('visible'); } else { $('#scroll-top').removeClass('visible'); }
answers question: http://stackoverflow.com/q/25482131

http://stackoverflow.com/a/25537139
answers question: http://stackoverflow.com/q/25536926
downvote count: 1
has comment: http://stackoverflow.com/comment/39895671
upvote count: 0
score: -1
has comment: http://stackoverflow.com/comment/39896758
has comment: http://stackoverflow.com/comment/39880828
has body: When I've run into issue with attaching event handlers, I've resolved the issue by using the on() method to attach click handlers instead of jQuery's "shortcut" methods. Try using this syntax. $(document).on('click', '.mySelector', function(e) { e.preventDefault() // do stuff }
type: Answer
has comment: http://stackoverflow.com/comment/39896145

http://stackoverflow.com/comment/39724323
type: AnswerComment
has text: works great! But... if I select only a letter from a word then I select another letter from the same word, that second letter goes to the start of the paragraph. why so? This is so close to what I am looking for!
comment on: http://stackoverflow.com/a/25457456
score: 0
type: Comment

http://stackoverflow.com/q/25547683
upvote count: 1
tagged with: php
score: 1
tagged with: mysql
has title: Jquery Accordion data from database using php?
type: Question
has answer: http://stackoverflow.com/a/25548492
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: accordion
has body: How to get the parent and child data from the database and how to make the accordion.I want use the accordion in joomla. Please help me.My table is below I want this formate accordion
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39876243
comment on: http://stackoverflow.com/q/25539543
type: Comment
type: QuestionComment
has text: @MarkGabriel good point, in which case the answer below won't work. I would suggest unicode
score: 0

http://stackoverflow.com/comment/39792110
has text: @ProllyGeek I cited elclanrs comment in my answer - but at the time I started writing the answer elclanrs had not posted an answer and you had requested further clarification, which I was attempting to provide. Although we have quoted from the same source, this was not a copy and paste answer.
type: Comment
comment on: http://stackoverflow.com/a/25493821
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39647590
comment on: http://stackoverflow.com/q/25416080
has text: yes you're right only the black part
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39790706
type: Comment
comment on: http://stackoverflow.com/a/25485662
type: AnswerComment
has text: That works, but as an FYI, the jQuery UI way of hiding elements is to use class="ui-helper-hidden". That will hide it from screen readers too.
score: 0

http://stackoverflow.com/comment/39682034
has text: I would guess your right. The browser handles it all. I can only assume its a throwback from C and old code that doesnt hurt to put in. Maybe some browsers back in the day were getting memory leaks, and this was a workaround.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25434781
score: 0

http://stackoverflow.com/comment/39713753
comment on: http://stackoverflow.com/q/25452123
score: 0
type: Comment
type: QuestionComment
has text: Can you post more code about what you have done?

http://stackoverflow.com/q/25532058
has comment: http://stackoverflow.com/comment/39862446
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has title: RegEx not matching correctly when using new RegExp
tagged with: regex
linked to: http://stackoverflow.com/q/604860
score: 2
has comment: http://stackoverflow.com/comment/39862238
answer count: 0
has comment: http://stackoverflow.com/comment/39862412
duplicate of: http://stackoverflow.com/q/604860
type: Question
has body: I am trying to use regex to match a letter against strings and then using test however, it doesn't always match a letter with every string. x = [ 'Mike', 'Mary', 'Bob', 'Julie', 'Jon', 'Adam' ]; Working: (not using new RegExp) x.map(function(a) { console.log(a, /(m)/ig.test(a)); }); VM745:2 Mike true VM745:2 Mary true VM745:2 Bob false VM745:2 Julie false VM745:2 Jon false VM745:2 Adam true Not working: (using new RegExp) y = new RegExp('(m)', 'ig'); x.map(function(a) { console.log(a, y.test(a)); }); VM748:2 Mike true VM748:2 Mary false VM748:2 Bob false VM748:2 Julie false VM748:2 Jon false VM748:2 Adam true
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39737024
type: Comment
comment on: http://stackoverflow.com/a/25464330
score: 0
type: AnswerComment
has text: how would the html be? should it still be ng-click="create('/tab/newpost')"? or a href?

http://stackoverflow.com/a/25484594
type: Answer
has comment: http://stackoverflow.com/comment/39774057
answers question: http://stackoverflow.com/q/25484488
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25484488
has comment: http://stackoverflow.com/comment/39803829
upvote count: 2
has comment: http://stackoverflow.com/comment/39774177
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39774098
has body: You can use what you want in the address parameter of the GeoCoding API, for example: http://maps.googleapis.com/maps/api/geocode/json?address=Paris&amp;sensor=true Here I got the results matching the address Paris: Paris in France, Paris in Texas, etc. So you can use it to input your city and check if the state is valid. For this purpose, limit your search to the US also, using this complement: components=country:US Sample: http://maps.googleapis.com/maps/api/geocode/json?address=Paris&amp;sensor=true&amp;components=country:US Result: { "results" : [ { "address_components" : [ { "long_name" : "Paris", "short_name" : "Paris", "types" : [ "locality", "political" ] }, { "long_name" : "Comté de Lamar", "short_name" : "Comté de Lamar", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Texas", "short_name" : "TX", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "États-Unis", "short_name" : "US", "types" : [ "country", "political" ] } ], "formatted_address" : "Paris, Texas, États-Unis", "geometry" : { "bounds" : { "northeast" : { "lat" : 33.7383781, "lng" : -95.435455 }, "southwest" : { "lat" : 33.6118529, "lng" : -95.62792789999999 } }, "location" : { "lat" : 33.6609389, "lng" : -95.55551299999999 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 33.7383781, "lng" : -95.435455 }, "southwest" : { "lat" : 33.6118529, "lng" : -95.62792789999999 } } }, "types" : [ "locality", "political" ] }, { "address_components" : [ { "long_name" : "Paris", "short_name" : "Paris", "types" : [ "locality", "political" ] }, { "long_name" : "Comté de Henry", "short_name" : "Comté de Henry", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Tennessee", "short_name" : "TN", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "États-Unis", "short_name" : "US", "types" : [ "country", "political" ] }, { "long_name" : "38242", "short_name" : "38242", "types" : [ "postal…

http://stackoverflow.com/q/25468063
type: Question
score: 9
upvote count: 9
has answer: http://stackoverflow.com/a/37768679
downvote count: 0
has body: I'm playing around a bit with the HTML5 &lt;audio&gt; tag and I noticed some strange behaviour that has to do with the currentTime attribute. I wanted to have a local audio file played and let the timeupdate event detect when it finishes by comparing the currentTime attribute to the duration attribute. This actually works pretty fine if I let the song play from the beginning to the end - the end of the song is determined correctly. However, changing the currentTime manually (either directly through JavaScript or by using the browser-based audio controls) results in the API not giving back the correct value of the currentTime anymore but seems to set it some seconds ahead of the position that's actually playing. (These "some seconds" ahead are based on Chrome, Firefox seems to completely going crazy which results in the discrepancy being way bigger.) A little jsFiddle example about the problem: http://jsfiddle.net/yp3o8cyw/2/ Can anybody tell me why this happens - or did I just not getting right what the API should do? P.S.: I just noticed this actually only happens with MP3-encoded files, OGG files are totally doing fine.
tagged with: javascript
possible better answer: http://stackoverflow.com/a/37768679
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: HTML5 audio - currentTime attribute inaccurate?
has answer: http://stackoverflow.com/a/79454737
has comment: http://stackoverflow.com/comment/62800420
favorite count: 0
has answer: http://stackoverflow.com/a/25468932
tagged with: html5-audio
tagged with: audio
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/62752647
has comment: http://stackoverflow.com/comment/62766676
accepted answer: http://stackoverflow.com/a/25468932
tagged with: http://stackoverflow.com/tag/mp3

http://stackoverflow.com/comment/39723597
comment on: http://stackoverflow.com/q/25457031
score: 1
type: QuestionComment
has text: Save the old contents in a variable, and then put it back on the second click.
type: Comment

http://stackoverflow.com/comment/39712584
score: 0
type: Comment
has text: If there are any properties set on `OriginalConstructor.prototype`, `newObject` doesn't have them.
comment on: http://stackoverflow.com/a/25451456
type: AnswerComment

http://stackoverflow.com/q/25542280
has answer: http://stackoverflow.com/a/25542397
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25542581
has title: Javascript change hidden field on submit
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39881045
has answer: http://stackoverflow.com/a/25542552
has comment: http://stackoverflow.com/comment/39881551
has answer: http://stackoverflow.com/a/25542354
tagged with: forms
has answer: http://stackoverflow.com/a/25542609
upvote count: 3
has answer: http://stackoverflow.com/a/25542385
has body: Hi I am trying to install a merchant facility onto my website and it needs to submit a value $vpc_Amount which is the amount purchased in cents. What I need to do is multiply the amount entered by the user ($amount) by 100 to get $vpc_Amount. I tried the following but it isn't working. &lt;input type="text" ID="A1" name="amount"onkeypress="process1()"&gt; &lt;input type="hidden" id="A2" name="vpc_Amount"&gt; And then the javascript function process1() { f1 = document.getElementById("A1").value; total = f1*1000; document.getElementById("A2").value = total; } What is happening is it is occasionally working but most of the time it doesn't. I know there is something wrong with the script so hence asking here.
answer count: 7
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25542505

http://stackoverflow.com/a/25532953
has comment: http://stackoverflow.com/comment/39864337
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39868609
has comment: http://stackoverflow.com/comment/39868867
type: Answer
has comment: http://stackoverflow.com/comment/39869281
has comment: http://stackoverflow.com/comment/39868594
score: 2
accepted answer of: http://stackoverflow.com/q/25532750
downvote count: 0
answers question: http://stackoverflow.com/q/25532750
has comment: http://stackoverflow.com/comment/39869358
has body: You have to run the second function after the first asynchronous request is done. At the end of your vcenter1, add: return req; Then modify your code to: $('a[href*="vmware"]').on('click', function () { vcenter1().then(vcenter2); });
has comment: http://stackoverflow.com/comment/39868756

http://stackoverflow.com/comment/39760165
type: QuestionComment
comment on: http://stackoverflow.com/q/25476845
score: 0
has text: `.selected::before` is a selector, not a class, so you can't use that as an argument to `removeClass`.
type: Comment

http://stackoverflow.com/a/33911476
type: Answer
has comment: http://stackoverflow.com/comment/78489918
downvote count: 1
answers question: http://stackoverflow.com/q/25501391
has body: You can try __st.cid in JavaScript for getting customer id.
score: 20
upvote count: 21

http://stackoverflow.com/comment/39887633
type: Comment
type: QuestionComment
has text: @TJ Sorry i didnt get you. Can you explain?
comment on: http://stackoverflow.com/q/25545486
score: 0

http://stackoverflow.com/comment/39750987
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25471750
has text: Also I'd bet money this isn't a Node bug.
type: Comment

http://stackoverflow.com/comment/39631773
comment on: http://stackoverflow.com/a/25403560
type: AnswerComment
score: 0
has text: To fade image background colour use the following CSS on the element - Change the .2 to the duration of the fade: `-o-transition:background .2s ease-out, background .2s ease-in; -ms-transition:background .2s ease-out, background .2s ease-in; -moz-transition:background .2s ease-out, background .2s ease-in; -webkit-transition:color .2s ease-out, background .2s ease-in; transition:background .2s ease-out, background .2s ease-in;`
type: Comment

http://stackoverflow.com/comment/39841409
type: AnswerComment
score: 0
type: Comment
has text: Sorry, that's wrong. `console.log(len)` still gives 0. Also, as I've already defined datatype for my `$.post` request as json, json.data do give me the html content. The proof is that it is being appended to the div!
comment on: http://stackoverflow.com/a/25520514

http://stackoverflow.com/comment/39628835
has text: If my answer helped feel free to upvote/accept it. Alternatively if you need a little more information feel free to ask any questions.
score: 0
comment on: http://stackoverflow.com/q/25401437
type: Comment
type: QuestionComment

prop
tags question: http://stackoverflow.com/q/25412798
type: Tag
tag name: prop

rsvp.js
type: Tag
tag name: rsvp.js
tags question: http://stackoverflow.com/q/25411630

http://stackoverflow.com/q/25467514
answer count: 2
possible better answer: http://stackoverflow.com/a/25468175
tagged with: javascript
has body: I've set up an Angular Factory and Controller to pull images off Instagram using their API. I'm getting an error when trying to load the page but cannot seem to figure out the issue. My html, app, routes, factory, and controller code is below. I left the quiz controller out as it's functioning properly. I think the issue may reside with the factory as I am new to using them. index.html: Starter Node and Angular Toggle navigation Frank Social About Us Sign Up app.js: angular.module('app', ['ngRoute', 'appRoutes', 'InstaFactory', 'QuizCtrl', 'InstaCtrl']); appRoutes.js: angular.module('appRoutes', []).config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { $routeProvider // home page .when('/', { templateUrl: 'views/home.html', controller: 'QuizController' }) // quiz page that will use the QuizController .when('/quiz', { templateUrl: 'views/quiz.html', controller: 'QuizController' }) // insta page that will use the InstaController .when('/insta', { templateUrl: 'views/insta.html', controller: 'InstaController' }); $locationProvider.html5Mode(true); }]); InstaCtrl.js: angular.module('InstaCtrl', []).controller('InstaController', function($scope, Instagram) { $scope.example1 = { hash: 'angular' }; $scope.example2 = { hash: 'fit' }; $scope.example3 = { hash: 'food' }; var instagramSuccess = function(scope, res) { if (res.meta.code !== 200) { scope.error = res.meta.error_type + ' | ' + res.meta.error_message; return; } if (res.data.length > 0) { scope.items = res.data; } else { scope.error = "This hashtag has returned no results"; } }; Instagram.get(9, $scope.example1.hash).success(function(response) { instagramSuccess($scope.example1, response); }); Instagram.get(9, $scope.example2.hash).success(function(response) { instagramSuccess($scope.example2, response); }); Instagram.get(9, $scope.example3.hash).success(function(response) { instagramSuccess($scope.example3, response); }); }); InstaFactory.js: angular.module('InstaFactory', []).…
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25468175
type: Question
has title: Angular "ng:areq" error, factory issue
has answer: http://stackoverflow.com/a/25476431
accepted answer: http://stackoverflow.com/a/25476431
score: 0

http://stackoverflow.com/q/25478900
tagged with: countdown
tagged with: timer
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25479474
score: 0
tagged with: java
type: Question
answer count: 2
tagged with: javascript
has body: is it possible to create a timer where I can manually set the hours each day to a set number of hours but still remains accurate? For example; if I set the countdown for 5 hours at 2pm I want the timer to stop as soon as it hits 7pm. Also, when I set the timer for 5 hours I would like everyone in the world to see it countdown from 5 hours, no matter what the time is in their country. In the format: days hours minutes seconds. The reason I want to do this is for a streamer's website. He needs a flexible timer which can be manually changed and is the same worldwide for his viewers to know when he starts streaming. The current timer we're using at the moment; setInterval(function(){ var currentTime = new Date(); if(currentTime.getHours() &gt; 19){ var countdownHours = (24 - currentTime.getHours()) + 19; }else if(currentTime.getHours() &lt; 19){ var countdownHours = 19 - currentTime.getHours(); }else{ var countdownHours = 0; } var countdownMins = 59 - currentTime.getMinutes(); var countdownSecs = 60 - currentTime.getSeconds(); $('#countdown-days h1').text('0'); $('#countdown-hours h1').text(countdownHours); $('#countdown-minutes h1').text(countdownMins); $('#countdown-seconds h1').text(countdownSecs); }, 1000); As you can tell it isn't ideal for what we need it for since it counts down to 7pm in the timezone you're in. Any help/examples would be greatly appreciated, Thank you in advance, Lixorp.
has title: Is it possible to create a timer in jscript that you can manually change without it being affected by timezones?
has answer: http://stackoverflow.com/a/25478978

http://stackoverflow.com/q/25402191
answer count: 4
has title: setting minDate in datepicker in Rails
has answer: http://stackoverflow.com/a/36580817
possible better answer: http://stackoverflow.com/a/25402697
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/25402697
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25440116
type: Question
has body: I need to apply minDate attribute to the datepicker in Rails App as today's date. In _admin_controls.html.erb &lt;%= f.input :end_date, wrapper: :append do %&gt; &lt;div id="datepicker" class="datepicker input-group edit-left"&gt; &lt;%= f.text_field :end_date, :class =&gt; "datetime form-control" %&gt; application.js contains jQuery(document).on('focus', 'input.datetime', function() { opts = {format: 'M dd, yyyy', autoclose: true}; jQuery(this).datepicker(opts); jQuery(".datepicker").css("z-index",10000); }); What should be the javascript to do so only for _admin_controls.html.erb?
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25440116
tagged with: datepicker
has answer: http://stackoverflow.com/a/25403304

http://stackoverflow.com/comment/39728923
has text: about scraping: https://www.facebook.com/apps/site_scraping_tos_terms.php
comment on: http://stackoverflow.com/q/25458263
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25532754
score: 5
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have a helper called 'isActive' and a template named 'create'.. see below Template.create.isActive = function () { return Meteor.user().profile.isActive; }; When I try to run this code it returns the following in console: "Exception in template helper: TypeError: Cannot read property 'profile' of undefined". Basically I want to pull the 'isActive' info from the current user profile and return it to the template. Any idea why this does not work? Update //startup on server side: Meteor.publish("userData", function() { if (this.userId) { return Meteor.users.find({_id: this.userId}, {fields: {'profile.isActive': 1}}); } else { this.ready(); } }); //startup on client side Meteor.subscribe('userData'); //router this.route('list', { path: 'list', waitOn : function () { return Meteor.subscribe('userData'); }, data : function () { return Meteor.users.findOne({_id: this.params._id}); }, action : function () { if (this.ready()) { this.render(); } } });
tagged with: meteor
linked to: http://stackoverflow.com/q/18478279
has title: Meteor.user().profile returns 'profile' undefined
upvote count: 5
accepted answer: http://stackoverflow.com/a/25533012
has comment: http://stackoverflow.com/comment/39920638
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25533012
linked to: http://stackoverflow.com/q/11087820
has comment: http://stackoverflow.com/comment/39911168
has comment: http://stackoverflow.com/comment/39907318
type: Question

http://stackoverflow.com/q/25455857
has comment: http://stackoverflow.com/comment/39721609
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39721496
tagged with: arrays
tagged with: jquery
has title: Comparing Objects in Array
type: Question
has body: Ok so Im building a product sorting watch and this is what I have so far. jQuery(document).ready(function() { // starter jQuery file /* Watches Array */ var watchesArray = [ { model: "Swim", image:"", price: 149.99, sports:["Swimming"], touchScreen:false, GPS:false, heartRateMonitor:false, hrZoneTraining:false, caloriesBurned:true, distance:true, pace:true, multisport:false, swimMetrics:true, memory:"Up to 30 workouts", virtualPartner:false, virtualRacer:false, paceAlert:false, timeDistanceAlert:false, hydrationAlert:false, rechargeableBattery:false, waterResistant:"Up to 50 meters", syncWithComputer:true, other:"", }, { model: "FR 10", image:"fr_10.jpg", price: 129.99, sports:["Running"], touchScreen:false, GPS:true, heartRateMonitor:false, hrZoneTraining:false, caloriesBurned:false, distance:true, pace:true, multisport:false, swimMetrics:false, memory:"Up to 7 workouts", virtualPartner:false, virtualRacer:false, paceAlert:false, timeDistanceAlert:false, hydrationAlert:false, rechargeableBattery:true, waterResistant:"Up to 50 meters", syncWithComputer:false, other:"-Virtual Pacer(compares running pace to target) -Walk/Run feature", checkBox:" " }, { model: "FR 15", image:"fr_15.jpg", price: 199.99, sports:["Running"], touchScreen:false, GPS:true, heartRateMonitor:true, hrZoneTraining:true, caloriesBurned:true, distance:true, pace:true, multisport:false, swimMetrics:false, memory:"Up to 7 workouts", virtualPartner:false, virtualRacer:false, paceAlert:false, timeDistanceAlert:false, hydrationAlert:false, rechargeableBattery:true, waterResistant:"Up to 50 meters", syncWithComputer:false, other:"-Virtual Pacer (compares running pace to target) Walk/Run feature -Activity", }, { model: "FR 220", image:"fr_220.jpg", price: 299.99, sports:["Running"], touchScreen:false, GPS:true, heartRateMonitor:true, hrZoneTraining:true, caloriesBurned:true, distance:true, pace:true, multisport:false, swimMetrics:false, memory:"200 hours of data", virtualPartner:false, virtualRacer:false…
has comment: http://stackoverflow.com/comment/41736968
score: 0
has answer: http://stackoverflow.com/a/26556991
answer count: 1

http://stackoverflow.com/a/25478982
answers question: http://stackoverflow.com/q/25478947
has comment: http://stackoverflow.com/comment/39764147
type: Answer
score: 0
has body: If u want it in array then u can use split function like below var address=json.result[0].address.split(","); var picture=json.result[0].picture.split(","); var story =json.result[0].story.split(","); if there are more the 1 result in json then var address=[]; var picture=[]; var story =[]; for (var i=0;i&lt;json.result.length;i++){ address=address.concat(json.result[i].address.split(",")); picture=picture.concat(json.result[i].picture.split(",")); story =story .concat(json.result[i].story.split(",")); }
has comment: http://stackoverflow.com/comment/39764168

http://stackoverflow.com/comment/39822161
comment on: http://stackoverflow.com/a/25509906
type: Comment
score: 0
type: AnswerComment
has text: This code works without any problem and your answer is respected for me! But this is not something that I want!

http://stackoverflow.com/q/25479789
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39766277
favorite count: 0
has title: Font Awesome stacked icon hover outline issue
has comment: http://stackoverflow.com/comment/39766240
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/25480293
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40245110
has body: I am using font awesome stacked icon.My code is: jquery code to change color when mouse hover is: $("#twitterBox").hover(function(){ $("#faTwittertSquare").removeClass("colorOrange"); $("#faTwittertSquare").addClass("colorWhite"); $("#fatwitter").removeClass("colorWhite"); $("#fatwitter").addClass("colorOrange"); },function(){ $("#faTwittertSquare").removeClass("colorWhite"); $("#faTwittertSquare").addClass("colorOrange"); $("#fatwitter").removeClass("colorOrange"); $("#fatwitter").addClass("colorWhite"); }); $("#facebookBox").hover(function(){ $("#faFacebookSquare").removeClass("colorOrange"); $("#faFacebookSquare").addClass("colorWhite"); $("#faFacebook").removeClass("colorWhite"); $("#faFacebook").addClass("colorOrange"); },function(){ $("#faFacebookSquare").removeClass("colorWhite"); $("#faFacebookSquare").addClass("colorOrange"); $("#faFacebook").removeClass("colorOrange"); $("#faFacebook").addClass("colorWhite"); }); it's all working but when i mouse hover the icons many time icon right side small line visible.how to fix it.This problem only on chrome browser. This my image: my css code: .fa-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle; } .fa { display: inline-block; font-family: FontAwesome; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .fa-square-o:before { content: "\f096"; } .fa-square:before { content: "\f0c8"; } .fa-stack-2x { font-size: 2em; } .fa-stack-2x { position: absolute; left: 0; width: 100%; text-align: center; } .fa-twitter:before { content: "\f099"; } .fa-facebook:before { content: "\f09a"; } .colorWhit{ color:#FFFFFF; } .colorOrange{ color:#FFA500; }
has comment: http://stackoverflow.com/comment/39765724
type: Question
has comment: http://stackoverflow.com/comment/39766197
tagged with: font-awesome
has comment: http://stackoverflow.com/comment/39765860
tagged with: javascript
has comment: http://stackoverflow.com/comment/39765921
tagged with: jquery

http://stackoverflow.com/q/25530168
linked to: http://stackoverflow.com/q/5381621
type: Question
has title: Is there a function like array_unique() in jQuery?
score: 9
duplicate of: http://stackoverflow.com/q/5381621
answer count: 1
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/136321310
favorite count: 0
linked to: http://stackoverflow.com/q/9229645
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/952194
has comment: http://stackoverflow.com/comment/39858734
has comment: http://stackoverflow.com/comment/39859152
tagged with: php
has body: I have a select where i can get some values as array like ["1","2","3"] On every change i run the following code to get a result of array which is connected to these values i get from select $('#event-courses-type').on('change',function(){ type = $('#event-courses-type').val(); console.log(type); var var1 = ["4689 Leadership Award", "UKCC Level 1", "UKCC Level 2", "UKCC Level 3", "UKCC Level 4", "Old WHU Award", "None at present"]; var var2 = ["4689 Leadership Award", "GB-wide Level 1", "Old Level 1 (Pre January 2012)", "Level 2", "Level 3", "EHF", "FIH", "None at present"]; var var5 = ["D32/33", "A1 Assessor", "CTS", "IAPS", "PTLLS", "AVRA", "Umpire Educator Training", "Umpire Assessor Training"]; var var6 = ["D32/33", "A1 Assessor", "CTS", "IAPS", "PTLLS", "AVRA", "Umpire Educator Training", "Umpire Assessor Training"]; var results = []; if ($.inArray("1",type) != -1) { var results = $.merge(var1, results); } if ($.inArray("2",type) != -1) { var results = $.merge(var2, results); } if ($.inArray("5",type) != -1) { var results = $.merge(var5, results); } if ($.inArray("6",type) != -1) { var results = $.merge(var6, results); } console.log(results); )}; Here is my console log to let you see the type array after i selected 2 options and the results array: ["1", "2"] ------------------- add_event.php:802 ["4689 Leadership Award", "GB-wide Level 1", "Old Level 1 (Pre January 2012)", "Level 2", "Level 3", "EHF", "FIH", "None at present", "4689 Leadership Award", "UKCC Level 1", "UKCC Level 2", "UKCC Level 3", "UKCC Level 4", "Old WHU Award", "None at present"] As you see there is two times "4689 Leadership Award" and i dont want this to happen. In PHP i use the array_unique() function to eliminate these duplicated values but i dont know how to do it in jQuery.
duplicate of: http://stackoverflow.com/q/9229645
has comment: http://stackoverflow.com/comment/39859336
has answer: http://stackoverflow.com/a/25530233
has comment: http://stackoverflow.com/comment/39858927
upvote count: 9

http://stackoverflow.com/q/25407448
possible better answer: http://stackoverflow.com/a/25407561
has answer: http://stackoverflow.com/a/25407561
type: AnsweredQuestion
has title: how to get form parameters after post request sent with jQuery post
type: Question
has comment: http://stackoverflow.com/comment/39630920
has comment: http://stackoverflow.com/comment/39630928
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25407521
score: 0
answer count: 2
upvote count: 1
downvote count: 1
has body: I have an HTML form $("#mainform").submit(function() { $.post($("#mainform").attr("action"), $("#mainform").serialize(), function(data){ doSomething(); }); }); How can I get the parameters sent with the form, like "myparam" in this example? Looks like the 'data' parameter of the callback function rather returns the html of the whole page.
tagged with: jquery
has answer: http://stackoverflow.com/a/25407521
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25419130
score: 2
has body: The purpose why data-selectors where introduces is because the users neednt want to use class or anyother attributes to store value.Kindly use data-selectors itself. In order to make it easy to access them use attributes selector i.e. [attribute='value']. PFB the fiddle for the same and also the example jsfiddle JS Bin sdf sdf sdf sdf function call() { $("#1").html($('[data-check="1"]').length); $("#2").html( document.querySelectorAll('[data-check="1"]').length); } Output: 5 5 sdf sdf sdf
upvote count: 2
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25418379

http://stackoverflow.com/comment/39690752
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25439717
has text: `[object Object]` is just the browser automatically calling `.toString()` on `this`, it won't tell you what variable it is assigned to. You can try using `console.log(this)` or `console.dir(this)` and checking your browser's Developer Tools to see the properties on `this`.
type: QuestionComment

http://stackoverflow.com/q/25537624
type: Question
has answer: http://stackoverflow.com/a/25610139
has comment: http://stackoverflow.com/comment/39954345
accepted answer: http://stackoverflow.com/a/25610139
has answer: http://stackoverflow.com/a/25581420
has body: I'm working on this website The products on the center and right column are in a masonry container. The problem I have is that If I apply the lazy load plugin to it, since it has different heights the images overlaps the others container: This is how it looks (when not using lazy load): Any ideas on how to make it work? This is my script: Posts.prototype.onBeforeRender = function() { var container; /* log("Msnry!"); */ container = document.querySelector('#products_tmpl'); App.msnry = new Masonry(this.el, { itemSelector: '.product', columnWidth: container.querySelector('.column-width'), gutter: container.querySelector('.gutter-sizer'), transitionDuration: '0.1s' }); return delay(1000, this.reRenderLayout); }; jQuery(function() { jQuery("img.lazy").lazyload({ effect : "fadeIn" }); }); Post.prototype.returnImageForPost = function(maxSize) { var image_url, thumbnail_images; image_url = ""; if (this.model.get("thumbnail_images") != null) { thumbnail_images = this.model.get("thumbnail_images"); thumbnail_images = _.sortBy(thumbnail_images, function(item) { return -item.width; }); _.each(thumbnail_images, function(thumb) { if (thumb.width >= maxSize) { return image_url = thumb; } }); } return image_url; }; This is the markup of each item: <img class="lazy" data-original="<%= post_item.image_url.url %>"> <%= item.title %> <%= title %>
has comment: http://stackoverflow.com/comment/39954126
tagged with: javascript
score: 4
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/39954104
has comment: http://stackoverflow.com/comment/40019094
downvote count: 0
tagged with: jquery
linked to: http://stackoverflow.com/q/10096300
favorite count: 0
has comment: http://stackoverflow.com/comment/76186362
possible better answer: http://stackoverflow.com/a/25581420
tagged with: http://stackoverflow.com/tag/html
tagged with: plugins
has comment: http://stackoverflow.com/comment/39954146
tagged with: css
has comment: http://stackoverflow.com/comment/39954268
type: AnsweredQuestion
has title: Masonry and Lazy load integration
has comment: http://stackoverflow.com/comment/39954193

http://stackoverflow.com/comment/39630838
has text: mu is too short, if you turn your comment into an answer, I will accept it. Thanks!
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25390121
type: QuestionComment

http://stackoverflow.com/q/25401391
has title: How to get an H1 using getelementby
type: Question
has comment: http://stackoverflow.com/comment/39619579
tagged with: javascript
tagged with: dom
answer count: 1
has comment: http://stackoverflow.com/comment/39619717
favorite count: 0
has body: I have this code which I've been trying to fix for hours. empty empty THIS I have tried everything: getElementsByTagName, getElementsByID, getElementsByClassName, return $dom_document->getElementByTagName("h1")->nodeValue;; But no success.
linked to: http://stackoverflow.com/q/1666881
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/1666881
score: -1
downvote count: 2
has answer: http://stackoverflow.com/a/25401463
upvote count: 1

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/25460782

http://stackoverflow.com/comment/39884080
score: 1
has text: Yes it should work. See [this](http://api.jquery.com/siblings/) for more information on siblings
type: AnswerComment
comment on: http://stackoverflow.com/a/25542659
type: Comment

http://stackoverflow.com/comment/39743381
has text: possible duplicate of http://stackoverflow.com/questions/919522/how-can-i-use-google-translate-via-ajax-using-jquery
comment on: http://stackoverflow.com/q/25467740
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/70020058
answers question: http://stackoverflow.com/q/25499539
downvote count: 0
type: Answer
score: 1
has body: this worked for me: function check() { let table = $('#tableId').DataTable(); let rows = table.rows({selected: true}).nodes().to$(); var checkBox = rows[0].cells[0].children[0]; alert(checkBox.id) }
upvote count: 1

http://stackoverflow.com/q/25406778
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25406860
linked to: http://stackoverflow.com/q/21062543
has body: In this example, I type in java and I hit tab/down, and I can start navigating the results. Its also sane as I can select the text and open the learn more link. I want to make an autosuggest like this. How do I make it keyboard navigable as: tab/down from textbox moves to first element tab/down from an element moves to next element up reverses both 1. and 2., you can move from an element to the textbox I have tried setting tabindex to a bunch of elements. I can make them selectable, once selected I can only navigate only by tab (in Firefox), no up or down, much less going back to the textbox. something one item and link one item one item I also need to lay out everything consecutively in the HTML, whereas I usually add popovers as the last element to the body and absolutely position them. I guess StackOverflow the site must be handling the tab, up and down keys and calculating which one gets focus; tabindex seems kinda limiting.
has title: How to make divs navigable by tab/down?
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/25485951
has title: generator-angular-fullstack d3.js directive
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: angularjs
tagged with: d3.js
type: UnansweredQuestion
has body: I've alread tested that in a plnkr and it works fine. But whenever i try to use it in a directive inside of the Daftmonk/generator-angular-fullstack it renders everything except the arrows at the end of the links. It works fine when used in main.html...but in every other route is fails...the css is picked up correctly but the svg's are an issue. The arrows for example wont show up. plnkr: http://plnkr.co/edit/mYRoPVDP95vFw7YkHrAG?p=info generator: github.com/DaftMonk/generator-angular-fullstack directive: app.directive('myNodes', ['$compile', function ($compile) { return { restrict: 'AE', link: function(scope, element, attrs) { // http://blog.thomsonreuters.com/index.php/mobile-patent-suits-graphic-of-the-day/ var links = [ {source: "Microsoft", target: "Amazon", type: "licensing"}, {source: "Microsoft", target: "HTC", type: "licensing"}, {source: "Samsung", target: "Apple", type: "suit"}, {source: "Motorola", target: "Apple", type: "suit"}, {source: "Nokia", target: "Apple", type: "resolved"}, {source: "HTC", target: "Apple", type: "suit"}, {source: "Kodak", target: "Apple", type: "suit"}, {source: "Microsoft", target: "Barnes &amp; Noble", type: "suit"}, {source: "Microsoft", target: "Foxconn", type: "suit"}, {source: "Oracle", target: "Google", type: "suit"}, {source: "Apple", target: "HTC", type: "suit"}, {source: "Microsoft", target: "Inventec", type: "suit"}, {source: "Samsung", target: "Kodak", type: "resolved"}, {source: "LG", target: "Kodak", type: "resolved"}, {source: "RIM", target: "Kodak", type: "suit"}, {source: "Sony", target: "LG", type: "suit"}, {source: "Kodak", target: "LG", type: "resolved"}, {source: "Apple", target: "Nokia", type: "resolved"}, {source: "Qualcomm", target: "Nokia", type: "resolved"}, {source: "Apple", target: "Motorola", type: "suit"}, {source: "Microsoft", target: "Motorola", type: "suit"}, {source: "Motorola", target: "Microsoft", type: "suit"}, {source: "Huawei", target: "ZTE", type: "suit"}, {source: "Ericsson", target: "ZTE…
tagged with: css
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/25516848
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/27624692
type: UnansweredQuestion
tagged with: iframe
has body: I'm working with an IFrame on my page and making a Communication with Cross Domain IFrame - A Cross Browser Solution using .postmessage in java script in my IFRAME target page I have something like this: window.parent.postMessage("Assign to value1", "www.parentpage.com"); window.parent.postMessage("Assign to value2", "www.parentpage.com"); then in my parent page : var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; var eventer = window[eventMethod]; var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message"; eventer(messageEvent, function (e) { var value1 = e.data; var value2 = e.data; }, false); I tested it and Its working with single var using value1 only. Now I want to parametarized my .postmessage if its possible so that I can get the message dynamically. I'm expecting a result of : value1=Assign to value1 value2=Assign to value2 Any suggestion on how can I achieve that result?
linked to: http://stackoverflow.com/q/35939798
has title: Window.Parent.Postmessage with Parameter
type: Question
score: 20
answer count: 2
has answer: http://stackoverflow.com/a/34051349
upvote count: 20
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: cross-domain

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/25414209
tags question: http://stackoverflow.com/q/25409435
type: Tag

http://stackoverflow.com/comment/39820664
has text: For my surprise same is working only if I use array or json data. I don't know whats wrong with mentioned approach. I will post again if I get the root cause... I request others also to look into it. Thanks..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25489068

http://stackoverflow.com/a/25435145
type: Answer
accepted answer of: http://stackoverflow.com/q/25395334
type: AcceptedAnswer
has body: After troubleshooting for some time, I discovered that the entire problem was an issue in the manifest.json, specifically the matches section. The code given above works, and so do the methods given in the document that I linked to. Thanks to devnull69 for the quick response, I attempted that method and after solving the problem in manifest.json, it worked to remove the timeout entirely.
score: 0
answers question: http://stackoverflow.com/q/25395334

http://stackoverflow.com/comment/39748052
score: 0
type: Comment
has text: Thanks for the answer. Actually, ExtJs 4 has alot easier way to do it - just by using addDockedItem and RemoveDockedItem. That's why Im asking about ExtJs 3 and not 4. Could not find a way to do it in 3.
type: AnswerComment
comment on: http://stackoverflow.com/a/25443090

http://stackoverflow.com/a/25421959
has comment: http://stackoverflow.com/comment/39658669
accepted answer of: http://stackoverflow.com/q/25417915
upvote count: 3
has body: As you can see by the following command, the request to your website is being redirected from perativ.com to www.perativ.com using HTTP status code 301. When this redirect happens, POST is converted to GET. To solve the issue, send the request to www.perativ.com instead of perativ.com, OR disable the redirect if it is within your reach. $ curl -X POST http://perativ.com/receive -H 'Content-Length: 0' <TITLE>301 Moved 301 Moved The document has moved here.
answers question: http://stackoverflow.com/q/25417915
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39659009
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/39659050
downvote count: 0
has comment: http://stackoverflow.com/comment/39658581

http://stackoverflow.com/q/25457967
has comment: http://stackoverflow.com/comment/39725325
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25457995
has comment: http://stackoverflow.com/comment/39725463
has title: how to highlight index nav link when on root page
has comment: http://stackoverflow.com/comment/39725571
has comment: http://stackoverflow.com/comment/39726009
tagged with: nav
has comment: http://stackoverflow.com/comment/39725623
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has body: So there's one web design project I'm working on, and I've run into a bit of a problem I've been trying to resolve. I've been working on highlighting different nav links based on url of current page. It works on every page I've been working on except for the index page when you land to that page through root link. Even knowing the issue may seems minor if everything else works, but it does bother me a little, hey, I like a good challenge though. I've been trying to set it up in jquery so the index link get highlighted whenever someone is at the root links but I've had no success. I'm also out of ideas on what to try. If anyone can give me help that would be great. Here's all the relevant pieces of code HTML: Home About Contact CSS: nav.main ul li a { color: #000000; font-size: 1.57em; padding: 0.1em 1.5em; padding-top: 0.3em; border-bottom: 5px solid transparent } nav.main ul li a.pink:hover { border-bottom: 5px solid #d9618f; transition: 295ms ease; } nav.main ul li a.apink { border-bottom: 5px solid #d9618f; } nav.main ul li a.orange:hover { border-bottom: 5px solid #5ee9ef;; transition: 295ms ease; } nav.main ul li a.aorange { border-bottom: 5px solid #5ee9ef; } nav.main ul li a.purple:hover { border-bottom: 5px solid #9648a5; transition: 295ms ease; } nav.main ul li a.apurple { border-bottom: 5px solid #9648a5; } jQuery: $(function () { $('nav.main ul li a[href="index.html' + location.pathname.split("index.html")[1] + '"]').addClass('apink'); $('nav.main ul li a[href="about.html' + location.pathname.split("about.html")[3] + '"]').addClass('aorange'); $('nav.main ul li a[href="contact.html' + location.pathname.split("contact.html")[4] + '"]').addClass('apurple'); $('nav.main ul li a[href="index.html' + location.pathname.split("schedule.html")[5] + '"]').addClass('apink'); $('nav.main ul li a[href="contact.html' + location.pathname.split("thanks.html")[6] + '"]').addClass('apurple'); });
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25458035

http://stackoverflow.com/a/25417291
has comment: http://stackoverflow.com/comment/39716220
answers question: http://stackoverflow.com/q/25417038
has comment: http://stackoverflow.com/comment/39723359
has comment: http://stackoverflow.com/comment/39650628
type: Answer
has comment: http://stackoverflow.com/comment/39682154
has comment: http://stackoverflow.com/comment/39650658
has comment: http://stackoverflow.com/comment/39650743
has comment: http://stackoverflow.com/comment/39687714
downvote count: 1
score: 17
has comment: http://stackoverflow.com/comment/39690597
upvote count: 18
has comment: http://stackoverflow.com/comment/39675352
has body: Purely from an aggregation framework point of view there are a few approaches to this. You can either just apply $setUnion in modern releases: db.collection.aggregate([ { "$project": { "foo_list": { "$setUnion": [ "$foo_list", "$foo_list" ] } }} ]) Or more traditionally with $unwind and $addToSet: db.collection.aggregate([ { "$unwind": "$foo_list" }, { "$group": { "_id": "$_id", "foo_list": { "$addToSet": "$foo_list" } }} ]) Or if you were just interested in the duplicates only then by general grouping: db.collection.aggregate([ { "$unwind": "$foo_list" }, { "$group": { "_id": { "_id": "$_id", "foo_list": "$foo_list" }, "count": { "$sum": 1 } }}, { "$match": { "count": { "$ne": 1 } } }, { "$group": { "_id": "$_id._id", "foo_list": { "$push": "$_id.foo_list" } }} ]) The last form could be useful to you if you actually want to "remove" the duplicates from your data with another update statement as it identifies the elements which are duplicates. So in that last form the returned result from your sample data identifies the duplicate: { "_id" : ObjectId("53f5f7314ffa9b02cf01c076"), "foo_list" : [ { "id" : "98aa4987-d812-4aba-ac20-92d1079f87b2", "name" : "Foo 1", "slug" : "foo-1" } ] } Where results are returned from your collection per document that contains duplicate entries in the array and which entries are duplicated. This is the information you need to update, and you loop the results as you need to specify the update information from the results in order to remove duplicates. This is actually done with two update statements per document, as a simple $pull operation would remove "both" items, which is not what you want: var cursor = db.collection.aggregate([ { "$unwind": "$foo_list" }, { "$group": { "_id": { "_id": "$_id", "foo_list": "$foo_list" }, "count": { "$sum": 1 } }}, { "$match": { "count": { "$ne": 1 } } }, { "$group": { "_id": "$_id._id", "foo_list": { "$push": "$_id.foo_list" } }} ]) var batch = db.collection.initializeOrderedBulkOp(); var count = 0; cur…
has comment: http://stackoverflow.com/comment/39674088
has comment: http://stackoverflow.com/comment/39722787
has comment: http://stackoverflow.com/comment/117695769

http://stackoverflow.com/q/25510664
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25530436
answer count: 1
favorite count: 0
has body: First shot at V8, trying to get a js object cast to a c++ struct and cannot find more info on the web. lets say I have: var brush = { r:255, g:255, b:255, a:255 } and I want to pass it to a function accepting a struct like the following: struct brush{ int r; int g; int b; int a; } ; How should I go about maping this?
accepted answer: http://stackoverflow.com/a/25530436
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: v8
type: Question
has title: Map js Object to struct in V8

http://stackoverflow.com/comment/39706609
comment on: http://stackoverflow.com/q/25448220
type: Comment
type: QuestionComment
has text: Why dont you try textbox instead of textarea?
score: 0

http://stackoverflow.com/comment/39819349
type: Comment
comment on: http://stackoverflow.com/a/25508585
has text: yes, but what is with my i-tag? the class must change on the same time with the state of the div.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39861274
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25530872
has text: What you are essentially saying is that any thing you want to do must be done inside the `then` method using the `data` I obtain as an `argument` in the `callback` to it.Just like `callbacks`,I guess.
score: 0

http://stackoverflow.com/comment/39859448
type: QuestionComment
comment on: http://stackoverflow.com/q/25530489
has text: what about international phone numbers with `+XX` or `00XX` at the beginning?
score: 0
type: Comment

http://stackoverflow.com/comment/39861870
score: 0
type: QuestionComment
type: Comment
has text: You're welcome - I have posted my comments as an answer so that you can mark it as the correct answer.
comment on: http://stackoverflow.com/q/25531383

http://stackoverflow.com/a/25474620
score: 0
answers question: http://stackoverflow.com/q/25474346
has body: You have to register your Controller. Try this: var myApp = angular.module('myApp',[]); myApp.controller('placesCtrl', ['$http','$scope', function($http, $scope) { $http.get("http://somedomain/api/places_JSON.php") .success(function(response){ $scope.names = response; }); $scope.display = $scope.names[2].City; }]); And edit your html: &lt;div ng-app="myApp" ng-controller="placesCtrl"&gt;
type: Answer
has comment: http://stackoverflow.com/comment/39756092

http://stackoverflow.com/a/25457510
has comment: http://stackoverflow.com/comment/39758936
has body: Make reusable functions (it's often a good practice, when you a difficulties with a piece of code, to break it into small functions): var staminaIncreaseTimer = null; function configureStaminaIncrease(delay) { if (staminaIncreaseTimer !== null) clearInterval(staminaIncreaseTimer); staminaIncreaseTimer = setInterval(function () { increaseStamina(); }, delay); } function increaseStamina() { stamina += 1; document.getElementById("stamina").innerHTML = stamina; } Solution with an array (suggested by Jay Harris) var roadIndex = road-1; var ROAD_DELAYS = [1400, 1300, 1200, /*...*/]; var DEFAULT_DELAY = 1500; if (roadIndex &lt; ROAD_DELAYS.length) { configureStaminaIncrease(ROAD_DELAYS[roadIndex]); } else { configureStaminaIncrease(DEFAULT_DELAY); } Solution with a switch instead of you if-elseif mess: switch (road) { case 1: configureStaminaIncrease(1400); break; case 2: configureStaminaIncrease(1300); break; case 3: configureStaminaIncrease(1200); break; //and so on... default: configureStaminaIncrease(1500); }
accepted answer of: http://stackoverflow.com/q/25457411
type: Answer
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39724452
answers question: http://stackoverflow.com/q/25457411
has comment: http://stackoverflow.com/comment/39724401

http://stackoverflow.com/a/25495630
upvote count: 0
type: Answer
score: -1
has body: I recommend you look into http://webpack.github.io/ or http://browserify.org/ as these solve this problem for you. They allow you to use require much as before, yet the code is compiled/concatenated into a single file. Webpack allows for a bit more flexibility in loading different chunks of code for different parts of your site, but Browserify is the most well-known so far. There may be a cost in switching over to these, as I don't think that they're 100% compatible requirejs, however they bring great advantages. Here's someone's journey from RequireJS to Browserify with some Pros and Cons.
downvote count: 1
answers question: http://stackoverflow.com/q/25427546

http://stackoverflow.com/comment/39721430
comment on: http://stackoverflow.com/a/25455527
score: 0
type: AnswerComment
type: Comment
has text: I can sometimes get up to the gallery section without issue, but the gallery always seems to break. Other times, all three slideshow sections break.

http://stackoverflow.com/a/25488875
has body: Is this a loop? $("table[id^='post']").each(function(index)? Yes What does this line of code mean? var entry = $(this); It assigns a jQuery object to variable entry How is the id captured? var id = entry.attr('id').substring(4); It uses jQuery which has attr() function.
score: 0
has comment: http://stackoverflow.com/comment/39782419
accepted answer of: http://stackoverflow.com/q/25488818
answers question: http://stackoverflow.com/q/25488818
has comment: http://stackoverflow.com/comment/39782594
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39782469
type: Answer

http://stackoverflow.com/a/25419177
answers question: http://stackoverflow.com/q/25419123
has body: You may use the array approach like this: if (["thunderstorm", "fog", "hail", "heavy_snow", "haze", "sleet", "snow"].indexOf(filenameTmp) &gt;= 0) {
score: 4
has comment: http://stackoverflow.com/comment/39653023
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/39652885
downvote count: 0

http://stackoverflow.com/a/25436698
has comment: http://stackoverflow.com/comment/39686721
answers question: http://stackoverflow.com/q/25436342
has comment: http://stackoverflow.com/comment/39686574
has comment: http://stackoverflow.com/comment/39872913
accepted answer of: http://stackoverflow.com/q/25436342
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39686015
has comment: http://stackoverflow.com/comment/39869362
has comment: http://stackoverflow.com/comment/39901580
has comment: http://stackoverflow.com/comment/39883283
has comment: http://stackoverflow.com/comment/39686600
has comment: http://stackoverflow.com/comment/39860053
has comment: http://stackoverflow.com/comment/39686198
has body: I saw these mistakes: When the step function is called, i equals links.length. Read How do JavaScript closures work? to understand more about this error. An easy solution is to use Array.forEach (or $.each): FIDDLE links.forEach(function(linkId){ var $link = $(linkId); //... }); There are no .x nor .y on a jquery object, use .offset().left and .offset().top instead: FIDDLE if ($link.offset().left &gt; ($(".footer").offset().left + $(".footer").width) //... On a jquery object, width and height are functions: FIDDLE if ($link.offset().left &gt; ($(".footer").offset().left + $(".footer").width()) //... That should be enough to fix your code. Also try to use more variables, that will clean your code and help you find bugs. These three mistakes were making the condition to always equal false: i was equal to links.length, so links[i] was undefined and $(links[i]) was an empty jQuery object. You can't find the position and the size of an empty jQuery object (and that's not what you want, you want the position and the size of the DIV) $link.x and $link.y are undefined, so you're comparing undefined values where you want to compare position values. .width and .height are functions, not the real size. Again, you're comparing streange meaningless values instead of comparing the bottom-right position values.
has comment: http://stackoverflow.com/comment/39862388
has comment: http://stackoverflow.com/comment/39864594

http://stackoverflow.com/comment/39887999
type: Comment
has text: @hindmost actually these buttons are attached with two different handlers in jsp
type: QuestionComment
comment on: http://stackoverflow.com/q/25546302
score: 0

http://stackoverflow.com/q/25541569
type: AnsweredQuestion
upvote count: 3
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25542379
has body: Trying to create a count down demo, using angular js. Once am in idle state for 30 seconds, i need to show the count down starting from 10 to 0, How to implement the count down timer. this is what I have tried. var time = $timeout(function () { $rootScope.$broadcast('shutdwon'); setTimeout( function () { $location.path('/'); }, 1500); }, 30000);
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 3
favorite count: 0
possible better answer: http://stackoverflow.com/a/25542144
tagged with: angularjs
has answer: http://stackoverflow.com/a/25542379
has answer: http://stackoverflow.com/a/25542144
has title: How to show the count down in angular js

http://stackoverflow.com/comment/39737872
has text: I will create a new question if you need that. I was looking for that way since two hours ago.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25460781

http://stackoverflow.com/a/26406972
has comment: http://stackoverflow.com/comment/50087751
upvote count: 1
has comment: http://stackoverflow.com/comment/50115484
score: 1
has comment: http://stackoverflow.com/comment/42004711
downvote count: 0
answers question: http://stackoverflow.com/q/25451789
has comment: http://stackoverflow.com/comment/101653054
type: Answer
has comment: http://stackoverflow.com/comment/41852685
has body: The DOM Event deviceorientation from the DeviceOrientation Event Specification providers you with the information needed to calculate compass heading. The Android Chrome Browser is supporting that spec (according to mobilehtml5.org). HTML 5 is agnostic to whether that information actually originates in the internal magnetometer, or some other device trick, but I guess that's fine for the scope of your question.

http://stackoverflow.com/a/25478577
downvote count: 0
has comment: http://stackoverflow.com/comment/39764013
has comment: http://stackoverflow.com/comment/39764253
has comment: http://stackoverflow.com/comment/39763460
has comment: http://stackoverflow.com/comment/39764057
has comment: http://stackoverflow.com/comment/39763481
upvote count: 2
has comment: http://stackoverflow.com/comment/39763475
type: Answer
has comment: http://stackoverflow.com/comment/39763490
score: 2
has body: Use these codes: var digits = [ '0','1','2','3','4','5','6','7','8','9', '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' ]; /** * x is the base, y is the decimal value * x must be in the range of 2..36 * y must be greater than zero */ function base10ToBaseN(x,y) { var str = ""; while (y&gt;0) { var mod = y%x; var div = Math.floor(y/x); str = digits[mod]+str; y = div; } return str; } alert(base10ToBaseN(2,23)); See this jsfiddle: http://jsfiddle.net/jondinham/mLz5ycey
answers question: http://stackoverflow.com/q/25478398

http://stackoverflow.com/q/25416270
has answer: http://stackoverflow.com/a/25416435
type: AnsweredQuestion
type: Question
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25416435
tagged with: jquery
has comment: http://stackoverflow.com/comment/39648177
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Get all form values into javascript array
has body: I am attempting to get all the form values into a normal array[]. I had it working for tags but then I added some tags and can't seem to get it. With just tags it worked with this var content = document.querySelectorAll("#form input[name='content[]']"); I am currently trying something like this var content = document.elements["content[]"].value; This form can change from user input down the road as each section of the form is a module that they choose to add. It is also important to get the values in order, if that isn't possible then I would need to make it a JSON array. Pure javascript or jquery is fine either way. Thank you for any help. EDIT I used this to solve my problem var contents=[] var content = $('#form').serializeArray() for (var i = 0; i &lt; content.length; i++) { contents[contents.length]=content[i].value };
has comment: http://stackoverflow.com/comment/39647880
has comment: http://stackoverflow.com/comment/39648025

http://stackoverflow.com/a/25424857
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25424755
accepted answer of: http://stackoverflow.com/q/25424755
type: AcceptedAnswer
has body: Firstly we can write a new function which checks all our counters and adds their values together: function checkCounters() { var result = 0; // Loop through each "qty" input element $('.qty').each(function() { // Add the value of the input to our result result += +this.value; }); if (result === 0) // Your function should be triggered here console.log("Result is 0"); else console.log("Result isn't 0, result is " + result); } We can then call this function whenever we update the value of a counter: ... if (!isNaN(currentVal)) { $field.val(currentVal + 1); } else { $field.val(0); } checkCounters(); JSFiddle demo.
downvote count: 0
type: Answer

http://stackoverflow.com/a/25489258
has comment: http://stackoverflow.com/comment/39783317
upvote count: 1
has comment: http://stackoverflow.com/comment/39783136
has body: $('.edit').click(function(){ var appid = $(this).val(); });
type: Answer
has comment: http://stackoverflow.com/comment/39783264
downvote count: 4
has comment: http://stackoverflow.com/comment/39783091
answers question: http://stackoverflow.com/q/25489218
score: -3
has comment: http://stackoverflow.com/comment/39783547

http://stackoverflow.com/q/25506091
tagged with: javascript
has answer: http://stackoverflow.com/a/25506175
score: 0
accepted answer: http://stackoverflow.com/a/25506175
has comment: http://stackoverflow.com/comment/39814594
answer count: 1
has comment: http://stackoverflow.com/comment/39814478
has comment: http://stackoverflow.com/comment/39814636
has title: Setting javascript object number to x and y values
has comment: http://stackoverflow.com/comment/39814569
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to convert a number to object I have a javascript object that looks like this settings = { offset: 20 } to settings.offset: { x: 20, y: 20 } I thought it would have been as easy as doing if (typeof settings.offset == 'number') { var tValue = settings.offset; settings.offset['x'] = tValue; settings.offset['y'] = tValue; }
has comment: http://stackoverflow.com/comment/39814525
type: Question
has comment: http://stackoverflow.com/comment/39814543

http://stackoverflow.com/comment/39616405
score: 0
type: Comment
type: QuestionComment
has text: `$(window).on('load')` Did it. Tanks, that was easy!
comment on: http://stackoverflow.com/q/25399495

http://stackoverflow.com/comment/45678605
type: Comment
has text: If the parent rerenders, the child would rerender, blowing away the jQuery DOM manipulations. Maybe use `componentDidUpdate` instead of or as well as `componentDidMount`
score: 1
comment on: http://stackoverflow.com/a/25514772
type: AnswerComment

http://stackoverflow.com/a/25526707
downvote count: 0
score: 1
has body: css Script Html 1 2 3 4 5
answers question: http://stackoverflow.com/q/25526533
upvote count: 1
type: Answer

http://stackoverflow.com/q/25515111
score: 0
accepted answer: http://stackoverflow.com/a/25515149
tagged with: animation
type: AnsweredQuestion
type: Question
has title: setTimeout-ception alernative
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25515149
has body: I wonder if we can do something more optimal than just nest setTimeout multiple time to animate a bunch of elements one after the other like this ugly thing: setTimeout(function () { $('div[data-order="0"]').parent().removeClass('flipped'); setTimeout(function () { $('div[data-order="1"]').parent().removeClass('flipped'); setTimeout(function () { $('div[data-order="2"]').parent().removeClass('flipped'); }, 75); }, 75); }, 75);

http://stackoverflow.com/a/25487254
type: Answer
answers question: http://stackoverflow.com/q/25487041
has body: Live Demo : JSFIDDLE You have to include jQuery library in your head section like this &lt;script src="http://code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt; There are lot of mistakes in your code please see below: First mistake you should put your jQuery inside ready function. Second mistake there is no such id #titleInsert it is a class so you have to do .titleInsert Third mistake there is no tag h3 in #title Fourth mistake you should use .keyup event instead .change event Replace your jQuery code with following : &lt;script type="text/javascript"&gt; $(document).ready(function(){ var titleValue=""; $('.titleInsert').on("keyup", function () { titleValue=$(this).val(); $("#title").text("titleValue"); }); }); &lt;/script&gt;
score: 0

http://stackoverflow.com/comment/39862452
has text: I raised a followup question [here](http://stackoverflow.com/q/25532175/405117). Thanks for your time!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25516115

http://stackoverflow.com/comment/39700878
comment on: http://stackoverflow.com/q/25445529
score: 0
has text: Have you tried .parent( ?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39863208
type: Comment
type: QuestionComment
has text: Can you make [fiddle](http://jsfiddle.net) with your code reproducing this problem?
score: 2
comment on: http://stackoverflow.com/q/25532595

http://stackoverflow.com/comment/39705877
has text: i have founded the solution :) thanks @Pawel fus but few more problmes are still in queue
comment on: http://stackoverflow.com/a/25424207
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39688553
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25419748
has text: Using Chrome's inspector, I can see that `document.querySelector('core-scaffold')` works. However, when I try to use `document.querySelector('core-scaffold').togglePanel()` it does nothing and gives no errors. When I use `console.log(....togglePanel)` it shows that the function is defined, but for some reason, nothing happens in my browser.
type: AnswerComment

http://stackoverflow.com/a/25508449
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25508288
answers question: http://stackoverflow.com/q/25508288
upvote count: 1
has body: You're trying to draw the image on the canvas before it is loaded, you need to draw it onload: var img = new Image(); img.onload = function() { context.drawImage(img, 0, 0); } img.src = 'http://www.animefighters.de/images/armor_leatherbelly.png';
has comment: http://stackoverflow.com/comment/39843370
score: 1
has comment: http://stackoverflow.com/comment/39827994
type: AcceptedAnswer

http://stackoverflow.com/a/25498474
score: 1
upvote count: 1
has body: Note , Caching selectors , objects , etc. to variables may contribute to gathering value of $(this) within piece , if / when utilized. Renders input value instead placeholder , immediately ; input elements gain immediate focus. Try html bgcolor: bgfontcolor: js (function($) { $.fn.HSLAColorPicker = function() { // added `that` = `$(this)` that = $(this); $(".hsla-cpick-container").remove(); $("body").append(' '); var FontColorPick = function() { if ( $(".colorpick-a-text").val() === "1" ) { // substituted `that` for `$(this)` that.val( "hsl(" + $(".colorpick-hue").val() + ", " + $(".colorpick-s").val() + "%, " + $(".colorpick-l").val() + "%)"); } else { // substituted `that` for `$(this)` that.val( "hsla(" + $(".colorpick-hue").val() + ", " + $(".colorpick-s").val() + "%, " + $(".colorpick-l").val() + "%, " + $(".colorpick-a").val() + ")"); } if ( $(".colorpick-a-text").val() === "0" ) { // substituted `that` for `$(this)` that.val("transparent"); } // Alpha Saturation $(".colorpick-s-bg").css({ "background": "linear-gradient(to right, #7f7f80 0%," + "hsl(" + $(".colorpick-hue").val() + "," + $(".colorpick-s").val() + "%," + $(".colorpick-l").val() + "%)" + " 100%)" }); // Alpha Lightness $(".colorpick-l-bg").css({ "background": "linear-gradient(to right, #000000 0%," + "hsl(" + $(".colorpick-hue").val() + "," + $(".colorpick-s").val() + "%,50%) 50%,#ffffff 100%)" }); // Alpha Preview $(".colorpick-a-bg").css({ "background": "linear-gradient(to right, rgba(255,255,255,0) 0%," + "hsl(" + $(".colorpick-hue").val() + "," + $(".colorpick-s").val() + "%," + $(".colorpick-l").val() + "%)" + " 100%)" }); }; that.on('mousedown touchstart focus', function(e) { $(".hsla-cpick-container").show().css({ 'position': 'absolute', 'margin-top': "-" + that.offset().top, 'left': that.offset().left, 'width': that.width() }); FontColorPick(); }); $(document).on('mousedown touchstart', function(e) { if ($(".hsla-cpick-container").is(":visible")) { if (!$(e.target).hasClass('keepcpickabov…
accepted answer of: http://stackoverflow.com/q/25497238
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25497238

http://stackoverflow.com/q/25394244
tagged with: javascript
has comment: http://stackoverflow.com/comment/39606765
has answer: http://stackoverflow.com/a/25394393
type: Question
has comment: http://stackoverflow.com/comment/39606819
has comment: http://stackoverflow.com/comment/39631022
has comment: http://stackoverflow.com/comment/39606835
score: 0
has comment: http://stackoverflow.com/comment/39630947
answer count: 1
has title: Proper throw syntax in JavaScript
has body: If I use: throw new Error('You broke it'); I get an output in the chrome console that looks like this: where it basically looks like it's doing console.error(new Error('You broke it')) as opposed to console.error('You broke it') whereas if I use throw 'You broke it'; I get this: which looks more like what I would expect. Why does Chrome do this, and which way is correct? I've always been told to use the first method, but the console output looks sloppier, though when I wrap a try catch, around the second it passes only the string as opposed to an actual Error object. Included Firefox for reference:
type: UnansweredQuestion

http://stackoverflow.com/comment/39671546
type: AnswerComment
score: 0
has text: Copy paste this into scratchpad. It properly runs your code in all tabs. However it deoesnt remove all css. Are you sure about the `media.mediaText` technique? maybe i have a bug and didnt look
type: Comment
comment on: http://stackoverflow.com/a/25395535

http://stackoverflow.com/a/25406860
score: 1
answers question: http://stackoverflow.com/q/25406778
downvote count: 0
has body: Your problem is your tabindexes are all the same values. You need to make them incremental in the order you want them tabbed. something one item and link one item one item This is assuming you're using HTML5.
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39630236
has comment: http://stackoverflow.com/comment/39638439

http://stackoverflow.com/comment/39689787
type: Comment
has text: Do you ultimately want a JavaScript object?
score: 0
comment on: http://stackoverflow.com/q/25439045
type: QuestionComment

http://stackoverflow.com/comment/50291852
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25510967
has text: Ah ... good call. I'll do that.
score: 0

http://stackoverflow.com/q/25514527
type: Question
linked to: http://stackoverflow.com/q/17989270
linked to: http://stackoverflow.com/q/313893
tagged with: javascript
has title: Loop optimizations in JavaScript, do I need it?
has comment: http://stackoverflow.com/comment/39830623
duplicate of: http://stackoverflow.com/q/17989270
score: 0
has comment: http://stackoverflow.com/comment/39830657
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39830617
linked to: http://stackoverflow.com/q/25460123
answer count: 0
has body: I know that JavaScript is an interpreted language, which doesn't have the benefits of code optimization that may be done for a compiled language. So I was curious, which would be better to use? A. With .length in the loop: //Assuming 'arr' in an array of an arbitrary length for(var i = 0; i &lt; arr.length; i++) { //Do work on element arr[i]; } B. or this: //Assuming 'arr' in an array of an arbitrary length var arrLen = arr.length; for(var i = 0; i &lt; arrLen; i++) { //Do work on element arr[i]; }
has comment: http://stackoverflow.com/comment/39830637

http://stackoverflow.com/comment/39663345
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25424966
has text: Can you add a sample of the data? Mostly to show how the month and year are stored in it.
score: 0

http://stackoverflow.com/comment/39766887
has text: Change `onclick"=myfun()"` of button to `onclick="myfun()" `
comment on: http://stackoverflow.com/q/25480410
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/75618360
type: AnswerComment
has text: Probably in order to make all of that have total sense, db module has to have defined Promise of a db connection instance, because otherwise connection can be not ready yet, and each module which use db conn has to resolve the Promise.
comment on: http://stackoverflow.com/a/25549817
score: 0
type: Comment

http://stackoverflow.com/a/68249050
has body: You can just do string comparison on two valid ISO8601 strings (i.e. new Date().toISOString()) and it'll work "2021-07-02T21:50:01.926Z" > "2021-07-04T21:49:56.863Z" // false
score: 2
answers question: http://stackoverflow.com/q/25458591
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/39900648
type: AnswerComment
has text: That makes sense! I checked the minified version and it reads `b.V=b.subscribe=function...`. But that also means you end up with two different properties and you always need to be aware which one you are reading or writing. Sounds like a good source for bugs.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25532377

http://stackoverflow.com/comment/39765854
comment on: http://stackoverflow.com/q/25476801
has text: @Visilios Indeed, it is evaluating a string argument. In your example the value of the text box. So your string is `unescape("alert%28%27ciao%21%27%29%3B")` so eval executes the `unescape` function which produces an unescaped string `alert('ciao!');`. As you mentioned yourself in such particular case you would need a second eval. The more nesting you have the more evals you will have to put.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39626918
type: QuestionComment
comment on: http://stackoverflow.com/q/25405320
has text: Can you put it in a fiddle please.
type: Comment
score: 0

http://stackoverflow.com/comment/39805692
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25500457
has text: Thanks for your reply @Anders this surely look neat, i don't know yet if this would suit my needs but i certainly would give it a try :)

http://stackoverflow.com/comment/39700999
comment on: http://stackoverflow.com/q/25445210
score: 0
type: Comment
type: QuestionComment
has text: use webview delegate method `-(BOOL)webView:(UIWebView *)webiew shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{ NSURL* url = [request URL]; NSLog(@"Url is :%@",url);}`

http://stackoverflow.com/q/25495860
type: UnansweredQuestion
has body: Quick question: I have an HTML document playing HTML5 Audio. Nothing fancy. Textbook really. &lt;audio id="audioclip" preload="auto" loop &gt; &lt;source src="audio/music01.ogg" type="audio/ogg"&gt; &lt;/audio&gt; The same HTML document features an iframe containing a few Images. Clicking on one of these images browses to a page containing an autostart HTML5 video clip. Of course now the audio from the parent AND the audio from the iframe video play at the same time. Is there an EASY way to stop the parent audio playback from inside the iframe automatically when the autoplay video triggers? I found some pretty complicated stuff for parent/child communication. Far to sophisticated for me. But I also found this little snippet: jQuery(function($) { parent.$("#parent_element").trigger(event); } (window.jQuery)); Could I put that to use in my case? Or are there alternatives? Just getting into JavaScript a little more, atm I'd consider myself a newbie. :-\ Many Thanks! PS: On video end the iframe page automatically browses back to the previous page. It would be super-nifty if the audio would resume playing at the Point IF it was playing before. If not then...well...not. But I reckon that would be much more complex?
tagged with: http://stackoverflow.com/tag/html
score: 2
tagged with: audio
answer count: 0
tagged with: iframe
type: Question
tagged with: javascript
has title: Stop playing parent frame HTML5 audio from an iframe?
downvote count: 0
tagged with: jquery
favorite count: 0
upvote count: 2

http://stackoverflow.com/q/25395667
favorite count: 0
upvote count: 1
tagged with: google-chrome
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25395721
score: 1
tagged with: date
type: Question
has body: I am executing the following in chrome developers console, var d = new Date("2010-03-20"); d Fri Mar 19 2010 17:00:00 GMT-0700 (PDT) var d = new Date("2010/03/20"); d Sat Mar 20 2010 00:00:00 GMT-0700 (PDT) var d = new Date("2010-3-20"); d Sat Mar 20 2010 00:00:00 GMT-0700 (PDT) var d = new Date("2010.3.20"); d Sat Mar 20 2010 00:00:00 GMT-0700 (PDT) var d = new Date("2010.03.20"); d Sat Mar 20 2010 00:00:00 GMT-0700 (PDT) My question is why is it behaving differently for "2010-03-20" where it is giving Mar 19 ? If I do getUTCDate(), I am getting 20, but why is it different only for 2010-03-20. Is it an active bug in javascript date ?
answer count: 1
downvote count: 0
tagged with: javascript
has title: Javascript date behaving differrently
has answer: http://stackoverflow.com/a/25395721

http://stackoverflow.com/comment/39779298
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25487204
type: Comment
has text: yes) thanks it's working too)) but problem still present, the value not change

http://stackoverflow.com/comment/39738151
score: 0
has text: @gibberish No. I am posting to a different page. The ajax is in a file called `"scripts.js"` and its posting to `addEvents.php`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25464332

http://stackoverflow.com/comment/39873393
comment on: http://stackoverflow.com/a/25532932
type: Comment
has text: This is wrong. Html helpers will render the `id` attribute based on its first parameter. It is not necessary to use `new { @id = "deckTitles" }`. You can also use `$('#deckTitles').val();` to get the value
score: 0
type: AnswerComment

http://stackoverflow.com/a/58446175
upvote count: 3
has comment: http://stackoverflow.com/comment/119719184
has comment: http://stackoverflow.com/comment/104884013
has comment: http://stackoverflow.com/comment/109010808
type: Answer
downvote count: 0
has body: Below is the pagination logic as a function function Pagination(pageEleArr, numOfEleToDisplayPerPage) { this.pageEleArr = pageEleArr; this.numOfEleToDisplayPerPage = numOfEleToDisplayPerPage; this.elementCount = this.pageEleArr.length; this.numOfPages = Math.ceil(this.elementCount / this.numOfEleToDisplayPerPage); const pageElementsArr = function (arr, eleDispCount) { const arrLen = arr.length; const noOfPages = Math.ceil(arrLen / eleDispCount); let pageArr = []; let perPageArr = []; let index = 0; let condition = 0; let remainingEleInArr = 0; for (let i = 0; i &lt; noOfPages; i++) { if (i === 0) { index = 0; condition = eleDispCount; } for (let j = index; j &lt; condition; j++) { perPageArr.push(arr[j]); } pageArr.push(perPageArr); if (i === 0) { remainingEleInArr = arrLen - perPageArr.length; } else { remainingEleInArr = remainingEleInArr - perPageArr.length; } if (remainingEleInArr &gt; 0) { if (remainingEleInArr &gt; eleDispCount) { index = index + eleDispCount; condition = condition + eleDispCount; } else { index = index + perPageArr.length; condition = condition + remainingEleInArr; } } perPageArr = []; } return pageArr; } this.display = function (pageNo) { if (pageNo &gt; this.numOfPages || pageNo &lt;= 0) { return -1; } else { console.log('Inside else loop in display method'); console.log(pageElementsArr(this.pageEleArr, this.numOfEleToDisplayPerPage)); console.log(pageElementsArr(this.pageEleArr, this.numOfEleToDisplayPerPage)[pageNo - 1]); return pageElementsArr(this.pageEleArr, this.numOfEleToDisplayPerPage)[pageNo - 1]; } } } const p1 = new Pagination(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3); console.log(p1.elementCount); console.log(p1.pageEleArr); console.log(p1.numOfPages); console.log(p1.numOfEleToDisplayPerPage); console.log(p1.display(3));
score: 3
answers question: http://stackoverflow.com/q/25434813

http://stackoverflow.com/a/25396172
has body: Because i is the index of the item in array, you need to use textArray[i] to access the current item(if you had logged the value of i it would show 0,1,2...7). for (var i in textArray) { console.log($(textArray[i]).offset()); }
answers question: http://stackoverflow.com/q/25396163
score: 0
type: Answer

http://stackoverflow.com/comment/39896484
type: Comment
type: QuestionComment
score: 1
has text: I would go with selector syntax and `#tablenew`'s parent.
comment on: http://stackoverflow.com/q/25550450

http://stackoverflow.com/q/25531623
tagged with: css
has comment: http://stackoverflow.com/comment/39861765
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: dom
has comment: http://stackoverflow.com/comment/39861499
type: Question
accepted answer: http://stackoverflow.com/a/25532121
tagged with: javascript
has comment: http://stackoverflow.com/comment/39863486
has comment: http://stackoverflow.com/comment/39861486
has title: how to Get an id of DOM elements using JQuery
has comment: http://stackoverflow.com/comment/39861868
has comment: http://stackoverflow.com/comment/39861721
has comment: http://stackoverflow.com/comment/39861468
has body: I'm having some problems understanding the stracture of JQuery elements and how to move through the DOM tree. My aim is to highlight (background color) the clicked link (a). if the "li a" is inside ul which is not the main "menu" ul (meanning sub-menu link) then i want to highlight both the sub menu link and the top menu link. My HTML code is: home read test addRead Books Search Register CoNTACT ffffffffffffffffffffffffffffffsdfdsfsdfwefwfwfw fwfwefwe fwefwefw fsfdsfsdf footer As for the JQuery i tried this: $(this).closest("ul").find("a").attr("id")); and a few other versions with parents but i get "undefined" or empty strings when i check with alerts. Can you help me understand where is my mistake? I'm sure it's something very simple i just can't find it. Thanks
has comment: http://stackoverflow.com/comment/39861867
answer count: 1
has comment: http://stackoverflow.com/comment/39863225
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39861669
has comment: http://stackoverflow.com/comment/39861823
favorite count: 0
has comment: http://stackoverflow.com/comment/39862288
has answer: http://stackoverflow.com/a/25532121
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25505735
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25505775
has title: Content is not showing in IE8
has body: IE8 didn't showing content, in Chrome and Firefox everything is OK. There are no JS errors on page. I think there is something unsupportable in this part of code. Is there any ideas? I heard that .html() will not work in IE8 if there html tags inside are not valid. var container = $(' ',{ 'class' : 'ATC_table', 'idx':section.INDEX }); var inputs = ' ' + ' ' +' ' + ' ' +' ' + ' ' +' ' + ' '; var select = ' ' + ( (withRemove === false) ? (PreCond_tohtmlSelect('PRECONDITION_NAME_Add')) : ' ') + ' '; var table = $(' \ \ \ \ \ \ \ '); container.html(inputs + select); if(withRemove) { var removeButton = $(' Удалить '); removeButton.click(deleteSection); removeButton.appendTo(container); } else { var addNewSectionButton = $(' Добавить '); addNewSectionButton.click(saveNewSection); addNewSectionButton.appendTo(container); } table.appendTo(container); container.appendTo(location); for (var j in allAttributes) { var tbody = ""; tbody +=' '; tbody +=' '; tbody +=' '+allAttributes[j].NAME+' '; tbody +=' '; if(section.INDEX == -1){tbody +='<input id="Att_add'+allAttributes[j].LIST_ITEM_ATT_ID+'" style="height: 26px;" type="text" attribute="';} else{tbody +=' '; tbody +=' '; tbody +=' '; table.children('tbody').append(tbody); appendChangeEvent(section,allAttributes[j].LIST_ITEM_ATT_ID); if(section.INDEX != -1) {forceSectionValue(section,allAttributes[j].LIST_ITEM_ATT_ID);} }
type: UnansweredQuestion
tagged with: internet-explorer
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/25482229
downvote count: 0
favorite count: 0
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25482337
has answer: http://stackoverflow.com/a/52617633
has body: I have seen many similar questions to this but none with quite the same criteria. I would like to generate a short string of 6 characters that consist of lowercase letters and numbers only (ideally without the letter 'o' and the number 0). The string has to be unique as it will be used as part of a URL. I have been using the following but the strings are similar each time they are generated and I would like them to appear very different. (+new Date()).toString(36); //actually creates 8 letter string and includes o &amp; 0 Example: Look at JS fiddle and click "save" - the url is updated with a random, unique, non sequential id. (8 characters in this case) Any suggestions?
score: 1
has answer: http://stackoverflow.com/a/25482409
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39770863
has comment: http://stackoverflow.com/comment/39770781
has answer: http://stackoverflow.com/a/25482381
tagged with: javascript
has title: Generate random 6 character lowercase string
has answer: http://stackoverflow.com/a/25482288

http://stackoverflow.com/comment/39630520
type: Comment
type: QuestionComment
has text: Also, a jQuery selector has absolutely nothing to do with AngularJS's scope and `$watch`ing it.
comment on: http://stackoverflow.com/q/25406400
score: 0

ios8
tags question: http://stackoverflow.com/q/25510711
tag name: ios8
type: Tag

http://stackoverflow.com/a/32310895
downvote count: 1
upvote count: 4
answers question: http://stackoverflow.com/q/25421233
type: Answer
has body: This one is easy to remember, but might be slow. Use jQuery to copy non-null properties to an empty object. No deep copy unless you add true as first argument. myObj = $.extend({}, myObj);
score: 3

http://stackoverflow.com/q/25462705
tagged with: javascript
tagged with: html-table
score: 0
has answer: http://stackoverflow.com/a/25462808
answer count: 3
has answer: http://stackoverflow.com/a/25462812
possible better answer: http://stackoverflow.com/a/25462728
accepted answer: http://stackoverflow.com/a/25462808
has answer: http://stackoverflow.com/a/25462728
has comment: http://stackoverflow.com/comment/39734090
linked to: http://stackoverflow.com/q/122102
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39733972
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39734210
has comment: http://stackoverflow.com/comment/39733904
type: Question
has title: how to extract data from html table using jQuery each function
has body: I'm need to extract data from a html table to create a JSON array. Here is the structure of HTML table, header_column1 header_column2 header_column3 row1_column1 row1_column2 row1_column3 row2_column1 row2_column2 row2_column3 In my JavaScript function, I'm doing this function() { var json = { header_column1 : '', header_column2 : '', header_column3 : '' }; var data = []; $('tableClass').find('tbody').children('tr').each(function() { var $tds = $(this).find('td'); json.header_column1 = $tds.eq(0).text(); json.header_column2 = $tds.eq(1).text(); json.header_column3 = $tds.eq(2).text(); data.push(json); }); return data; } when I print my array, but I'm getting only 'row2_column1, row2_column2, row2_column3'. Couldn't workout what I'm doing wrong/missing. Would be great if you could help me out with this.

http://stackoverflow.com/comment/39705473
score: 0
type: Comment
type: QuestionComment
has text: I've noticed that this question has a the Java tag, please remove this tag as this question has nothing to do with Java, for more info on the differences read this; http://www.java.com/en/download/faq/java_javascript.xml
comment on: http://stackoverflow.com/q/25447842

http://stackoverflow.com/comment/39663069
has text: this may help you http://stackoverflow.com/questions/12118971/is-window-document-ever-null-or-undefined
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25424923

drupal
type: Tag
tags question: http://stackoverflow.com/q/25442392
tags question: http://stackoverflow.com/q/25489412
tag name: drupal
tags question: http://stackoverflow.com/q/25531312

http://stackoverflow.com/q/25518783
has comment: http://stackoverflow.com/comment/39839763
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39839742
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/25748770
has comment: http://stackoverflow.com/comment/39839833
tagged with: coffeescript
type: Question
has body: Is it possible to use coffeescript inside .php file, for example : use coffeescript inside php file how to use coffeescript <?php echo $lorem ?> If I want to use coffeescript in my php file what should I do to make it work?
has comment: http://stackoverflow.com/comment/39838863
answer count: 1
tagged with: javascript
has title: coffeescript inside php file
has comment: http://stackoverflow.com/comment/39838454
score: 0

http://stackoverflow.com/comment/39695454
score: 1
comment on: http://stackoverflow.com/q/25442261
has text: of course, since the earth is a sphere, it depends on the strategy used to flatten it up. I don't know what is your problem, but any good API for map plotting would let you plot some points just by their lat/lng values. For example, Google Maps' API does this.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25513510
favorite count: 0
type: Question
tagged with: tampermonkey
has title: Tampermonkey script sometimes fails to start
has comment: http://stackoverflow.com/comment/39828787
upvote count: 1
tagged with: userscripts
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39830219
answer count: 0
downvote count: 0
score: 1
has body: I have a tampermonkey script that sometimes works doesn't start. // ==UserScript== // @name Hitbox Emotes // @namespace Hitbox Emotes // @description The original Hitbox Emotes script with ober 13,000 emotes! - Request your custom emotes and mod badges here! // @include *.hitbox.tv/* // @include *.vgstreams.com/* // @include *.multistream.xuzia.com/* // @icon http://i.imgur.com/fa1Kkku.png // @version 1.3.6 // ==/UserScript== function init() { console.log("this is %o, event is %o, host is %s"); var MainEmotes = document.createElement('script'); MainEmotes.type = 'text/javascript'; MainEmotes.src = "https://dl.dropboxusercontent.com/u/23313911/javascript/MainEmotes.js"; var CustomStyle = document.createElement('link'); CustomStyle.setAttribute('rel', 'stylesheet'); CustomStyle.setAttribute('type', 'text/css'); CustomStyle.setAttribute('href', 'https://dl.dropboxusercontent.com/u/23313911/css/CustomStyle.css') var BackupEmotes = document.createElement('script'); BackupEmotes.type = 'text/javascript'; BackupEmotes.src = "https://cdn.rawgit.com/GamingTom/11142192/raw/fdd206a1a9e892a0f0c55f1de253981d980fa0e8/MainEmotes.js"; var CustomEmotes = document.createElement('script'); CustomEmotes.type = 'text/javascript'; CustomEmotes.src = "https://dl.dropboxusercontent.com/u/23313911/javascript/CustomEmotes.js"; var CustomBadges = document.createElement('script'); CustomBadges.type = 'text/javascript'; CustomBadges.src = "https://dl.dropboxusercontent.com/u/23313911/javascript/CustomBadges.js"; var head = document.getElementsByTagName('head')[0]; if (head) { head.appendChild(MainEmotes); console.info("Hitbox Emotes: Main emotes loaded from " + MainEmotes.src) head.appendChild(BackupEmotes); console.info("Hitbox Emotes: Backup emotes loaded from " + BackupEmotes.src) head.appendChild(CustomEmotes); console.info("Hitbox Emotes: Custom emotes loaded from " + CustomEmotes.src) head.appendChild(CustomBadges); console.info("Hitbox Emotes: Custom badges loaded from " + CustomBadges.s…

http://stackoverflow.com/comment/39606931
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25394318
has text: I bet green is your favorite color :)
score: 0

http://stackoverflow.com/q/25457859
has title: $rootScope and passing data from controller to service
favorite count: 0
tagged with: service
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25842962
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/25457958
has answer: http://stackoverflow.com/a/25842962
tagged with: rootscope
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/25457958
tagged with: javascript
tagged with: controller
answer count: 3
has body: I'm using angular js and have got a controller looking like this myApp = angular.module("myApp.controllers", []); myApp.controller("ScheduleCtrl", function($scope, $http, ScheduleService){ $scope.hours = 4; ScheduleService.test(); ScheduleService.initializeSchedule(); }); and a service (in another file) looking like this myApp = angular.module('myApp.services', []); myApp.factory('ScheduleService', ['$rootScope', function($rootScope){ return { test : function(){ alert("Test"); }, initializeSchedule : function(){ alert($rootScope.hours); } }; }); To assure everyone that things are hooked up properly from service to controller, the first call to "test()" inside my controller produces the desired output in the alert box. However, for the next function, which as of now should be alerting "4", is instead alerting "undefined". How can I use either $rootScope or something else in order to utilize scope variables to my service.
has answer: http://stackoverflow.com/a/25458119

http://stackoverflow.com/a/25412507
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/25411816
score: 4
has body: Might want to take a look at this site: http://andyshora.com/mobile-scroll-event-problems.html It helps explains why your going to be banging you head against a wall.

http://stackoverflow.com/comment/39719859
type: QuestionComment
has text: $(page).remove('my-class');
score: 1
comment on: http://stackoverflow.com/q/25455112
type: Comment

http://stackoverflow.com/a/25510666
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39891086
has comment: http://stackoverflow.com/comment/39823542
type: Answer
answers question: http://stackoverflow.com/q/25510510
upvote count: 3
has comment: http://stackoverflow.com/comment/39824857
has comment: http://stackoverflow.com/comment/39837665
has body: I imagine adding a "mousemove" event to all elements while you're dragging the row. Every time you move the mouse, you check if it's within (100 / 200 / 300)px of the window edge, start an interval loop (setInterval) that moves the screen by x pixels every y seconds. You need to make sure that once you drop the row that you stop the interval loop and remove the mousemove event handlers from all elements. When you move out of the range near the edge of the window should also stop the interval loop. If you want an idea of what the code would look like, I'll create a fiddle, let me know.
has comment: http://stackoverflow.com/comment/39826086

http://stackoverflow.com/comment/39888253
comment on: http://stackoverflow.com/q/25546094
has text: Have a look at this https://developers.google.com/+/hangouts/button#inviting_people_to_the_hangout
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25528791
has body: As an alternative to querySelector, you can also use specialized functions: document.getElementById('teste_1').getElementsByTagName('span')[0].style.color = 'red'; This is more useful if you have to get #teste_1 separately anyway.
downvote count: 0
score: 2
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25527804

http://stackoverflow.com/comment/39737451
has text: Athul AK, basically I just want to programmically (JavaScript) add ` ` into a specific location in the webpage's HTML.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25464550

http://stackoverflow.com/q/25518807
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39838653
has comment: http://stackoverflow.com/comment/39838613
has comment: http://stackoverflow.com/comment/39838793
has answer: http://stackoverflow.com/a/25519108
has comment: http://stackoverflow.com/comment/39838713
tagged with: http://stackoverflow.com/tag/html
tagged with: flextable
has comment: http://stackoverflow.com/comment/40463593
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39838581
type: Question
accepted answer: http://stackoverflow.com/a/25519108
has title: How can i resize Element with flexigrid in
has comment: http://stackoverflow.com/comment/39838808
tagged with: javascript
tagged with: resize
tagged with: jquery
has body: html data &lt;div id="flexdiv" class="resizable-ui"&gt; &lt;div&gt; etc layer .. &lt;/div&gt; &lt;table class='flexme1'&gt; ... &lt;/table&gt; &lt;/div&gt; jquery data var width = $(div).width(), height = $(div).height()-100; $('.flexme1').flexigrid({ width: width, height: height, resizable: false, singleSelect: true}); $(div).resize(function() { var width = $(div).width(), height = $(div).height() -20; $('.flexme1').flexigrid({height:height,width:width,striped:false}); }); it is not working i don't know what is it problem help me angles!!!!!!!!!!!!!!! plz..

http://stackoverflow.com/comment/39685644
score: 0
type: AnswerComment
type: Comment
has text: Yes it could contain commas in the strings to that won't work. Clever though.
comment on: http://stackoverflow.com/a/25436690

http://stackoverflow.com/comment/39786174
has text: Well that was just a suggestion.
type: AnswerComment
comment on: http://stackoverflow.com/a/25490704
type: Comment
score: 0

http://stackoverflow.com/comment/39870872
score: 0
has text: See http://stackoverflow.com/questions/577632/validating-and-submitting-a-form-using-javascript-ajax . Your `.post` call is asynchronous, so the browser will send the ajax request, but will not wait for an answer before continuing. Thus, your form gets submitted. Also, the `return false` is in the context of the callback function and not `validate`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25535334

http://stackoverflow.com/q/25549855
type: Question
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39895384
tagged with: http://stackoverflow.com/tag/xml
has answer: http://stackoverflow.com/a/25550484
accepted answer: http://stackoverflow.com/a/25550484
tagged with: xslt
has body: Here is my XSL code for the table in question: Action Element Parameter Pass/Fail <xsl:for-each select="trace/step"> <xsl:value-of select="action"/> <xsl:value-of select="element"/> <xsl:value-of select="parameter"/> </xsl:for-each> Here is my javascript: var textarea = document.getElementById('actionc'); var word = 'error:'; var textValue=textarea.value; if (textValue.indexOf(word) != -1) { $('#passfailc').append('X'); } else { $('#passfailc').append('O'); } Example XML code: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="output.xsl"?> page action: click Home Page: Search Button page action: set text Home Page: Search Input Text bike page action: click Results Page: Top Item page action: Get an attributes value from an element Item Page: Price Text page action: navigate to http://www.buystuff.com/ page action: set text Home Page: Search Input Text bike error: Error communicating with the remote browser. It may have died. Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'Apeldoorn.local', ip: '10.0.1.7', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.4', java.version: '1.7.0_45' Driver info: driver.version: RemoteWebDriver org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died. Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'Apeldoorn.local', ip: '10.0.1.7', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.4', java.version: '1.7.0_45' Driver info: driver.version: RemoteWebDriver When I open the XML file, everything works but it isn't putting anything in the Pass/Fail column? I am very new to Javascript and XML so please go easy on me! Thanks in advance!
type: AnsweredQuestion
has title: Javascript search for word in text and change another td
has comment: http://stackoverflow.com/comment/39895403

http://stackoverflow.com/comment/39688604
type: Comment
has text: @teatimer not that I've seen. But nothing seems to show when the dialog loads either. I added comments prior to and following the dialog code and they both show with no errors between.
score: 0
comment on: http://stackoverflow.com/q/25438129
type: QuestionComment

http://stackoverflow.com/comment/138300843
type: AnswerComment
has text: Zero Padding: var date = nowDate.getFullYear()+'/'+('0'+(nowDate.getMonth()+1)).substring(0,2)+'/'+('0'+nowDate.getDate()).substring(0,2);
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25445516

http://stackoverflow.com/q/25544620
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: Dear AngularJS savies, How to set $scope.data in the controller having a promise returned from a factory. All I can do is work with the data returned in the scope of the method of the factory's object and I cannot "load" the data in a value existing in the controller's scope. How can I pass the data into controller's scope? The code sequences as following This is the factory: var features = {}; // the method returns a promise tot he controller needed to be delt with .then() features.getPromise = function(){ //make a promise var promise = $http({method: 'GET', url: '../../LIBS/inc/getAllGeoFeatures.php'}) .success(function(data, status, headers, config){ return data; }) .error(function(data, status, headers, config){ $log.warn(data, status, headers, config); }); return promise; }; This is the controller: $scope.data = 'null'; factGetFeat.getPromise().then(function(promise){ $scope.data = promise; $log.info($scope.data); //gets the object all right // here I can work with the data but I cannot share it with the controller // i.e. with the view }); $log.info($scope.data); //$scope.data is still null and I need it loaded with the data I need some counceling because I sense I go nowhere I even tried to load $scope.data with the outcome of the method, but I only get the promsise object and not the data: Object {then: function, catch: function, finally: function} Please advise. P.S. I use angular 1.2.x Thank you very much for your time and patience.
has answer: http://stackoverflow.com/a/34366879
favorite count: 0
tagged with: promise
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25544779
upvote count: 1
score: 1
tagged with: http
has title: Angularjs return data from the promise in controller's scope

http://stackoverflow.com/q/25494853
answer count: 2
has body: So I have a form, and if the input is invalid, I won't let the form pass like so $(".main-form").submit(function(e){ return false; }); This won't let the form pass. When the user complete everything correctly I try to do this $(".main-form").submit(function(e){ return true; }); But for some reason it stays false all the way though. Any workarounds?
downvote count: 0
has answer: http://stackoverflow.com/a/25494891
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Can't return form submit to false
has comment: http://stackoverflow.com/comment/39794170
type: UnansweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25494913
tagged with: javascript
tagged with: forms
type: Question

http://stackoverflow.com/comment/39719598
comment on: http://stackoverflow.com/q/25455009
type: Comment
type: QuestionComment
score: 1
has text: `$(currLink.attr("href"));` is not a valid selector. Could you post the HTML markup? Is the `href` value and `id` perhaps? (something like `#id`)

http://stackoverflow.com/comment/39761340
score: 1
type: Comment
type: QuestionComment
has text: Try `var img = $("img").get(0); var imgTransform = img.style.webkitTransform; console.log(imgTransform);`
comment on: http://stackoverflow.com/q/25477409

http://stackoverflow.com/q/25441813
tagged with: ajax
has comment: http://stackoverflow.com/comment/39696363
type: AnsweredQuestion
score: 3
answer count: 1
downvote count: 0
has body: It is not mentioned in the docs, but apparently if the local AJAX success handler throws an error, even the global ajaxSuccess handler is not invoked. Is there a way around this mechanism cause if you want to distribute a JS library or util function that does something on ajaxSuccess, you can't necessarily have control over the success handler and make sure it does not raise an exception. $(document).ajaxSuccess(function(ev, jqXHR, settings) { console.log('ajaxSuccess called!'); // does not get called }); $.ajax({ 'url': '/', 'type': 'GET', 'success': function (response) { console.log('success called!'); throw new Error(); } }); CodePen: http://codepen.io/anon/pen/Ldybr
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/25480480
has comment: http://stackoverflow.com/comment/39758160
upvote count: 3
has comment: http://stackoverflow.com/comment/39758220
has title: Invoke jQuery ajaxSuccess (or any global AJAX event) even if the local success (or any local AJAX event) throws an error
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25480480

http://stackoverflow.com/comment/39845010
comment on: http://stackoverflow.com/q/25522605
has text: Add error reporting in top of the page `ini_set("display_errors",1); error_reporting(E_ALL);`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39785073
type: QuestionComment
comment on: http://stackoverflow.com/q/25489518
has text: @BarbaraLaird yes, but that's the event, arguments[0].point is still null.
score: 0
type: Comment

http://stackoverflow.com/q/25494737
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25495097
type: Question
has title: Different navigation menu when user scrolls down
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25494805
has answer: http://stackoverflow.com/a/25494805
score: 0
answer count: 2
has body: I am having trouble finding a way to create a different navigation menu when the user scrolls down. I am looking for something like this. http://www.kamellazaarfoundation.org I want #small-menu to replace #big-menu when the user scrolls down. JSFiddle Big Logo Navigation Search #container { width: 600px; border: 1px solid green; padding: 10px; } #big-menu { height: 100px; border: 1px solid red; } #big-logo { width: 100px; height: 80px; border: 1px solid blue; margin-top: 10px; float: left; } #big-navigation { width: 300px; height: 20px; border: 1px solid orange; float: left; margin: 70px 0 0 10px; } #big-search-bar { width: 150px; height: 20px; border: 1px solid pink; float: right; margin: 70px 10px 0 0; } #small-menu { height: 60px; border: 1px solid teal; } #small-logo { height: 60px; width: 60px; float: left; border: 1px solid red; } #small-navigation { width: 300px; height: 20px; border: 1px solid black; margin: 30px 0 0 10px; float: left; } #small-search-bar { width: 150px; height: 20px; border: 1px solid aqua; float: right; margin: 30px 10px 0 0; } #content { height: 1200px; margin-top: 10px; border: 1px solid purple; } $(function() { // Stick the #nav to the top of the window var nav = $('#big-menu'); var navHomeY = nav.offset().top; var isFixed = false; var $w = $(window); $w.scroll(function() { var scrollTop = $w.scrollTop(); var shouldBeFixed = scrollTop > navHomeY; if (shouldBeFixed && !isFixed) { nav.css({ position: 'fixed', top: 0, left: nav.offset().left, width: nav.width() }); isFixed = true; } else if (!shouldBeFixed && isFixed) { nav.css({ position: 'static' }); isFixed = false; } }); });
accepted answer: http://stackoverflow.com/a/25495097
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/39943325
score: 0
type: Comment
has text: @RedGiant I'm not quite sure what you mean by that, could you emphasize a bit?
comment on: http://stackoverflow.com/a/25574784
type: AnswerComment

http://stackoverflow.com/comment/39731877
type: Comment
type: QuestionComment
has text: see this:http://stackoverflow.com/questions/8644428/how-to-highlight-text-using-javascript
comment on: http://stackoverflow.com/q/25461497
score: 0

http://stackoverflow.com/a/25476366
has body: Should probably be: for (var i = 0; i &lt; matchWordArray.length; i++) { The original statement: for (var i = 0; matchWordArray.length; i++) { ...would result in an infinite loop because matchWordArray.length is always truthy (3) in your test.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25476318

http://stackoverflow.com/comment/39799346
comment on: http://stackoverflow.com/q/25497784
score: 0
type: Comment
has text: Are you following through a JavaScript tutorial?
type: QuestionComment

http://stackoverflow.com/q/25462528
has title: Track first keypress event
score: 1
type: Question
answer count: 2
tagged with: keypress
downvote count: 0
has comment: http://stackoverflow.com/comment/39737756
tagged with: javascript
has answer: http://stackoverflow.com/a/25464810
favorite count: 0
has answer: http://stackoverflow.com/a/25462683
has body: For reasons I have to rely on keypress instead of keydown/keyup. keypress repeatedly fires events if the key is pressed. How to track only the first press on a key? For keydown/keyup this would not be a problem, since there is a dedicated keyup event. But this is not the case for keypress.
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/39761739
has text: The problem was just that! When I modified the single.php page I probably forgot to replace `<?php get_footer(); ?>`. Thank you so much! Never seen a problem solved in such a short time!
comment on: http://stackoverflow.com/a/25477666
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39623079
score: 0
comment on: http://stackoverflow.com/q/25402949
type: QuestionComment
type: Comment
has text: I solved using the method `$("#mainDayCounter").show()` after setting the text! Thank you!

http://stackoverflow.com/a/25413629
has body: Okay, so it is not a solution to the problem above, more like a better way to do it. I tried to do automation with greasemonkey, that is why it tries to send the data to another place. There is a tool for doing this, called casperJS (built onto PhantomJS, it is also required to run it). Basically, you can write JavaScript, to navigate in the site, select the data you want and post it with the casperjs's ajax util. All of this is documented well. casperjs.org casper ajax Tutorial: Automating &amp; Scraping with PhantomJS and CasperJS by Chris Hawkes
answers question: http://stackoverflow.com/q/25406672
type: Answer
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25406672

http://stackoverflow.com/q/25441646
has comment: http://stackoverflow.com/comment/54561019
tagged with: javascript
has answer: http://stackoverflow.com/a/33385452
has answer: http://stackoverflow.com/a/33389427
has comment: http://stackoverflow.com/comment/54560995
has comment: http://stackoverflow.com/comment/54789674
has comment: http://stackoverflow.com/comment/54794437
possible better answer: http://stackoverflow.com/a/33475550
has comment: http://stackoverflow.com/comment/39694225
tagged with: textarea
downvote count: 1
answer count: 7
has answer: http://stackoverflow.com/a/33402045
has answer: http://stackoverflow.com/a/33515629
favorite count: 0
upvote count: 14
has answer: http://stackoverflow.com/a/25442265
has comment: http://stackoverflow.com/comment/54805316
has title: Remove dot marks from textarea
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/33494094
has body: How to remove right bottom-corner dots from textarea ? There is a solution with following css resize:none but I don't want to remove resizing... So is it possible to do ...
score: 13
has comment: http://stackoverflow.com/comment/54799589
type: Question
accepted answer: http://stackoverflow.com/a/33385452
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33475550

http://stackoverflow.com/a/25457806
has body: Here's it the changes in your code that will do your task. &lt;script&gt; $(document).ready(function(){ // On selecting an option in select dropdown $("#ppl_select").change(function(){ var selectedValue = $(this).val(); // Get value of selected option if(selectedValue == "0"){ // if selected option is 0 (other) $("#other_ppl).removeAttr("disabled"); // Enable other people textbox } setMinMax(selectedValue); // Now call your setMinMax function passing with // selected option value }); }); function setMinMax(value) { var num_tanks = document.getElementById("tanks_num"); var num_dps = document.getElementById("dps_num"); var num_heal = document.getElementById("heal_num"); var max_tanks = document.getElementById("max_tanks"); var max_dps = document.getElementById("max_dps"); var max_heals = document.getElementById("max_heals"); if(value == '8') { num_tanks.setAttribute("value", 2); num_tanks.setAttribute("max", 2); max_tanks.innerHTML = "Maximum: " + (num_tanks.value); num_dps.setAttribute("value", 4); num_dps.setAttribute("max", 4); num_heal.setAttribute("value", 2); num_heal.setAttribute("max", 2); } else if(value == '16') { num_tanks.setAttribute("value", 2); num_tanks.setAttribute("max", 2); max_tanks.innerHTML = "Maximum: " + (num_tanks.value); num_dps.setAttribute("value", 10); num_dps.setAttribute("max", 10); num_heal.setAttribute("value", 4); num_heal.setAttribute("max", 4); } } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39725074
score: 0
has comment: http://stackoverflow.com/comment/39725108
answers question: http://stackoverflow.com/q/25457734
type: Answer
has comment: http://stackoverflow.com/comment/39725103

http://stackoverflow.com/a/25549209
has comment: http://stackoverflow.com/comment/39895919
score: 0
answers question: http://stackoverflow.com/q/25549016
has body: I would go about this by saying something along the lines of : if value is > than 10(value) change color. Look into using JQuery to change color of divs with .css command. To make the bars move you should also look into JQuery with .animate() If you haven't already go to www.codecademy.com and go through the JQuery tutorial. This might not have given you the code straight up but you'll learn more from trying to work it out with those resources. Hope it helped though =)
type: Answer
has comment: http://stackoverflow.com/comment/39893522
has comment: http://stackoverflow.com/comment/39897137

http://stackoverflow.com/a/25498143
type: Answer
accepted answer of: http://stackoverflow.com/q/25483555
answers question: http://stackoverflow.com/q/25483555
has comment: http://stackoverflow.com/comment/39801190
has body: Here's the script that will output html table into xml. Script used to download is [ ::: Downloadify ::: ]. $(document).ready( function() { var table8_Props = { col_0: "select", public_methods: true }; var tf8 = setFilterGrid("table8", table8_Props); function xml_generate (){ var xml = '<?xml version="1.0" encoding="utf-8"?>\n'; xml = xml + ' \n'; $("#table8 tr:gt(1):not(:hidden)").each(function () { var cells = $('td', this); console.log(cells.text()); xml += ' \n ' + cells.eq(0).text() + ' \n'; xml += ' ' + cells.eq(1).text() + ' \n'; xml += ' ' + cells.eq(2).text() + ' \n'; xml += " \n"; }); xml += ' '; return xml; } Downloadify.create('downloadify',{ filename: function(){ return 'table_data.xml'; }, data: function(){ return xml_generate(); }, onComplete: function(){ alert('Your File Has Been Saved!'); }, onCancel: function(){ alert('You have cancelled the saving of this file.'); }, onError: function(){ alert('You must put something in the File Contents or there will be nothing to save!'); }, transparent: false, swf: 'http://pixelgraphics.us/downloadify/media/downloadify.swf', downloadImage: 'http://pixelgraphics.us/downloadify/images/download.png', width: 100, height: 30, transparent: true, append: false }); }); HTML: Add this line of code in the html after the table tag ends. You must have Flash 10 installed to download this file. Here's the jsfiddle : http://jsfiddle.net/avw8u59z/6/
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39687038
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25437485
score: 1
has text: The comma operator returns the value of the *last* operand, so this will work as long as `row >= 0` regardless of the other conditions. You're looking for `&&` instead of `,`.

http://stackoverflow.com/q/25486695
score: -1
has body: I have jquery slider dbpasCarousel but there no option bullets how i can add bullet option in dbpasCarousel ??? $.fn.dbpasCarousel.options = { itemsVisible: 2, //for smooth movement, leave at a minimum 2 items out of view slideDelay: 500, //milliseconds autoSlide: 0, //0-off 1-on autoDelay: 5000, //milliseconds hoverPause: 1, //0-off 1-on imgCaption: 1, //0-off 1-on onComplete: null //callback function };
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: slider
answer count: 1
has answer: http://stackoverflow.com/a/25486763
favorite count: 0
type: UnansweredQuestion
has title: Add bullets in jquery dbpasCarousel?
downvote count: 1

http://stackoverflow.com/comment/39660216
type: QuestionComment
has text: I tried require.js but doesn't seem to solve my problem, see edit above
comment on: http://stackoverflow.com/q/25422899
score: 0
type: Comment

http://stackoverflow.com/a/25471428
has comment: http://stackoverflow.com/comment/39830082
has comment: http://stackoverflow.com/comment/39830906
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25471387
has comment: http://stackoverflow.com/comment/39842641
answers question: http://stackoverflow.com/q/25471387
has body: That's pretty simple: $("#buttonA").on("click", function() { $("#theDiv").load("http://theUrl"); }); $("#buttonB").on("click", function() { $("#theDiv").load("http://theOtherUrl"); }); Replace #buttonA, #buttonB, #theDiv with your specific selectors. A better way would be to use data attributes: load A load B And... $(".link-btn").on("click", function() { $("#theDiv").load($(this).data("url")); });
type: Answer
has comment: http://stackoverflow.com/comment/39835677

http://stackoverflow.com/comment/39834688
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25507598
has text: You cannot render the chart in a PDF - you have to render in a browser and convert to .png. The API provides a `getImageURI` method for most of the charts that will return a URI that you can pass to the `src` of an ` ` tag, and then save the image.
score: 0

http://stackoverflow.com/a/25440679
has body: You should be using only one $(document).ready( ... ) in your Javascript. Working demo of your code (fixed) JS: $(document).ready(function() { $("input, textarea").keyup(function() { var val = $(this).val() $(this).val(val.toUpperCase()); }); $('input[type="text"]').on('keypress', function() { var $this = $(this), value = $this.val(); if (value.length === 1) { $this.val( value.charAt(0).toUpperCase() ); } }); });
upvote count: 2
has comment: http://stackoverflow.com/comment/39692533
downvote count: 1
has comment: http://stackoverflow.com/comment/39692645
type: Answer
has comment: http://stackoverflow.com/comment/39692361
answers question: http://stackoverflow.com/q/25440604
score: 1
has comment: http://stackoverflow.com/comment/39692307

http://stackoverflow.com/comment/40346000
has text: There is no "of course" here on SO - if you don't show code for it, we don't know if it exists.
type: Comment
comment on: http://stackoverflow.com/a/25487456
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39674813
type: QuestionComment
comment on: http://stackoverflow.com/q/25415121
score: 0
has text: you can see the form in action here: http://ryanduffdesign.com/form/
type: Comment

http://stackoverflow.com/comment/39822909
comment on: http://stackoverflow.com/q/25492587
score: 0
type: QuestionComment
type: Comment
has text: Chrome. It works on a stand-alone page just fine. I think the problem must have been with the Polymer elements scaffold I was using. I switched to another scaffold and the problem was gone.

http://stackoverflow.com/q/25473844
tagged with: javascript
has answer: http://stackoverflow.com/a/25474058
score: 0
answer count: 3
has body: I am displaying the following code for next 5 days function setDateTime() { var timesOffice = (officeTimes[officeID] + "").split(","); //alert(officeTimes[officeID]+":12:"+timesOffice[0]); var dt = new Date(correctDate); var dateOptions = ""; var firstdateString = ""; var totalDays = 5; for (i = 0; i &lt; totalDays; i++) { var sateString = dt.getFullYear() + " " + monthNames[dt.getMonth()] + " " + (dt.getDate()); //console.log("i:"+i+"s:"+sateString); dateFlag = 0; var j = 0; for (j = 0; j &lt; timesOffice.length; j++) { if (checkValidDateTime(sateString, timesOffice[j])) { dateFlag = 1; break; } } dt.setDate(dt.getDate() + 1); if (dateFlag == 0) { totalDays++; continue; } if (firstdateString == "") firstdateString = sateString; dateOptions = dateOptions + '&lt;option value="' + sateString + '"&gt;' + sateString + '&lt;/option&gt;'; } $(".date").html(dateOptions); } I want to exclude Sundays from this list
type: UnansweredQuestion
has title: Display next 5 days excluding Sundays in javascript
has answer: http://stackoverflow.com/a/25473873
type: Question
has answer: http://stackoverflow.com/a/25474087

http://stackoverflow.com/comment/39868589
type: Comment
comment on: http://stackoverflow.com/q/25518233
score: 0
type: QuestionComment
has text: @lavrton further investigation indicates that my problems are related to the layers I'm using. Unfortunately the code is quite lengthy and wouldn't be worth condensing into a jsfiddle, but thanks anyway!

web-worker
tags question: http://stackoverflow.com/q/25499480
type: Tag
tags question: http://stackoverflow.com/q/25489453
tag name: web-worker
tags question: http://stackoverflow.com/q/25404158
tags question: http://stackoverflow.com/q/25458104
tags question: http://stackoverflow.com/q/25429312

webrtc
tags question: http://stackoverflow.com/q/25394151
tags question: http://stackoverflow.com/q/25523289
tags question: http://stackoverflow.com/q/25549516
tags question: http://stackoverflow.com/q/25481216
type: Tag
tags question: http://stackoverflow.com/q/25504437
tags question: http://stackoverflow.com/q/25488318
tag name: webrtc

http://stackoverflow.com/a/25518977
answers question: http://stackoverflow.com/q/25516078
type: Answer
has body: You might be better off using the regular element.appendChild function for this. You can get a reference to your parent element using d3.select(el).node() then, you can call .appendChild on that, passing in svg.node() as the element to append. So, all together: d3.select(el).node().appendChild(svg.node());
has comment: http://stackoverflow.com/comment/39838813
score: 4
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/25512023
type: Question
has answer: http://stackoverflow.com/a/25592004
tagged with: javascript
tagged with: dc.js
score: 0
tagged with: filter
answer count: 1
accepted answer: http://stackoverflow.com/a/25592004
has body: I have multiple charts for which I want to display all filters that are applied. Here is an example of displaying filters for each chart individually. A filter is a click on an element of a chart. I want to display all filters from multiple charts in one place. I will provide a jsfiddle to play around with shortly. To display a filter for each chart individually like in the link I provided one has to put this | Current filter: within the of that chart like so | Current filter: I want to combine those filters in one place though outside the chart's div. Thanks.
tagged with: d3.js
has title: Display filters being applied on multiple graphs in one place
type: AnsweredQuestion

http://stackoverflow.com/a/25545986
answers question: http://stackoverflow.com/q/25537452
score: 0
type: Answer
has body: try this: $('#datetimepicker').datetimepicker() .datetimepicker({value:new Date({{ now_date.year }}, {{ now_date.month }}, {{ now_date.day }}), step:10});

http://stackoverflow.com/comment/39809730
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25503625
score: 0
has text: I just tested `window.close()` in the console of a Mozilla browser. It definitely works. What does your code look like?

http://stackoverflow.com/q/25505930
type: Question
has comment: http://stackoverflow.com/comment/39814184
tagged with: javascript
has comment: http://stackoverflow.com/comment/39814215
tagged with: jquery
has comment: http://stackoverflow.com/comment/39814175
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25506052
has comment: http://stackoverflow.com/comment/39814293
has body: I have a menu with their own submenus too. Problem: When the page is loaded, the website emits a letter S at the end of every submenu. How can i remove that letter S at the end of every submenu via JQuery or CSS? This is the current markup when I copy html node in firebug: &lt;nav class="shopMenuHover"&gt; &lt;div id="bx_incl_area_5_1"&gt; &lt;ul&gt; &lt;li class=""&gt;&lt;a href="#" class="firstLevel"&gt;&lt;font&gt;&lt;font&gt;Main Menu 1&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;div class="shopSubmenuHover" style=""&gt;&lt;h2&gt;&lt;a href="#"&gt;&lt;font&gt;&lt;font&gt;Sub Menu 1&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/h2&gt; &lt;ul&gt; &lt;li&gt; &lt;a href=""&gt;&lt;font&gt;&lt;font&gt;Sub Menu &amp;gt; Sub Menu&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Sub Menu &amp;gt; Sub Menu&lt;/a&gt; s&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class="firstLevel hasSubmenu instrumentarium-en-fresen"&gt; &lt;a href="#" class="firstLevel"&gt;&lt;font&gt;&lt;font class=""&gt;Main Menu 2&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;div class="shopSubmenuHover" style=""&gt;&lt;h2&gt;&lt;a href=""&gt;&lt;font&gt;&lt;font class=""&gt;Sub Menu 2&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=""&gt;&lt;font&gt;&lt;font&gt;Sub Menu &amp;gt; Sub Menu&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Sub Menu &amp;gt; Sub Menu&lt;/a&gt; s&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/li&gt; &lt;li style="display:none " class="firstLevel hasSubmenu emptySubmenu outlet"&gt; &lt;a href="#" class="firstLevel"&gt;Outlet&lt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/nav&gt; This is the jquery that i used to find the last li of every ul &lt;script type="text/javascript"&gt; $(document).ready(function() { $('.shopMenuHover ul li:last-child').css( "border", "1px solid" ); }); &lt;/script&gt; Kindly Please help me...
has title: How do i find the last in every (Front-end, html, css , jquery)
has comment: http://stackoverflow.com/comment/39814264
tagged with: frontend
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39814229
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39814216
tagged with: css
has comment: http://stackoverflow.com/comment/39814160
has comment: http://stackoverflow.com/comment/39814536
has comment: http://stackoverflow.com/comment/39814165

http://stackoverflow.com/q/25549016
tagged with: css
has title: How to make filling bars with different color depending on value? Looking for JS solution
has comment: http://stackoverflow.com/comment/39893130
has comment: http://stackoverflow.com/comment/39893215
downvote count: 1
accepted answer: http://stackoverflow.com/a/25550090
tagged with: charts
type: AnsweredQuestion
has body: I'm looking for solution to create live-charts like shown on the picture, I've looked through samples of Highcharts, fusioncharts, raphaeljs and much much more others, but couldn't find something really appropriate. I've tried a lot with fusioncharts LED widgets, but it doesn't have required customization possibilities. Looking for your help and advice, thanks! Take a look at the picture, please. I need bars with same way of working and look&amp;feel. https://i.sstatic.net/UdGLz.png
score: -1
type: Question
has comment: http://stackoverflow.com/comment/39893175
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25549209
favorite count: 0
has answer: http://stackoverflow.com/a/25549209
has answer: http://stackoverflow.com/a/25550090

http://stackoverflow.com/comment/39812936
has text: Does your `data` contain any items?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25503949

http://stackoverflow.com/q/25525177
has comment: http://stackoverflow.com/comment/39850197
linked to: http://stackoverflow.com/q/8625373
tagged with: node.js
has comment: http://stackoverflow.com/comment/39850886
has comment: http://stackoverflow.com/comment/39853357
linked to: http://stackoverflow.com/q/19361974
has comment: http://stackoverflow.com/comment/39855669
upvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/19426882
tagged with: socket.io
accepted answer: http://stackoverflow.com/a/25527574
tagged with: javascript
tagged with: express
linked to: http://stackoverflow.com/q/20428162
has body: I've been checking other related answers such as: node.js /socket.io/socket.io.js not found Socket.io not being served by Node.js server socket.io.js not found on client Configuring 'simplest' node.js + socket.IO + Express server But I didn't find the solution to my problem. This is exactly what I did: Installed node through the windows executable and then: express node6 --hogan --ejs cd node6 npm install npm install socket.io npm start My app.js is the default one but I added the following lines to link it with socket.io: var http = require('http'); var server = http.createServer(app); var io = require('socket.io')(server); io.listen(http); http.listen(3000); Here's the complete app.js file. I also tried to copy and paste the examples for Node http server and Using with Express 3/4 or the app.js detailed in the socket.io docs, but both of them throw errors when calling npm start. Then, in my hoggn view, I'm trying to load socket.io this way: As far as I know, node.js should get it automatically, but it doesn't in my case. Why? Express version: 4.2.0 This is the error page: Not Found 404 Error: Not Found at Layer.app.use.res.render.message [as handle] (C:\inetpub\wwwroot\node6\app.js:29:15) at trim_prefix (C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:240:15) at C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:208:9 at Function.proto.process_params (C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:269:12) at next (C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:199:19) at next (C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:176:38) at C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:137:5 at C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:250:10 at next (C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:160:14) at next (C:\inetpub\wwwroot\node6\node_modules\express\lib\router\index.js:176:38)
type: AnsweredQuestion
has title: Socket.io.js not found (node.js + express + socket.io)
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39850127
favorite count: 0
has comment: http://stackoverflow.com/comment/39858638
type: Question
has comment: http://stackoverflow.com/comment/39858899
has answer: http://stackoverflow.com/a/25527574

http://stackoverflow.com/q/25515140
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39832141
has body: I want to load the contents of the gallery element to the stage element by clicking on the gallery element itself. This is noob stuff I'm sure, but I have yet to find an explanation for this. Why doesn't this work? Also, I am using jquery UI to create a drag and drop interface --> the element inside the #gallery is draggable, and #gallery is droppable $(document).ready(function () { var $galcon = $('#gallery').html(); $("#gallery").on('click'function () { $('#stage').append($galcon); }); });
tagged with: jquery-ui-droppable
type: Question
has comment: http://stackoverflow.com/comment/39832080
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25515218
score: 0
has answer: http://stackoverflow.com/a/25515224
answer count: 3
has answer: http://stackoverflow.com/a/25515245
tagged with: http://stackoverflow.com/tag/html
has title: Moving html content around the DOM with jquery
tagged with: jquery-ui-draggable
linked to: http://stackoverflow.com/q/3015335

http://stackoverflow.com/comment/39762656
type: Comment
comment on: http://stackoverflow.com/q/25478129
type: QuestionComment
has text: I'm not familiar with java/htmlunit but maybe this will be a start:[`refreshHandler`](http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/RefreshHandler.html)
score: 0

http://stackoverflow.com/q/25392438
tagged with: javascript
score: 0
tagged with: angularjs
has title: >> bitwise operator not working as expected
type: UnansweredQuestion
tagged with: bit-manipulation
type: Question
has body: I'm trying to create a simple utility for myself to be able to convert values from rgb to hex, and vice versa. It works for the most part, except for one flaw. If I enter a hex value like '007aff', '00' gets trimmed and the result is '7aff'. The r/g/b/ still gets the correct value, but I don't want the zeroes trimmed from the hexadecimal value. Am I doing something incorrectly? // for anyone unfamiliar with angular // $watch runs when the variable in quotes changes in value // the rest is basic javascript AngularJS: $scope.$watch('hex', function() { var rgb = parseInt($scope.hex, 16); $scope.r = (rgb &gt;&gt; 16) &amp; 0xFF; $scope.g = (rgb &gt;&gt; 8) &amp; 0xFF; $scope.b = rgb &amp; 0xFF; $scope.rgb = 'rgb(' + $scope.r + ',' + $scope.g + ',' + $scope.b + ');'; }); $scope.$watch('r+g+b', function() { $scope.rgb = 'rgb(' + $scope.r + ',' + $scope.g + ',' + $scope.b + ');'; $scope.hex = parseInt($scope.r &lt;&lt; 16 | $scope.g &lt;&lt; 8 | $scope.b).toString(16); }); Here is a sample Plunker:
has answer: http://stackoverflow.com/a/25392764
tagged with: bitwise-operators
answer count: 2
has answer: http://stackoverflow.com/a/25392737

append
tags question: http://stackoverflow.com/q/25438069
tag name: append
tags question: http://stackoverflow.com/q/25524906
tags question: http://stackoverflow.com/q/25509046
tags question: http://stackoverflow.com/q/25478654
tags question: http://stackoverflow.com/q/25462006
type: Tag

http://stackoverflow.com/q/25527343
tagged with: facebook-graph-api
has comment: http://stackoverflow.com/comment/39855492
has comment: http://stackoverflow.com/comment/39854923
score: 0
has comment: http://stackoverflow.com/comment/39854439
has comment: http://stackoverflow.com/comment/39853871
has comment: http://stackoverflow.com/comment/39853371
type: UnansweredQuestion
has body: I want to fetch the inbox messages of the logged in users. I have tried the following code as described in the facebook devlopers website, but I'm getting an error response. FB.api( "/me/inbox", function (response) { if (response &amp;&amp; !response.error) { /* handle the result */ alert(response); } else { alert("this part is getting alerted"); }}) But when i tried it in graph api explorer i am getting the data correctly https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&amp;path=me%2Finbox&amp;version=v2.1
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39853653
has comment: http://stackoverflow.com/comment/39853965
type: Question
has title: Fetch facebook inbox messages

http://stackoverflow.com/comment/39725293
type: Comment
comment on: http://stackoverflow.com/q/25435242
has text: I try to log path of each property which will contain passed propContentPart. You're right after first `return` we consistently come out of the chain of reqursive. But why just we aren't shifted to previous level of chain of reqursive? Why we go out immediately?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39796657
score: 1
has text: `removeme` was indeed the specific class in the OP's code.
type: AnswerComment
comment on: http://stackoverflow.com/a/25496243
type: Comment

http://stackoverflow.com/comment/39732455
type: Comment
has text: yeah, ok I found the same error as you now, adding `dataType:'JSON'` ,as stated in my original post, which someone down voted, fixes your issue
type: AnswerComment
comment on: http://stackoverflow.com/a/25461560
score: 0

http://stackoverflow.com/comment/39874101
type: QuestionComment
comment on: http://stackoverflow.com/q/25538452
has text: Get rid of `var` on the lines after the first; it's completely unnecessary and it's causing your problem.
type: Comment
score: 6

http://stackoverflow.com/q/25408980
has comment: http://stackoverflow.com/comment/39633995
type: Question
has title: Left and Right in a li to have a border
has answer: http://stackoverflow.com/a/25409013
tagged with: javascript
has body: I have a li that gets generated dynamically and I want the left li and the right li to have a border. I was thinking of adding a classes to them. The li that has class "hidden" doesnt get displayed. The list might be like this First Second Third Fourth Or First Second Third Fourth No matter what how they are stacked, the first list should have a border on the left and last list should have border on the right. JSFIDDLE
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/25409110
type: UnansweredQuestion

http://stackoverflow.com/comment/39690549
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25439209
has text: @cpburnz: Yeah, the idea is that without the password, the data is useless.

http://stackoverflow.com/comment/39640089
type: Comment
comment on: http://stackoverflow.com/a/25411868
has text: I agree, Ajax is in most cases no option, but there are scenarios where it is, e.g. iframeing a legacy application on the same domain. The hidden iframe option is possible, not beautiful, but possible, checking onbeforeunload in parent frame and onload in iframe.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25399339
accepted answer of: http://stackoverflow.com/q/25399174
answers question: http://stackoverflow.com/q/25399174
has body: Well i think you can use reload callback of this plugin so in your success function of ajax you can call your initialiceMasonry() function which will look like this function initialiceMasonry(){ var $container = $('#masonry-container'); $container.imagesLoaded(function() { $container.masonry('reload'); $container.masonry({ isInitLayout : true, itemSelector: '.mason_jar_item' }); });
has comment: http://stackoverflow.com/comment/39616953
type: AcceptedAnswer
upvote count: 6
has comment: http://stackoverflow.com/comment/39616169
type: Answer
score: 6
downvote count: 0

http://stackoverflow.com/q/25446125
tagged with: popup
downvote count: 0
accepted answer: http://stackoverflow.com/a/39730240
score: 16
has comment: http://stackoverflow.com/comment/41431263
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40263719
type: Question
tagged with: synchronous
has comment: http://stackoverflow.com/comment/41352907
has answer: http://stackoverflow.com/a/39730240
possible better answer: http://stackoverflow.com/a/26389282
tagged with: javascript
has title: Synchronous Ajax - does Chrome have a timeout on trusted events?
has body: Situation We have a situation, where we need to onclick-open a new tab in browsers after performing an XHR / Ajax request. We do this by setting the Ajax request to be performed synchronously to keep the context of the trusted click event and this works fine. Problem However, in the latest Chrome version (36), we experience popup warnings when the Ajax call has some lag... A lag of 2 seconds is enough for Chrome to display a popup warning instead of opening the tab like it is supposed to. The code itself is working, I can click that button multiple times and it works all the time until the request experiences some lag. Then I get the popup warning... Question Is there a timeout applied to synchronous Ajax requests during which it needs to be finished for the trusted event to still be available? Is there any way to circumvent that? After all, the call is already synchronous and freezing everything else until the result arrives. Thanks. Update JSFiddle Update: I've created a JSFiddle to demonstrate the problem: http://jsfiddle.net/23JNw/9/ /** * This method will give open the popup without a warning. */ function performSlowSyncronousRequest() { $.ajax({ url: '/echo/html', data: {delay: 2}, //JSfiddle will delay the answer by 2 seconds success: function(){ window.open('http://www.thirtykingdoms.com'); //this causes the popup warning in Chrome }, async: false }); }
answer count: 3
has comment: http://stackoverflow.com/comment/41507350
upvote count: 16
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/28126663
has answer: http://stackoverflow.com/a/26389282
type: AnsweredQuestion

http://stackoverflow.com/q/25430319
favorite count: 0
has title: If URL contains hash on initial page load
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39673593
type: Question
accepted answer: http://stackoverflow.com/a/25430444
has comment: http://stackoverflow.com/comment/39673637
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/25430444
answer count: 1
tagged with: jquery
has body: I need to run some functions on initial page load and also if the page is refreshed, if the url contains a particular hash. As of now, I am able to get it working only on page refresh and not working when i first get to the page. My code: $(document).ready(function() { if (document.location.href.indexOf('#story') &gt; -1) { alert('true'); } });

http://stackoverflow.com/comment/39603578
score: 0
has text: Thanks @YuriyGalanter, but your fiddle exhibits precisely the same behavior in IE11 that I am trying to solve; IE11 does not render the item in the color specified by the style rule (red) unless the *other* item is selected.
comment on: http://stackoverflow.com/q/25392412
type: Comment
type: QuestionComment

ruby
tags question: http://stackoverflow.com/q/25443273
tags question: http://stackoverflow.com/q/25507980
tags question: http://stackoverflow.com/q/25434205
tag name: ruby
tags question: http://stackoverflow.com/q/25459366
tags question: http://stackoverflow.com/q/25509989
tags question: http://stackoverflow.com/q/25474329
tags question: http://stackoverflow.com/q/25394909
tags question: http://stackoverflow.com/q/25394456
tags question: http://stackoverflow.com/q/25395008
tags question: http://stackoverflow.com/q/25490699
tags question: http://stackoverflow.com/q/25441613
tags question: http://stackoverflow.com/q/25409937
tags question: http://stackoverflow.com/q/25455399
tags question: http://stackoverflow.com/q/25506563
type: Tag

http://stackoverflow.com/q/25405835
tagged with: ajax
has comment: http://stackoverflow.com/comment/39627817
has comment: http://stackoverflow.com/comment/39627877
has comment: http://stackoverflow.com/comment/39627956
has body: I've tried to make simple callback, so I can get used to it, but it doesn't work when the page loads. $(document).ready(getVideoId(function (response) { alert(response); })); function getVideoId(callback){ var http; var url = base_url + "main/firstVideo"; if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari http=new XMLHttpRequest(); } else if (window.ActiveXObject){ // code for IE6, IE5 http=new ActiveXObject("Microsoft.XMLHTTP"); } else{ alert("Your browser does not support XMLHTTP!"); } http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", 0); http.setRequestHeader("Connection", "close"); http.onreadystatechange = function() { if(http.readyState == 4 &amp;&amp; http.status == 200) { callback(http.responseText); } http.open("POST", url, true); http.send(null); }; } Idea is that I will get back video_id from database and make alert out of it. Base_url is defined as a variable.
favorite count: 0
has comment: http://stackoverflow.com/comment/39627841
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39627773
score: -3
downvote count: 3
has comment: http://stackoverflow.com/comment/39627794
type: Question
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25405973
has title: AJAX callback doesn't work.
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25547033
has body: "userDestination" is new function. And value of "userDestinationPrompt" has been set before function called. Set value inside the function will solve your issue. var userDestination = function () { allDestination = destinationArray.slice(0, destinationArraySet).join(' ').trim(); console.log(allDestination); var userDestinationPrompt = ("Where would you like to go? Available places: \n" + allDestination +"."); userDestinationAnswer = prompt(userDestinationPrompt).toUpperCase(); destinationArraySet++; };
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39889771
accepted answer of: http://stackoverflow.com/q/25546868
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25546868

http://stackoverflow.com/q/25511264
has body: I'm actually building a web app using custom Polymer elements (which is based on web-components and shadow-dom) but I encountered a serious problem. I want this app to run on an Android 4.4 WebView, but I experienced some issues with the shadow-dom when testing the app on the WebView, although it works perfectly fine on Chrome (Android and Desktop). This problem occurs when I try to access a shadowRoot element from CSS (with ::shadow or /deep/) or from pure js. Here is a simple illustration of my problem : some content // script.js window.addEventListener('polymer-ready',function(){ var e = document.getElementsByTagName('custom-elt')[0]; alert(e.getElt().innerHTML); }); Works perfectly on Chrome, but not in the WebView. According to caniuse.com, shadow-dom is supported by Android 4.4 browser (which is used by the WebView right ?) with the 'webkit' prefix (http://caniuse.com/#feat=shadowdom), but I didn't find a way to use it with the prefix. Any solution ? Thanks Baptiste
tagged with: webview
type: Question
has comment: http://stackoverflow.com/comment/41535007
has answer: http://stackoverflow.com/a/27260135
tagged with: javascript
has comment: http://stackoverflow.com/comment/41742944
has title: Using shadow-dom (Polymer) in Android 4.4 Webview
tagged with: web-component
answer count: 1
downvote count: 0
favorite count: 0
score: 8
upvote count: 8
tagged with: shadow-dom
type: UnansweredQuestion
tagged with: android

http://stackoverflow.com/q/25433489
has title: Using Visual Studio 2013 regular expression find - how to invalidate multiple prefixes
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/25434137
linked to: http://stackoverflow.com/q/11352870
favorite count: 0
has body: I'm trying to find the "symbol" all in a bunch of C#, XML, and JS files. My project is huge and doing a naive search for "all" results in over 8,000 lines found so I'm trying to eliminate some of them. For example, I don't want to match on "call" or "balloon" or "Balloon" (those are UX element styles. Looking at the using Regular Expressions MSDN page (http://msdn.microsoft.com/en-us/library/vstudio/2k3te2cs%28v=vs.110%29.aspx) I found out how to invalidate on one of those but I can't figure out how to do it on multiple and make it case-insensitive. I started off using: (?!c)all And that filtered out call and things like that but I can't get one to filter out multiple to work. (?!b|c)all Is the form I've been playing around with, trying to get it to ignore balloon. Ideally I could do something like (warning! - invalid regex below) (?!b|c|B|C|)all If anyone could point me in the right direction that would be great. The reason why I'm not looking for all surrounded by spaces is because I don't know if the reference I'm looking for is going to be: .All .all ("All") (all) and etc...
tagged with: regex
tagged with: visual-studio-2013
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25434137
has answer: http://stackoverflow.com/a/25433693
upvote count: 1
has answer: http://stackoverflow.com/a/25433796
type: Question
tagged with: c#
possible better answer: http://stackoverflow.com/a/25433693
tagged with: javascript

http://stackoverflow.com/q/25412275
type: Question
has title: How to print the variable outside of the function in JavaScript?
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25412487
has comment: http://stackoverflow.com/comment/39640578
has body: I would like to alert(httpAccept) outside of the function but this is not possible. All actions must me made inside the httpAcceptResponse(data). When I consol httpAccess after the getHTTP() I get Resource interpreted as Script but transferred with MIME type text/html: "http://www.domain.com/httpaccept.php?callback=httpAcceptResponse". What is a workaround for this? function requestServerCall(url) { var head = document.head; var script = document.createElement("script"); script.setAttribute("src", url); head.appendChild(script); head.removeChild(script); } var httpAccept = ''; function httpAcceptResponse(data) { httpAccept = data.token; } function getHTTP() { requestServerCall("http://www.domain.com/httpaccept.php?callback=httpAcceptResponse"); } getHTTP();
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25412487

http://stackoverflow.com/a/25418901
upvote count: 0
has body: name
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/25418721
type: Answer

http://stackoverflow.com/q/25516753
tagged with: extjs
tagged with: extjs4
has body: Below code works fine with the data as in ReadOrder.json (below), however how to read the associated object when it is nested inside another object as in ReadOrderNested.json(below, within 'collection'). Question is more specifically can we use a mapping property or proxy's reader config with rootProperty (tried this approach with no luck) Sencha fiddle : https://fiddle.sencha.com/#fiddle/9fb Extjs version : 5.0.0 //Base Model Ext.define('MyApp.model.Base', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int' }], schema: { namespace: 'MyApp.model' } }); //Order Model Ext.define('MyApp.model.Order', { extend: 'MyApp.model.Base', fields: [{ name: 'customer', type: 'string' }, { name: 'paymentStatus', type: 'string' }] }); //PaymentDetail Model Ext.define('MyApp.model.PaymentDetail', { extend: 'MyApp.model.Base', fields: [{ name: 'orderId', reference: 'Order' }, { name: 'cardNumber', type: 'string' }, { name: 'status', type: 'string' }] }); Ext.define('MyApp.store.OrderStore', { extend: 'Ext.data.Store', model: 'MyApp.model.Order', proxy: { type: "rest", url: 'Order.json', appendId: false, api: { create: undefined, read: 'ReadOrder.json', update: 'UpdateOrder.json', destroy: undefined }, reader: { type: 'json', rootProperty: 'order' }, writer: { writeAllFields: true, allDataOptions: { persist: true, associated: true } } }, }); Ext.application({ name: 'MyApp', launch: function() { var orderStore = Ext.create('MyApp.store.OrderStore'); orderStore.load({ callback: function(records) { var order = this.first(); debugger; var paymentDetailList = order.paymentDetails(); paymentDetailList.each(function(paymentDetail) { //Print initial values of payment detail console.log(paymentDetail.get('cardNumber')); console.log(paymentDetail.get('status')); }) } }); } }); Data : ReadOrder.json { "success": true, "order": [{ "id": 1, "customer": "Philip J. Fry", "paymentStatus": "AWAIT_AUTH", "paymentDetails": [{ orderId : 1, "cardNumber": "4111111111", "status": 'CREATED' }, { o…
tagged with: extjs5
tagged with: extjs4.2
has title: How to read the referenced object when it is nested in ExtJS 5.0.0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25535214
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/46787410
has text: Missed one of the parentheses: `if (requestText.match(/POST \/ RTSP\/1.0/) {` should be `if (requestText.match(/POST \/ RTSP\/1.0/)) {`
type: Comment
comment on: http://stackoverflow.com/a/25438446
type: AnswerComment
score: 0

http://stackoverflow.com/a/25478361
score: 2
has body: Seems like a bug in FF and Chrome. A workaround is to not wrap your SVG in a element. Instead, put the inside the SVG, like so: Some text Could also click here. You can then disable the underline with CSS. Demo here
downvote count: 0
has comment: http://stackoverflow.com/comment/39775943
answers question: http://stackoverflow.com/q/25478183
has comment: http://stackoverflow.com/comment/39802267
has comment: http://stackoverflow.com/comment/39794704
has comment: http://stackoverflow.com/comment/39763215
has comment: http://stackoverflow.com/comment/39794776
upvote count: 2
type: Answer

http://stackoverflow.com/comment/39658269
has text: @ChathuraLakmal `value` is working with `form` elements.. you should use there `innerHTML` or `textContent`
comment on: http://stackoverflow.com/a/25422158
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39739231
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25465568
type: QuestionComment
has text: Maybe the following answer can help. It answers what a constructor function does and what prototype does: http://stackoverflow.com/a/16063711/1641941

http://stackoverflow.com/comment/39834298
has text: I have tried to put form at the end before but it does not like having all the markup in the middle. It broke the function :( I don't think I have inputs outside the form. When the order button is pressed, it's pulling information off 1 form. All the other info is stored in the session so I can call that on the next page. In which case... does the submit() work for IE9?
type: Comment
comment on: http://stackoverflow.com/a/25516015
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39852166
type: QuestionComment
has text: @Ahmad: No, in HTML5 they don’t.
score: 0
comment on: http://stackoverflow.com/q/25526533
type: Comment

http://stackoverflow.com/a/25463702
accepted answer of: http://stackoverflow.com/q/25455369
upvote count: 1
has body: Give those radio buttons an unique style class, e.g. styleClass="status". &lt;p:selectOneRadio id="all"&gt; &lt;f:selectItem itemLabel="Approve all" itemValue="#{true}" /&gt; &lt;f:selectItem itemLabel="Disapprove all" itemValue="#{false}" /&gt; &lt;/p:selectOneRadio&gt; &lt;p:dataTable id="table" value="#{bean.items}" var="item"&gt; &lt;p:column&gt;#{item.value}&lt;/p:column&gt; &lt;p:column&gt; &lt;p:selectOneRadio id="status" value="#{item.status}" styleClass="status"&gt; &lt;f:selectItem itemLabel="Approve" itemValue="#{true}" /&gt; &lt;f:selectItem itemLabel="Disapprove" itemValue="#{false}" /&gt; &lt;/p:selectOneRadio&gt; &lt;/p:column&gt; &lt;/p:dataTable&gt; Once done that, then there are 2 general approaches to achieve the functional requirement: Client side, using jQuery: &lt;p:selectOneRadio id="all" onchange="$('.status .ui-radiobutton:has([value=' + this.value + ']) .ui-radiobutton-box').click()"&gt; ... &lt;/p:selectOneRadio&gt; Server side, using JSF ajax: &lt;p:selectOneRadio id="all"&gt; ... &lt;p:ajax listener="#{bean.updateStatus(component.value)}" update="@(.status)" /&gt; &lt;/p:selectOneRadio&gt; With this new bean method: public void updateStatus(boolean newStatus) { for (Item item : items) { item.setStatus(newStatus); } }
answers question: http://stackoverflow.com/q/25455369
has comment: http://stackoverflow.com/comment/39903235
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39870695
type: Answer
has comment: http://stackoverflow.com/comment/39899852
has comment: http://stackoverflow.com/comment/39870630
has comment: http://stackoverflow.com/comment/39893730

http://stackoverflow.com/q/25456336
has answer: http://stackoverflow.com/a/25456489
has answer: http://stackoverflow.com/a/25456398
has title: How to add event listener to many buttons in JavaScript?
answer count: 4
type: AnsweredQuestion
has body: Here's my code. It correctly adds buttons using JavaScript, but the event listener doesn't work as expected. The output in the text area is always button100, no matter which button I click. Well, the button click doesn't change anything for any of the buttons, which makes me think the listener is not getting added correctly. Many buttons I'm not sure where the mistake is. Shouldn't the for loop add the clickHandler() to all buttons?
upvote count: 1
has comment: http://stackoverflow.com/comment/39722245
type: Question
accepted answer: http://stackoverflow.com/a/25456398
score: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25456469
possible better answer: http://stackoverflow.com/a/25456401
tagged with: button
downvote count: 0
has answer: http://stackoverflow.com/a/25456401
favorite count: 0

http://stackoverflow.com/a/25469341
accepted answer of: http://stackoverflow.com/q/25469294
has comment: http://stackoverflow.com/comment/39746482
answers question: http://stackoverflow.com/q/25469294
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39746532
has comment: http://stackoverflow.com/comment/39746293
type: Answer
has comment: http://stackoverflow.com/comment/39746463
has comment: http://stackoverflow.com/comment/39746358
score: 2
has comment: http://stackoverflow.com/comment/39746524
has body: Just do this : Suppose you have button for delete Delete</delete> Write the this under click event of class delete-it $(".delete-it").click(function(){ bootbox.confirm("Are you sure?", function(result) { if(result) window.location = 'delete.php?id=' + id; }); }); As per comments below : Using onclick is considered as bad practice. If you have $id value wrap it on data-attribute like this Delete And change JS in to this : $(".delete-it").click(function(){ var id = $(this).data('id'); bootbox.confirm("Are you sure?", function(result) { if(result) window.location = 'delete.php?id=' + id; }); });
downvote count: 0

http://stackoverflow.com/comment/39799246
type: Comment
has text: I ended up using something very similar: `var isStrictMode = function () { eval("var _temp = null"); if(typeof _temp === "undefined") { new App; } else { jQuery("#oldBrowser").toggle();}}();` Sorry about the poor format; comments don't let you do block code.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25480113

http://stackoverflow.com/comment/39677904
comment on: http://stackoverflow.com/a/25428892
has text: oh yeah, np, figuring out the right thing to search for is half the battle, and it was different enough for me to not close it as a duplicate.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39820794
type: Comment
has text: And your relevant HTML?
score: 0
comment on: http://stackoverflow.com/q/25509002
type: QuestionComment

http://stackoverflow.com/a/25420254
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25418403
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25418403
has comment: http://stackoverflow.com/comment/51806664
has comment: http://stackoverflow.com/comment/39656249
downvote count: 0
has body: I created the second answer, to follow also the issue in this plunker, which @skip (OP) passed me as the example fo the issue. Firstly There is an updated working version of that plunker, which does what we need. There are the main changes: The original state def: .state('home', { url: '/', views: { '': { templateUrl: 'home.html' }, 'A@home': { templateUrl: 'a.html', controller: 'MainCtrl' }, 'B@home': { templateUrl: 'b.html', controller: 'MainCtrl' } } Was replaced with the RootCtrl defintion: .state('home', { url: '/', views: { '': { templateUrl: 'home.html', controller: 'RootCtrl' // here we do use parent scoping }, 'A@home': { templateUrl: 'a.html', controller: 'MainCtrl' }, 'B@home': { templateUrl: 'b.html', controller: 'MainCtrl' } } And this was one controller: app.controller('MainCtrl', function($scope) { var fruits = [{"name": "Apple"}, {"name": "Banana"}, {"name": "Carrot"}]; $scope.bar = $scope.bar || []; $scope.foo = 2; $scope.$watch('foo',function(value, oldValue){ $scope.bar = []; getBar(fruits, value); }); function getBar(fruits, howManyFruits) { for(var i=0; i &lt; $scope.foo; i++) { $scope.bar.push(fruits[i]); } } }); But now we do have two (Parent and child): app.controller('RootCtrl', function($scope) { $scope.bar = []; }) app.controller('MainCtrl', function($scope) { var fruits = [{"name": "Apple"}, {"name": "Banana"}, {"name": "Carrot"}]; //$scope.bar = $scope.bar || []; $scope.foo = 2; $scope.$watch('foo',function(value, oldValue){ $scope.bar.length = 0; getBar(fruits, value); }); function getBar(fruits, howManyFruits) { for(var i=0; i &lt; $scope.foo; i++) { $scope.bar.push(fruits[i]); } } }); Some important parts to mention I. The least common denominator We have to move the shared collection (array bar) into the parent. Why? we have to move the shared reference to the least common denominator - to the parent scope see How do I prevent reload on named view, when state changes? AngularJS UI-Router II. The Reference to array must be unchanged w…

http://stackoverflow.com/q/25456013
has answer: http://stackoverflow.com/a/48678766
possible better answer: http://stackoverflow.com/a/45683145
upvote count: 39
accepted answer: http://stackoverflow.com/a/25456134
has answer: http://stackoverflow.com/a/45683145
has answer: http://stackoverflow.com/a/77278013
has answer: http://stackoverflow.com/a/44724412
has answer: http://stackoverflow.com/a/71341917
has answer: http://stackoverflow.com/a/76957557
has answer: http://stackoverflow.com/a/58479021
type: Question
type: AnsweredQuestion
tagged with: recursion
tagged with: object
score: 39
has answer: http://stackoverflow.com/a/79331033
has title: Javascript - deepEqual Comparison
has answer: http://stackoverflow.com/a/56403071
has answer: http://stackoverflow.com/a/25456134
tagged with: javascript
tagged with: equality
tagged with: comparison
has answer: http://stackoverflow.com/a/69424269
has answer: http://stackoverflow.com/a/25456130
answer count: 14
has answer: http://stackoverflow.com/a/76560344
downvote count: 0
has body: Question (From Eloquent Javascript 2nd Edition, Chapter 4, Exercise 4): Write a function, deepEqual, that takes two values and returns true only if they are the same value or are objects with the same properties whose values are also equal when compared with a recursive call to deepEqual. Test Cases: var obj = {here: {is: "an"}, object: 2}; console.log(deepEqual(obj, obj)); // → true console.log(deepEqual(obj, {here: 1, object: 2})); // → false console.log(deepEqual(obj, {here: {is: "an"}, object: 2})); // → true My code: var deepEqual = function (x, y) { if ((typeof x == "object" &amp;&amp; x != null) &amp;&amp; (typeof y == "object" &amp;&amp; y != null)) { if (Object.keys(x).length != Object.keys(y).length) return false; for (var prop in x) { if (y.hasOwnProperty(prop)) return deepEqual(x[prop], y[prop]); /*This is most likely where my error is. The question states that all the values should be checked via recursion; however, with the current setup, only the first set of properties will be checked. It passes the test cases, but I would like to solve the problem correctly!*/ } } else if (x !== y) return false; else return true; } I think I have the general idea down; however, like I stated in the comment, the program will not check the second property in the objects. I feel like I have a structural/logic problem and am simply using recursion in the wrong way, as I originally intended to loop through the properties, use recursion to compare the values of the first property, then continue on in the loop to the next property and compare again. Although, I'm not sure if that's even possible? I've given a good amount of thought and tried a couple different approaches, but this was the most correct answer I've come to so far. Any possible tips to point me in the right direction?
favorite count: 0
has answer: http://stackoverflow.com/a/56234705

http://stackoverflow.com/q/25534606
accepted answer: http://stackoverflow.com/a/25535133
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39867035
has body: I have this design: HTML Welcome Page This one for all This not but why not ....100 of those here..... JQUERY $('#links').find('a.view').each(function(){ quickC = $(this).attr('href'); $.get(quickC, function(html){ var quantity = $(html).find('a.my_text').size(); $('.link_number').append(quantity); }); }); HTML Page #1 www.this.com/43534534534 this this this this this this this this this HTML Page #2 www.this.com/99540594544 this this this this this this ... RESULT FROM JQUERY Page #1 = found 3 links Page #2 = found 2 links ... DESIRED RESULT HTML Welcome Page **3**This one for all **2**This not but why not ....100 of those here..... THE PROBLEM/QUESTION: Everything works except I don't know why it pulls only first link and spread the same number to other link_number classes. Question, how to make this code work as I may have 100 of those links with specific href and return processed link number to the related a.view link on welcome page? Your input appreciated! Thank you.
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
type: AnsweredQuestion
has title: Jquery find multiple links href with same class and change name for each link depending on get page
upvote count: 2
has answer: http://stackoverflow.com/a/25536085
has answer: http://stackoverflow.com/a/25535133
type: Question
tagged with: href
has comment: http://stackoverflow.com/comment/39866914
possible better answer: http://stackoverflow.com/a/25536085
tagged with: javascript
answer count: 2

http://stackoverflow.com/comment/39699677
comment on: http://stackoverflow.com/q/25409435
score: 0
has text: event the jslint plugin I added does not do the job.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39681930
type: AnswerComment
comment on: http://stackoverflow.com/a/25434661
has text: @FelixKling - Maybe I can blame dementia ?
type: Comment
score: 0

http://stackoverflow.com/q/25409305
has comment: http://stackoverflow.com/comment/39634673
answer count: 1
accepted answer: http://stackoverflow.com/a/25411217
tagged with: checkbox
has comment: http://stackoverflow.com/comment/39634583
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has title: Checkbox with text inside
type: Question
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/25411217
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39634887
has body: I'm trying to create checkboxes with the text inside the box. Jquery UI appears to already have something similar to what I want - take a look at the "Toggle" button on this page: http://jqueryui.com/button/#checkbox The example code shown there doesn't seem to work for me though. Here are snippets of the code on my page. Toggle Upon inspection, Chrome is telling me that .button() is an undefined function. In turn the checkbox on the page is untouched and remains as a regular checkbox with the text "toggle" on the outside. Does someone know of another plugin for checkbox functionality and text inside the box? I also want to style the checkbox to be very large and probably change background colour in its checked state. Thanks for your time!
score: 0

http://stackoverflow.com/comment/39674495
has text: Neil Lunn, thank you sir. This worked. db.events.remove( { $where: function() { return (this.StartTime.getDay() == this.StartTime.getDay()) } } );
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25417507

http://stackoverflow.com/q/25462025
has body: I have a coffeescript file that overrides the rails confirmation pop-up and instead uses bootstrap modal to confirm the delete action. #delete.js.coffee ready = -&gt; $.rails.allowAction = (element) -&gt; message = element.data('confirm') return true unless message $link = element.clone() .removeAttr('class') .removeAttr('data-confirm') .addClass('btn').addClass('btn-danger') .html("Delete") modal_html = """ &lt;div class="modal fade"&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"&gt;#{message}&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;p&gt;Be certain, sony.&lt;/p&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;a data-dismiss="modal" class="btn"&gt;Cancel&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; """ $modal_html = $(modal_html) $modal_html.find('.modal-footer').append($link) $modal_html.modal() return false $(document).ready(ready) $(document).on('page:load', ready) The code above works properly unless it is called from a table when the modal pops up correctly but then quickly closes. The table has a clickable row functionality which links to the show view. #users.js.coffee ready = -&gt; $("tr[data-link]").click -&gt; window.location = @dataset.link return return $(document).ready ready $(document).on "page:load", ready Here is the body of the table where the clickable tr exist with the embed link to delete the user: #index.html.erb &lt;tbody&gt; &lt;% @users.each do |user| %&gt; &lt;tr data-link="&lt;%= user_path(user) %&gt;"&gt; &lt;td&gt;&lt;%= user.name %&gt;&lt;/td&gt; &lt;td&gt;&lt;%= user.email %&gt;&lt;/td&gt; &lt;td&gt;&lt;%= user_status(user) %&gt; &lt;% unless current_account.owner == user || user.invitation_accepted? %&gt; &lt;%= form_for(User.new, url:…
has answer: http://stackoverflow.com/a/25462472
type: Question
tagged with: twitter-bootstrap
score: 0
tagged with: coffeescript
tagged with: ruby-on-rails
answer count: 1
has title: Delete Confirmation Message Closes Prematurely in Rails App
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/39787995
type: AnswerComment
comment on: http://stackoverflow.com/a/25488404
type: Comment
has text: It works now, the problem was just stupid of me, I put it all in $(document).ready(function(){}); and now it works! Thank you for your help!
score: 1

http://stackoverflow.com/comment/39895996
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25549373
score: 0
has text: That's not what I meant by using `$templateCache`. I'm talking about this: https://www.npmjs.org/package/grunt-angular-templates _BUT_ the `template` parameter on directives accepts a function. Check this out: http://plnkr.co/edit/ilffq2JkaziAOX6wUGJf?p=preview It completely bypasses `templateUrl` and a single `$apply` is called. Inside it you can get the actual template from localStorage.

http://stackoverflow.com/comment/39649215
type: Comment
has text: the reason that iterating through your headings is better is because you are doing less selection and can keep references to your elements instead of constantly reselecting.
comment on: http://stackoverflow.com/a/25416916
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39631364
has text: @SerigiuParaschiv: Thank you. But If I exclude scope.$watch, the red dot is not printed out, BUT the blacks dot is printed out as expected. Why that? I can't understand why the black dots inside the loop is printed out, but not the red dot.
comment on: http://stackoverflow.com/a/25407631
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39835650
score: 0
type: AnswerComment
has text: having a script tag will make sure the script gets loaded as soon as div gets loaded - that is what the solution is and the ask was. Passing the div id is all that is required in the method he is invoking.
type: Comment
comment on: http://stackoverflow.com/a/25516954

http://stackoverflow.com/comment/39710595
type: AnswerComment
type: Comment
has text: Thanks, that worked partially. The thing is, i'm bulding a page with 3 different "slides", each one with a different video background. So now, only the first video is autoplaying. Do i have to change something on that afterRender callback to allow multiple videos?
comment on: http://stackoverflow.com/a/25447334
score: 0

http://stackoverflow.com/comment/39652441
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25418827
type: QuestionComment
has text: it is the list of DIVs number.

http://stackoverflow.com/comment/39778557
has text: The code you posted is not the source of the error. Get rid of the comment after that `5` but that won't fix the problem.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25486976
score: 3

http://stackoverflow.com/q/25474527
tagged with: virtual-machine
has title: Concurrent RDP Sessions Using Multiple VM Instances
tagged with: java
has body: I was wondering if anyone has any pointers/resources/examples/advice on whether the following scenario is feasible programmatically: Given one computer running Windows or Linux Launch multiple VM instances on top of it Support an active (sandboxed) RDP connection into each VM instance concurrently Have each VM support separate mouse/keyboard input streams so that the simultaneous RDP sessions don't conflict with each other Is there a way to do this, and have it automated/initiated via some library or language (preferably a C#/C++/Java/Javascript solution if possible)? Many thanks
type: Question
tagged with: remote-desktop
tagged with: .net
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25474570
type: UnansweredQuestion

http://stackoverflow.com/q/25481278
type: Question
has body: My DOM doesn't update when I Call the 'Click' function. It does update the datamodel. When I put an alert(); in the Click function then I can see the correct values. HTML: JavaScript: Click = function (categorie) { //alert(toggleContentBool(Categorie.visible)); Categorie.visible = toggleContentBool(Categorie.visible); } function toggleContentBool(switcher) { if (switcher) { return false; } else { return true; } } function TouchArea(jsonObject) { var self = this; self.productCategories = ko.observableArray(jsonObject.Categories); } function Product(text1, text2, text3, text4) { var self = this; self.text1 = text1; }; function Categorie(name ) { var self = this; self.name = ko.observable(name); self.visible = ko.observable(true); self.products = ko.observableArray([]); } function dataLoader() { this.jsonTouchArea = '{"Categories":[{"name":"11111","visible":true,"products":[{"text1":"text"},{"text1":"text"}]},{"name":"22222","visible":true,"products":[{"text1":"text"},{"text1":"text"}]}]}'; return JSON.parse(this.jsonTouchArea); } Also important: the Categories array gets loaded with a json object. and I suspect it will have to do something with this.
answer count: 1
has answer: http://stackoverflow.com/a/25481336
score: 0
tagged with: knockout.js
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25481336
type: AnsweredQuestion
has title: My DOM doesn't update, but my dataModel does

http://stackoverflow.com/comment/39685281
type: QuestionComment
has text: I've updated the question to include an excerpt from the function and a possible workaround
comment on: http://stackoverflow.com/q/25436056
score: 0
type: Comment

http://stackoverflow.com/comment/39678460
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25432830
has text: If you're asking the OP to contact you privately for more help, that sort of thing is not allowed on SO. Your posted answer should be fully self-contained so that it benefits everyone.
score: 1

http://stackoverflow.com/comment/39771479
type: QuestionComment
score: 0
has text: you have added the script after the end of `html` tag? move it above the ` `
comment on: http://stackoverflow.com/q/25483030
type: Comment

http://stackoverflow.com/a/25545410
has body: You could use a callback function that executes after the function that creates DIV is compleated. In callback function add the code that populates the DIV.
answers question: http://stackoverflow.com/q/25544548
score: 0
type: Answer

http://stackoverflow.com/q/25391100
has comment: http://stackoverflow.com/comment/39600617
has title: Properly using functions in a JS library
type: Question
tagged with: object
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25391200
score: 0
tagged with: function
answer count: 1
tagged with: scope
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25391200
has comment: http://stackoverflow.com/comment/39600931
type: AnsweredQuestion
has body: Right now I am attempting to build a JavaScript library, albeit, it is very juvenile and I'm sure that it can be reworked to perform better. However, I'm currently storing some of my more common functions that I routinely use (while rendering HTML5 Canvas animations) and I have aforementioned JavaScript functions stored within their own flat file named canvasLab.js. My current structure is this: var canvasLab = { setCanvas: function(elem) { if (elem == undefined) { return Modernizr.canvas; } return document.getElementById(elem); }, set2D: function(elem) { return elem.getContext('2d'); }, ... and everything works fine until I attempt to declare a function within another function: getColorGradient: function(freqR,freqG,freqB,phaseA,phaseB,phaseC,center,width,length) { if (center == undefined) center = 128; if (width == undefined) width = 127; if (length == undefined) length = 50; colorArray=[]; frequency = 0.3; amplitude = 127; center = 128; byte2Hex: function(n) { nybHexString = '0123456789ABCDEF'; return String( nybHexString.substr( ( n &gt;&gt; 4 ) &amp; 0x0F, 1 ) ) + nybHexString.substr(n &amp; 0x0F, 1); }, getRgb: function(r,g,b) { return '#' + byte2Hex(r) + byte2Hex(g) + byte2Hex(b); }, getGradientArray: function() { for (var i=0; i&lt;length; ++i) { red = Math.sin(freqR * i + phaseA) * width + center; green = Math.sin(freqG * i + phaseB) * width + center; blue = Math.sin(freqB * i + phaseC) * width + center; result = getRgb(red,green,blue); this.colorArray[i] = result; } } } when I receive an 'unexpected token (' error at line 45: byte2Hex: function(n) { I'm sort of new to making JavaScript libraries (or Lib Objects), and I am still unsure about the best method(s) and syntax to use while developing a library. My hugest concern is that it is light weight internally, on the client's machine and in the browser. In either case, I do not understand why I cannot create a new method (i.e.: byte2Hex()) and have it instantiated through the parent object. Any criticism w…

http://stackoverflow.com/comment/39670841
type: Comment
type: AnswerComment
has text: change your: to
comment on: http://stackoverflow.com/a/25428745
score: 0

http://stackoverflow.com/comment/39621619
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25401947
type: QuestionComment
has text: @BhushanKawadkar I posted my solution ..though I will dig into the directives for more concrete solution

http://stackoverflow.com/comment/39692050
has text: Is the button type is submit? And please paste the snippet line of your button
comment on: http://stackoverflow.com/a/25440366
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25438569
tagged with: javascript
has body: I'm trying to perform a simple regex replace in javascript to replace new lines \n with html breaks var strings = 'Hello world This is a test. Multi-line.'; stringt = strings.replace( '/(\r\n|\n|\r)/gm', '&lt;br /&gt;' ); alert(stringt); Testing the RegEx pattern on a couple of online testers has proven successful, I guess I'm just missing something real dumb?
score: 0
answer count: 1
tagged with: regex
has answer: http://stackoverflow.com/a/25438584
accepted answer: http://stackoverflow.com/a/25438584
type: AnsweredQuestion
has title: JS Regex .replace, what am I missing?
has comment: http://stackoverflow.com/comment/39688891
type: Question

http://stackoverflow.com/comment/39790099
score: 0
has text: @SizzlingCode, I posted an answer. Please respond to my answer if you have questions. Also, update/edit your OP to include the jQuery Validate code, since the only clue to that critical detail is buried in these comments.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25492545

http://stackoverflow.com/q/25446082
has title: Leaflet marker disable hover or show nothing on hover
has body: I am using Leaflet API to draw some markers on the map. My marker data is populated using HTML which displays fine when clicked on. The problem is when hovered on top of the marker it displays the html tags also. Either I want to disable the hover entirely OR show the data only on hover also excluding the Html tags OR show empty string on hover which ever is easier. My code (JS): for (var i = 0; i &lt; arr.length; i++) { var a = arr[i]; var title = a[2]; var marker = new L.Marker(new L.LatLng(a[0], a[1]), { title: title }); marker.bindPopup(title); layer.markers.addLayer(marker); } map.addLayer(layer.markers);
has comment: http://stackoverflow.com/comment/39706209
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39702061
tagged with: leaflet
has comment: http://stackoverflow.com/comment/39706260
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25448332
has comment: http://stackoverflow.com/comment/39705702
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
tagged with: marker
favorite count: 0
has answer: http://stackoverflow.com/a/25448332
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39646156
has text: `instance` is going to be assigned an empty object
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25415256
score: 0

http://stackoverflow.com/a/26770642
type: Answer
score: 2
downvote count: 0
has body: Unless you really need to test in javascript, you can try using Airborne.rb. Its similar to Frisby just without the asynchrony issues.
upvote count: 2
answers question: http://stackoverflow.com/q/25417350

http://stackoverflow.com/a/25430734
upvote count: 14
has body: In the string version, you need to escape the backslash. var testStr2 = eval("/^(19|20)\\d{2}$/").test(2013); In regular expression literals, escaping backslashes is unnecessary (unless you need a literal backslash), but in a string, \d simply becomes the character d without escaping. As a note of caution, eval should really be avoided at all costs. It's highly unlikely that you ever need it, and using it can always be dangerous without ample care to ensure that it can't be abused for malicious purposes. Furthermore, if your regex is malformed or some other error occurs, you won't get a helpful error message, it will likely just break in strange ways. If you can, use RegExp literals! They are convenient and reliable, and you don't have to do any unnecessary escaping: /^(19|20)\d{2}$/.test(2013); If you need the regex from a string, use the constructor instead of eval. It will do the same thing, but more safely. new RegExp("^(19|20)\\d{2}$").test(2013);
has comment: http://stackoverflow.com/comment/53813237
accepted answer of: http://stackoverflow.com/q/25430701
answers question: http://stackoverflow.com/q/25430701
type: AcceptedAnswer
downvote count: 0
score: 14
type: Answer

http://stackoverflow.com/comment/39875615
type: QuestionComment
has text: Please remove the google-chrome-app tag.
score: 0
comment on: http://stackoverflow.com/q/25539179
type: Comment

http://stackoverflow.com/a/25424692
answers question: http://stackoverflow.com/q/25424602
upvote count: 0
type: Answer
has body: Generally, in pseudo-code, I do : var nbr1 = random() var nbr2 = random() while (nbr1 == nbr2) { nbr2 = random(); } This way you'll get two different random numbers. With an additional condition you can make them different to another (3rd) number.
downvote count: 1
score: -1

http://stackoverflow.com/a/25542960
upvote count: 20
has body: I think you can just call drillUp() function on your chart like this: $('#drillUp').click(function() { if (chart.drilldownLevels.length &gt; 0) { chart.drillUp(); } }); You need to check that chart.drilldownLevels array contains elements before calling this function. See updated demo.
accepted answer of: http://stackoverflow.com/q/25542402
downvote count: 0
answers question: http://stackoverflow.com/q/25542402
score: 20
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/54813563
type: Answer
has comment: http://stackoverflow.com/comment/48964777

http://stackoverflow.com/comment/39729293
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25460123
has text: Don't you mean `top.length`?

http://stackoverflow.com/a/60676194
score: 1
type: Answer
answers question: http://stackoverflow.com/q/25430453
upvote count: 1
has body: I have this class @Configuration @EnableWebMvc @ComponentScan("noughtsandcrosses") public class DemoAppConfig implements WebMvcConfigurer { @Bean public ViewResolver viewResolver() { final InternalResourceViewResolver bean = new InternalResourceViewResolver(); bean.setViewClass(JstlView.class); bean.setPrefix("/WEB-INF/view/pages/"); bean.setSuffix(".jsp"); return bean; } public void addResourceHandlers(final ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**") .addResourceLocations("/resources/"); } } for this app structure: and import like this: &lt;link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/index.css"&gt;
downvote count: 0

http://stackoverflow.com/comment/78142279
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25520747
has text: @Sakthivel Please Select a answer so that others can have a point of call of where to start when looking at the question
score: 0

http://stackoverflow.com/comment/39697489
has text: I have routing added to this page as well I will edit the code to show the route. But How do I get it to load when the user enters the site
comment on: http://stackoverflow.com/q/25443420
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25542454
has comment: http://stackoverflow.com/comment/39882909
has comment: http://stackoverflow.com/comment/39883026
tagged with: javascript
has answer: http://stackoverflow.com/a/25604846
answer count: 1
downvote count: 0
tagged with: jsp
has comment: http://stackoverflow.com/comment/39883311
favorite count: 0
has title: Javascript 'onclick' not working in Google Chrome
has comment: http://stackoverflow.com/comment/39881237
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39883032
has body: I am using datatables to dynamically create a table and populate it with data. So far so good. Then I try to use onclick() to make certain td elements clickable so they redirect me to another page. The problem is: clicking on the td's does absolutely nothing in Chrome. It works fine in IE though. Here's the html code. <input type="hidden" name="currency_numberOfRows" id="currency_numberOfRows" value="<%=currency_numberOfRows %>"> <input type="hidden" name="currency_numberOfColumns" id="currency_numberOfColumns" value="<%=currency_numberOfColumns %>"> <%=header_data%> % of Total Total *Dynamically Added Heading* ***Clickable Cell*** *Dynamically Added Data* *Dynamically Added Data* The javascript code is and function setTDOnclickEvents(val){ var pageFrom = val; var colHeaders = []; var rowHeaders = []; var numberOfColumns = document.getElementById("currency_numberOfColumns").value; var numberOfRows = document.getElementById("currency_numberOfRows").value; var table=document.getElementById("currency_example"); for (var h=0; h <= numberOfColumns*2; h++) { //find every TR in a "clickableTDs" type table colHeaders[h]= (table.rows[0].cells[h].innerHTML); //alert(h) //alert(table.rows[0].cells[h].innerHTML) } for (var h=0; h < numberOfRows/2; h++) { //find every TR in a "clickableTDs" type table if(h==0) rowHeaders[h]= (table.rows[h].cells[0].innerHTML); else if(h==1){ rowHeaders[h]= (table.rows[numberOfRows/2].cells[0].innerHTML);} Uncaught TypeError: Cannot read property 'cells' of undefined in the above line else rowHeaders[h]= (table.rows[h-1].cells[0].innerHTML); } var allTRs = new Array(); //go through all elements if(document.forms[0].tab.value=="Currency"){ for (var h=0; h < document.all.length; h++) { //find every TR in a "clickableTDs" type table if (document.all[h].tagName == "TR" && document.all[h].parentElement.parentElement.tableType == "currency_clickableTDs") { allTRs.push(document.all[h]); } } } else if(document.forms[0].tab.value=="Service"){ for (var h=0…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39881733
accepted answer: http://stackoverflow.com/a/25604846
score: 1
upvote count: 1
tagged with: google-chrome
type: Question

http://stackoverflow.com/q/25431269
has comment: http://stackoverflow.com/comment/39676087
tagged with: updatepanel
has comment: http://stackoverflow.com/comment/39675595
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/39675530
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39675882
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39675639
downvote count: 0
has comment: http://stackoverflow.com/comment/39676425
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39675565
has answer: http://stackoverflow.com/a/25431901
accepted answer: http://stackoverflow.com/a/25431901
upvote count: 2
has body: I have a button (inside an UpdatePanel) which opens a popup form which allows me to enter some data then submitting does some function (Updates an UpdatePanel with the new data entered) and closes the pop-up: <asp:HyperLink ID="hlCreateMsg" runat="server" NavigateUrl="JavaScript:void(0);" CssClass="linkOff" ClientIDMode="Static">Create New</asp:HyperLink> x Add a New Message Client: <asp:DropDownList ID="ddlCliNewMsg" AutoPostBack="false" ClientIDMode="Static" runat="server" CssClass="chosen-select" ></asp:DropDownList> Site: <asp:DropDownList ID="ddlSitNewMsg" AutoPostBack="false" ClientIDMode="Static" runat="server" CssClass="chosen-select"></asp:DropDownList> Provider: <asp:DropDownList ID="ddlProNewMsg" AutoPostBack="false" ClientIDMode="Static" runat="server" CssClass="chosen-select"></asp:DropDownList> *Message: <asp:TextBox ID="tbMessage" ClientIDMode="Static" runat="server" TextMode="MultiLine" Columns="30" Rows="5"></asp:TextBox> Active? <asp:CheckBox ID="cbIsActive" ClientIDMode="Static" runat="server" /> <asp:UpdatePanel runat="server" ID="upSubmit" ClientIDMode="Static" UpdateMode="Conditional"> <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="btnExport" ClientIDMode="Static" UseSubmitBehavior="false" OnClick="SubmitAdminMessage" /> </asp:UpdatePanel> SCRIPT: //CONTROLLING EVENTS IN jQuery $(document).ready(function () { //LOADING POPUP //Click the button event! $("#hlCreateMsg").click(function (e) { e.preventDefault(); //centering with css centerPopup(); //load popup loadPopup(); }); $("#Create").click(function (e) { e.preventDefault(); //centering with css centerPopup(); //load popup loadPopup(); }); $("#btnSubmit").on('click', function (e) { alert('test'); e.preventDefault(); disablePopup(); }); //CLOSING POPUP //Click the x event! $("#popupContactClose").click(function () { disablePopup(); }); //Click out event! $("#backgroundPopup").click(function () { disablePopup(); }); //Press Escape event! $(document).keypress(function (e) { if …
answer count: 1
has title: Why a button inside an UpdatePanel doesn't execute a JQuery event after the first time
tagged with: jquery

http://stackoverflow.com/a/25436985
accepted answer of: http://stackoverflow.com/q/25436265
answers question: http://stackoverflow.com/q/25436265
type: AcceptedAnswer
score: 0
type: Answer
has body: Looks like the problem is that ParseInt is choking on the dollar sign. Then when you remove that, it only reads up to comma and animates to 16. Take them both out, and it works. value = $(this).text().replace(/[\,\$]/g,''); But, you'll need to include this option to get your comma back: var comma_separator_number_step = $.animateNumber.numberStepFactories.separator(',') $(this).animateNumber( { number: value, numberStep: comma_separator_number_step }, 1000 ) To get your dollar sign back, you could change your html to something like this: $16,309

http://stackoverflow.com/q/25398677
has answer: http://stackoverflow.com/a/25398722
type: Question
has answer: http://stackoverflow.com/a/25399018
possible better answer: http://stackoverflow.com/a/25398708
has comment: http://stackoverflow.com/comment/39614602
tagged with: arrays
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/25398720
has comment: http://stackoverflow.com/comment/39614950
score: 0
has comment: http://stackoverflow.com/comment/39614555
has answer: http://stackoverflow.com/a/25398715
has comment: http://stackoverflow.com/comment/39614583
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39614833
favorite count: 0
has title: Javascript Array and assign them to variable, but first value as undefined. why?
has answer: http://stackoverflow.com/a/25398732
accepted answer: http://stackoverflow.com/a/25398720
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25398708
has body: When making an unordered list from JS by using Array, first value is undefined. var list; //box for accumulating list tags var arr = ['menu1', 'menu2', 'menu3', 'menu4']; for(var i = 0; i < arr.length; i++) { list += ' ' + arr[i] + ' '; } document.getElementById('menu').innerHTML = list; result: undefined menu1 menu2 menu3 menu4 But assign null value at first, it will be fine. var list = ""; So I want to know what the difference is. If this question is redundant, I'll delete it soon. Thank you for stopping by.
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/39800246
type: QuestionComment
has text: Why do you care if the page timer is exactly synced with an actual minute? Isn't the timing all just relative to the viewing of the page itself? What need does it have to be synchronized to the second with outside agents (other users or servers)?
comment on: http://stackoverflow.com/q/25498059
score: 0
type: Comment

http://stackoverflow.com/q/25448016
tagged with: javascript
score: 0
answer count: 2
tagged with: angularjs
has body: I am making a series of "radio buttons" but are images (meaning only 1 can be chosen per grouping). My problem is that I am new to Angular and I cannot seem to find a way to keep track of the value and store that as my ng-model. On a side note, I also am trying to find a simple way to keep images at full opacity when selected, but when you change group selection it un-opacities everything. (click one in group one, then in group 2 will remove the opacity set on group 1's selection), is there a simply angular attribute that will allow me to keep items remain in focus when changing groups. Here is a JSFiddle Demo, it just has two groups but you can see the issue in regards to the value not updating, and the images loses opacity when the opposite group is selected. HTML (Angular code just has the variables s1, s2, ect..) &lt;div style="background:white"&gt; &lt;input value="2" class="pastElos" name="season1" type="image" src="{{images[0].source}}" title="Season1 Bronze" ng-model="s1" style="width:70px; height:75px" /&gt; &lt;input value="3" class="pastElos" name="season1" type="image" src="{{images[1].source}}" title="Season1 Silver" ng-model="s1" /&gt; &lt;input value="4" class="pastElos" name="season1" type="image" src="{{images[2].source}}" title="Season1 Gold" ng-model="s1" /&gt; &lt;input value="5" class="pastElos" name="season1" type="image" src="{{images[3].source}}" title="Season1 Platinum" ng-model="s1" /&gt; &lt;br /&gt; Current Season 1 Value:&lt;span style="color:black"&gt;{{s1}}&lt;/span&gt; &lt;hr /&gt; &lt;input value="6" class="pastElos" name="season2" type="image" src="{{images[0].source}}" title="Season2 Bronze" ng-model="s2" style="width:70px; height:75px" /&gt; &lt;input value="7" class="pastElos" name="season2" type="image" src="{{images[1].source}}" title="Season2 Silver" ng-model="s2" /&gt; &lt;input value="8" class="pastElos" name="season2" type="image" src="{{images[2].source}}" title="Season2 Gold" ng-model="s2" /&gt; &lt;input value="9" class=…
possible better answer: http://stackoverflow.com/a/25448188
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25448444
has answer: http://stackoverflow.com/a/25448188
tagged with: css
type: AnsweredQuestion
has title: Have model keep track of input's value attribute - AngularJS
type: Question
accepted answer: http://stackoverflow.com/a/25448444

text-alignment
tags question: http://stackoverflow.com/q/25532202
tag name: text-alignment
type: Tag

http://stackoverflow.com/a/25403190
downvote count: 0
has body: It would make more sense to store this item in an array: var items = ["a", "b", "c"]; for (var i=0;i&lt;3;i++) { Console.log(items[i]); } Alternatively you can use square bracket notation. Accessing Street1 will depend on where it lives, assuming you've not scoped anything the following will get you the value, depending on where street1 is defined: this['street' + i] window['street' + i]
type: Answer
has comment: http://stackoverflow.com/comment/39622628
score: 3
has comment: http://stackoverflow.com/comment/39622584
answers question: http://stackoverflow.com/q/25403120
has comment: http://stackoverflow.com/comment/39622630
upvote count: 3

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/25400812

http://stackoverflow.com/comment/39727751
type: QuestionComment
comment on: http://stackoverflow.com/q/25459246
score: 0
has text: yes include ui.css, ui.js
type: Comment

http://stackoverflow.com/q/25460988
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25461784
type: Question
tagged with: javascript
score: 0
has body: I'm just starting to learn ember. Currently still trying to learn route and url. Need to know the better way to do this because in my template in the index.html there is repetition of code in each of the handlebar templates to manage the menu. apps.js App = Ember.Application.create(); App.Router.map(function() { this.resource('home', { path: '/' }); this.resource('students'); this.resource('about'); }); index.html Thanks in advance for any help.
answer count: 1
has answer: http://stackoverflow.com/a/25461784
tagged with: ember.js
has title: Ember route and link structure

http://stackoverflow.com/a/25438543
has comment: http://stackoverflow.com/comment/39713504
answers question: http://stackoverflow.com/q/25438442
has comment: http://stackoverflow.com/comment/39717195
has comment: http://stackoverflow.com/comment/39689182
has comment: http://stackoverflow.com/comment/39714908
has comment: http://stackoverflow.com/comment/39689249
score: 0
has comment: http://stackoverflow.com/comment/39691158
type: Answer
has body: Remove the: $("form").submit(function(){ } The default type for a is submit, so whenever you click on it you are handling the click event and performing an ajax call and then the browser is submitting the form for you afterwards. If you look at the network trace on the browser debugging console you will see this. Set the type="button" to avoid this. Also return false from your .click() handler to stop the click from propagating as you handled it completely. The $("form") really isn't needed and is just causing yet another form submission. You definitely need to install your .click() handler inside a $(document).ready(...) construct.

http://stackoverflow.com/comment/39794402
score: 0
comment on: http://stackoverflow.com/q/25491641
type: Comment
has text: Great point, thank you. In the end I had to go a completely different route as the "no control over the table" thing presented other challenges once I got past this. But I understand this better now and thx for the help.
type: QuestionComment

http://stackoverflow.com/q/25435528
has title: JQuery find HTML item and replace
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25435629
accepted answer: http://stackoverflow.com/a/25435629
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25435692
has answer: http://stackoverflow.com/a/25435589
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39684531
has body: I have a kinda specific problem. I have got a Webpage where it is possible to choose the amount of results to be shown. I did this with some buttons and a span for the active / chosen amount. Now I need to implement the ajax request for this and therefore I need to find out which amount is currently chosen and after the client picked another amount I need to update the HTML part, so the HTML part is always highlighting the current Amount. My Question is: How can I get the current data ID and how can I replace only this HTML Line when the button is active. My HTML: Show orders 25 50 75 100 125 150 All My JQuery Guess to get the current Amount: var selectedAmount = $( ".pagination" ).find ( ".active" ).data( "id" ); My JQuery Event to replace the buttons with the element and the other way round: $('.pagination a').on('click', function(event){ event.preventDefault(); // Replace the old highlighted amountbutton with <a href> tag // And replace the old <a href> tag with the "highlighted" span button });
tagged with: css
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25435589
type: Question
has comment: http://stackoverflow.com/comment/39683603

http://stackoverflow.com/comment/39790560
has text: forget tricks, just use array.map(function(a){return a.slice(0);}); or the slow-but-sure JSON.parse(JSON.stringify(array));
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25492329

http://stackoverflow.com/a/25534605
type: Answer
has body: You can use a selector and check the number of elements found (length indicates this). $('input:checkbox').change(function() { var numberChecked = $('input:checkbox:checked').length; if (numberChecked &gt; 2) { // Fade your div out here } });
score: 8
downvote count: 0
answers question: http://stackoverflow.com/q/25534518
accepted answer of: http://stackoverflow.com/q/25534518
upvote count: 8
type: AcceptedAnswer

http://stackoverflow.com/comment/39607231
has text: What would happen to this snippet if I was to add a white space in a box I do not wish to enter data in?
comment on: http://stackoverflow.com/a/25394531
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41271128
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25524019
has text: possible duplicate of [How do I resend a failed ajax request?](http://stackoverflow.com/questions/8881614/how-do-i-resend-a-failed-ajax-request)

http://stackoverflow.com/a/25668037
type: AcceptedAnswer
downvote count: 0
score: 7
accepted answer of: http://stackoverflow.com/q/25468904
has comment: http://stackoverflow.com/comment/40274005
type: Answer
has comment: http://stackoverflow.com/comment/40309194
answers question: http://stackoverflow.com/q/25468904
has comment: http://stackoverflow.com/comment/40210705
has body: I would give every premission a value the following way premission 1 = 1 premission 2 = 2 premission 3 = 4 premission 4 = 8 The roles would have a value that is the sum of the premission they have so role 1 (premission 1,2,4) = 11 role 2 (premission 2,3) 6 Then take the highest premission value (8 in this case) and check with the checked roles. so 11-8 = 3 is not smaller then 0, so premission 4. Take half of the current premission value (4) with the result of last check (11-8) 3 - 4 = -1 is smaller then 0. NOT premission 3. Take half of current premission value (2), but keep the result of 3 3 - 2 = 1 is not smaller then 0, so premission 2. again the same 1 - 1 = 0 is not smaller then 0, so premission 1. $(".role").on("click", function(){ $(".perm").prop("checked", false); $(".role:checked").each(function() { var reduceBy = maxFromDatabase; var roleRight = $(this).data("rights"); while(reduceBy != 0) { if(!(roleRight - reduceBy &lt; 0)) { $("input[data-right-val='"+reduceBy+"']").prop("checked", true); roleRight = roleRight-reduceBy; } reduceBy = Math.floor(reduceBy/2); } }); }); You can check this fiddle for the html (I use data attributes) implementation http://jsfiddle.net/8dcp4Lvk/3/ I placed the values in a data attribute in html. I like this system because it is easy to maintain. You do not need an extra table in the database between the roles and premissions and adding a premission or removing one is as easy as adding or removing it's value from the role value. In the fiddle all you would have to do is add a new premission, with a value of 64, as 64 to the first role (71) and maxFromDatabase to 64 (this value you would normally get with a query offcourse, same with all the data values). Added benifit is that you can also use these values in your PHP code in the same way. You could extend this. Give roles a value like premission (1, 2, 4, etc) and you can use those for the user. Give him two columns (roles and premissions) in roles you give him the roles he has…
has comment: http://stackoverflow.com/comment/40273839
has comment: http://stackoverflow.com/comment/40294307
upvote count: 7
has comment: http://stackoverflow.com/comment/40133406

http://stackoverflow.com/a/46597519
answers question: http://stackoverflow.com/q/25422260
type: Answer
downvote count: 0
score: 1
has body: Using this is perfect: ko.validation.group(yourViewModel, { deep: true }).showAllMessages(false); However it must be done after calling applyBindings: ko.applyBindings(yourViewModel); Otherwise it doesn't work.
upvote count: 1

http://stackoverflow.com/a/33494094
has body: Hello There HERE is a working example of my answer: First is to point this is based on CSS3 resize, which is not fully supported in all browsers. HTML &lt;div class="resize_this"&gt; &lt;textarea class="no_dots"&gt;&lt;/textarea&gt; &lt;/div&gt; ENDS HTML CSS3 .no_dots{ resize: none; width: 100%; height: 100%; border:none; } .resize_this{ resize:both; overflow: hidden; border:2px solid black; border-radius: 5px; /*HERE PLACE DEFAULT SIZE FOR THE TEXTAREA*/ width: 50%; height: 250px; } ENDS CSS3 HOPE THIS HELPS T04435
downvote count: 0
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25441646

http://stackoverflow.com/comment/39801173
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25498852
has text: How would you call the function? onChange isn't the same as keyup and keydown. I want submitEquation called anytime any of the input boxes are changed

http://stackoverflow.com/q/25528474
type: Question
has answer: http://stackoverflow.com/a/25528867
has title: jquery not working in mobile environment: some links are not changing when I open in Android browser
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25528867
tagged with: android
answer count: 1
score: 0
has body: I am trying to open a site in Android, all the codes are working for desktop but some links are not changing when I open in Android browser. $( document ).ready(function() { $('a').each(function(i,link){ var reg = /(http:\/\/example.com\/)(.*)/ var newlink = link.href.replace(reg, 'http://m.example.com/$2') link.href = newlink; }); }); I am replacing all the links in a webpage. is there any different code need to implement for Android?
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/comment/130211351
has text: I definitely wrap all my logging functionality in an in house adapter or some logging library but I think the difference between `log` and `info` is an interesting idealogical question. I personally think `debug` is (naturally) for debugging, `log` is for extra context that may be verbose (contrary to Chrome's devtools logging levels filter) and `info` is for logging important context changes like a routing change in a SPA or sign-in/out changes. Honestly still an up-to-you / YMMV situation imo ‾\\_(ツ)_/‾
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25532778

http://stackoverflow.com/comment/39876139
type: QuestionComment
has text: If you eventually migrate to UA and start using GTM, there's a tutorial here (http://www.cardinalpath.com/youtube-video-tracking-with-gtm-and-ua-a-step-by-step-guide/) on how to track Youtube videos.
score: 0
comment on: http://stackoverflow.com/q/25536127
type: Comment

http://stackoverflow.com/comment/39686613
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25437012
has text: well i disagree with most of this, most API's i work with return usefull messages or codes; http status codes are for the status of the network connection not the API

http://stackoverflow.com/comment/39821177
score: 0
type: Comment
type: QuestionComment
has text: AJAX is your friend my dear
comment on: http://stackoverflow.com/q/25508924

http://stackoverflow.com/comment/39661259
type: Comment
comment on: http://stackoverflow.com/a/25416552
type: AnswerComment
has text: I get data, but the data is often duplicated.
score: 0

http://stackoverflow.com/comment/39800316
type: Comment
type: QuestionComment
has text: I'd say this is a duplicate of the famous http://stackoverflow.com/questions/3127429/javascript-this-keyword. Asking about `this` requires an understanding of `this`.
score: 0
comment on: http://stackoverflow.com/q/25498402

http://stackoverflow.com/q/25461897
has comment: http://stackoverflow.com/comment/39733339
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39732524
has body: This could be a stupid question. Jasmine, Qunit, Mocha, Unit.js, etc - as far I as I know are Javascript test frameworks. But what is a Javascript test framework? What it is for actually? Is it any different from these Javascript frameworks below? ember.js backbone require.js Jasmine, describe('Hello world', function() { it('says hello', function() { expect(helloWorld()).toEqual("Hello world!"); }); }); It seems like that is what node.js does, isn't? What do you need to test?
has comment: http://stackoverflow.com/comment/39732491
has comment: http://stackoverflow.com/comment/39732553
downvote count: 1
tagged with: unit-testing
type: Question
has comment: http://stackoverflow.com/comment/39732582
has comment: http://stackoverflow.com/comment/39733038
score: 2
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39733244
tagged with: jquery
tagged with: jasmine
favorite count: 0
has comment: http://stackoverflow.com/comment/39732419
has answer: http://stackoverflow.com/a/25461964
has title: What is a Javascript test framework?
has comment: http://stackoverflow.com/comment/39732461

http://stackoverflow.com/a/25509168
accepted answer of: http://stackoverflow.com/q/25508244
has body: One way to do this is as follows: // binding an anonymous function as the change-event handler: $('select').change(function () { // adjusting the 'color' property of the select element: $(this).css('color', function () { // caching the 'this' variable for efficiency (give repeated use): var self = this, // finding the options of the select element: opts = self.options; // getting the currently-selected option, and then checking if // it's the default-selected option (returns a Boolean); if it is // we set the colour to '#aaa', if not we set the colour to '#000': return opts[self.selectedIndex].defaultSelected ? '#aaa' : '#000'; }); // triggering the change-event so that this runs on page-load: }).change(); JS Fiddle demo. Reference: change(). css().
answers question: http://stackoverflow.com/q/25508244
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39821122
has comment: http://stackoverflow.com/comment/39821660
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39820582
comment on: http://stackoverflow.com/q/25508974
type: Comment
type: QuestionComment
has text: I think you should use *location+#rule* instead of *location+#zhuaguirule*, i.e. the id of the page (*data-role=page*), instead of the id ot the content (*data-role=content*).
score: 0

http://stackoverflow.com/q/25429778
has title: Highlight a Calendar date on a Text Date Hover
tagged with: datepicker
has comment: http://stackoverflow.com/comment/39675232
answer count: 0
score: 0
type: UnansweredQuestion
tagged with: date
type: Question
has body: I was wondering if it would be possible to show a date selected for example on a jquery date picker if a user hovers over a texted based date. I have a list of dates in spans 8-21-2014 9-1-2014 10-2-2014 The goal would be the datepicker (or any other method of showing a calendar ie:keithwood ) would be off to the side and would highlight / change month when the span is hovered giving the user a visual idea of where that date lands in the month. Note: I already have a calendar page, the list based view just gets more views.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39673831
tagged with: jquery

http://stackoverflow.com/q/25433598
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39679598
downvote count: 1
has comment: http://stackoverflow.com/comment/39679688
has answer: http://stackoverflow.com/a/25434431
accepted answer: http://stackoverflow.com/a/25434431
favorite count: 0
has comment: http://stackoverflow.com/comment/39680197
upvote count: 0
tagged with: angularjs
has title: Regex to allow everything except to start with a whitespace
has body: I have a text input which should allow everything(Alpha, numeric, special characters) except starting with a whitespace. Any help is much appreciated.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25433620
has comment: http://stackoverflow.com/comment/39679798
type: Question
possible better answer: http://stackoverflow.com/a/25433620
answer count: 2

http://stackoverflow.com/comment/39896474
comment on: http://stackoverflow.com/a/25535822
type: AnswerComment
has text: If you intend for this function to be used for multiple "boxes", consider a percentage based "good enough" evaluation (as opposed to a defined number of pixels).
score: 0
type: Comment

http://stackoverflow.com/q/25489060
duplicate of: http://stackoverflow.com/q/23667086
type: Question
tagged with: anonymous-function
has body: I have this: $(document).ready(function(){ pubnub.subscribe ({ connect: function(m){ var channelLatestMessages = []; pubnub.history({ channel: broadcastChannel, count: 1, callback: function (m) { if(m[0].length &gt; 0) { $.each(m[0], function(index, value){ channelLatestMessages.push(value); }); } //THE NUMBER OF MESSAGE OBJECTS RETURNED IS 2 //HERE THE OUTPUT IS 2 console.info(channelLatestMessages.length); }, }); //THE NUMBER OF MESSAGE OBJECTS RETURNED IS 2 //HERE THE OUTPUT IS 0 console.info(channelLatestMessages); } }); }); If I declare: channelLatestMessages = []; without the var keyword and after page load issue I in Firebug console: console.info(channelLatestMessages.length); the number is 2. But I get channelLatestMessages.length value of 0 in the code again. How is this possible???
tagged with: javascript
tagged with: variables
has answer: http://stackoverflow.com/a/25489136
tagged with: scope
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39782872
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23667086
has title: Javascript variable scope in callbacks as closures

http://stackoverflow.com/comment/108163728
comment on: http://stackoverflow.com/a/25507961
score: 0
type: AnswerComment
type: Comment
has text: So quick hack would be `while($("font").length) $("font").replaceWith(...)` or `$($("font").get().reverse()).replaceWith(...)` or instead of tag.html() append the children. The original code did not have nested tags, hence the orginal answer.

http://stackoverflow.com/comment/39839537
score: 0
type: AnswerComment
type: Comment
has text: It was supposed to be `return new this.constructor`, not `return this.constructor`. I updated the answer.
comment on: http://stackoverflow.com/a/25516857

http://stackoverflow.com/q/25530736
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25531037
linked to: http://stackoverflow.com/q/1056728
type: Question
duplicate of: http://stackoverflow.com/q/1056728
has answer: http://stackoverflow.com/a/25531439
tagged with: jquery-plugins
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25531439
has comment: http://stackoverflow.com/comment/39859813
tagged with: javascript
has answer: http://stackoverflow.com/a/25531037
tagged with: jquery
has title: How to format date like "July 14, 2014" in javascript/jQuery?
tagged with: datepicker
has body: I'm getting date value from jQuery BeatPicker like "14/07/2014", I need to format this value as "July 14, 2014". Is there any easy way to achieve this using javascript/jQuery/plugin? Thanks

http://stackoverflow.com/comment/39785444
score: 0
comment on: http://stackoverflow.com/a/25488050
type: AnswerComment
type: Comment
has text: @PSL: Sounds great your idea, now I only have to realize it :-)

http://stackoverflow.com/comment/39603151
type: Comment
type: QuestionComment
has text: OK, I use VBS for most of my classic asp, I'm not completely familiar with JS equivalents, but I think you should be using Server.CreateObject rather than new ActiveXObject - see this link http://www.4guysfromrolla.com/webtech/051999-3.shtml
score: 0
comment on: http://stackoverflow.com/q/25391877

http://stackoverflow.com/q/25391249
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25394029
has title: Smooth Scroll Implementation Using Image Mapped Navigation Bar
type: Question
has comment: http://stackoverflow.com/comment/39606201
tagged with: javascript
has comment: http://stackoverflow.com/comment/39605954
has comment: http://stackoverflow.com/comment/39605633
tagged with: smooth-scrolling
has body: I'm currently trying to use smooth scrolling on a site, but with a fixed navigation bar that has been image mapped. Unfortunately, this appears to make using anchors impossible. I'm also using sections, which look like they cannot be named as anchors. Additionally, whenever I have tried implementing any jquery version of smooth scroll I can find, it does not work. Can anyone explain how to format the code into HTML5? The script I have been using:
has comment: http://stackoverflow.com/comment/39605815

http://stackoverflow.com/comment/39699717
has text: It is working fine in my app too. Thanks buddy for your sincere help. Carry on helping :)
type: AnswerComment
comment on: http://stackoverflow.com/a/25404785
score: 0
type: Comment

http://stackoverflow.com/comment/39723299
comment on: http://stackoverflow.com/q/25413419
score: 0
type: Comment
has text: Any luck with any of these answers? :)
type: QuestionComment

http://stackoverflow.com/comment/39717444
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25453925
type: AnswerComment
has text: Yes, @Pointy, I disagree.

http://stackoverflow.com/a/25524484
has comment: http://stackoverflow.com/comment/39857559
has body: Since the replace method is part of the string object prototype. It would seem that the result of your var wktxt may not always equal a string. To test this you can use the typof statement. Something like if (typeof wktxt === 'string') { wktxt = wktxt.replace("(" + rowno, "(" + rowcnt) inputs[i].setAttribute( "ondblClick", wktxt ); inputs[i].style.backgroundImage = "url()"; } else { //write some code here to put whatever you want in wktxt should it fail to evaluate to // a string }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25524042

http://stackoverflow.com/q/25434888
has answer: http://stackoverflow.com/a/25438329
has answer: http://stackoverflow.com/a/25435063
has answer: http://stackoverflow.com/a/25434943
tagged with: newline
tagged with: javascript
linked to: http://stackoverflow.com/q/12719859
has comment: http://stackoverflow.com/comment/39682267
has comment: http://stackoverflow.com/comment/39682318
upvote count: 2
answer count: 3
tagged with: jquery
favorite count: 0
has title: jQuery unexpected token illegal for \n
tagged with: php
has body: Any time I use \n anywhere in javascript/jQuery the browser throws uncaught syntaxerror: unexpected token illegal I found ways to work around adding new lines without using \n, but I can't find a work around to read the \n from a textarea without using \n. I am using a mac pro mavericks with the chrome browser version 36. The code is output from a php script from a linux server. I have also tried in firefox and get an equivilent error. Examples include: var line = $('#textareaid').val().split("\n"); var line = $('#textareaid').val().split("\r\n"); var some = "This is\nsome text"; All of the examples have the error as well as any other use of \n. I have been unable to find any reference to \n not working, but plenty of examples of its use.
has comment: http://stackoverflow.com/comment/39682360
type: AnsweredQuestion
score: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/25434943
has comment: http://stackoverflow.com/comment/39682326
has comment: http://stackoverflow.com/comment/39682155
possible better answer: http://stackoverflow.com/a/25435063
type: Question

http://stackoverflow.com/q/25489706
tagged with: image
type: Question
possible better answer: http://stackoverflow.com/a/25490551
has body: http://honghanhdinh.com/ I am currently developing my website and I am running into some troubles with some of the parallax tutorials I am learning. As you can see, the plane and the words to my name "Hong" appears on on the opening page but the other 2 parts of my name "Hanh Dinh" only appears when beginning to scroll down. In addition, the plane also disappears upon scrolling and flys out from the right to the left. I don't want the plane to appear upon entering the website but for it to naturally slide out to the left when scrolling down. I also want my full name "Hong Hanh Dinh" to appear upon entering the website--not just the Hong part. I've tried many things to fix it but I think I'm missing something. Here is the beginning of HTML code: <!--Begin about info--!> <MAIN> Hong Hanh Dinh Here is my CSS: #bg { background-color: #FFFFFF; background-size } #parallax2 { height: 800px; margin-bottom: 600px; overflow: hidden; padding-top: 200px; } /* Parallax Scrolling text */ #center.parallax2 { font-size: 175px; color: #CC3333; opacity: 0.5; text-align: center; left: 200px; padding: 0; position: relative; bottom: 100px; } #left.parallax2 { color: #336699; font-size: 200px; text-align: left; left: 400px; opacity: 0.75; overflow: hidden; position: relative; } #right.parallax2 { color: #C5C3DE; font-size: 250px; text-align: right; opacity: 0.5; overflow: hidden; position: relative; width: 1200px; bottom: -300px; } This is the jQuery for the "Hong Hanh Dinh" scrolling: $(document).ready(function() { var controller = $.superscrollorama(); controller.addTween( '#parallax2', (new TimelineLite()).append([ TweenMax.fromTo($('#left.parallax2'), 1, { css: { top: 200 }, immediateRender: true }, { css: { top: -900 } }), TweenMax.fromTo($('#right.parallax2'), 1, { css: { top: 500 }, immediateRender: true }, { css: { top: -1800 } }) ]), 1000 // scroll duration of tween ); }); This is the jQuery for the flying plane: $(document).ready(function() { $(window).scroll(function() { conso…
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25490331
has title: jQuery - Text and Image scrolling effects are not working
tagged with: jquery
has answer: http://stackoverflow.com/a/25490551
tagged with: text
tagged with: scroll
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25490331
tagged with: javascript

http://stackoverflow.com/q/25403120
tagged with: loops
type: Question
has comment: http://stackoverflow.com/comment/39622624
has comment: http://stackoverflow.com/comment/39623330
tagged with: javascript
has body: I got ten javascript variables named street1, street2, street3 ... street10. I have to do a loop by putting into these variables. so I did: var data; for (var i=1;i&lt;=10;i++) { data = data + 'this is street '+street+i+'\n'; } console log prints "street" does not exist...which is right because my variable is named street1. there's a way I can "mix" variables and index?
has answer: http://stackoverflow.com/a/25403190
has answer: http://stackoverflow.com/a/25403210
tagged with: for-loop
has answer: http://stackoverflow.com/a/25403301
has comment: http://stackoverflow.com/comment/39623305
possible better answer: http://stackoverflow.com/a/25403190
has title: how to mix variables and loop indexes in javascript?
has comment: http://stackoverflow.com/comment/39624453
answer count: 4
has comment: http://stackoverflow.com/comment/39623012
has comment: http://stackoverflow.com/comment/39622407
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25403230
accepted answer: http://stackoverflow.com/a/25403301
score: 0

http://stackoverflow.com/comment/39748837
has text: Any reason to do it client only?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25470522

http://stackoverflow.com/comment/39634954
score: 0
has text: That means `cookie_value` is `null`. You must include the code here, otherwise if your site goes down, the question won't help future visitors. And please use a better title, currently it's too generic.
type: Comment
comment on: http://stackoverflow.com/q/25409470
type: QuestionComment

http://stackoverflow.com/comment/39825245
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25511678
has text: Yeah, at first the phrase should fade in and then second time when you click it then should fade in other phrase.

http://stackoverflow.com/comment/39833392
score: 0
type: Comment
has text: This sounds like it is probably the issue, because I do have a handful event binding to DOM elements in one of the views.
type: AnswerComment
comment on: http://stackoverflow.com/a/25515813

http://stackoverflow.com/comment/39631092
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25407347
has text: i try: data: JSON.stringify({cat:testarr}) doesn't get result..

http://stackoverflow.com/q/25458928
score: 1
accepted answer: http://stackoverflow.com/a/25494386
type: Question
tagged with: javascript
has body: I'm having some trouble with the code below: CardList.preload = function() { game.load.text('card_list', '/data/card_list.json'); var card_list = JSON.parse(game.cache.getText("card_list")); // :ISSUE: This code never fires because card_list isn't populated until preload is complete... for(var i in card_list) { game.load.image('hero_card_' + i, 'images/hero_card_' + i + '.jpg'); game.load.image('hero_tile_' + i, 'images/hero_tile_' + i + '.jpg'); } } Basically, I'm trying to load a list of the cards the player owns (from a JSON file), and then pre-load the images. The problem is, game.load.text() doesn't fire immediately and there's no support for a callback. Is there a different approach to solve this problem?
has title: phaser.io pre-loading data and then pre-loading images
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25494386
upvote count: 1
tagged with: phaser-framework
type: AnsweredQuestion

http://stackoverflow.com/comment/39690590
has text: Take a look at the videoJS docs: https://github.com/videojs/video.js/blob/master/docs/guides/setup.md. Under Step 2: "The 'id' Attribute: Should be used and unique for every video on the same page."
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25439368

http://stackoverflow.com/comment/39624870
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25403781
has text: Do. Not. Reinvent. The. Wheel. There are always people at least as smart as you who have already had the same problem https://github.com/benjamine/jsondiffpatch
score: 0

http://stackoverflow.com/q/25413994
type: Question
linked to: http://stackoverflow.com/q/8457082
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25414048
answer count: 1
tagged with: jquery
has title: Get div at different z-index but same position
has comment: http://stackoverflow.com/comment/39643782
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39643808
has body: I have a Div which is positioned via javascript. $("#'+customer.Id+'").css({ left: customerOffset, width: customerWidth- endDayOffset, height: document.getElementById("Planning").rows[0].clientHeight, display: "normal", position: "absolute" }); $("#'+customer.Id+'").offset({ top: bottomTop }) This div is placed on a table cell with a certain Id. This Id I want to obtain. How is this possible?

http://stackoverflow.com/comment/52711416
type: AnswerComment
has text: Actually the OP was asking to block *all* global variables, and using window as an example. (If anyone knows how to do this, I want to know...)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25425082

http://stackoverflow.com/q/25510471
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25510635
has comment: http://stackoverflow.com/comment/39823918
tagged with: http://stackoverflow.com/tag/html
has body: I am very into creating a canvas game, but im not sure if its worth the effort, and this is why... Flash has Adobe Flash which is an interface for creating very complex animations, games and apps. So im sure that a program is soon to come where, making games and animation will not require anny coding skills, it will al be done via a graphical user interface, pushing buttons and such. So i am afraid i will put all this time into something that evantually will not be even necesary to achive the same goal. What do you people think?
has comment: http://stackoverflow.com/comment/39823062
favorite count: 0
has answer: http://stackoverflow.com/a/25510643
upvote count: 2
downvote count: 2
tagged with: gamecanvas
possible better answer: http://stackoverflow.com/a/25510643
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39823944
has answer: http://stackoverflow.com/a/25510635
has title: Canvas games - is it worth learning?
type: Question
answer count: 2
tagged with: canvas
tagged with: flash

http://stackoverflow.com/comment/39775999
comment on: http://stackoverflow.com/a/25460048
type: Comment
has text: Yes, this is required by highcharts. its not working when I am returning this through code but when I pasting this logging statement as a data element its working....
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39710760
type: Comment
score: 0
type: AnswerComment
has text: Also, to address your earlier comment, caching promises is definitely not desirable in this case, because the server might reply with "503 Retry-After 5000" for the first request, and return a 200 on a subsequent request. If the promises are cached, once the first promise resolves with the 503 error, all future requests will just return that same error instead of making a fresh request like I want. That's part of the reason why I'm managing caching myself in this example, not using generic request caching. That's why it's important that this enhancement's code take place before `resolve`.
comment on: http://stackoverflow.com/a/25434141

http://stackoverflow.com/a/25514287
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25513222
answers question: http://stackoverflow.com/q/25513222
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39831881
has body: Using $timeout gives Angular time to evaluate the expression and your directive should work just fine. Working example app.directive('varianceValue', function ($timeout) { return { restrict: 'A', link: function (scope, el, attr) { $timeout(function(){ $(el).toggleClass("text-red", ($(el).text().indexOf('-') > -1)); },0); }, } }); HTML
has comment: http://stackoverflow.com/comment/39830728

http://stackoverflow.com/q/25470401
downvote count: 0
tagged with: jquery-mobile
has title: Select dropdown option by value using jQuery
tagged with: javascript
answer count: 6
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/25470416
has answer: http://stackoverflow.com/a/58284422
favorite count: 0
has answer: http://stackoverflow.com/a/27481166
has comment: http://stackoverflow.com/comment/39748473
accepted answer: http://stackoverflow.com/a/25470416
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39748286
has answer: http://stackoverflow.com/a/53220477
type: Question
possible better answer: http://stackoverflow.com/a/25470429
upvote count: 4
has answer: http://stackoverflow.com/a/25470429
has answer: http://stackoverflow.com/a/25470651
has body: I have select following html structure 1 2 3 4 5 6 on page load I want initially set option with value 5 so I tried (but nothing changed) $(document).ready(function () { $('#mainMenu option').eq(5).prop('selected', true); }) I'm using jQuery 1.8.3 and jQuery mobile since this is mobile website UPDATE: I just realize that every code from posted answers works (as well as mine), #mainMenu option value is set to desired value (5) but it's text doesn't change (in any of this scenarios). Is this normal and is there workaround for this. I tried $("mainMenu").text("5");

http://stackoverflow.com/a/25415550
type: Answer
answers question: http://stackoverflow.com/q/25415146
score: 0
has body: The answer is no. However, you can get a free account with jotform.com and use that. It works GREAT. Hopefully this can help.

http://stackoverflow.com/q/25455399
has answer: http://stackoverflow.com/a/25461114
possible better answer: http://stackoverflow.com/a/25455706
score: 0
answer count: 2
tagged with: ruby-on-rails
accepted answer: http://stackoverflow.com/a/25461114
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: Question
has title: Rails Getting event trigger from remote:true
has answer: http://stackoverflow.com/a/25455706
tagged with: ruby
has body: I have a link_to with remote:true on a button in one of my views in Rails. I would like to change the properties of that button [lets just say turn it blue] after the AJAX is called and processes my .js.erb file that it is pointed towards, but I can't figure out how to get that object passed to my .js.erb. If I were not using remote:true, but using raw/home-made AJAX, what I would want is this or $(this), but I can't figure out how to pass this to my .js.erb file Example code (simplified): index.html link_to("Load This One", show_path(1), {:remote true}) show.js.erb //Load some modal $("#myModal .modalcontent).html("&lt;%=.......&gt;"); $("#myModal").modal(); // ****** change properties on button that loaded that modal $( this).css('color', 'blue'); I want to know how can I get that link_to anchor in my show.js.erb. Is that possible? Thanks!

dropbox-api
tags question: http://stackoverflow.com/q/25477876
tag name: dropbox-api
type: Tag
tags question: http://stackoverflow.com/q/25450929

jaydata
tag name: jaydata
type: Tag
tags question: http://stackoverflow.com/q/25405565

http://stackoverflow.com/comment/39671281
has text: it fixed that the element is hidden after left the ScrollDiv - now im working on fixing the thing with the block-post DIV
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25429144

http://stackoverflow.com/a/25494913
answers question: http://stackoverflow.com/q/25494853
has body: You should use a single submit handler: $(".main-form").submit() { if (...) { return true; } else { return false; } } where ... contains your validation checks. The actual code might be somewhat more complex, e.g. if (field1 is invalid) { return false; } else if (field2 is invalid) { return false; } ... } else { return true; }
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39794117
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/39794103

http://stackoverflow.com/a/25391533
type: Answer
has comment: http://stackoverflow.com/comment/39604502
has comment: http://stackoverflow.com/comment/39601408
has body: Its alert('' + $('.delete_co').data('comment-id')); not alert('' + $('.delete_co').data['comment-id']); The problem is the []
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/25391508
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25391508

http://stackoverflow.com/comment/39870533
comment on: http://stackoverflow.com/a/25515848
type: AnswerComment
has text: I have *JavaScript the Good Parts* and will look for something along the lines of "In JS the usual "code unit" (code+data) is a closure, not an object" because this is very, very important and I seem to have missed out on this...
score: 0
type: Comment

http://stackoverflow.com/comment/39738719
type: QuestionComment
comment on: http://stackoverflow.com/q/25465076
score: 0
has text: Whisher if u want to throw an answer up id be happy to +1 you! Thanks again! Ive got to run but will +1 when u when I get back
type: Comment

http://stackoverflow.com/comment/39680201
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25433653
has text: What's the question?

http://stackoverflow.com/q/25480918
type: UnansweredQuestion
has body: I am using the leaflet bing maps plugin. How can I validate the bing maps api key before it's used by leaflet? If I allow an invalid key to be used like this: var bing_key = "funTimeWithBingMaps" baseMapUrl = new L.BingLayer(bing_key) Then bing maps reports: "Leaflet Bing Plugin Error - Got metadata: Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation." And then map.removeLayer(baseMapUrl); fails to remove the layer.
tagged with: leaflet
tagged with: bing-api
type: Question
tagged with: javascript
tagged with: bing-maps
has answer: http://stackoverflow.com/a/25487502
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25493649
has title: how to validate bing maps api key?

http://stackoverflow.com/comment/39832332
has text: I can reproduce consistently and I don't have any error messages (using Chrome)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25515304

http://stackoverflow.com/comment/39812201
comment on: http://stackoverflow.com/a/25504448
type: Comment
has text: Thanks a bunch. If you have a follow up question, you can add it here.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25489599
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39783967
tagged with: google-closure-library
favorite count: 0
has body: Dear Javascript programmers, Google's Closure Library is always good for driving people crazy. I hope you can help me on this issue: I want to catch the ondevicemotion-Event by javascript within a function within the Closure lib. Without Closure everything works fine with the following code which I grabbed from this page (thanks to the author): http://www.peterfriese.de/how-to-use-the-gyroscope-of-your-iphone-in-a-mobile-web-app/ The following snippet shows "my" code: if (window.DeviceMotionEvent != undefined) { console.log("DME"); window.ondevicemotion = function(e) { console.log("ODM"); // handle events like e.rotationRate ... } } This works perfectly in a standalone html page. Both console.logs are triggered. In contrast, Closure seems to have a problem with window.ondevicemotion = function(e) { because the console logs "DME" but not "ODM". There are no compiler warnings or errors. Has anybody recognized such a problem, too? I sadly have no idea why Closure acts so stupid (more probably I am so stupid). ;-) Thanks for reading! Any help appreciated!
has title: Closure Library ondevicemotion never fired
tagged with: google-closure
upvote count: 1
has comment: http://stackoverflow.com/comment/39820857
type: AnsweredQuestion
tagged with: motionevent
score: 1
has answer: http://stackoverflow.com/a/25496095
type: Question
accepted answer: http://stackoverflow.com/a/25496095
has comment: http://stackoverflow.com/comment/39811345

http://stackoverflow.com/a/25461414
has comment: http://stackoverflow.com/comment/39736778
type: Answer
has comment: http://stackoverflow.com/comment/39735952
answers question: http://stackoverflow.com/q/25461277
has body: Try using json_encode, it should escape most of the characters that would make it break &lt;?php ob_start(); the_content(); $data = ob_get_contents(); ob_end_clean(); ?&gt; window.the_content = &lt;?php echo json_encode($data); ?&gt;; You could also just strip out the new lines window.the_content = "&lt;?php str_replace("\n","",the_content()); ?&gt;"; Note that you would have to do other stuff to make sure it doesnt break, for instance escape double quotes etc.
accepted answer of: http://stackoverflow.com/q/25461277
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25437353
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/680785
has title: javascript to open a tab on same page using a # link
type: Question
has comment: http://stackoverflow.com/comment/39687682
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25437843
answer count: 1
accepted answer: http://stackoverflow.com/a/25437843
has body: I have a javascript function already working that works so that when the user clicks a reviews link shown in a list of products it opens the products page and goes straight to the tabs section of the page, with reviews being the open tab. The product listing page would have a url such as www.mysite/thisproduct#reviews The product page reviews section starts with &lt;li id="reviews"&gt; The javascript i have is $(window).load(function() { if(window.location.hash &amp;&amp; $(window.location.hash).length &gt; 0) { selected_tab = $(window.location.hash); selected_tab_num = selected_tab.attr('class'); selected_tab_link = $('a', selected_tab)[0]; expandcontent(selected_tab_num, selected_tab_link); } page_links = $('.review_page_links a'); if (page_links.length &gt; 0) { var load_more_reviews = false; page_links.live('click', function(e){ e.preventDefault(); if (load_more_reviews) return false; review_page_url = $(this).attr('href'); $('.reviews_content &gt; div').css({'opacity':'0.5'}); $.ajax({ type: 'GET', url: review_page_url, cache: false, success: function(data){ new_reviews = $('.reviews_content &gt; div', data).hide(); $('.reviews_content &gt; div').fadeOut(100).remove(); $('.reviews_content').append(new_reviews); $('.reviews_content &gt; div').fadeIn(100); }, complete: function(){ load_more_reviews = false; } }); load_more_reviews = true; }); } }); I'm trying to get this same code to work on a same page situation where the url click #review and reviews tab are on the same page. I'm not at all good with javascript but i'm assuming that the problem is because the code was originally written for loading a new page whereas now it's a same page event. I tried changing .load to .onclick as i thought maybe that would change how it was triggered but it didn't make any difference. I'm looking for suggestions on how i can make this function work on a same page event rather than a new page load.

http://stackoverflow.com/a/25446040
type: Answer
downvote count: 0
score: 1
has body: you can use window.location.protocol: $(window).click(function(evt){ if (window.location.protocol != "https:"){ alert("clicked but not https"); } else{ alert("clicked and yes https"); } }); jsfiddle here: http://jsfiddle.net/fn4Lk263/
upvote count: 1
answers question: http://stackoverflow.com/q/25445857

http://stackoverflow.com/a/25425003
downvote count: 0
type: Answer
has body: I can't declare a local variable in a function call If you are trying to access same variable from two calls to same function, you will have to declare the variable in an outer scope E.g. function foo() { var i = 0; function bar() { i++; } bar(); alert(i);//1 bar(); alert(i);//2 }
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25424835

http://stackoverflow.com/comment/39718271
score: 0
has text: That still means I'll need to add that as a dependency for almost every controller I have, right? A provider would be no different in that case compared to the service that I currently inject. Please let me know if I'm missing something about providers and configuration, because I'm not too familiar with that.
type: Comment
comment on: http://stackoverflow.com/q/25453331
type: QuestionComment

http://stackoverflow.com/comment/39747924
has text: Why close, please elaborate or bug off
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25470198

http://stackoverflow.com/comment/39863595
has text: if you want to post multiple forms, it can only be AJAX. So you can have a button and then use javascript to post all the forms with AJAX.
score: 0
comment on: http://stackoverflow.com/q/25532565
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39891672
has text: From my understanding, it seems your way of doing this differs from the solution given by @Benjamin in that there is less functions like 'bookInclude()' to write?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25547816

http://stackoverflow.com/a/39623844
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25405543
has body: This worked for me, thanks o/ //form.blade.php State Select state.uf //employeeController.js angular.module("app").controller('EmployeeController', function($scope, $q, utilsFactory){ var that = this; //service that contains a $http request utilsFactory.getAll('states').then(function(response) { that.states = response.data; console.log(that.states); //should be available to child.states }); } )

http://stackoverflow.com/comment/39764188
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25478937
has text: Edited, because it is just a small script from one file. It is executed when document is ready.

http://stackoverflow.com/comment/39715161
comment on: http://stackoverflow.com/a/25452577
type: AnswerComment
score: 0
type: Comment
has text: @Regent - simplest yes, fastest no. `.each()` is horrifically slow compared to a standard `for` loop. also, the reinstantiation of `$(this)` within each rather than leveraging the cached slides would slow things down further.

http://stackoverflow.com/q/25497133
has answer: http://stackoverflow.com/a/25497353
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: d3.js
type: UnansweredQuestion
has title: javascript d3 visualization doesn't load/appear until clicking HTML input
has answer: http://stackoverflow.com/a/25498573
has body: I have a d3 app with one HTML number input. Everything works as I want it to for the moment, except that the visualization doesn't appear in the browser until I actually click the number input up or down. I tried setting the input with a value: &lt;input type="number" min="0" max="100" step="1" value="5" id="nMinutes"&gt; I also tried this workaround: var hack = document.getElementById("nMinutes"); hack.value = "22"; to no avail. I am following this example: http://www.d3noob.org/2014/04/using-html-inputs-with-d3js.html Here's the fiddle: http://jsfiddle.net/btsusu6v/3/ Note: I am using d3.csv in my actual app: var dataset2 d3.csv("/assets/csv/mydata.csv", function(d) { dataset2=d; }) This is my first venture into D3 (and javascript for that matter), so all general recommendations about the app (and not 100% specific to the posted question) are welcome and appreciated.
linked to: http://stackoverflow.com/q/9491885
type: Question
answer count: 2

http://stackoverflow.com/comment/39852225
score: 0
comment on: http://stackoverflow.com/q/25526533
type: QuestionComment
type: Comment
has text: @CBroe yep, still the other way validates HTML5 and previous versions

http://stackoverflow.com/comment/39607618
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25394060
has text: @Fabio: its ok if you remove that part of property from css...the problem is not there its not showing triangle
type: QuestionComment

http://stackoverflow.com/comment/39696476
has text: My first solution: http://jsfiddle.net/ou52v17a/ Only problem here is there will be considerable rewrite of existing modules
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25442392
score: 0

http://stackoverflow.com/a/25541816
has comment: http://stackoverflow.com/comment/39880129
answers question: http://stackoverflow.com/q/25541695
has body: Some minor changes, and check the fiddle to see it working. //this needed to be .value not .innerHtml document.getElementById("msg").value = alltext; //this worked for me, and is better for seperation of concerns, it will help to keep your code cleaner. document.getElementById("btnTxt").onclick = function(){ ShortUrl(short_url.value); }; working fiddle
type: Answer
score: 0

http://stackoverflow.com/comment/39621498
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25401977
has text: I believe I have narrowed it down to the combination of using `type="number"` alongside `maxlength="4"`. They don't appear to work well together. I can change back to `type="text"` and it works fine, but then for mobile users they will see the QWERTY keyboard instead of the number keypad which isn't as nice UX experience. I can't see a solution for this other than some clunky JavaScript that has been offered above.

http://stackoverflow.com/comment/39719061
comment on: http://stackoverflow.com/a/25454457
type: AnswerComment
score: 0
type: Comment
has text: `key` in your example needs to be a string value of `'veggie'` or `'color'` in order to return `true`, `delete` is not part of angular but rather a javacript keyword that removes a property from an object. If you would like to use `indexOf` and `splice` you will need to change your `$scope.datas` from an object to an array.

http://stackoverflow.com/comment/39679126
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25432736
has text: By using "sessions". Only a logged in user should be authenticated to do anything like that on your site. And your backend system should be sophisticated enough to know if the data is valid. In any case, to fully explain how sessions work, etc. is too broad for the SO Q & A format.

http://stackoverflow.com/comment/39634306
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25393091
score: 0
has text: Yes. The stuck class simply has the position: fixed, when scrolling up the header nav needs to stick.

http://stackoverflow.com/comment/39767451
has text: You need to apply styles!!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25480769

http://stackoverflow.com/a/25503336
has comment: http://stackoverflow.com/comment/39809880
has comment: http://stackoverflow.com/comment/39809660
has body: If you are using jQuery's $.ajax() or $.post() or $.get(), use the call back to start the next one! Eg: console.log("AJAX start: Save Game"); $.post("save-game.php", function(){ console.log("AJAX finish: Save Game"); console.log("AJAX start: Check"); $.post("check.php", function(){ console.log("AJAX finish: Check"); // Iterate from here using a recursive function! :P }); }); You can do the iteration, may be this way: function saveCheckGame() { console.log("AJAX start: Save Game"); $.post("save-game.php", function(){ console.log("AJAX finish: Save Game"); console.log("AJAX start: Check"); $.post("check.php", function(){ console.log("AJAX finish: Check"); saveCheckGame(); }); }); }
score: 0
has comment: http://stackoverflow.com/comment/39809687
has comment: http://stackoverflow.com/comment/39809906
answers question: http://stackoverflow.com/q/25503251
type: Answer

http://stackoverflow.com/a/25411785
answers question: http://stackoverflow.com/q/25411641
has comment: http://stackoverflow.com/comment/39639434
downvote count: 0
has body: Add an ID to your Select and values to your options <!--<?php require_once( 'php/countries.php' ); ?>--> US Canada Then in your object set country to the #country value var formData = { name: $('input#name').val(), add1: $('input#add1').val(), add2: $('input#add2').val(), city: $('input#city').val(), state: $('input#state').val(), country: $('#country').val() } Finally... $('#country').val() Will be your country Name
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/25459407
has comment: http://stackoverflow.com/comment/39748468
has comment: http://stackoverflow.com/comment/39748575
has answer: http://stackoverflow.com/a/25459443
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25459498
possible better answer: http://stackoverflow.com/a/25459443
has body: I'm facing problem in a simple website, where I'm using buttons to switch between different pages, behind the every button I'm using onclick() method to open other page. Method I'm using is onclick = "windows.open('xyz.html')" of JavaScript. but when I do click on a button to open a specific page , that specific page does not open, another page become appear instead. Note: website is placed on server of apachi(wamp server) using php there.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39728190
type: Question
has comment: http://stackoverflow.com/comment/39728293
score: 0
tagged with: client-server
answer count: 3
has comment: http://stackoverflow.com/comment/39728056
has answer: http://stackoverflow.com/a/25459548
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
has title: Navigation between different pages of website on server
has answer: http://stackoverflow.com/a/25459498

http://stackoverflow.com/comment/39701795
has text: Nice solution, but this wont register clicks on non `a` tags I need them all. Upvoted, but I'll accept other answer. Thank you.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25445926

http://stackoverflow.com/a/25453379
has comment: http://stackoverflow.com/comment/39745062
has body: Page B will never be able to respond to a click event on the previous page, which seems to be what you're trying to do in the code. Try using location.hash to access the hash instead. $(window).on('hashchange', function(e) { $('html, body').animate({ scrollTop: $(location.hash).offset().top - 150 }, 300); });
score: 1
has comment: http://stackoverflow.com/comment/39747352
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25452751
answers question: http://stackoverflow.com/q/25452751
type: Answer

http://stackoverflow.com/q/25508721
has comment: http://stackoverflow.com/comment/39834501
has body: I can't seem to get this to work. I've looked for an answer but nothing seems to help me. I had a working version as an html page, but I cannot get it to work as an extension. This is my first extension so if I am doing something wrong please notify me so. manifest.json: { "manifest_version": 2, "name": "ROBLOX User-Profile Finder", "description": "Find any user's profile by typing in their name.", "version": "1.0", "permissions": [ "<all_urls>" ], "browser_action": { "default_icon": "Icon.png", "default_popup": "Popup.html" } } Popup.html: Type in the roblox username: Go to Profile! What is the problem here? I think I'm missing something, as I usually program in Lua, not JavaScript. Solved: The problem was that I was making scripts in the middle, and I kept asking for help, the problem was a simple mistake with the quotation marks and a few other little errors. Here's the finished scripts if anyone's interested: manifest.json: { "manifest_version": 2, "name": "ROBLOX User-Profile Finder", "description": "Find any user's profile by typing in their name. Note: Not created by roblox.", "version": "1.0", "permissions": [ "<all_urls>" ], "browser_action": { "default_icon": "Icon.png", "default_popup": "Popup.html" } } Popup.html: Type in the roblox username: Go to Profile! Script.js: var link="http://roblox.com/user.aspx?username="; function Submit() { window.open(link.concat(document.getElementById("username").value)); } document.getElementById('Button').addEventListener("click", Submit);
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/39862527
has title: Can't change website with chrome extension?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39833260
has comment: http://stackoverflow.com/comment/39830821
has comment: http://stackoverflow.com/comment/39833618
type: Question
has comment: http://stackoverflow.com/comment/39852754
linked to: http://stackoverflow.com/q/13591983
accepted answer: http://stackoverflow.com/a/25508916
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40647016
duplicate of: http://stackoverflow.com/q/13591983
tagged with: window.open
downvote count: 2
has comment: http://stackoverflow.com/comment/39836575
has comment: http://stackoverflow.com/comment/39938064
has answer: http://stackoverflow.com/a/25508916
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39834077
favorite count: 0

http://stackoverflow.com/comment/39732028
score: 0
has text: @Zentoaku: I will take a look at those and see what I can do through them, thanks!
type: Comment
comment on: http://stackoverflow.com/q/25447168
type: QuestionComment

http://stackoverflow.com/comment/39675435
score: 0
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59745/discussion-between-deebs-and-user3371414).
type: AnswerComment
comment on: http://stackoverflow.com/a/25429803

http://stackoverflow.com/comment/39833863
type: QuestionComment
has text: @JamesKleeh so you're suggesting that I shouldn't be using states to show views in this case? Just make it so there is only one page that shows both list and details, and use media queries to handle which is displayed and when? That's might not be a bad idea either.
comment on: http://stackoverflow.com/q/25513710
score: 0
type: Comment

http://stackoverflow.com/a/25546105
has body: Why don't you use &lt;%- instead of &lt;%= , and pass object JSON.stringify() method. The first one will render object in HTML, the second one will render variables (as they are, eval)
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25544897
answers question: http://stackoverflow.com/q/25544897
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/39888070
has text: thanks! but there's allways only 20 {NUMBERN} which means there's only 20 numbers. Any of these 20 NUMBERN could be beetween 1 to 100
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25546196

http://stackoverflow.com/a/25544505
has body: The way you have it written you would need self.editData = function (data) { self.id(data.id); self.nscto(data.nscto); if (self.nscto() != null &amp;&amp; self.nscto() == ""){ self.view(true); } }
score: 0
answers question: http://stackoverflow.com/q/25542877
type: Answer

http://stackoverflow.com/comment/39823788
score: 0
type: AnswerComment
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/60026/discussion-between-pje-and-juan-mendes).
comment on: http://stackoverflow.com/a/25494950

http://stackoverflow.com/a/25513381
accepted answer of: http://stackoverflow.com/q/25511769
answers question: http://stackoverflow.com/q/25511769
has comment: http://stackoverflow.com/comment/39830957
has body: They aren't completely different. Components are made up of templates (html) and data/logic (view model i.e. JavaScript). When you have a modular view you want to attach a view model to you can utilize components. Here's a link discussing components a bit more: http://www.knockmeout.net/2014/06/knockout-3-2-preview-components.html
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/39868919
type: Answer
has comment: http://stackoverflow.com/comment/39862619

http://stackoverflow.com/q/25477166
has title: How to output registration form data to the current page and another page?
tagged with: javascript
tagged with: forms
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/25477267
has body: As the tittle says, how do I output a registration form data to the current page(form.php) and another page(profile.php) if the submitted form data has been successful and validated? I've been trying to search how to do this but couldn't find anything useful. I tried changing the action to profile.php where I want the user's data to be displayed, but when I did that, I couldn't display the errors in my form page. Basically, I want the errors to be displayed in the form if the user's input is incorrect and once he filled out everything correctly and submitted the form, I want the data to be displayed to his profile (profile.php). Like if I do <?php echo $_POST['username']?> in profile.php, I want his username to be displayed in profile.php. Is there a way to do this? I'm still kind of new to this... Is there anything I should add or change? I'm not sure how I can output the data to profile.php Here's my code: <?php error_reporting(E_ERROR | E_WARNING | E_PARSE); require 'core.inc.php'; require 'connect.inc.php'; if(count($_POST) > 0){ $username = $_POST['username']; $email = $_POST['email']; $password = $_POST['password']; $password_hash = md5($password); $age = $_POST['age']; $gender = $_POST['gender']; $validated = true; if(!preg_match("/^[a-zA-Z ]*$/",$username)){ $usernameErr = " Only letters and white space allowed"; $validated = false; } else if(empty($username)){ $usernameErr = ' Enter your username'; $validated = false; } if(strlen($username)>30){ $error = 'Please ahear to maxlength of fields.'; } if(empty($password)){ $passErr = ' Enter your password'; $validated = false; } if (!empty($email) && !filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = " Invalid email"; $validated = false; } else if(empty($email)){ $emailErr = ' Enter your email'; $validated = false; } if(empty($gender)){ $genderErr = ' Select your gender'; $validated = false; } if(empty($age)){ $ageErr = ' Select your age'; $validated = false; } if($validated === true){ $query = "SELECT `us…
has answer: http://stackoverflow.com/a/25477298
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/48367203
has text: AH so it was that `keypress` was deprecated, we're suppose to use `keyup` now.
comment on: http://stackoverflow.com/a/25465358
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25417038
has answer: http://stackoverflow.com/a/25417291
type: UnansweredQuestion
tagged with: aggregation-framework
score: 10
has title: How can I remove a duplicate object from a MongoDB array?
upvote count: 11
tagged with: mongodb-query
downvote count: 1
type: Question
tagged with: mongodb
tagged with: javascript
linked to: http://stackoverflow.com/q/18804404
linked to: http://stackoverflow.com/q/9862255
answer count: 1
favorite count: 0
has body: My data looks like this: { "foo_list": [ { "id": "98aa4987-d812-4aba-ac20-92d1079f87b2", "name": "Foo 1", "slug": "foo-1" }, { "id": "98aa4987-d812-4aba-ac20-92d1079f87b2", "name": "Foo 1", "slug": "foo-1" }, { "id": "157569ec-abab-4bfb-b732-55e9c8f4a57d", "name": "Foo 3", "slug": "foo-3" } ] } Where foo_list is a field in a model called Bar. Notice that the first and second objects in the array are complete duplicates. Aside from the obvious solution of switching to PostgresSQL, what MongoDB query can I run to remove duplicate entries from foo_list? Similar answers that do not quite cut it: https://stackoverflow.com/a/16907596/432 https://stackoverflow.com/a/18804460/432 These questions answer the question if the array had bare strings in it. However in my situation the array is filled with objects. I hope it is clear that I am not interested querying the database; I want the duplicates to be gone from the database forever.

http://stackoverflow.com/comment/39608579
type: Comment
has text: is `#emailblock` a div?
type: QuestionComment
comment on: http://stackoverflow.com/q/25395159
score: 0

http://stackoverflow.com/q/25509269
answer count: 3
accepted answer: http://stackoverflow.com/a/25509395
has comment: http://stackoverflow.com/comment/39820706
possible better answer: http://stackoverflow.com/a/25509584
favorite count: 0
has answer: http://stackoverflow.com/a/25509584
has title: JavaScript enumeration
upvote count: 2
has comment: http://stackoverflow.com/comment/39820956
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39820936
has comment: http://stackoverflow.com/comment/39820714
has answer: http://stackoverflow.com/a/25509395
downvote count: 1
has answer: http://stackoverflow.com/a/25509489
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39822946
tagged with: enumeration
has body: I have a file [not a .js file] that has a list of errors mapped with error codes in the following format. 404 = The requested resource could not be found 500 = Internal server error 1001 = No message body found 1002 = No message header found and so on....[about 3000 lines.] I wish to write a function, pass the error code as parameter and expect to receive the corresponding string as errorString. I am using Javascript for my web app. But unfortunately, the file that contains the error list in this format. C an anybody suggest what I should do to get the work done. I am also ready to convert this file to a java script file, if any body can suggest how would I achieve that for about 3000 lines of code. Thank you.

http://stackoverflow.com/a/25433894
downvote count: 0
answers question: http://stackoverflow.com/q/25433827
type: Answer
score: 2
has body: Depending on the environment this has to run, a getter might be a suitable solution: Object.defineProperty(Object2, 'x', { get: function() { return Object1.x; }, enumerable: true }); You might also want to define a setter to sync changes back.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25433827
type: AcceptedAnswer

http://stackoverflow.com/q/25501141
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25504349
has answer: http://stackoverflow.com/a/25501684
has title: Multiple Forms Email validation on a single page using javascript
tagged with: widget
score: 0
tagged with: wordpress
linked to: http://stackoverflow.com/q/7171483
tagged with: forms
has body: I am developing a Wordpress Widget Plugin that inserts as many as you want email input forms in a widget. I am using the following code to validate email fields function validateForm(form) { var x = document.forms["twb_form"]["email"].value; var atpos = x.indexOf("@"); var dotpos = x.lastIndexOf("."); if (x == null || x == "" || atpos&lt; 1 || dotpos&lt;atpos+2 || dotpos+2&gt;=x.length) { document.getElementById('errorMSG').innerHTML = 'Please enter a valid email address'; return false; } } The problem is that validation error always display along the very first form on page regardless of other forms... This is because of the div #errorMSG I know this can be solved using some kind of PHP tricks but I can't figure it out. Every form on the page is being applied a separate ID ... widget-id-1, widget-id-2 and so on... How can I associate each validation message with a widget-id ?
tagged with: javascript
type: UnansweredQuestion
tagged with: validation

http://stackoverflow.com/comment/39872591
score: 0
type: QuestionComment
type: Comment
has text: I simplified out the service, which needs to know what portion of the data hive to look at depending on the currently logged-in user.
comment on: http://stackoverflow.com/q/25537321

http://stackoverflow.com/comment/39626697
type: AnswerComment
comment on: http://stackoverflow.com/a/25405019
score: 0
type: Comment
has text: it's works but my map background colour is changed.when click previous and next button.

http://stackoverflow.com/comment/40036764
type: Comment
comment on: http://stackoverflow.com/a/25532849
has text: I've tried multiple times to get this to work and I think I am missing something as it does not seem to trigger the code. Anyway you can help me out a little more here?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39658777
score: 0
type: Comment
type: QuestionComment
has text: Don't mix content(html) with behavior(js). Remove those `onclick` and use jQuery, that takes care for you of those browser differences.
comment on: http://stackoverflow.com/q/25422400

http://stackoverflow.com/q/25437381
type: Question
tagged with: jsfiddle
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39686916
has answer: http://stackoverflow.com/a/25437841
has comment: http://stackoverflow.com/comment/39686865
has title: three.js code working is JSfiddle but not in my browser
score: 0
linked to: http://stackoverflow.com/q/15471879
has body: Here is a simple three.js code that creates a custom geometry http://jsfiddle.net/67Lgzjpb/. When I try to run this directly on my browser, (not throught JSFiddle) it says TypeError: geom.computeCentroids is not a function Has anyone got a clue why?
type: UnansweredQuestion
tagged with: three.js

http://stackoverflow.com/a/25409785
has comment: http://stackoverflow.com/comment/39635823
has comment: http://stackoverflow.com/comment/39635737
has comment: http://stackoverflow.com/comment/39636828
downvote count: 0
has comment: http://stackoverflow.com/comment/39636924
answers question: http://stackoverflow.com/q/25409662
has comment: http://stackoverflow.com/comment/39637085
type: Answer
has comment: http://stackoverflow.com/comment/39635798
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39640517
has body: If you press ENTER on submit1, submit2 will not be selected unless you hit TAB. Are you doing this? Anyway, you can do this: $("#submit1").click(function () { /* Verify data with javascript and send it with Ajax */ /* if everything is ok display: */ $("#submit2").focus(); // This will automatically focus the user on the second submit button // }); This will force the user, the next time he hits ENTER, to submit the submit2 button. But don't use .submit()... you should use the .submit() function instead of .click(), because I believe .click() only checks for mouse clicks? $("#submit1").submit(function(){ /* Blah blah blah... */ $("#submit2").focus(); // This will automatically focus the user on the second submit button // }); $("#submit2").submit(function(){ /* ... */ }); As other users have said, are submit1 and submit2 in the same tag: Yes, they were. But you shouldn't have 2 fields in the same tag if you want to submit the data separately. Do this: HTML JQuery $("#submit1").submit(function(e){ /* Blah blah blah... */ e.preventDefault(); // Keeps the user on the same page // }); $("#submit2").submit(function(e){ /* ... */ e.preventDefault(); // Keeps the user on the same page // });
has comment: http://stackoverflow.com/comment/39636745
has comment: http://stackoverflow.com/comment/39635844

http://stackoverflow.com/q/25437649
tagged with: css
has title: Responsive navigation stays hidden on window resize (pure JS)
answer count: 0
linked to: http://stackoverflow.com/q/17663958
has body: I have been looking for a solution for over ten hours, today only, and have searched many more days before that. I'm asking a question here because I'll be ripping my hair out very soon if this goes on. My problem : I have a responsive navigation which looks like a regular navbar on desktop sized screens that converts to a dropdown menu when window shrinks or device width gets too small. On the media queries front, I think I've got everything covered. The Javascript is what is causing problems. Let me explain : Desktop nav shrinks when window is resized clicking to open/close the shrunk menu makes the list items pop out/hide without problem when window is resized to its original width (with menu closed) the navigation stays hidden Here are two examples to illustrate what I mean. Responsive menu hidden on window resize Responsive navigation hidden on window resize I know what people might suggest : just make it work with jQuery there are many working examples. While that may be true, I'm not familiar with jQuery at all and if I could, I would rather not use a whole library just for this. I'm not very experienced in JavaScript either, but I prefer the pure JS approach. HTML About Skills Work Contact CSS *, :after, :before{ -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -ms-box-sizing:border-box; box-sizing: border-box; word-wrap:break-word; } html, body{ padding: 0px; margin: 0px; height: 100%; width: 100%; font-size: 100%; } ul, li{ list-style-type: none; padding:0; margin:0; } a{ text-decoration: none; } .floatWrapper{ width: 90%; max-width: 1120px; margin:0 auto; } .floatWrapper:before, .floatWrapper:after { content:""; display:block; } .floatWrapper:after { clear:both; } .allGrids{ height: auto; float:left; margin: 1% 0%; display:block; } .grid1{ width: 100%; margin:1% 0; } .grid70{ width: 66%; } .header{ position: fixed; top: 0; left:0; width:100%; z-index: 100000; padding:0; height: auto; -moz-transition: all .2s ease-in-out; -webkit-transition: al…
has comment: http://stackoverflow.com/comment/39687307
type: Question
tagged with: responsive-design
tagged with: javascript
has comment: http://stackoverflow.com/comment/39687387
score: 0
has comment: http://stackoverflow.com/comment/39687491
has comment: http://stackoverflow.com/comment/39687334
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/15816323

http://stackoverflow.com/q/25461709
has comment: http://stackoverflow.com/comment/39732155
has body: Trying the create a javaScript array from a PHP array of urls to images using JSON and AJAX. Then I want to display the images on a cordova app. I believe my issue is I'm either I'm receiving or sending the Json messages with automatic html tags. My xmlhttp.response is equal the array of urls but it has html tags which are not present in the PHP file. I think because of these tags my JSON.parse isn't working? This is my PHP stored on a server. I'm returning the urls in json message. &lt;?php include("mysqlconnect.php"); $select_query = "SELECT `ImagesPath` FROM `offerstbl` ORDER by `ImagesId` DESC"; $sql = mysql_query($select_query) or die(mysql_error()); $data = array(); while($row = mysql_fetch_array($sql,MYSQL_BOTH)){ $data[] = $row['ImagesPath']; } echo json_encode($data); ?&gt; This is my script in my cordova app. I want to covent the JSON message into a javaScript array and display the first image in the array in the div contents. But I think I'm calling a message which includes html tags so I can't parse the message I could be wrong. I currently get three error alerts because the ready state is not correct. &lt;html&gt; &lt;script&gt; var arr = []; function importJson(str) { if (str=="") { document.getElementById("content").innerHTML=""; return; } 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){ alert(xmlhttp.response); arr = JSON.parse(xmlhttp.response); //var arr = (array)json.parse(xmlhttp.response); for (var i = 0; i &lt; arr.length; i++) { buildImage(arr[i]); alert(arr[0]); } } else { alert("Error"); } } xmlhttp.open("GET","http://server/~name/folder/content.php); xmlhttp.responseType = "json"; xmlhttp.send(); buildImage=function(src) { var img = document.createElement('img'); img.src = src; document.getElementById("co…
score: 0
answer count: 1
tagged with: ajax
has comment: http://stackoverflow.com/comment/39733453
has title: How to use json and ajax to create a javascript array from a PHP array?
has comment: http://stackoverflow.com/comment/39732248
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39733371
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25462602
has comment: http://stackoverflow.com/comment/39733294
type: Question
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/a/28595962
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/25456250
accepted answer of: http://stackoverflow.com/q/25456250
score: 4
type: AcceptedAnswer
has body: king Puppy, I've seen a few responses that dictate that the controller parameters should be an object that matches the object that is being sent, however, it seems that it's a little more forgiving than that. Consider the following example (I've updated your function a little): Javascript: $scope.postIt = function() { var data = { id = 4 }; $http .post('Home/Give', data) .success(function(data, status, headers, config) { successFn(); }) .errors(function(data, status, headers, config) { errorFn(); }); }; function successFn() { alert("success"); }; function errorFn() { alert("error"); }; MVC: public ActionResult Give(int id) { var response = "some response" + id.ToString(); return Json(new JavaScriptSerializer().Serialize(response)); } If you set a breakpoint, you will see that the id passed in is 4. If you needed to pass in an object (so more than just one id), you could either create a matching class or struct on the controller side, or have multiple parameters (provided that they are simple value types) ie: public JsonResult Give (int id, int reasonId) { ... } Anyway, I realize the post is old, but perhaps it will help you or others.

http://stackoverflow.com/comment/39893251
score: 0
type: Comment
type: QuestionComment
has text: @JukkaK.Korpela same problem.
comment on: http://stackoverflow.com/q/25548328

http://stackoverflow.com/q/25392297
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25392550
tagged with: php
tagged with: css
has body: I am working on this form with several select elements with options Yes, No or Not applicable. It was required that whenever the user select yes option a separate date field appears next to it. I used HTML DOM document.getElementById("id").innerHTML for this date field. Everything went well but I was not able to pass the value of date to the form action page using POST method. Check this code: <?php include("menu.inc"); ?> <input type="hidden" name="consultant_id" value="<?php echo $consult_id; ?>"> Credit Check Please select ... Yes No Not Applicable Employment Check :* Please select ... Yes No Not Applicable
type: AnsweredQuestion
has title: Unable to post tag returned through document.getElementById('div').innerHTML
type: Question
has answer: http://stackoverflow.com/a/25392411
accepted answer: http://stackoverflow.com/a/25392411
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25392442
has answer: http://stackoverflow.com/a/25392442
score: 0

http://stackoverflow.com/comment/39609178
has text: I just dont fully understand AJAX is the issue, and if its even the solution i am looking for. How do I execute a PHP file from javascript? Facebook said use an AJAX call to call the PHP from the javascript. This is what I am trying to achieve: JS checks their status >> status is connected >> fire PHP >> return to application
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25395395

http://stackoverflow.com/comment/39843737
score: 0
has text: if MChoice means the user's answer is correct or not, i see multiple correct answers there, so how to know exactly which answer did user select
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25521858

http://stackoverflow.com/q/25434657
has answer: http://stackoverflow.com/a/25434767
tagged with: javascript
has title: jQuery - grab href from click inside of an iframe
linked to: http://stackoverflow.com/q/2689984
score: 0
answer count: 1
tagged with: jquery
has body: I have this code I got from a site. It works fine and it can detect a click inside of an iframe. $('body', $('#iframeId1').contents()).click(function(event) { alert("Link clicked"); }); However, I am trying to get the href of the clicked link. I tried : var href = $(this).attr("href"); alert(href); But this alerts undefined
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/364952
has comment: http://stackoverflow.com/comment/39681849
tagged with: iframe
has comment: http://stackoverflow.com/comment/39765808
type: Question
has comment: http://stackoverflow.com/comment/39681798

http://stackoverflow.com/a/25539365
has comment: http://stackoverflow.com/comment/39877449
score: 0
has comment: http://stackoverflow.com/comment/39876383
has body: Your question is an basic ajax problem, isn't it? You have: client > call "try.cgi" in server > response data ("Value_in_C") to client > display it. Then it should be: $.ajax({ url: "http://localhost/cgi-bin/try.cgi", type: 'POST', data: JSON.stringify(obj), dataType: 'text', // since your response is a string success: function(responseData){ alert(responseData); // responseData should be "Value_in_C" } }); Updated: dataType: 'json' will parse response to json, so "Value_in_C" became null
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39877015
accepted answer of: http://stackoverflow.com/q/25539315
has comment: http://stackoverflow.com/comment/39876987
has comment: http://stackoverflow.com/comment/39877486
answers question: http://stackoverflow.com/q/25539315
has comment: http://stackoverflow.com/comment/39876691

http://stackoverflow.com/comment/39640890
type: Comment
type: QuestionComment
has text: Might find this answer useful http://stackoverflow.com/a/18630603/1342440
comment on: http://stackoverflow.com/q/25412230
score: 0

http://stackoverflow.com/comment/39866522
comment on: http://stackoverflow.com/q/25534281
has text: That implies that there is no current document in $ie, maybe the page isn't loaded yet? I use `Do {Start-Sleep 1} Until (!($IE.Busy))` to wait for that.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39640044
type: Comment
score: 0
type: QuestionComment
has text: Sure added as answer. Thanks
comment on: http://stackoverflow.com/q/25409135

http://stackoverflow.com/comment/39859516
has text: This is changing the question.
type: AnswerComment
comment on: http://stackoverflow.com/a/25530572
score: 0
type: Comment

http://stackoverflow.com/a/25461934
score: 3
upvote count: 3
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25458546
answers question: http://stackoverflow.com/q/25458546
type: Answer
has body: If you are trying to get some value from browser, you can use String str = Driver.findElement(By.xpath("xpath of the object").getText();

http://stackoverflow.com/comment/39693698
score: 0
has text: I know it isnt the same language, but this SO on array_map vs foreach in php probably still accurately accounts for the slowness of using map vs other methods, tl; dr because of how the memory manager handles the lambda (anonymous function) http://stackoverflow.com/questions/18144782/performance-of-foreach-array-map-with-lambda-and-array-map-with-static-function
type: Comment
comment on: http://stackoverflow.com/a/25436716
type: AnswerComment

http://stackoverflow.com/q/25493225
has answer: http://stackoverflow.com/a/25493459
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25493321
has title: Running jQuery UI with Draggable and Droppable
tagged with: jquery-ui-draggable
has comment: http://stackoverflow.com/comment/39791132
has comment: http://stackoverflow.com/comment/39793937
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39790918
type: Question
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/25493423
tagged with: jquery-ui-droppable
has body: I am working on this demo. Why am I not able to run the draggable and droppable using jQuery UI? I am not getting any error message on console. Here is the code I am using: $(function() { $(".draggable").draggable(); $(".item").droppable({ drop: function(event, ui) { var $this = $(this); var width = $(".item").width(); var height = $(".item").height(); var cntrLeft = (width / 2) - ( $(".draggable").width() / 2); var cntrTop = (height / 2) - ( $(".draggable").height() / 2); $(".draggable").css({ left: cntrLeft + "px", top: cntrTop + "px" }); } }); });
answer count: 3

http://stackoverflow.com/comment/39648169
type: AnswerComment
comment on: http://stackoverflow.com/a/25416450
score: 0
type: Comment
has text: I define "safe" as in "the program and those who use it should still behave as expected"

http://stackoverflow.com/comment/39684853
score: 0
type: QuestionComment
type: Comment
has text: Hello @user3779812 ...could you be more specific in order to modify the fiddle pls.
comment on: http://stackoverflow.com/q/25436040

http://stackoverflow.com/comment/39794500
has text: Sigh. Even without knowing anything about javascript, it should be obvious that "YOUR_JSON_VIEW_URL" is a placeholder for your *actual* view URL. Otherwise how can the code know where to go to get the JSON content?
comment on: http://stackoverflow.com/q/25488620
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25537528
has body: You could parse the JSON and then change those values just like if you were dealing with a regular JS object. If you have jQuery you could their $.parseJSON method. For example: // $.parseJSON takes a JSON string and turns it into a JS Object var obj = $.parseJSON('{"id":1,"name":"Test","value1":false,"value2":0,"value3":1140}'); // Changing the definition of value1 and value2 depending on its value. obj[value1] = (obj[value1] === true) ? 'Yes' : 'No'; obj[value2] = (obj[value2] === 1) ? 'Yes' : 'No';
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25537352
answers question: http://stackoverflow.com/q/25537352
type: Answer
score: 0

http://stackoverflow.com/a/25474725
type: Answer
has body: The problem lies precisely in the fact that the script is being executed from a Chrome Extension. XHR requests must be allowed from the user. You must add in your manifest.json the "permissions" propriety, just like this "permissions": [ "http://www.example.com/", "https://www.example.com/" ] Reload the extension and it shoud be work. See more about XHR on Chrome Extensions
answers question: http://stackoverflow.com/q/25473908
score: 0

http://stackoverflow.com/a/25513467
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25511120
has comment: http://stackoverflow.com/comment/39843366
downvote count: 0
has body: I don't have enough points to add a comment on John Smith his answer, but he is on the right track, except from a little mistake probably because he is used to program in Python :-) The regular expression should be: /^throw.*;\s*/ instead of "^throw.*;\s*" Instead of using double quotes, use / at the beginning and end of the regular expression. That will do the trick.
has comment: http://stackoverflow.com/comment/39839813

http://stackoverflow.com/q/25418059
type: Question
has comment: http://stackoverflow.com/comment/39651073
score: 5
possible better answer: http://stackoverflow.com/a/25418189
tagged with: firefox
upvote count: 6
tagged with: javascript
has answer: http://stackoverflow.com/a/25418189
has answer: http://stackoverflow.com/a/30884781
has body: Recently Firefox started ignoring autocomplete="off" for password fields, and now allows the user to save passwords all the time. We have a large application used by thousands of users, and by law we need to ensure that passwords are NEVER saved in plain text on our clients computers. Is there any way we can prevent Firefox from saving these passwords? We found a workaround for Chrome (it only saves the first password field on the screen, so we added a hidden one before the real one), but we haven't had any luck with Firefox. As of now, the only option we have is to disable Firefox support entirely. And yes, I realize blocking the user from saving passwords is annoying, but we have no choice ... this is a requirement imposed on us by Federal regulations.
has comment: http://stackoverflow.com/comment/39667554
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/39651132
has title: Disabling password auto-complete in Firefox?
has comment: http://stackoverflow.com/comment/39651064
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25433449
accepted answer: http://stackoverflow.com/a/25433449
has answer: http://stackoverflow.com/a/25418193

http://stackoverflow.com/comment/39815669
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25506525
has text: Worked amazing, sir. You can make it an answer so I can mark it.
score: 0

http://stackoverflow.com/comment/39730318
has text: @hamburger — I can't see any differences in the data. The only differences I can spot are in how the different tools visualise it.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25460493

http://stackoverflow.com/a/25498848
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39801004
type: Answer
has comment: http://stackoverflow.com/comment/39801103
score: 2
has comment: http://stackoverflow.com/comment/39801026
upvote count: 2
answers question: http://stackoverflow.com/q/25498802
has body: The first loop does not really output 2. You see it in the console, because the console also outputs the result of the last expression of your code, which would be count before it is incremented one final time. In your second loop, only the first code-block belongs to the loop (do .... while). In it, the count variable never gets incremented, so you've got an infinite loop. EDIT: To get your second loop working the way you would expect, you need to be aware of how the do...while loop works. Contrary to normal while loops, they are at least executed once. The part that will be looped over is the code between do and while. So I guess, the code you want would look something like this: count=1; console.log("start"); do { console.log("I'm looping!") count++; } while(count &lt; 3)
accepted answer of: http://stackoverflow.com/q/25498802

http://stackoverflow.com/a/25412130
type: Answer
answers question: http://stackoverflow.com/q/25411884
has body: Do you have the JQuery-Script in a .js-file? If yes, your PHP-Interpreter doesn't interpret it. You can change this by adding the following to your .htaccess-file: &lt;FilesMatch "\.(js)$"&gt; AddHandler application/x-httpd-php .js &lt;/FilesMatch&gt;
score: 0

http://stackoverflow.com/comment/39850732
has text: @Arvind Sridharan Ok, but it doesn't work for me like that if I remove `success: "valid"` and add `submitHandler: recapVerify();` instead the form will be submitted even with empty email field?
comment on: http://stackoverflow.com/q/25524827
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25523785
tagged with: css
has title: Save image as jpg with extension
type: Question
tagged with: javascript
tagged with: html2canvas
score: 0
has body: I'm using Backbone and html2canvas.js, this is the code I have so far for transforming a div to canvas and saving it. It works, but it doesn't add the .jpg extension. Because of this, after downloading the image, FF and Chrome first ask me about the program I want to use to open the file and IE just tells me that I don't have the right program and suggests visiting the store. In FF and Chrome I can see the image when choosing the default Windows picture viewer etc. What I would like to achieve is to add the .jpg extension so the file opens in the default program right away: savePicture: function() { //$(this.el).find('.drag-img').unwrap(); var image = $(this.el).find('#droppable2'); html2canvas(image, { onrendered: function(canvas) { var img = canvas.toDataURL("image/jpeg"); var frame = document.getElementById("myHideFrame"); if (!frame) { frame = document.createElement("iframe"); frame.id = "myHideFrame"; document.body.appendChild(frame); } frame.src = img.replace(/^data[:]image\/(png|jpg|jpeg)[;]/i, "data:application/octet-stream;"); } }); },
answer count: 1
tagged with: backbone.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25523984

http://stackoverflow.com/comment/39919381
comment on: http://stackoverflow.com/a/25559400
type: AnswerComment
score: 0
type: Comment
has text: What do you mean by the tab's 'onChanged' event ? I can find no such event. If you mean the 'onUpdated', it doesn't have sufficient information to tell whether the user clicked the 'back' or 'forward' buttons. Correct me if I'm wrong.

http://stackoverflow.com/a/28555879
has body: //javascript example jQuery(document).ready(function($) { "use strict"; if (typeof(plupload) !== 'undefined') { var uploader1 = new plupload.Uploader({ runtimes : 'html5,flash,html4', browse_button : 'upload-button-1', container : 'upload-container-1', file_data_name : 'upload_file', max_file_size : $max_file_size . 'b', //maximum file size you want set url : '<?php echo admin_url('admin-ajax.php') . '?action=me_upload1&nonce='. wp_create_nonce('aaiu_allow') ?>' , //here add your ajax request function url or callback method url for example i putted link flash_swf_url : '<?php echo includes_url('js/plupload/plupload.flash.swf') ?>', // path for plupload.flash.swf file filters : array(array('title' => __('Allowed Files','wpestate'), 'extensions' => "jpg,gif,png")), // filters option or validation for extension type multipart : true, urlstream_upload : true, }); uploader1.init(); uploader1.bind('FilesAdded', function (up, files) { $.each(files, function (i, file) { // console.log('append'+file.id ); $('#aaiu-upload-imagelist-1').append( ' ' + file.name + ' (' + plupload.formatSize(file.size) + ') ' + ' '); }); up.refresh(); // Reposition Flash/Silverlight uploader1.start(); }); uploader1.bind('UploadProgress', function (up, file) { $('#' + file.id + " b").html(file.percent + "%"); }); // On erro occur uploader1.bind('Error', function (up, err) { $('#aaiu-upload-imagelist-1').append(" Error: " + err.code + ", Message: " + err.message + (err.file ? ", File: " + err.file.name : "") + " " ); up.refresh(); // Reposition Flash/Silverlight }); uploader1.bind('FileUploaded', function (up, file, response) { console.log(response.response); var result = $.parseJSON(response.response); // console.log(result); $('#' + file.id).remove(); if (result.success) { var all_id=$('#uplodaer1_attachid').val(); all_id=all_id+","+result.attach; $('#uplodaer1_attachid').val(all_id); $('#imagelist-1').append(' '); delete_binder(); thumb_setter(); } }); } var uploader2 = new plupload.Uploader({ r…
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25440360

http://stackoverflow.com/q/25460123
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39729415
has comment: http://stackoverflow.com/comment/39729533
tagged with: loops
has answer: http://stackoverflow.com/a/25460215
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39729491
has comment: http://stackoverflow.com/comment/39729293
has comment: http://stackoverflow.com/comment/39729495
score: 0
has body: In various languages (I'm going to use JavaScript here, but I've seen it done in PHP and C++ and probably elsewhere), there seem to be a couple of ways of constructing a simple for loop. Version 1 is like: var top = document.getElementsByTagName("p"); for (var i = 0; i &lt; top.length; i++) { ...do something } Whereas elsewhere I've seen people construct the for loop like: for (var i = 0, ii = top.length; i &lt; ii; i++) It seems like people do it without rhyme or reason - the same programmer will do both in the same script. Is there any reason to do one and not the other? Cheers
has title: What are the pros and cons to assigning the end point of a for loop?
has comment: http://stackoverflow.com/comment/39729820
tagged with: coding-style

http://stackoverflow.com/q/25435338
tagged with: javascript
tagged with: jquery
has title: Edit MediaWiki API using Javascript or jQuery
score: 0
has comment: http://stackoverflow.com/comment/39683243
tagged with: mediawiki
has answer: http://stackoverflow.com/a/29210267
has comment: http://stackoverflow.com/comment/39683929
linked to: http://stackoverflow.com/q/3102819
type: UnansweredQuestion
tagged with: http
type: Question
has body: Note that I am totally new to Javascript, but due to complications, this is the only language that I can use here. I have spent many hours looking for a solution, but can't seem to find one. I want to edit a Wikipedia page through the MediaWiki API from my local machine using either Javascript or jQuery - that's it. I don't need a mechanism to obtain an edit token, that is all sorted. All I need is to be able to edit a page, and so far every method I've seen fails because of the 'Access-Control-Allow-Origin' header.
linked to: http://stackoverflow.com/q/3873636
answer count: 1

http://stackoverflow.com/q/25404158
linked to: http://stackoverflow.com/q/13574158
has comment: http://stackoverflow.com/comment/39624572
downvote count: 0
has comment: http://stackoverflow.com/comment/39624653
tagged with: javascript
has body: Suppose you have a task on your webapp that demands maximum performance. The task is highly parallelizable: you can subdivide it on, say, 500 independent subtasks. What is the best solution? (A) Merely spawn 500 Web Workers. (B) Spawn a small amount t of Web Workers and make them consume those 500 tasks. If (B) is the way to go, how can you determine (empirically if needed) the best value for t? Is there any library to solve this particular problem?
tagged with: web-worker
answer count: 1
has comment: http://stackoverflow.com/comment/39624718
upvote count: 6
favorite count: 0
type: UnansweredQuestion
score: 6
has title: Optimal number of Web Workers
type: Question
has answer: http://stackoverflow.com/a/43419870

http://stackoverflow.com/comment/69980674
has text: You can use [GroupEffect](http://danielcwilson.com/blog/2015/09/animations-part-4/) or [SequenceEffect](http://danielcwilson.com/blog/2015/09/animations-part-4/) to further transform your element/s. This only if your transform is not dictated by mouse position (eg. drag).
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25423684
type: Comment

http://stackoverflow.com/a/25549377
has body: It's almost correct. The string you get is a hexadecimal representation of your original string. Try to convert it like this: var decrypted = CryptoJS.AES.decrypt(encrypted, "770A8A65DA156D24EE2A093277530142").toString(CryptoJS.enc.Utf8); forked jsfiddle: http://jsfiddle.net/1qgzk9j8/
score: 4
has comment: http://stackoverflow.com/comment/39893777
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25549279
has comment: http://stackoverflow.com/comment/119059087
accepted answer of: http://stackoverflow.com/q/25549279
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/a/25512713
type: Answer
has body: Try triggering the event on page load: $('#myselect').change(function() { //... }).change(); http://jsfiddle.net/bwjxrhwo/
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25512666
answers question: http://stackoverflow.com/q/25512666

http://stackoverflow.com/comment/39697389
type: AnswerComment
comment on: http://stackoverflow.com/a/25442510
score: 0
type: Comment
has text: @539 provide demo, i will fix.

http://stackoverflow.com/comment/39735748
has text: How about just replacing `slideToggle` with `slideDown`, or am I missing something ?
comment on: http://stackoverflow.com/q/25463728
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/39684575
type: QuestionComment
type: Comment
has text: Here's a tip for you: [matooltip.com](http://www.matooltip.com). I made it to look just like Twitter's Bootstrap only better.
comment on: http://stackoverflow.com/q/25436093
score: 0

http://stackoverflow.com/q/25410492
has comment: http://stackoverflow.com/comment/39637854
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39637060
has comment: http://stackoverflow.com/comment/39637798
has title: Function Defined but still getting not defined
linked to: http://stackoverflow.com/q/25398005
has comment: http://stackoverflow.com/comment/39636944
has comment: http://stackoverflow.com/comment/39637826
possible better answer: http://stackoverflow.com/a/25410587
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39636928
has comment: http://stackoverflow.com/comment/39637044
has comment: http://stackoverflow.com/comment/39636941
has answer: http://stackoverflow.com/a/25410746
has comment: http://stackoverflow.com/comment/39637668
has body: I am trying to make a stop watch in js and my code is working correctly until I include Millisecond in my stopwatch. Here's my code: index.html My Second Page script.js var ss = 0, mm = 0, hh = 0, ms = 0; var once = 0; function gettime() { if (once == 0) { document.write(' '); once++; } setInterval("msss()", 100); } function msss() { // I have defined msss printtime(); if (ms > 1000) { sec(); } else { ms += 100; } } function sec() { ms = 0; printtime(); if (ss > 59) { min(); } else { ss += 1; } } function min() { ss = 0; printtime(); if (mm > 59) { hr(); } else { mm += 1; } } function hr() { mm = 0; printtime(); hh += 1; } function printtime() { document.getElementById('stopwatch').innerHTML = 'H: ' + hh + 'M: ' + mm + ' S: ' + ss + ' MS: ' + ms; } Error Code ReferenceError: msss is not defined What am I doing wrong?
accepted answer: http://stackoverflow.com/a/25410746
tagged with: javascript
has comment: http://stackoverflow.com/comment/39636847
score: 0
tagged with: stopwatch
has comment: http://stackoverflow.com/comment/39637001
tagged with: http://stackoverflow.com/tag/html
tagged with: increment
tagged with: setinterval
has answer: http://stackoverflow.com/a/25410587

http://stackoverflow.com/q/25520667
tagged with: regex
has title: On Demand Regular Expression for Password
type: AnsweredQuestion
has body: I need to make a regular expression for password, whose strength settings can be changed by the client. The strength parameters are as follows: Min and Max length can be taken care of by AngularJS ngMinlength and ngMaxlength. But I need to generate a regular expression which will be created on the fly, by parameters fetched from the db. I can fetch these parameters from a JSON like this: var minCharLength = pwdJSON.minCharLength; var minCapCharLength = pwdJSON.minCapCharLength; ... var regex = // What to do now? I don't have the knowledge of regular expression making. Plus this regular expression will also be used for validating on server with C#.
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39841615
accepted answer: http://stackoverflow.com/a/25521521
type: Question
tagged with: c#
linked to: http://stackoverflow.com/q/25520253
tagged with: javascript
has comment: http://stackoverflow.com/comment/39843111
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39841653
possible better answer: http://stackoverflow.com/a/25521510
favorite count: 0
has answer: http://stackoverflow.com/a/25521510
has answer: http://stackoverflow.com/a/25521521
has comment: http://stackoverflow.com/comment/39842854

http://stackoverflow.com/a/35115909
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25449639
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: If you want to set colors layer per layer, this trick works: https://github.com/epochjs/epoch/issues/137#issuecomment-177531945 var layer_num = 0 # insert here the number of the layer var catname = "category2" # insert here the css class category chart.getVisibleLayers()[layer_num].className = "layer " + catname Visit this link for more informations about category colors. By default, category10 is used, so "category1" is #1f77b4, "category2" is #ff7f0e etc
answers question: http://stackoverflow.com/q/25449639

http://stackoverflow.com/q/25476525
has comment: http://stackoverflow.com/comment/39759634
has answer: http://stackoverflow.com/a/25476804
linked to: http://stackoverflow.com/q/491052
answer count: 1
downvote count: 0
has body: I created a simple chrome extension tool to show small text message (a div with z-index 999999) on the page a user will be browsing. Sometimes, the div still appears below the existing page's elements and worse, the contents of the div changes because the page already has it's own CSS rules. The challenge is how to ensure that my text message will appear on top of all elements (works on any site) and that it will look consistent and unaffected by existing CSS rules. Would iframe solve this issue? But still, even with an iframe, it still needs to appear on top of all elements and seems like z-index doesn't work always.
has title: javascript: ensure element always appears on top
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 3
has comment: http://stackoverflow.com/comment/39759551
type: Question
score: 3
tagged with: javascript

http://stackoverflow.com/comment/39667833
score: 4
has text: In which language you want? your tags are confusing?
type: QuestionComment
comment on: http://stackoverflow.com/q/25427415
type: Comment

http://stackoverflow.com/a/25511884
answers question: http://stackoverflow.com/q/25511843
score: 0
type: Answer
has body: Try this: $(".button").click(function(){ $(this).next().fadeIn().delay(3000).fadeOut(); }); DEMO

http://stackoverflow.com/comment/39674304
type: AnswerComment
has text: @nole If you intend to have more than 1 node application listening on your box, you must use some sort of vhost and proxy. Whether it be a master node process that listens to 80 and delegates the connections based on host or a very lightweight proxy like nginx (which I recommend if you're glued to apache) to handle incoming connections.
type: Comment
comment on: http://stackoverflow.com/a/25416330
score: 0

native
tags question: http://stackoverflow.com/q/25499582
tag name: native
type: Tag

http://stackoverflow.com/comment/39880773
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25542222
has text: if the function is in global scope then you can use `eval(s+array[i]+ss)` - http://stackoverflow.com/questions/86513/why-is-using-the-javascript-eval-function-a-bad-idea
type: Comment

http://stackoverflow.com/a/25543428
accepted answer of: http://stackoverflow.com/q/25543382
type: Answer
has body: Sticking with your concept of using strings, it would be: window["functions"]["function1"](); If you want a single string for it, you can use split and walk through the parts: var name = "functions.function1"; callFunction(name); function callFunction(name) { var parts = name.split("."); var n; var obj = window; for (n = 0; n &lt; parts.length; ++n) { obj = obj[parts[n]]; if (!obj) { return; } } return obj ? obj() : undefined; } Side note: All properties of window are a globals. The global namespace is incredibly crowded, so adding more globals is a Bad Idea(tm). Instead, wrap your code in a scoping function and use your own object rather than window.
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25543382

http://stackoverflow.com/a/25499875
score: 0
has body: You can use jquery, and do something like this: ` I have a bike I have a car `
type: Answer
answers question: http://stackoverflow.com/q/25499539

http://stackoverflow.com/q/25517525
type: Question
has title: JavaScript file(jQuery steps) not loading in Google Chrome
score: 0
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25517586
answer count: 1
type: UnansweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/45090788
has body: I am using a jQuery plugin the file name is jquery.steps.js. I include it in index.html unambiguously but Chrome will not load this script. It was somehow in the cache earlier which is why I never noticed this. Can anyone suggest what the problem might be and how in the world I can get it to load. Thanks in advance

http://stackoverflow.com/comment/39989978
type: Comment
comment on: http://stackoverflow.com/a/25574784
has text: @RedGiant Is there anything else you are experiencing difficulties with regarding the code I've presented? Or is there anything you would like to have added or changed?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25500312
has comment: http://stackoverflow.com/comment/39804073
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39803968
has comment: http://stackoverflow.com/comment/39804138
accepted answer: http://stackoverflow.com/a/25501444
has body: I have #header and have #page. Both are positioned relatively, I don't want to make the header fixed but I want it to overlap the #page. The red bit is the #header and the dark green is the #page. I am trying to make the #header overlap the #page but keep the content of the #page away from the #header! The theory I was trying to apply to make this work is. 1) find the .outerHeight of #header 2) Double that height 3) Apply it as padding-top to the #page 4) Apply the height not doubled as mince margin-top Please help, I don't know how to get this working, here is what I have been working with: $(window).on("ready resize", function() { if (window.innerWidth &gt; 1024) { var pageTop = $("#header.header-overlay .content").outerHeight() + "px"; $("#page").css("padding-top", pageTop); } else { var pageTop = $("#secondHeader").outerHeight() + "px"; $("#page").css("padding-top", pageTop); } });
has comment: http://stackoverflow.com/comment/39804233
has comment: http://stackoverflow.com/comment/39804911
has title: Apply the fixed header effect to a none fixed header
type: Question
has comment: http://stackoverflow.com/comment/39804041
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39803820
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25501444
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39803734
tagged with: css
has comment: http://stackoverflow.com/comment/39804023

ng-options
tags question: http://stackoverflow.com/q/25396722
tags question: http://stackoverflow.com/q/25410479
tags question: http://stackoverflow.com/q/25500782
type: Tag
tag name: ng-options
tags question: http://stackoverflow.com/q/25512214

http://stackoverflow.com/comment/39819735
type: Comment
comment on: http://stackoverflow.com/a/25508275
type: AnswerComment
score: 0
has text: I know, that's why I said that this answer gives a hint, but not actually answers the question.

http://stackoverflow.com/comment/39720735
comment on: http://stackoverflow.com/q/25455493
type: Comment
type: QuestionComment
has text: possible duplicate of [Displaying yAxsis data for columnrange highchart](http://stackoverflow.com/questions/25390410/displaying-yaxsis-data-for-columnrange-highchart)
score: 0

http://stackoverflow.com/q/25449104
score: 1
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39708798
has answer: http://stackoverflow.com/a/25453389
answer count: 1
linked to: http://stackoverflow.com/q/17797437
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
has title: d3 time axis with only days for a long interval
upvote count: 1
has body: I need to draw axis with time scale and show only days on it. Here is my code: var xScale = d3.time.scale.utc() .domain([beginning, ending]) .range([margin.left, availableWidth - margin.right]); var xAxis = d3.svg.axis() .scale(xScale) .orient(orient) .tickFormat(tickFormat) .ticks(d3.time.days.utc, 1) .tickSize(tickSize); But on long intervals it is bad overlapping (because I show every tick): https://pp.vk.me/c620728/v620728099/16ab9/HdJByiakoKA.jpg I make some math operations and calculate acceptable amount of ticks: var xAxis = d3.svg.axis() ... .ticks(d3.time.days.utc, stepTick) // for example 20 for a year interval .tickSize(tickSize); So every 20th tick on axis will be shown for a year and it looks great! Except joint of month: https://pp.vk.me/c620728/v620728099/16aaf/PjM4KJ0ofTM.jpg (31.05/01.06) Labels on joint of month are still overlapping, because in docs for d3.time.days we can see that If step is specified, then every step'th date will be returned, based on the day of the month. How should I do to prevent labels overlapping ?
linked to: http://stackoverflow.com/q/19242674

http://stackoverflow.com/comment/39888854
comment on: http://stackoverflow.com/q/25546747
type: Comment
type: QuestionComment
has text: What version of angular are you using?
score: 0

http://stackoverflow.com/comment/39599709
score: 0
type: Comment
type: QuestionComment
has text: It's meant to refer to the `td.contents` element. So for each `tr.active`, the number value from its selected shapes data attributes is displayed in its child `tr.contents`.
comment on: http://stackoverflow.com/q/25389809

http://stackoverflow.com/comment/39845450
score: 0
type: AnswerComment
type: Comment
has text: See the answer below for a better approach.
comment on: http://stackoverflow.com/a/25486923

http://stackoverflow.com/a/25489125
score: 1
answers question: http://stackoverflow.com/q/25489049
upvote count: 1
has body: Just remove the event.preventDefault();
type: Answer
downvote count: 0

http://stackoverflow.com/a/25457805
has body: 1- Reading the required data (JSON serialized) from storage directly from the content script every time the page is visited. But you have to do that every time your page is loaded which you want to avoid (I guess) 2- Maintaining the state in the extension background page and transferring the required data (also JSON serialized) to the content script environment using message passing. The only way to make Content Scripts and Background scripts interact is via Message Passing. You are not actually looking to an alternative solution but you want to improve the process and avoid message passing each time a page is loaded. For this, you can develop a spec. The spec states for which URLs or which Domains or based on some condition you want to get the data from Background. If your current URL/Tab agrees with spec only then pass a message to background. Optionally, Background can also do the same and send message only if your spec is followed. Moreover, when your extension is loaded, you can also cache the storage into local variable. Use Chrome Storage API to listen for changes in storage and update your local data copy accordingly. You can also look at this code written by me using the same approach.
has comment: http://stackoverflow.com/comment/39730620
has comment: http://stackoverflow.com/comment/39730530
answers question: http://stackoverflow.com/q/25453243
score: 0
has comment: http://stackoverflow.com/comment/39730631
has comment: http://stackoverflow.com/comment/39730667
has comment: http://stackoverflow.com/comment/39731337
type: Answer

http://stackoverflow.com/a/25488843
upvote count: 2
has body: I suspect that the issue is that the iframe is running with its own document context, and its own javascript context. That means that the custom elements you've registered in your document are unknown to the iframe. Try: var source = '&lt;script src='path/to/platform/platform.js'&gt;&lt;/script&gt;'; source += '&lt;link rel='import' href='path/to/custom-element/custom-element.html'&gt;'; source += '&lt;custom-element&gt;&lt;/custom-element&gt;'; $(this.$.frame).contents().find('html').html(source);
has comment: http://stackoverflow.com/comment/39788949
answers question: http://stackoverflow.com/q/25487247
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39782797
score: 2

http://stackoverflow.com/q/25399859
tagged with: javascript
has title: How does same origin policy solve issues with XHR, cookies and cross page commuication?
tagged with: security
score: 0
tagged with: same-origin-policy
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/39617445
downvote count: 1
has body: I understand that same origin policy is about restricting javascript from other domains from accessing contents of a page. I read these particular points of importance of same origin policy on the Web: XmlHttpRequests: they don't work if done cross domain. But why would a Web page make an xhr request to a less trusted site in the first place? Isn't it the Web page's fault? Why impose a restriction then? cookies: it is not right if a malicious page can view my Facebook cookies. So if it tries to check "document.cookies" it will never see my Facebook cookies anyway. Where does same policy come into the picture here? cross page communication: the only way a malicious page opened in a tab can view information about another page is via cookies and or local storage. So where does same origin policy help here?
has comment: http://stackoverflow.com/comment/39619038
favorite count: 0
accepted answer: http://stackoverflow.com/a/25400299
possible better answer: http://stackoverflow.com/a/25400232
has comment: http://stackoverflow.com/comment/39616755
has answer: http://stackoverflow.com/a/25400299
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25400054
type: Question
has answer: http://stackoverflow.com/a/25400232
has comment: http://stackoverflow.com/comment/39617394

http://stackoverflow.com/comment/39712450
type: Comment
comment on: http://stackoverflow.com/q/25451418
has text: No difference, parens are there to remind you that's an IIFE.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25490798
accepted answer: http://stackoverflow.com/a/25492291
has title: How do I cap the slider so that my next and prev buttons don't scroll past the content into whitespace?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
type: Question
score: 0
linked to: http://stackoverflow.com/q/25313267
has answer: http://stackoverflow.com/a/25492291
has body: I've created a fiddle to demonstrate my question. If you continue to hit prev and next the slider bar keeps sliding even past the content. $('#next').click(function() { $('#sliderWrapper').animate({ marginLeft: "-=200px" }, "fast"); }); $('#prev').click(function() { $('#sliderWrapper').animate({ marginLeft: "+=200px" }, "fast"); }); I assume I need an if statement something like if (current.width+totalScrolled &lt; slider.width) { $('#sliderWrapper').animate({ marginLeft: "+=200px" }, "fast"); } else { [soemthing like set.scrollRight = max] } and again to keep track of where you are so you don't scroll back too far. Even a solution that brings you back to the beginning would be a great way to solve this. I just help with logic.
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39787856
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25491658
has text: if its playing in safari it will always go full screen. If the web app is saved to your home screen, I think it will play inline. It is very unfortunate. I too have really disliked this behavior
type: Comment

http://stackoverflow.com/comment/39700631
score: 0
type: Comment
has text: @Alain: The cache contains the promises, not the values. Which has the additional benefit that a second call during a ongoing request returns the same promise as the first call, instead of starting a second request.
comment on: http://stackoverflow.com/a/25434141
type: AnswerComment

http://stackoverflow.com/comment/39755331
comment on: http://stackoverflow.com/q/25473613
type: Comment
type: QuestionComment
has text: what is this.get("controller").get("canvas"), and where is it set?
score: 0

http://stackoverflow.com/comment/39599748
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25390460
has text: @epascarello. sorry, isee it now. that was a type. it's actually var json = 'json.json',
score: 0

http://stackoverflow.com/a/25411868
has comment: http://stackoverflow.com/comment/39640192
has comment: http://stackoverflow.com/comment/39640089
has comment: http://stackoverflow.com/comment/39639650
has body: There is now reliable way to say for sure that the URL is not iframeable. Most of those URLs can be excluded with an Ajax request and checking the X-Frame-Options header in the response. (Disregarding the "Same origin policy") Other sites use a script to check if they are iframed, those sites can only be excluded by "testing" the site in a hidden iframe and check the content yourself, of course this is only applicable if you know the expected content, or at least some key elements. To prevent the loaded iframe from redirecting your own page, you can use the IFrame-Sandbox or alternativly checking onbeforeunload
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25411408

http://stackoverflow.com/a/25470964
downvote count: 0
answers question: http://stackoverflow.com/q/25470477
score: 1
upvote count: 1
has body: So from what I understand from the question, you are not clear on static methods / properties in javascript. Static methods can be called any time without creating a new instance of the class. Static methods are merely related code that may do something such as configure a class or uphold a design pattern such as creating / returning a singleton instance of the class. // Constructor var BunnyDefender = {}; // Prototype declarations BunnyDefender.prototype = { ... } // Static method implementing a crude singleton BunnyDefender.Boot = function() { // Check if the static property _instance exists // if it doesn't. Create it one time only, thus our // BunnyDefender singleton is born. if ( ! BunnyDefender._instance ) BunnyDefender._instance = new BunnyDefender(); // Return the already created instance of BunnyDefender return BunnyDefender._instance; }; As Boot is a static method of the class BunnyDefender we can call it without creating a new instance of bunny defender. var bunnyDefender = BunnyDefender.Boot(); You can read more about static properties / methods in javascript tutorials/documentation such as this article.
type: Answer

http://stackoverflow.com/a/30791181
has comment: http://stackoverflow.com/comment/49711301
score: 4
accepted answer of: http://stackoverflow.com/q/25439051
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: You can simply iterate over your controls by going through the DOM: // Assuming $element is your &lt;form&gt; var invalidFields = []; $element.find('.ng-invalid').each(function() { invalidFields.push(this.name); }); This approach is just using the fact that NgModelController will set ng-invalid CSS class on all invalid controls. Using Angular does not mean you are forbidden to work with DOM.
type: Answer
answers question: http://stackoverflow.com/q/25439051

http://stackoverflow.com/comment/39626408
type: QuestionComment
has text: I have no idea what fiddle is..
comment on: http://stackoverflow.com/q/25404915
score: 0
type: Comment

http://stackoverflow.com/a/25514035
type: Answer
downvote count: 0
score: 2
has body: I'd suggest a slightly more robust solution than what's been proposed so far: var urlString = "&lt;url string coming in some undetermined order&gt;"; var parts = urlString.split('/'); var map = {}; for (var i = 0; i &lt; parts.length; i += 2) { map[parts[i]] = parts[i+1]; } This way your values are now stored along with the keys to access them, which you can set in any way you want. So say your URL is /myMessages/v2/partnum/2/messages/I18/thing/splund/foo/bar and you want the values of partnum, thing, and foo, but you don't necessarily know that they'll be in the order I just put up in that url. Using the method I suggested, you can simply access their values using: var partnum = map['partnum'] // '2' var thing = map['thing'] // 'splund' var foo = map['foo'] // 'bar'
upvote count: 2
has comment: http://stackoverflow.com/comment/39829765
answers question: http://stackoverflow.com/q/25513856

http://stackoverflow.com/comment/39783466
comment on: http://stackoverflow.com/q/25489426
score: 0
type: Comment
type: QuestionComment
has text: I don't understand what you mean by "when the second loop starts the first one stops".

http://stackoverflow.com/a/37313379
has body: I've found the __st variables unreliable (__st_uniqToken for one). I believe the proper way to do this in Javascript is using the following call: ShopifyAnalytics.lib.user().id() You can also get the unique user id (non-logged in id) with: ShopifyAnalytics.lib.user().properties().uniqToken This is also the only reliable way to get it on the checkout page. I previously used __st_uniqToken, but it has since stopped working. NOTE This is no longer 100% fool-proof. Shopify have AGAIN changed how their site works on the landing and thank-you pages. I've had to resort to the following function to get a user id 'reliably'. var user_id = function() { try { return ShopifyAnalytics.lib.user().id(); } catch(e) {} try { return ShopifyAnalytics.lib.user().properties().uniqToken; } catch(e) {} try { return ShopifyAnalytics.lib.user().anonymousId(); } catch(e) {} return __st_uniqToken; }; Developing for Shopify is a true nightmare. I spend 50% of my time un-breaking my product every few weeks because them.
score: 19
has comment: http://stackoverflow.com/comment/78489899
downvote count: 0
has comment: http://stackoverflow.com/comment/64548584
answers question: http://stackoverflow.com/q/25501391
upvote count: 19
has comment: http://stackoverflow.com/comment/104090075
type: Answer

http://stackoverflow.com/comment/39826076
type: Comment
type: QuestionComment
has text: save the geolocation data to a hidden input and submit the form
comment on: http://stackoverflow.com/q/25511992
score: 0

http://stackoverflow.com/q/25545486
favorite count: 0
has comment: http://stackoverflow.com/comment/39886488
answer count: 5
has comment: http://stackoverflow.com/comment/39886513
has comment: http://stackoverflow.com/comment/39887488
has comment: http://stackoverflow.com/comment/39886564
has comment: http://stackoverflow.com/comment/39886457
has comment: http://stackoverflow.com/comment/39886608
accepted answer: http://stackoverflow.com/a/25545611
has comment: http://stackoverflow.com/comment/39887633
has comment: http://stackoverflow.com/comment/39888484
has comment: http://stackoverflow.com/comment/39886759
has comment: http://stackoverflow.com/comment/39886416
type: AnsweredQuestion
has title: cannot update values of textbox in jQuery
possible better answer: http://stackoverflow.com/a/25545640
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25545699
has body: I'm trying to update values of three textboxes in three different table rows but it is only updating one textbox value in one row. I'm sharing my code please guide me. HTML: jQuery: var BindBPCustom = function (id, BPUSD) { var errormsg = ""; var amount = $(id).val(); var country21 = $('#CurrencyValue').val(); $.ajax({ type: "GET", url: cc, data: { amount: amount, country: country21 }, contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { $(BPUSD).val(data); }, error: function (jqXHR, exception) { } }); } $(".ppp").on("keydown", function () { var cnt = 0; var bp = $("#ItemBuyingPrice" + cnt); var converted = $("#Itembpusd" + cnt); cnt++; BindBPCustom(bp, converted); alert(cnt); }); I want to change every Itembpusd0,1,2 values on each corresponding text typed in ItemBuyingPrice0,1,2. Currently it is just changing only one textbox value if i type in ItemBuyingPrice0 it is changing Itembpusd0 value but i want this in other textboxes as well. Please guide me
type: Question
has answer: http://stackoverflow.com/a/25545640
has comment: http://stackoverflow.com/comment/39886481
has answer: http://stackoverflow.com/a/25545650
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25545611
tagged with: ajax
has answer: http://stackoverflow.com/a/25545832
score: 0
has comment: http://stackoverflow.com/comment/39886599
has comment: http://stackoverflow.com/comment/39886672
has comment: http://stackoverflow.com/comment/39886687

http://stackoverflow.com/q/25491004
has answer: http://stackoverflow.com/a/25650817
has answer: http://stackoverflow.com/a/25491269
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40081121
has title: How to cancel the blur event if a modal is present?
tagged with: redactor
score: 0
tagged with: wysiwyg
has answer: http://stackoverflow.com/a/25491193
has comment: http://stackoverflow.com/comment/39786532
type: Question
tagged with: javascript
tagged with: jquery
has body: I'm using the WYSIWYG HTML editor Redactor as an inline editor. When the user clicks an editable line and the editor is invoked, upon blur, the editor is destroyed and the data saved. element.bind('click', function($event) { element.redactor({ focus: true }); }); element.on('blur', function($event){ var ckValue = element.getCode(); scope.$apply(function () { setter(scope, ckValue); }); element.destroyEditor(); compileElement(); }); The issue I'm having is when the editor opens a modal for uploading a picture. Focus is changed to the modal window. Is there a way to change/chain focus so the blur event is not triggered when a modal is opened?
answer count: 3

http://stackoverflow.com/a/25427576
has body: Okay, I have it - just do this: #components{ overflow: visible; } #draggableHelper{ z-index: 100; } .panel{ z-index: 99; } #sidebar{ overflow: visible; } should work.
upvote count: 1
has comment: http://stackoverflow.com/comment/39670784
accepted answer of: http://stackoverflow.com/q/25426863
answers question: http://stackoverflow.com/q/25426863
has comment: http://stackoverflow.com/comment/39670512
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39670944
type: Answer

http://stackoverflow.com/comment/39814989
type: Comment
type: QuestionComment
score: 0
has text: @Celt The second statement is complete wrong, because `document.getElementById("myObject")` returns a dom object (a representation of memory).
comment on: http://stackoverflow.com/q/25506223

http://stackoverflow.com/q/25461077
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25461116
has title: Will yield expression block if execute asynchronous operation?
has answer: http://stackoverflow.com/a/25461628
tagged with: generator
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I have learned that when we call next(), the code will continue to run until the yield keyword, and next() return will hold this value. My question is, if yield expression is doing an asynchronous operation, such as perform a file io or http request, and before the asynchronous call is done, we call next, is the code will still block, or resume running immediately even the asynchronous operation has not finished? And Why? function * generator(){ yield http.get('http://google.com'); yield http.get('http://yahoo.com'); } var gen = generator(); var a = gen.next(); var b = gen.next(); If google.com's request has not finished, will yahoo.com's request be sent immediately? or it has to block and wait for the google's request being finished?
answer count: 2
downvote count: 0
favorite count: 0
tagged with: yield

http://stackoverflow.com/q/25499582
upvote count: 6
type: AnsweredQuestion
has body: I can't find any plugin that makes infinite scroll functional without jQuery. Is there something like this? https://github.com/alexblack/infinite-scroll - doesn't work:)
tagged with: scroll
downvote count: 1
type: Question
has title: Infinite scroll without jquery?
has comment: http://stackoverflow.com/comment/39802310
tagged with: native
score: 5
linked to: http://stackoverflow.com/q/5059526
tagged with: javascript
has answer: http://stackoverflow.com/a/25500655
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25500655

http://stackoverflow.com/comment/39856132
type: Comment
type: QuestionComment
has text: @RichieHindle Interesting. The only thing is that the code I made puts the font-size at 33.5px because at 33px, the paragraph isn't yet as high as the container...
comment on: http://stackoverflow.com/q/25528559
score: 0

http://stackoverflow.com/comment/40241283
has text: Ideally I'd like to have the arrow start from the middle of the origin square to the center of the destination square. I was trying to accomplish this with the use of pre-determined coordinates assigned to each div. So far I haven't touched jQuery at all, and was trying to write everything in straight javascript since I wanted to reduce how many external files I had to link to. However, I am also trying to play around with html2canvas (also giving me trouble), which uses jQuery, so I may not have a choice.
comment on: http://stackoverflow.com/a/25528141
type: AnswerComment
score: 0
type: Comment

three.js
tags question: http://stackoverflow.com/q/25428063
tag name: three.js
tags question: http://stackoverflow.com/q/25487721
tags question: http://stackoverflow.com/q/25491068
tags question: http://stackoverflow.com/q/25453950
tags question: http://stackoverflow.com/q/25452090
tags question: http://stackoverflow.com/q/25437381
tags question: http://stackoverflow.com/q/25407973
tags question: http://stackoverflow.com/q/25535468
tags question: http://stackoverflow.com/q/25426300
tags question: http://stackoverflow.com/q/25508451
tags question: http://stackoverflow.com/q/25415155
tags question: http://stackoverflow.com/q/25511911
tags question: http://stackoverflow.com/q/25462755
tags question: http://stackoverflow.com/q/25467405
type: Tag
tags question: http://stackoverflow.com/q/25432540
tags question: http://stackoverflow.com/q/25418078
tags question: http://stackoverflow.com/q/25458168
tags question: http://stackoverflow.com/q/25497541
tags question: http://stackoverflow.com/q/25467825
tags question: http://stackoverflow.com/q/25510037
tags question: http://stackoverflow.com/q/25514067
tags question: http://stackoverflow.com/q/25534713

http://stackoverflow.com/q/25498082
type: Question
score: 31
has answer: http://stackoverflow.com/a/66328175
has answer: http://stackoverflow.com/a/25498210
possible better answer: http://stackoverflow.com/a/48754590
has title: jQuery create and append multiple elements
tagged with: javascript
has answer: http://stackoverflow.com/a/48754590
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25498210
has answer: http://stackoverflow.com/a/51118610
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
has body: I have created 2 divs, Div1(freeze) Div2(parent) and again 3 divs(loading, header, msg) appended it to Div2(parent). Entire divs in to body tag. Below are my code, I think there is some other best way to achieve this. var freeze = $('&lt;div/&gt;',{ "class" : "freeze" }); var parent = $('&lt;div/&gt;',{ "class":"parent" }); var loading = $('&lt;div/&gt;',{ "class":"loadimg" }).appendTo(parent); var header = $('&lt;div/&gt;',{ "class":"header" }).appendTo(parent); var msg = $('&lt;div/&gt;',{ "class":"msg" }).appendTo(parent); $('body').append(freeze,parent);
upvote count: 31

http://stackoverflow.com/a/25555604
has body: Is it possible to check the response headers for the media URLs separately? If so, you could request just headers for the media URLs, check for anything other than 200, and then provide feedback to the user. Might be a workaround. Your code looks fine to me.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25510171

http://stackoverflow.com/a/25486443
has body: You can try this: String html = myPanel.getElement().getInnerHTML(); print(html); public static final native void print(String html) /*-{ top.consoleRef=$wnd.open('','_blank', ""); top.consoleRef.document.write(html); top.consoleRef.print(); top.consoleRef.document.close() }-*/;
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39778251
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25485735
answers question: http://stackoverflow.com/q/25485735

http://stackoverflow.com/q/25390272
tagged with: java
tagged with: javascript
has title: Why is my XML file not loading in Websphere Virtual Server?
has body: I am trying to dynamically generate a navigation menu by parsing an xml file with jquery in a Dynamic Web Project in IRAD (eclipse). The XML: <?xml version="1.0" encoding="utf-8" ?> The jQuery script (embedded in a jsp page): $(document).ready(function(){ $.ajax({ type: "GET", url: "WEB-INF/topMenuTemplate.xml", dataType: "xml", success: function(xml){ var ul_main=$(" "); $(xml).find("Menu").each(function(){ if($(this).children().length) { var ulSub=$(" "); $(this).children().each(function(){ ulSub.append(" "+$(this).attr("text")+" "); }); var li=$(" "+$(this).attr("text")+" "); ul_main.append(li.append(ulSub)); } else ul_main.append(" "+$(this).attr("text")+" "); }); $("#navbar").append(ul_main); } }); }); Chrome Javascript error: GET http://localhost:9080/ELVISWeb/WEB-INF/topMenuTemplate.xml 404 (Not Found) However when I open the raw xml with chrome it opens fine. It's when I use the virtual server url: http://localhost:9080/ELVISWeb/WEB-INF/topMenuTemplate.xml that I get: Error 404: javax.servlet.ServletException: SRVE0190E: File not found: /WEB-INF/topMenuTemplate.xml I've also verified multiple times and the path is indeed correct. Is there something I need to enable in WebSphere to allow XML files to be used by jQuery? Thanks.
accepted answer: http://stackoverflow.com/a/25391145
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/xml
has answer: http://stackoverflow.com/a/25391145
upvote count: 1
answer count: 1
tagged with: jakarta-ee

http://stackoverflow.com/comment/39671832
type: QuestionComment
comment on: http://stackoverflow.com/q/25424378
score: 0
has text: I set singleFileUploads: false Now it works!
type: Comment

http://stackoverflow.com/comment/39634150
has text: Ok great thanks :) Then not use main.css and h5bp.css files? Isn't it just adding more bloat having those files there too?
comment on: http://stackoverflow.com/a/25408762
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39675530
has text: The `.live()` API is long-deprecated. [Satisfy your search for knowledge here.](http://api.jquery.com/on/)
comment on: http://stackoverflow.com/q/25431269
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39811849
type: QuestionComment
has text: ` close tab `
comment on: http://stackoverflow.com/q/25503625
score: 0
type: Comment

http://stackoverflow.com/comment/39618946
score: 1
comment on: http://stackoverflow.com/q/25401010
type: Comment
has text: You are actually pushing an array to an object, not an array.
type: QuestionComment

http://stackoverflow.com/a/25508820
accepted answer of: http://stackoverflow.com/q/25508565
answers question: http://stackoverflow.com/q/25508565
downvote count: 0
score: 1
has body: If I'm correct in assuming this is an HTTP-Auth window (that is, the remote HTTPD itself - Apache or Nginx or IIS or whatever - is requesting authentication, not the site software) you can provide a login and password as part of the iframe src URL, e.g. &lt;iframe src="http://login@password:website.com"&gt;&lt;/iframe&gt; I wouldn't recommend this approach if the login and password are sensitive, but your choices are really either putting the login and password in a place where the end user can find them, like this, or making another arrangement with the owners of website.com to auto-authorize users of your site.
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25415035
accepted answer: http://stackoverflow.com/a/25415139
type: AnsweredQuestion
tagged with: clone
has answer: http://stackoverflow.com/a/25415252
has comment: http://stackoverflow.com/comment/39645753
linked to: http://stackoverflow.com/q/1745814
has answer: http://stackoverflow.com/a/25415139
type: Question
has answer: http://stackoverflow.com/a/63712879
possible better answer: http://stackoverflow.com/a/25415252
answer count: 3
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39645707
score: 0
has comment: http://stackoverflow.com/comment/39645851
has body: I'm cloning a "template" DIV with jQuery and appending a modified version to another DIV. The problem is that the changes I make to the clone, do not show up when I append it to the destination. var $clone = $('div[data-id="5"]').clone(); console.log($clone.data('id')); // outputs '5' $clone.data('id', 99); console.log($clone.data('id')); // outputs '99' $clone.appendTo($('#target')); // resulting cloned element has data-id of '5'! Whaa...? Here's a fiddle to make it clearer: http://jsfiddle.net/ajanini/rcxd4v3b/1/ (inspect the element to see that the data-id is unchanged) Question is: what am I doing wrong? How do I change the data-id of the clone and keep the change when I append it to the destination?
has title: Change property of cloned element before appending
has comment: http://stackoverflow.com/comment/39645890

http://stackoverflow.com/comment/39853052
type: Comment
has text: NOTE: I highly recommend just caving and using moment js for date logic. Very nice library.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25527178

http://stackoverflow.com/comment/39639510
type: Comment
has text: how to write my call back function??
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25411298

http://stackoverflow.com/q/25400928
tagged with: javascript
tagged with: jquery
has body: $.noConflict(); jQuery(document).ready(function ($) { var options = { sortList: [ [1, 1] ], theme: 'ice', widgets: ['zebra', 'cssStickyHeaders'], }; $("#myTable").tablesorter(options); }); I use tablesorter and need to use cssStickyHeaders widget but I have two problems that I could not fix. 1) I have another sticky header on my page, and I need this tables sticky header to appear under it. I tried to understand widget options parameters from here but could not make it work. 2) CSS does not update automatically, so I have to turn on and off the developer tools in browser to make it work, to make the header move. In example everything works but it doesn't work with my page, though I do everything in the same way as it is presented in the example. I am new to javascript. I hope someone will help me.
score: 0
has comment: http://stackoverflow.com/comment/39618824
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39619293
tagged with: css
answer count: 0
type: UnansweredQuestion
has title: How to use tablesorter plugins cssStickyHeaders widget?
type: Question
has comment: http://stackoverflow.com/comment/39619069

http://stackoverflow.com/comment/39636674
has text: On a browser it is working fine. But I am not sure why it doesn't work in SharePoint if the background color worked. I tried simplifying the selector but still no luck
comment on: http://stackoverflow.com/a/25410271
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25399340
has title: How to change name and id of element using jQuery?
has body: I'm new at jQuery. I'm cloning one specific HTML block and trying to change last cloned html's element's nameor id, class but i couldn't. I can find and alert name of element that i want to change, but i can not change it. Hope you can help me.. thanks in advance. My code jQuery(document).on("click",".smclass",function(){ var html = jQuery(this).closest(".entry-edit").clone().appendTo(".main-col-inner").html(); html = jQuery(html).find('.start').attr('name','optional[2][type]').attr('id', 'Type1'); } HTML Field Ekle Date Text Select
score: 0
accepted answer: http://stackoverflow.com/a/25399445
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25399564
has answer: http://stackoverflow.com/a/25399564
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25399445

http://stackoverflow.com/a/25903998
has body: var append = $('#scrollIncoming').append( ' ' + ' ' + ' ' + ata[j].QueueNo + ' ' + ' ' + '' + data[j].Quantity + ' - ' + data[j].Code + ' ' + ' ' + ' ' ); my apologies, late response.. by the way I already solved it. Thanks bdw
accepted answer of: http://stackoverflow.com/q/25541907
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25541907
score: 0
type: Answer

http://stackoverflow.com/comment/39650844
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25417715
has text: @taufique Splitting with both a "string" and a character: `/puppy|kitten|[bdf]/`

http://stackoverflow.com/q/25530175
type: Question
has title: Alternative Delimiters for Handlebars
has comment: http://stackoverflow.com/comment/39860301
has comment: http://stackoverflow.com/comment/39860610
tagged with: javascript
tagged with: gruntjs
has body: I read on the handlebars js website that... Alternative delimeters are not supported. ... and unfortunately it conflicts with Angular JS. I want to do something like what I can do in handlebars... .json { "people": [{"name":"joe"}, {"name":"jay"}, {"name":"jim"}] } .tpl.html {{={% %}=}} {%#people%} {%name%}: {{localtime('{%name%}')}} {%/people%} And end up with... joe: {{localtime('joe')}} jay: {{localtime('jay')}} jim: {{localtime('jim')}} ... which is ready for angular js to process. I do not want to alter angular js delimiters, I use them much more heavily throughout the app. The best I can come up with, is to parse the HTML, and replace angular delimiters with a unique token, then swap instances of {% and %} with {{ and }}, process with handlebars, and then replace the tokens with original angular delimiters again on the processed output. This seems like far too much work. Is there another alternative? I am using grunt, is there a plugin to do what I am trying to do here?
downvote count: 0
linked to: http://stackoverflow.com/q/14324850
favorite count: 0
tagged with: mustache
linked to: http://stackoverflow.com/q/13671701
tagged with: angularjs
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/14324850
has comment: http://stackoverflow.com/comment/39858955
tagged with: handlebars.js
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/25469591
has body: Try using "Json.stringify". $.ajax({ url: 'http://localhost:8080/JasonToServlet/test', type: 'POST', dataType: 'json', data: {"json[]": JSON.stringify(data1)}, success: function(result) { } }); This will parse the array as string as follows: [{"Name":"Test","url":"Me"},{"Name":"Test2","url":"Me2"}] The problem here is that above result is a string not an array. So you gonna have to use stringtokenizer to split the string and make it as array. From servlet get this as: String row= request.getParameter("json[]"); String row1= request.getParameter("mode"); StringTokenizer str = new StringTokenizer(row, "[{}]"); List&lt;String&gt; temp = new ArrayList&lt;String&gt;(); while (str.hasMoreElements()) { String token = str.nextToken(); if(!token.equal(",")) temp.add(token); } THIS IS NOT A PERFECT SOLUTION, BUT IT WORKS.. :)
answers question: http://stackoverflow.com/q/25462850
score: 0
type: Answer

http://stackoverflow.com/comment/39646977
type: AnswerComment
score: 0
type: Comment
has text: Great solution, the count is what I was missing! Like in your code, I wanted to select items one by one, I meant add to the html with prepend, which puts the html before, sorry for the confusion.
comment on: http://stackoverflow.com/a/25415679

http://stackoverflow.com/comment/39689090
type: Comment
has text: I agree but the issue is that quote_id is undefined at the end: it is not even an object. So I guess the issue is somewhere else in the ajax answer. Thanks for your help
comment on: http://stackoverflow.com/q/25438227
score: 0
type: QuestionComment