Categories
Development HTML iOS Javascript

IOS Safari, what is the first release of IOS to allow local HTML/JAVASCRIPT files to be executed

I have a local HTML file containing javascript, which I have never been able to execute with IOS, by double-clicking the file. This has always worked on Android. I recently had access to a new iPad and the file was in Dropbox. I opened Dropbox, double clicked the filename and it worked perfectly. It contains […]

Categories
Development Javascript

Javascript regular expression selecting multiple

my problem is selected expressions cant use more than one but i need it here i prepare a example of what i want var regexp = /(^| )([a-z]{1})( |$)/gim; var string = “h ello e x a mple”; var choosen = string.match(regexp); for(var i = 0; i < choosen.length; i++){ console.log(choosen[i]); } you can see […]

Categories
Development Javascript

Problem with create list using for loop in Javascript

I’m trying to crate a code that will count number of images I have and then will create a list with the number of images (for example, if I have 5 images, I’ll get this : [0,1,2,3,4]. My code runs and I think it creates a list that is empty: This is my code (I […]

Categories
Development Java Javascript

How to Parse Data from a Table with No Obvious Class IDs using Javascript in Eclipse

I am trying to parse data from sites with a format similar to this one to retrieve surface observation for weather stations using Jscript (https://mesowest.utah.edu/cgi-bin/droman/meso_base_dyn.cgi?stn=KSLC&unit=0&timetype=GMT) I have developed a script that allows me to take user input of any site and parse the title and a brief description, but I don’t appear to be able […]

Categories
Development Java Javascript

How to add cell to all rows of a table with vanilla JavaScript?

I desire to add a table cell from the right of any last cell, of my table’s rows: document.querySelectorAll(“td”).forEach((element) => { element.insertRow(-1); }); <section class=”allEnglishSections”> <h2>Conditioning</h2> <table> <tr><th>English</tr></th> <tr><td>if</td></tr> <tr><td>else</td></tr> </table> </section> I get this error: Error { “message”: “Script error.”, “filename”: “”, “lineno”: 0, “colno”: 0 } but I don’t understand the problem from […]

Categories
Development Java Javascript

Javascript – Simplification of prefix notation

I am working on a Kattis problem, where I am supposed to take the input in prefix notation, simplify it and return it in prefix notation as well. These are the examples of inputs and outputs: Sample Input 1 Sample Output 1 + 3 4 Case 1: 7 – x x Case 2: – x […]

Categories
Development Java Javascript

How to to check if confirmed password is same as the first password in javascript?

I’m having trouble validating if the entered password is same as confirmed password. It doesnt show the text message if it isnt the same or if it is same. It only shows the notice that the password field is empty? HTML <div> <label>Geslo:</label> <input type=”password” id=”myInput2″ oninput=”myFunction2()” name=”password” id=”koda”><br /> <p id=”demo2″></p> </div> <div> <label>Ponovi […]

Categories
Development Java Javascript

Javascript – Simplification of prefix notation

I am working on a Kattis problem, where I am supposed to take the input in prefix notation, simplify it and return it in prefix notation as well. These are the examples of inputs and outputs: Sample Input 1 Sample Output 1 + 3 4 Case 1: 7 – x x Case 2: – x […]

Categories
Development Java Javascript

Intercepting any request – javascript

I have a web page say – sample-page.html with 2 links in it – sample-page.html – link1 (GET, ajax) – link 2 (GET, new page) When I click link1 an ajax GET request is executed and it still stays at the sample-page.html.When I click link2 another get request is executed and a new page sample-page2 […]

Categories
Development Java Javascript

What’s the common way to check if a field is null or undefined (but not zero or empty string) in Javascript? [duplicate]

This question already has an answer here: Checking for null or undefined 2 answers I know I can’t do if (!obj.x) because if obj.x is 0 or “”, it will be “truthy”. Option 1: I could do if (obj.x === null || obj.x === undefined). Option 2: But could I just do if (obj.x == […]