Click to See Complete Forum and Search --> : is this posible ?


Angellus
04-12-2003, 02:04 PM
Hi folks,
yep its me again ( the stupid one ) bleh :confused:
I downloaded this js here and now i'm trying to change it a bit so i can use it on my site, and because i dont have any knowledge of java i came here because you folks do know it :D
the background of my site is made of a .jpg and has a nice soft collor so ppl wont have to hurt there eyes to see or read anything, now my problem is that the scrollwindow has a white background color and the tekst is black,
now i found out on how to change the bg color to black, but not on how to change it to the same color as my site,
abouth the tekst collor inside the scrollbox i didnt find it at all.
So is it possible to change the bg collor to the same as my site's bg and is it possible to change the textcollor to white ?
here is the url of my site if anyone wants to know what the bg collor of my site is
http://h-zone.no-ip.org
Thanks
Angellus


<!-- THREE STEPS TO INSTALL NEWS SCROLLER:

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

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

<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 = "http://www.your-web-site-address-here.com/blank.gif";

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 = 240; // 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>

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

<BODY OnLoad="scrollnews(0)">

<!-- STEP THREE: Copy this code into the BODY of your HTML document -->

<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 -->

This news scroller begins<br>
Displaying text and images<br>
From the bottom of the box<br>
And restarts when all the<br>
Information scrolls above<br>
The top of the box.<br><br>
Any HTML page content can<br>
Be used in this Javascript<br>
Scroller.<br>
<br>
<a href="mailto:yobo42@hotmail.com">yobo42@hotmail.com</a>

<!-- 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>

<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: 2.71 KB -->

Nedals
04-12-2003, 02:31 PM
In STEP 3...

<table border=0 cellpadding=1 cellspacing=0 bgcolor="white">

You need to find the color of the background image. Something like this.... "#336633". Then change to bgcolor="#336633".

For the text color, add a <div>

<div style="color:#fff">
This news scroller begins<br>
....
Scroller.<br>
</div>

Angellus
04-12-2003, 07:16 PM
Thank you Nedals for that fine help you gave me here ;-)
I had some probs finding the right color settings but i managed :-)
Thanks again Nedals cos i wouldnt be able to find it myself lol
now that i know this i can try some more by fiddeling around a bit with the script hehehe.
but i do have 1 more question if you dont mind,
can i get the script to scroll a txt file instead of the teks that is in the script, so i dont have to open up the htm file everythime i want to change the tekst !?
or do i need a different script for this ?
if it is possible to let the script load a txt file, pls dont give me the anwser on how to do this, if it is possible then just say yes, then i am going to try and find out myself how to make this happen.:rolleyes:
Thanks again
Angellus

Nedals
04-12-2003, 09:56 PM
If you are talking about scrolling the 'Your News items', then yes. You will need to look into using DHTML.
Good luck, and if you get in trouble there's someone here that can help you out.

Angellus
04-15-2003, 06:59 AM
Ow my G.

I think i'll best go back to school hehehehe
Thanks Nedals for the help and info, i'll do my best .
And its nice to know we can find help here ;-)


Thanks
Angellus