I have created a cycling banner, with java script, which has three images
with three links . The code is working fine when I browse this page as
stand alone.
But I need to load this page in my index.html in a frame, which has other
html links as well. In index.html this cycling banner only rotate images,
but don't take me to the link.
If somebody can help me for this, that will be greatly appreciated.
Thanks
Renu
index.html code
<HTML>
<HEAD>
<TITLE>UNI-TEL SITE</TITLE>
<script language="Javascript">
<!--
myMsg = "Call everyone you know for less "
i=0
function scrollMsg() {
frontPart = myMsg.substring(i,myMsg.length)
backPart = myMsg.substring(0,i)
window.status = frontPart + backPart
if (i < myMsg.length) {
i++
}
else {
i = 0
}
setTimeout("scrollMsg()",50)
}
window.onload=scrollMsg
//-->
</script>
<BASE TARGET=_top>
</HEAD>
<FRAMESET COLS ="24%,76%">
<FRAME SRC="main.asp" NORSIZE NAME ="left" SCROLLING ="NO">
<FRAMESET ROWS ="120, *">
<FRAME SRC="logo1.asp" NORSIZE NAME ="right" SCROLLING ="YES">
<FRAME SRC="main3.asp" NORSIZE NAME ="center" SCROLLING ="YES">
</FRAMESET>
</HTML>
main.asp code which has cyclic banner with link
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from old browsers
adImages = new Array
("images/banner1.gif","images/banner2.gif","images/banner3.gif")
adURL = new Array
("rates.asp","customersignup.asp","service.asp")
thisAd = 0
imgCt = adImages.length
function rotate() {
if (document.images) {
if (document.adBanner.complete) {
thisAd++
if (thisAd == imgCt) {
thisAd = 0
}
document.adBanner.src=adImages
[thisAd]
}
setTimeout("rotate()", 3 * 1000)
}
}
function newLocation() {
document.location.href = "http://127.0.0.1/" +
adURL[thisAd]
}
// End hiding script from old browsers -->
</SCRIPT>
<STYLE>
.off {
font-size: 12pt;
font-weight: normal;
color: white;
}
.over {
font-size: 12pt;
font-weight: bold;
color: red;
</STYLE>
<BASE TARGET=_top>
</HEAD>
<BODY bgcolor =406599 onLoad="rotate()">
<A HREF="javascript:newLocation()"><IMG SRC="images/banner1.gif"
WIDTH="140" HEIGHT="65" NAME="adBanner" BORDER="1" ALT="ad banner">
</A>
<br><a href = "unitel_info.asp" CLASS="off"
onMouseover="this.className='over';"
onMouseout="this.className='off';">Company
Info</a></br>
<br><a href ="FAQ.asp"CLASS="off"
onMouseover="this.className='over';"
onMouseout="this.className='off';">FrequentlyAskedQuestion</a></br>
<br><a href ="rates.asp"CLASS="off"
onMouseover="this.className='over';"
onMouseout="this.className='off';">Rates</a></br>
<br><a href ="customersignup.asp"CLASS="off"
onMouseover="this.className='over';"
onMouseout="this.className='off';">CustomerSign-up</a></br>
<br><a href ="agent.asp"CLASS="off"
onMouseover="this.className='over';"
onMouseout="this.className='off';">AgentOppernunity</a></br>
<br><a href = "product.asp"CLASS="off"
onMouseover="this.className='over';"
onMouseout="this.className='off';">Product/Service
</a></br>
<br><a href = "service.asp"CLASS="off"
onMouseover="this.className='over';"
onMouseout="this.className='off';">CustomerService
</a></br>
<br><a href ="login.asp" CLASS="off"
onMouseover="this.className='over';"
onMouseout="this.className='off';">AgentLogin</a></br>
</BODY>
</HTML>