it's your business at
theTNTsite.com
   
and the sky's the limit!

Subscribe to our FREE Home Business Tips Newsletter with hundreds of money making tips and tricks. Enter your contact info below and click: "Free Signup!".
Your privacy is guaranteed.

E-Mail Address:

First Name:



JavaScript Examples

JavaScript Code Examples You Can Use From thetntsite.com

My name is Thomas Everett.

Thank you for visiting my website. If you have any questions, or need any help, please contact me at tnt@thetntsite.com I am always ready to help you in any way that I can.

One way that I know I can help you is to share some simple JavaScript code that you can use to improve your site. These code examples can be found in many text books and on many web sites. Feel free to copy them and use them in any way you wish.

Link to "New Window"
<a href="#" onClick="javascript:window.open('http://your_URL_here', 'pop1win', 'toolbar=no scrollbars=yes height=600 width=800')">Name_of_your_link_here</a>

Instructions:
Put the code above in the body of your HTML anywhere you would a normal html link.

Example:

 

Link to "New Window" on mouseover
<script language="JavaScript"> function overpop() { window.open('http://your_URL_here','doitnow','toolbar=yes,location=no, directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width =800,height=600'); }
</script>

Instructions:
Put the code above just before the </head> tag of your HTML.
Put the code below in the body of your HTML anywhere you would a normal html link.

<a href="" onMouseOver="parent.location='javascript:overpop()' ">Name_of_your_link_here</a>

Example:

 

"New Window" on exit
<script language="JavaScript">
function justpop() {
var popunder= "http://Your_URL_Here";
var width = 800;
var height = 600;
var left = screen.width - width + 60;
var p = 'scrollbars=yes,resizable=yes,toolbar=yes,' + 'menubar=no,status=no,location=no,left=' + left + ',top=0,height=' + height + ',width=' + width;
win2=window.open(popunder,"",p);
win2.blur();
win2.width = 800 ;
win2.height = 600 ;
win2.left = left ;
}
</script>

Instructions:
Put the code above just before the </head> tag of your HTML.
Put the code below in to replace the <body> tag of your HTML.

<body topmargin="0" leftmargin="0" onunload="justpop()">

Example:

 

"New Window" on entry
<SCRIPT>
var popupurl="http://Your_URL_Here"
var popupwidth=800
var popupheight=300
var maximumpopups=2
var countpopups=0
var ns6=document.getElementById&&!document.all?1:0
var ie=document.all?1:0
function startpopup() {
if (ns6 || ie) {
countpopups=0
var popuptop=Math.floor(400*Math.random())
var popupleft=Math.floor(600*Math.random())
window.open(popupurl, "", "toolbar=no,width=
"+popupwidth+",height="+popupheight+",top=
"+popuptop+",left="+popupleft+"");
}
}
function openpopup() {
if (countpopups<maximumpopups && (ns6 || ie)) {
for (i=0;i<=1;i++) {
var popuptop=Math.floor(400*Math.random())
var popupleft=Math.floor(600*Math.random())
window.open(popupurl, "", "scrollbars=yes,toolbar=no,width="+popupwidth+",height=
"+popupheight+",top="+popuptop+",left=
"+popupleft+"");countpopups++
}
}
}
window.onload=startpopup
</SCRIPT>

Instructions:
Put the code above just before the </head> tag of your HTML.

Example:

 

 


Make Money Work from Home  Business Opportunities

Thomas Everett
Dracut, MA. 01826
Ph:978-985-5884
Fax:208-279-9626
tnt@thetntsite.com

Home Contact Us About Us