Skip to content
Advertisement

Tag: firefox

Accessing the content of other tabs in a browser

I am using Mozilla Firefox and I am trying to figure out a way to access the content of other tabs in the same window using JavaScript and the DOM (I am open to other techniques if exist). E.g., I want to run JavaScript code in tab1 which can find the title of some other tab. Basically I need this

After travelling back in Firefox history, JavaScript won’t run

When I use the back button on Firefox to reach a previously visited page, scripts on that page won’t run again. Is there any fix/workaround to have the scripts execute again when viewing the page the second time? Please note that I have tested the same pages on Google Chrome and Internet Explorer and they work as intended. Here are

click() method in Firefox

The following code is throwing two alerts as expected in IE but not in Firefox. Please help. Answer Firefox only has a click() function for form elements such as buttons. However, you can call the onClick function directly; you can change the line to This works in firefox or IE (but note that it requires that the function actually exists,

Changing window.location.href in Firefox in response to an onunload event

I have a strange JavaScript problem using window.location.href, which apparently only affects Firefox (I’m using 3.6). Normally window.location.href would not be read-only, and this works perfectly in Firefox: However, when I call a function in response to an onunload event (<body onunload=”testThis();”>), this doesn’t work as expected: In both cases, the alert displays the current location of the page in

JavaScript getter for all properties

Long story short: I’m in a situation where I’d like a PHP-style getter, but in JavaScript. My JavaScript is running in Firefox only, so Mozilla specific JS is OK by me. The only way I can find to make a JS getter requires specifying its name, but I’d like to define a getter for all possible names. I’m not sure

How do I programmatically click on an element in JavaScript?

In IE, I can just call element.click() from JavaScript – how do I accomplish the same task in Firefox? Ideally I’d like to have some JavaScript that would work equally well cross-browser, but if necessary I’ll have different per-browser JavaScript for this. Answer The document.createEvent documentation says that “The createEvent method is deprecated. Use event constructors instead.” So you should

Possible to flash a Browser window using Javascript?

Like many programs flash their window on the taskbar / dock to alert the user to switch to the program, Is it possible to flash the Browser window using Javascript? (FireFox-only scripts are also welcome) This is useful for web-based Chat / Forum / Community-based software where there is lots of real-time activity. Answer @Hexagon Theory: Why would you ever

Advertisement