Answers for "open URL javascript new window"

5

javascript open url

window.location.href = "http://example.com/";
Posted by: Guest on May-21-2020
-1

open new window in java script

<script type="text/javascript">
var windowObjectReference = null; // global variable

function openRequestedPopup(url, windowName) {
  if(windowObjectReference == null || windowObjectReference.closed) {
    windowObjectReference = window.open(url, windowName,
           "resizable,scrollbars,status");
  } else {
    windowObjectReference.focus();
  };
}
</script>

(...)

<p><a
 href="http://www.spreadfirefox.com/"
 target="PromoteFirefoxWindow"
 onclick="openRequestedPopup(this.href, this.target); return false;"
 title="This link will create a new window or will re-use an already opened one"
>Promote Firefox adoption</a></p>
Posted by: Guest on January-30-2021

Code answers related to "open URL javascript new window"

Code answers related to "Javascript"

Browse Popular Code Answers by Language