JavaScript Not Working in Firefox

JavaScript Not Working in Firefox

Are you trying to open an URL using the JavaScript method but it is not working in the Firefox browser? Then you can use the below simple trick to resolve this issue.

The issue happens in the Mozilla Firefox browser because it is expecting a return value from the JavaScript function which is not being returned. So it shows the [object window] message in the previous tab from which the new tab is being opened using the function.

To solve this issue, use void() function over function. Below is an example:

void('', '_blank'));

If using javascript: keyword, like most we do in Oracle Apex, then check the below example:

javascript:void('', '_blank'));