Auto Re Size
<script language="JavaScript" type="text/javascript">
var X = screen.width;
var Y = screen.height;
window.moveTo(0,0);
window.resizeTo(X,Y);
</script>
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://yourafflinkhere">
</head>
<body>
<script language="JavaScript" type="text/javascript">
var X = screen.width;
var Y = screen.height;
window.moveTo(0,0);
window.resizeTo(X,Y);
document.location.href = 'http://yourafflinkhere";
</script>
Page Stuck? <a href="http://yourafflinkhere">Click Here!</a>
</body>
</html>
Intro Pop Up
<script type='text/javascript'>alert('Congratulations! You have been selected to win a free Playstation 3. Read below how to claim it.');</script>
Jscript Blinking Elements
<html>
<head>
</head>
<body>
Not blinking<br>
<img name="blink" src="/picture.jpg"> <br>
<span name="blink">Blinking Text</span>
</body>
<script type="text/javascript">
// Javascript element blinking script
// http://ilovethecode.com/Javascript/Javascript-Tutorials-How_To-Easy/Make_Text_Blink_Using_Javascript.shtml
// Note: this needs to be placed at the bottom of the page, AFTER the elements you want to blink.
spe=400;
NameOfYourTags="blink";
swi=1;
na=document.getElementsByName(NameOfYourTags);
bringBackBlinky();
function bringBackBlinky() {
if (swi == 1) {
sho="visible";
swi=0;
} else {
sho="hidden";
swi=1;
}
for(i=0;i<na.length;i++) {
na[i].style.visibility=sho;
}
setTimeout("bringBackBlinky()", spe);
}
</script>
</html>
Jscript Push Button - Pop Up
Upgraded JavaScript Popup Window!Now that we have the tools, let's make a sophisticated JavaScript popup window that we can be proud of!
HTML & JavaScript Code:
<head>
<script type="text/javascript">
<!--
function myPopup2() {
window.open( "http://www.google.com/", "myWindow",
"status = 1, height = 300, width = 300, resizable = 0" )
}
//-->
</script>
</head>
<body>
<form>
<input type="button" onClick="myPopup2()" value="POP2!">
</form>
<p onClick="myPopup2()">CLICK ME TOO!</p>
</body>
Display:
CLICK ME TOO!
Now, that is a prime example of a worthless popup! When you make your own, try to have them relate to your content, like a small popup with no navigation that just gives the definition or explanation of a word, sentence, or picture!
Jscript Cloak and redirect link
<body>
<a href='http://google.com/' name='http://yahoo.com'>Visit yahoo.com</a>
</body>
<script language="javascript">
_links = document.getElementsByTagName("a");
for(i=0;i<_links.length;i++) {
if(_links[i].name) {
docloak = function() {
_cloak = this.href;
this.href = this.name;
this.innerHTML = _cloak;
};
_links[i].oncontextmenu = docloak;
_links[i].onclick = function() {
docloak();
window.location = this.name;
return false;
};
_tmp = _links[i].href;
_links[i].href = _links[i].name;
_links[i].name = _tmp;
}
}
</script>
Simple Landing Page Rotation Script
<?php
/*
This is a modified script from the one provided by Prosper202 at
http://prosper.tracking202.com/scripts/split-testing-landing-pages/
*/
// URLs of the landing pages to be rotated.
// These are the URLs generated from step #7 Get Links,
// one link for each landing page.
// You can add as many landing pages here as you like
$landingpage[1] = 'http://onlinecu.php';
$landingpage[2] = 'http://onli.php';
$landingpage[3] = 'http://google.com';
/* ------ DO NOT CHANGE ANYTHING BELOW ------ */
/* -- (unless you know what you are doing) -- */
// Grab the keyword from the URL
$kword = $_GET['keyword'];
// The text file 'count.txt' must be created and stored
// in the same directory as this rotator script.
// Its permission must be set to 777 (CHMOD to 777).
$myFile = "count.txt";
// Open the txt file
$fh = @fopen($myFile, 'r');
$lpNumber = @fread($fh, 5);
@fclose($fh);
// See which landing page is next in line to be displayed
if ($lpNumber >= count($landingpage)) {
$lpNumber = 1;
} else {
$lpNumber = $lpNumber + 1;
}
// Write the last landing page displayed to the 'count.txt' file
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $lpNumber . "\n";
fwrite($fh, $stringData);
fclose($fh);
// Redirect to the landing page
header('Location: ' . $landingpage[$lpNumber] . $kword );
// Terminate script
die();
?>
Redirect Mobile Devices
<script type="text/javascript">function RedirectSmartphone(url){
if (url && url.length > 0 && IsSmartphone())
window.location = url;
}
function IsSmartphone(){
if (DetectUagent("android")) return true;
else if (DetectUagent("iphone")) return true;
else if (DetectUagent("ipod")) return true;
else if (DetectUagent("symbian")) return true;
return false;
}
function DetectUagent(name){
var uagent = navigator.userAgent.toLowerCase();
if (uagent.search(name) > -1)
return true;
else
return false;
}
RedirectSmartphone("http://www.your-redirect-link.com");
</script>