I am having some trouble getting a WKWebView in iOS 8 to display an alert dialog that is called from Javascript. After creating a standard WKWebView and loading an HTML file, I have a button on the page that creates a simple alert with some text. T...
I have a date string from an API containing a timezone using abbreviations:  "01/16/2018 12:15pm PST"   Moment.js seems to ignore the timezone though, even if I use the z timezone input parsing string. That only seems to handle timezones stri...
I am making a script that auto generates planets see codepen for example. But the problem I have is that i want to make it less pixelated and I am having some problems doing that if i make the tiles 70 * 70 and tile size to 10 * 10 pixels it works fi...
It's not difficult to find a tool to convert JSX to React.createElement, something like this:    <div className="commentBox">     Hello, world! I am a CommentBox.   </div>   to this:    React.createElement('div', {cla...
In my servlet I'm sending many values back to JSP page by for cycle like this:    protected void doGet(HttpServletRequest request, HttpServletResponse response){     for (int i = 0; i < veryBigNumber; i++){           if (something){...
Can anyone give me a solution on How can I load the Google plus share button (not the +1 button) in an iframe asynchronously. I have managed to do that for the +1 button....
I am wondering about the use of these two type of bson (javascript/javascriptwithscope);  as the base type of bson.  What's the use case of it and how to generate a javascriptwithscope object to save in mongodb?   Type    Number  Alias   Notes  D...
I have this working fine in Mozilla and IE but for some reason not chrome. In chrome, the error callback executes every time returning an error code of zero. Lots of articles on Stackoverflow keep reiterating how all major browsers support the "P...
I am new to JSP, I have method that contains loop and want to display value   <%! private void getDemo() {     for(int i=0; i<10; i++) {         setName("Val: " + i); %>         <script language="javascript">...
What is the difference between    window.location.href="http://example.com"; window.location.replace("http://example.com"); window.location.assign("http://example.com");   I read in many forums that window.location.assign()...
I know that my question needs a little more clarification, so let me explain:  When I visited the jquery api documentation for $.fn.extend, I was personally blown away by how easy it was to create a custom jquery function like this:   $('input[ty...
I'm using ChartJS in a project I'm working on and I need a different color for each bar in a Bar Chart.   Here's an example of the bar chart data set:  var barChartData = {   labels: ["001", "002", "003", "00...
I've looked through numerous other questions up here surrounding a negative lookbehind for JavaScript but I can't seem to mimic them.  I have the following Regex:  \b((?:http[s])?\S+\.\S+\.(?:\S+\.?){1,4})(?<[email protected])\b`    and the basis of this...
Have this problem, that I can't get my head around. I have absolutely no idea where to start with this.  I have these two simplified tables (MSSQL):  Table 1 -------  ID    |    LetterCode --------------------- 1     |    ABC 2     |    DEF 3...
I'm trying to setup logging across my typescript program, using log4javascript.  However I have no idea how to retrieve the function names using reflection (rather than typed manually).  Ideally I want to emulate what I do in C#:  public class Fo...
I have a JSON array that I would like to loop through to create a table.  TITLE etc would of course be the headings of the table and the associated data placed underneath.   JSON Result from PHP file  [   {      "TITLE":"Empire Burlesque&...
I am having troubles referring to a "User" object from inside a query. I have the following code:  Parse.Cloud.define("getTabsBadges", function(request, response) {   var UserObject = Parse.Object.extend('User');   var user =...
I'd like to do this with javascript. I'm building a presentation using Hakim El Hattab's Reveal.js as a foundation.  The way Reveal.js works is the current slide you are viewing has a class of .present, any previous slides have a class of...
I have a vuejs component in a html that is returned from jquery ajax call but it doesn't render the component. so how to make vuejs render this component from jquery?  jquery code sample :  $.post(baseURL + "media", postData, function (da...
I am building a content scraper for a tshirt website.  The goal is to enter a website through only one hardcoded url: http://shirts4mike.com  I will then find all the product pages for each tshirt, and then create a object with it's details. Then...
Chrome for me has always been a reference on web standards, unfortunately the defer isn't supported and IE supports it since version 5.5. Why ?  js.js  document.getElementById ("hi").innerHTML = "Hi :)";   HTML     <!DOCTYPE...
I have different sentences which all have double quotes in them, like:  <h3 class="myClass">Sentence one "ends like this"</h3> <h3 class="myClass">Sentence two"ends like that"</h3> <h3 class=...
Under what circumstances is it illegal for an HTML page to contain elements with duplicate ID attributes?  As a developer who has worked with HTML for many years, I am aware that the intention is that element ids should be unique - what I am asking...
I have seen apps, and wondered how can I programmatically take a picture of image. Define how it needs to be transformed so that it looks parallel to camera and not skewed perspective wise.   Then combine multiple photos to create a pdf file. For exa...
In docs it was said that:  onMove(mover, leftTop, e) called during every move notification; should actually move the node; can be overwritten.  but no example how to overwrite it (onMove). Can somebody throw several lines of code to show how it works...
I am a little confused with document.ready in jQuery.  When do you define javascript functions inside of  $(document).ready() and when do you not?  Is it safe enough just to put all javascript code inside of $(document).ready()?  What happens when...
I'm writing a chrome extension, and I need to split a string that contains only text and img tags, so that every element of the array is either letter or img tag. For example, "a", "b", "c", "<img.../>", "...
I have an Angular project which I compile with AOT. I want to be able to register ClassProvider that is resolved dynamically according to configuration. Simplified code I use is this:  const isMock = Math.random() > 0.5;  @NgModule({   // ...   pr...
I have a two-dimensional array. I'm trying to count the values within the inner array. I'm aware of JS array.length. But doing testData.length yields 5. Which is accurate. However, I want to count the number of items within each sub array.  t...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.