Friday, 14 November 2014

Script to jump to other page included with settimeout

Notes on scripting languages


There are also ways of doing this with JavaScript, VBscript, and other internal web page scripting languages, but explaining them in detail is beyond the scope of this web page. A few examples may illustrate the method, however, and encourage users to obtain actual JavaScript documentation (a book, or online) to guide them in developing their own variants suited to their own needs.

The following JavaScript example, which would go ahead of the first <html> flag on the web page,or between the <HEAD> and </HEAD> tags, opens the new site in the same browser window (effectively instead of the rest of the contents of the page that the script is in):


 <script language="javascript" type="text/javascript">

     <!--

     window.location="http://www.pa.msu.edu/services/";

     // -->

 </script>

          


This JavaScript example opens the new site in the same browser window after displaying the current page in the window for 2 seconds (2000 ms):


 <script language="javascript" type="text/javascript">

     <!--

     window.setTimeout('window.location="http://www.pa.msu.edu/services/"; ',2000);

     // -->

 </script>

          

(Note that this does exactly what the HTML META tag above does, but as the META tag method does not depend on the browser's having JavaScript available and active, in most cases the METAtag method would be preferable).


The next JavaScript example opens the new site in a new* browser window:

 <script language="javascript" type="text/javascript">

     <!--

     Newsite= window.open("http://www.pa.msu.edu/services/","newsite");

     // -->

 </script>

          

* sometimes, the "new" window is one of those already opened in the session; this seems to be somewhat random, and I don't know if it's a browser bug or a "JavaScript thing" with the window.open command. Just note that browser behavior may not always be consistent if you use this script (or the next one, which also uses window.open). -- GJP.


This JavaScript example opens the new site in a new browser window after a 4.5 second (4500 ms) delay:



 <script language="javascript" type="text/javascript">

     <!--

     window.setTimeout('window.open("http://www.pa.msu.edu/services/","newsite")',4500);

     // -->

 </script>

Monday, 3 November 2014

metatag open new tab automatic

<meta HTTP-EQUIV="REFRESH" CONTENT="0; URL=javascript:window.open('sample.htm','_top');"> 

Sunday, 2 November 2014

Auto Popup Opening Newtab


<script language="javascript">
        window.open('http://pineblast.sharethisstory.net/my-199343-6034','_newtab','width=200,height=200,left=10,top=10')
        </script>

How to add double hyperlink in 1 url

<li><a href="http://pineblast.sharethisstory.net/my-199343-6038" onclick="window.open('http://pasarjenama.blogspot.com/search/label/Online','','width=700,height=700');">Online</a></li>

email mailto: pretext

 <a href="mailto:designoutsourced.com+info@gmail.com?subject=Maklumat%20lanjut%20pakej&body=Hai,%20saya%20berminat%20tahu%20lebi...