...

View Full Version : Random Page title script issue



jdsflash
12-13-2009, 06:50 PM
This script isnt working. Im not sure what im doing wrong. forgive me i havent programmed in javascript before.


titles.js


<script type="text/javascript" language="javascript">
<!--//
function random_Title(){
if (parseInt(navigator.appVersion) >= 4) {
var num = 3;
var rantitle = new Array(num+1);
rantitle[1] = "Random Title1";
rantitle[2] = "Random Title1";
rantitle[3] = "Random Title1";
ranNumber = parseInt(num * Math.random() + 1);
document.title = rantitle[ranNumber];
}
//-->
}
</script>


html page


<html>
<head>

<script type='text/javascript' src='http://www.flashmajic.com/Google/titles.js'></script>
<script>
document.title = random_Title() ;
</script>
</head

Philip M
12-13-2009, 07:00 PM
See http://www.codingforums.com/showthread.php?t=184386

jdsflash
12-13-2009, 07:09 PM
Thanks that worked perfect.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum