daveago_forlan
09-11-2003, 10:23 AM
hi all
I'm still very new to java script and I'm having problems altering the code for this vertical text and pic scroll box to change the font from times new roman which appears to be the default font to Ariel. Does anyone know what and where I should alter the code to change it to ariel. Also it would be cool if I cound centre to text up in the box
thanks so much to anyone who helps
Davw:)
heres the code so far:
<BODY OnLoad="scrollnews(0)">
<div ID="news" style="position:absolute; visibility:hidden;
top:1; left:1; height:600;
clip:rect(10,100,100,10); border-width:0px;">
<table border=0 cellpadding=1 cellspacing=0 bgcolor="white">
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
<tr>
<td>
<!-- Your News Items are Here -->
<img border="0" src="advice line logo small.jpg" width="200" height="35"><br> <br>
As the mortgage market has developed over the last 10 years
, in order to satisfy the requirements of borrowers
and due to competition between banks and building societies
several different types of mortgage have been developed.
These range from a traditional (but still popular) straightforward
repayment mortgage, to flexible products which enable you
to make underpayments and overpayments
or even take payment holidays.
This section gives you information on main types of mortgage
currently available.<br> <br>
<img border="0" src="advice line logo small.jpg" width="200" height="35"><br> <br>
<!-- End Of Your News Items -->
</td>
</tr>
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
</table>
</div>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Dion (yobo42@hotmail.com) -->
<!-- Web Site: http://www.iinet.net.au/~biab/ -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
// change this to where you store the blank.gif image
var blank = "baby and money.jpg";
topedge = 130; // location of news box from top of page
leftedge = 10; // location of news box from left edge
boxheight = 150; // height of news box
boxwidth = 210; // width of news box
scrollheight = 340; // total height of all data to be scrolled
function scrollnews(cliptop) {
if (document.layers) {
newsDiv = document.news;
newsDiv.clip.top = cliptop;
newsDiv.clip.bottom = cliptop + boxheight;
newsDiv.clip.left = 0;
newsDiv.clip.right = boxwidth + leftedge;
newsDiv.left = leftedge;
newsDiv.top = topedge - cliptop;
}
else {
newsDiv = news.style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.pixelLeft = leftedge;
newsDiv.pixelTop = topedge - cliptop;
}
cliptop = (cliptop + 1) % (scrollheight + boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews(" + cliptop + ")", 150);
}
// End -->
</script>
</HEAD>
:D
I'm still very new to java script and I'm having problems altering the code for this vertical text and pic scroll box to change the font from times new roman which appears to be the default font to Ariel. Does anyone know what and where I should alter the code to change it to ariel. Also it would be cool if I cound centre to text up in the box
thanks so much to anyone who helps
Davw:)
heres the code so far:
<BODY OnLoad="scrollnews(0)">
<div ID="news" style="position:absolute; visibility:hidden;
top:1; left:1; height:600;
clip:rect(10,100,100,10); border-width:0px;">
<table border=0 cellpadding=1 cellspacing=0 bgcolor="white">
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
<tr>
<td>
<!-- Your News Items are Here -->
<img border="0" src="advice line logo small.jpg" width="200" height="35"><br> <br>
As the mortgage market has developed over the last 10 years
, in order to satisfy the requirements of borrowers
and due to competition between banks and building societies
several different types of mortgage have been developed.
These range from a traditional (but still popular) straightforward
repayment mortgage, to flexible products which enable you
to make underpayments and overpayments
or even take payment holidays.
This section gives you information on main types of mortgage
currently available.<br> <br>
<img border="0" src="advice line logo small.jpg" width="200" height="35"><br> <br>
<!-- End Of Your News Items -->
</td>
</tr>
<tr>
<td>
<script language="javascript">
document.write('<img src=' + blank + ' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
</table>
</div>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Dion (yobo42@hotmail.com) -->
<!-- Web Site: http://www.iinet.net.au/~biab/ -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
// change this to where you store the blank.gif image
var blank = "baby and money.jpg";
topedge = 130; // location of news box from top of page
leftedge = 10; // location of news box from left edge
boxheight = 150; // height of news box
boxwidth = 210; // width of news box
scrollheight = 340; // total height of all data to be scrolled
function scrollnews(cliptop) {
if (document.layers) {
newsDiv = document.news;
newsDiv.clip.top = cliptop;
newsDiv.clip.bottom = cliptop + boxheight;
newsDiv.clip.left = 0;
newsDiv.clip.right = boxwidth + leftedge;
newsDiv.left = leftedge;
newsDiv.top = topedge - cliptop;
}
else {
newsDiv = news.style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.pixelLeft = leftedge;
newsDiv.pixelTop = topedge - cliptop;
}
cliptop = (cliptop + 1) % (scrollheight + boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews(" + cliptop + ")", 150);
}
// End -->
</script>
</HEAD>
:D