Skip to content
Advertisement

Tag: dom-events

Make an iFrame trigger the body.onclick event

I have a script that attaches a function to be triggered by the the document.onclick event. The problem is that the page has an iframe in it. When the user clicks on the iframe, the document.onclick event does not trigger the function attached to it. Is there any way to fix this? In rare cases, the iframe may have another

Create a pause inside a while loop in Javascript

I would like to create a pause inside a while loop so that I can create n animations that each appear 3 seconds after the other. I’ve tried the following, but it doesn’t work. Would love to have someone show me what I’m doing wrong. Answer setTimeout does not pause; it asks Javascript to run some other code later. Googling

Search a table looking for labels

I am trying to search a table looking for all the labels in that table. When the JavaScript function finds a label I want to set it’s visibility to false. My html code looks like this: My function is called on a drop down lists onchange event which then passes the table that holds all the labels I want to

What is the DOM and BOM in JavaScript?

What is the DOM and BOM in JavaScript? If someone could explain these in layman terms it would be great! I like to get a deeper understanding of these. Answer The BOM (Browser Object Model) consists of the objects navigator, history, screen, location and document which are children of window. In the document node is the DOM (Document Object Model),

Advertisement