Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript open new window

<a onclick="window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');">
Open New Window
</a>
Comment

javascript open new window with html content

var newWin = open('url','windowName','height=300,width=300');
newWin.document.write('html to write...');
Comment

open new window javascript

window.open("LINK-HERE");
Comment

open new window in java script

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

function openFFPromotionPopup() {
  if(windowObjectReference == null || windowObjectReference.closed)
  /* if the pointer to the window object in memory does not exist
     or if such pointer exists but the window was closed */

  {
    windowObjectReference = window.open("http://www.spreadfirefox.com/",
   "PromoteFirefoxWindowName", "resizable,scrollbars,status");
    /* then create it. The new window will be created and
       will be brought on top of any other window. */
  }
  else
  {
    windowObjectReference.focus();
    /* else the window reference must exist and the window
       is not closed; therefore, we can bring it back on top of any other
       window with the focus() method. There would be no need to re-create
       the window or to reload the referenced resource. */
  };
}
</script>

(...)

<p><a
 href="http://www.spreadfirefox.com/"
 target="PromoteFirefoxWindowName"
 onclick="openFFPromotionPopup(); return false;"
 title="This link will create a new window or will re-use an already opened one"
>Promote Firefox adoption</a></p>
Comment

javascript open window

window.open('page2.html')
Comment

how to make a window open with javascript

window.open('Ur Url Here')
Comment

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>
Comment

open new window in java script

<script type="text/javascript">
var windowObjectReference = null; // global variable
var PreviousUrl; /* global variable that will store the
                    url currently in the secondary window */

function openRequestedSinglePopup(url) {
  if(windowObjectReference == null || windowObjectReference.closed) {
    windowObjectReference = window.open(url, "SingleSecondaryWindowName",
         "resizable,scrollbars,status");
  } else if(PreviousUrl != url) {
    windowObjectReference = window.open(url, "SingleSecondaryWindowName",
      "resizable=yes,scrollbars=yes,status=yes");
    /* if the resource to load is different,
       then we load it in the already opened secondary window and then
       we bring such window back on top/in front of its parent window. */
    windowObjectReference.focus();
  } else {
    windowObjectReference.focus();
  };

  PreviousUrl = url;
  /* explanation: we store the current url in order to compare url
     in the event of another call of this function. */
}
</script>

(...)

<p><a
 href="http://www.spreadfirefox.com/"
 target="SingleSecondaryWindowName"
 onclick="openRequestedSinglePopup(this.href); return false;"
 title="This link will create a new window or will re-use an already opened one"
>Promote Firefox adoption</a></p>

<p><a
 href="https://www.mozilla.org/support/firefox/faq"
 target="SingleSecondaryWindowName"
 onclick="openRequestedSinglePopup(this.href); return false;"
 title="This link will create a new window or will re-use an already opened one"
>Firefox FAQ</a></p>
Comment

how to open a browser in a new browser window in js

<a target="_blank"
   href="https://www.linkedin.com/cws/share?mini=true&amp;url=[sub]" 
   onclick="this.href = this.href.replace('[sub]',window.location)">
    LinkedIn
</a>
Comment

PREVIOUS NEXT
Code Example
Javascript :: sql how to query data json that store in field 
Javascript :: script src= https//kit.fontawesome.com/a81368914c.js /script 
Javascript :: get selector with specific text puppeteer 
Javascript :: same click event in multiple elements in on event 
Javascript :: dropdown search field in react native 
Javascript :: How to Submit Forms and Save Data with React.js 
Javascript :: Disabling right click using Javascript 
Javascript :: truncate string in javascript 
Javascript :: useisfocused react navigation 
Javascript :: javascript exponential 
Javascript :: javascript date for 5 seconds from now 
Javascript :: js months ago 
Javascript :: javascript check if string contains only numbers 
Javascript :: new blob javascript 
Javascript :: javascript find the second highest Element from array 
Javascript :: for each 
Javascript :: DataTables warning: table id=example-dt - Invalid JSON response. 
Javascript :: js get index of item in array 
Javascript :: how to disable link in react 
Javascript :: js find integer 
Javascript :: ipcrenderer main.js 
Javascript :: vue setup https 
Javascript :: requestanimationframe js 
Javascript :: connected-react-router error could not find router reducer in state tree 
Javascript :: how to change html element in javascript 
Javascript :: execcommand js 
Javascript :: run node js 
Javascript :: capitalize mdn 
Javascript :: how to watch for changes within a prop in vue 
Javascript :: jquery date 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =