Click to See Complete Forum and Search --> : dynamic title script help?


Northerner
10-07-2003, 12:14 PM
i am having a problem getting a script to work correctly and im hoping someone can help me out??

im trying to install the dynamic title script and im getting an error message "object expected"

the body instructions are as follows...


<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY onLoad="settitle()">


and the following is how i added it


<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="images/bgb.gif" onload="dynAnimation(); settitle();">


i contacted someone earlier for help with putting two onload commands in the same line (as shown above) so that is what i did, but maybe its wrong or i didnt do it right?

i hope i have explained this well enough?
if not just reply and i will explain more!
thanks!!

pyro
10-07-2003, 12:27 PM
Can we see the actual script(s) please?

Northerner
10-07-2003, 12:33 PM
here is the script im wanting to install, i have the first part put into the head


<!-- TWO STEPS TO INSTALL DYNAMIC TITLE:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Asif Nasir (Asifnasir@yahoo.com) -->

<!-- Begin
function settitle() {
var a = "You can find every thing you need here. ";
var b = "Best collection of scripts";
var c = "Easy to use through cut & paste";
var t = new Date();
s = t.getSeconds();
if (s == 10) {
document.title = a;}
else if (s == 20) {
document.title = b;}
else if (s == 30) {
document.title = c;}
else if (s == 40) {
document.title = a;}
else if (s == 50) {
document.title = b;}
else if (s == 00) {
document.title = c;}
setTimeout("settitle()", 1000);
}
// End -->
</script>


<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY onLoad="settitle()">

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.17 KB -->



and this is part of where im trying to install the 'onload' section


</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="file:///C:/Program%20Files/Microsoft%20Office/Office10/fpclass/animate.js">
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="images/bgb.gif" onload="dynAnimation()">
<table width="780" border="0" cellspacing="0" cellpadding="0" height="81">
<tr>
<td height="81" background="images/logo3.jpg">&nbsp;<div align="right">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="60%" id="AutoNumber1" height="54">
<tr>
<td width="100%" height="19">&nbsp;</td>
</tr>
<tr>

i hope that is enough info, if not just let me know!

thanks

pyro
10-07-2003, 12:42 PM
Try:

<script type="text/javascript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Asif Nasir (Asifnasir@yahoo.com) -->

<!-- Begin
function settitle() {
var a = "You can find every thing you need here. ";
var b = "Best collection of scripts";
var c = "Easy to use through cut & paste";
var t = new Date();
s = t.getSeconds();
if (s == 10) {
document.title = a;}
else if (s == 20) {
document.title = b;}
else if (s == 30) {
document.title = c;}
else if (s == 40) {

document.title = a;}
else if (s == 50) {
document.title = b;}
else if (s == 00) {
document.title = c;}
setTimeout("settitle()", 1000);
}
// End -->
</script>

<script language="JavaScript1.2" fptype="dynamicanimation" src="file:///C:/Program%20Files/Microsoft%20Office/Office10/fpclass/animate.js">
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="images/bgb.gif" onload="dynAnimation(); settitle();">
<table width="780" border="0" cellspacing="0" cellpadding="0" height="81">
<tr>
<td height="81" background="images/logo3.jpg"> <div align="right">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="60%" id="AutoNumber1" height="54">
<tr>
<td width="100%" height="19"> </td>
</tr>
<tr>

Northerner
10-07-2003, 01:05 PM
still not working,

i have tried tons of different things, looks like a problem in another area of code?

sorry for wasting your time but im giving up, im not experienced enough at this