I need to get the IP of the client. I am able to get it through PHP variable "$_SERVER['REMOTE_ADDR']". I get this ip from server side php to html page through AJAX request but when I want to use this IP value in JavaScript it is showing that th
I have a problem populating a jsgrid from with JSON data and I have scaled down the code to a very minimal implementation but it is still not working. I can see in the Chrome debugger that the REST call returns data on this format {data: [{ "Name&quo
I can easily make a plain object look like an array by setting its prototype to Array.prototype: const obj = {}; Reflect.setPrototypeOf(obj, Array.prototype); (I'm aware that there are also some problems with the magic length property and sparse arra
Just trying to submit the form data to the MySQL DB using Ajax & Python- Flask, but the same error "method not allowed" appearing again and again.. kindly look at the codes and help me out... <div class="modal-content"> <d
I'm trying to function this code But when I use it on my Angular app, I found some errors, and it seems to be jQuery var element=$('.cds'); //the problem is right here (angular.element('.cds') is the same) console.log(element.html()); //prints undefi
My goal is to create an appropriate above the fold .css file for each appropriate .html page. I'm using grunt-penthouse to extract the css and it works fine.. as long as you have only one html page. my current configuration goes something like this:
The following code I wrote in JavaScript, but I'm trying to convert it into something Python can understand, specifically the for loop. I tried reading up on how the for loop syntax in Python reads, but I just can't seem to wrap my head around it, si
This question already has an answer here: How to compare arrays in JavaScript? 42 answers I did the following. Very confused whether they are not equal. var arr1 = [] arr1.push(1) arr1.push(2) arr1.push(3) var arr2 = [1, 2, 3] var isSame = (arr1==arr
I want to hide all elements except for an element with a specific class AND all elements inside this. right now im using $("body").not(".embedded").hide(); But it also hides the elements inside my .embedded element. I appreciate every
Is it possible to parse in ng-repeat a array value into a string? I'll explain what I mean. <tr ng-repeat="(key,property) in obj.properties"> <td>{{key}}</td> <td>{{property}}</td> </tr> This {{property}} is a
In C# WinForms sample application, I have used WebBrowser control. I want to use JavaScript XPath to select single node. To do this, I use XPathJS But with the following code, the returned value of vResult is always NULL. bool completed = false; WebB
I have to add a div element to a page after a particular option in the select box is selected. How can I do it using jQuery? I am trying to use the onClick event but it doesn't works. <div class="col-xs-7"> <label for="sel1"&g
I have a slight problem here and maybe I can find someone who has dealt with this problem in the past. How can I resize a div while dragging an image? I'm using jQuery ui resizable and draggable. Here's a live URL: http://railmedia.ro/test/ I am tryi
I have a very simple problem and keep finding answers to similar questions with more complexity. I am trying to replace image links in loaded html and decided that the best is to read the html into a string variable loadedHTML using .get(), like this
I am facing issues while constructing an object using javascript. I want this: { "p_id": "2", "p_name": "weblogic", "ip_list": [ { "ip_id": 2690 }, { "ip_id": 2692 }, { "ip_id"
I've been reading a lot on Nodejs and its frameworks and recently finished my first full javascript frontend (using Angularjs). I've decided that my next pet project will be a Nodejs adventure using one of these two frameworks: Sails.js Meteor I've r
I have jquery code: $("#forcedcancel").on("click", function(e){ e.preventDefault(); $("#forceDialog").remove(); // get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); // c
I have an expression that is used to estimate percentiles by interpolating between two values. windowMin + (currentPercentile - lastPercentile) * (windowMax - windowMin) / (percentile - lastPercentile) This has given me very good real-world results.
I am trying to do the same thing as done in this Fancybox example here: http://jsfiddle.net/jekAe/ When I do it it keeps opening up the second gallery for all links. Here's what I have: My JS: $(document).ready(function() { var images = { 1: [ { href
I want to disable my div with image and click event that event does not call. I try do it with KO: <div title="Delete Series" class="deleteSeriesButton" data-bind="css: { disabled: true}" ></div> but this does not
I need to access the size of response message I am getting from another machine (cross-domain request) using $.getJSON, although I can see the request and response in chrome console, it does not work. Here is my request code: xhr=$.getJSON('http://19
I am trying to find some minamilistic google geocoding script. The ones I have found are very large and complicated, but this one is very simple. The only thing it doesnt do is actually put the co-ordinates in two input boxes like the others. Here is
I am confused about the best way to manage shared development of Google App Scripts. The thing is that editing google app scripts is done through an online editor with its own version control in place, but that's not shared with other developers as f
I can't seem to access the variable defaultValue down in my .blur() function. I've tried various stuff but with no luck. So far I only get an empty object. What's wrong? jQuery(document).ready(function(){ jQuery('#nameInput, #emailInput, #webInput').
I'm running this getJSON async call in jQuery to get the data back into and then out of my Java code. For whatever reason I continually get the error: "Ajax Error: Error invoking generateSearchQuery([object Object])" I've debugged both the jQuer
The autocomplete is outputting data in this format: <ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all"> <li class="ui-menu-item"> <a class="ui-corner-all">item 1</a> </li&
Is there a difference, in terms of efficiency, whether to store string values in variables or as a content of hidden input elements? Those values could be large and could be modified frequently.Unless you have a reason to store values in input elemen
I was trying to use this blog post. To get count of CSS locators. But of not avail, method is - public static int getCSSCount(String cssLocator) { String jsScript = "var cssMatches = eval_css(\"%s\", window.document);cssMatches.length;"
I have 500 CSV files in this format: IndicatorA_Name.csv 1900 1901 1902 ... Norway 3 2 Sweden 1 3 3 Denmark 5 2 3 ... IndicatorB_Name.csv 1900 1901 1902 ... Norway 1 3 4 Sweden 1 2 Iceland 1 6 3 ... Years in columns, countries in rows. Notice that co
How do You manage all of Your .js and .css files in asp.net project. Especially when they have a lot of dependency between each other? I've combined all script in one. But it's become weighty, and 90% of them were not used on particular pages. What I