2,103 questions
Score of 2
2 answers
65 views
Alter image after loading using html canvas
I want to draw a border around an image after it is loaded using new Image()
This works, I see the border, but modifying image.src inside the onload function calls onload again in an infinite loop. ...
Score of 0
1 answer
88 views
Why is "onload" event triggered early? - GitHub Pages loading screen woes
I’m using GitHub Pages to host a very simple site with a very chunky PDF file.
I want the site to land on a loading screen which disappears when the PDF is visible, but the loading screen always ...
Score of 0
0 answers
42 views
Unable to read properties of document.body.style [duplicate]
I'm trying to set the style of a body element, but I'm getting this error:
Uncaught TypeError: Cannot read properties of null (reading 'style')
at updateColour (coloured_fade.html:15:22)
I ...
Score of 0
2 answers
148 views
Why doesn't opening the same window via window.open() trigger a load event?
I have a button that when clicked opens a new tab via the following code:
const childWindow = window.open('myFile.html', 'my-target');
if (childWindow) {
childWindow.addEventListener('load', () =>...
Score of 0
0 answers
62 views
How to check if class exists after page load?
I want to target sdf-carousel-item that has an ID of "first" and only when class of "active" is present. However this is a carousel - so when the first slide is showing, the class ...
Score of 0
1 answer
31 views
Selecting and scrolling to jqgrid row after update and add
Is there a way to select and scroll to newly added or updated row in jqgrid? setSelection does not do either. I tried putting a timer on it..but still no go.
Score of 0
1 answer
94 views
ABCpdf: How to run javascript after PDF-File is opened?
I have a component which generates PDF-File using ABCpdf. In that PDF-File I need a "DateTime Picker" field.
There are JavaScript functions which can be used for this purpose: AFDate_Format, ...
Score of 1
0 answers
73 views
Why is this frame.onload not triggered?
I have a web page that calls an onload method myonload as a final line in the <script> section of the header:
...
<head>
...
<script>
var frame;
function loadthis(e,pg) {
// 50 ...
Score of 1
1 answer
96 views
will image lazy loading bypass windows.onload event in certain cases?
I am loading a large number of images on my webpage. My understanding is the using lazy loading allows the windows.onload event to occur sooner. If that's true, my question is this.. I am using a ...
Score of 0
0 answers
56 views
chrome window.open onload handler
I'm executing the following (modified for demo) script in the console of x.com
There is no cross-domain issues. But the function executes immediately - which results in an error because the DOM is not ...
Score of 0
0 answers
49 views
I have an XHTML page and the body onload event refuses to function
I have a body onload function in my XHTML and Javascript pages. For some reason the onload function won't run and I don't know why?
Here is my XHTML code:
<html xmlns="http://www.w3.org/...
Score of 1
1 answer
205 views
Show/Hide HTML list items based on ajax results
I'm running a PHP file that uses javascript to add to a list of items that is pulled from a sql database. The search filter does not affect the items that were taken from the sql database. How can I ...
Score of 1
0 answers
44 views
Stop const form checking (required text field) on initial load
I have a constant and I simply just want to stop it from checking a required text field that it is targeting only on page load to stop the error message from appearing at first:
const fromSchema = ...
Score of 1
0 answers
49 views
How to Trigger 404 On Website when not being logged in?
I am new to web development and want to achieve the following setup:
Login page where a user can log in using admin admin as username password (login.html)
He should then be redirected to a homepage (...
Score of 1
0 answers
522 views
How to dynamically calculate heights of components in a VariableSizeList in React?
I'm using React with Material-UI and the react-window library's VariableSizeList component to render a list of dynamically sized components. Each component's height is determined after it has rendered,...