I have an HTML page and I want to get the position of the mouse. I do this : But I have an Iframe and when I click on it, I don’t get the position. Do you have an idea ? Thank you Answer Here I am using Host listener (mousemove) for getting mouse position in the document with JavaScript
Tag: html
random equations in javascript
I want my code to create simple equations. You can put in answers and it tells you if you are correct or not. When I run this simple code, input the right answer and click on check, it doesn’t show correct. why is this and how can I fix? Answer In your code, check() requires two arguments rand1 and rand…
Read more / less code but it doesn’t change properly
After doing some research I came to this code shown below. If you try the code yourself you notice the variable is used for every div with a button and text (the whole site). I tried several other codes but I like the slideDown/Up feature. If somebody knows how I can rearrange this code to make it work for ev…
html onclick not happening when parameter has special characters like $ or [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. Improve this question I have…
Using fetch to read and write files
In my code i’ve a file called “orca.txt” it is just a number writen in this. it looks like: 2300 I use fetch to read this number, i get it with: fetch(‘orca.txt’) .then(response => response.text()) .then(textString => { contador=textString; }); It works very well, but then …
I’m trying to make a form based calculatorfor a business equation
I’m trying to create a form based calculator for a business equation which works out break-even return on ad spend. The fucntion works, I’ve testred it through the console on Chrome. But this is ony when I set the variables to numbers, I’m struggling to use the data from the form to work it …
JS will not run past set style.zIndex
I am trying to set up button elements. There are 2 scripts to get each button type and either run a simple collapse menu, or run a complicated collapse where slides 1 div over another after shifting depths. Everything seems to work except the depth (zindex) switch, and when the depth switch is implemented it …
How can I delay something in JavaScript [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. The community is reviewing whether to reopen this question as of 1 year ago. Improve this question I wanted to set …
Using pure javascript and Bootstrap : How to display a modal dialog confirm response from fetch operation from JSON API
Is it possible using bootstrap and pure javascript to display a modal dialog after a fetch request is successful or also if it the fetch request failed? Form submission The HTML Form Answer You probably wanna use this inside your request callback: Here is an example of what bootstrap modal can look like: You …
How to pass id of object from table to next component?
In the table(table) i have loaded objects from API. When i click on “osavotjad” link i am redirected to another component where i want to load data from selected object. How can i pass id of object what is on the same line with a clicked link. Answer There are many ways to do that. The easiest sol…