Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 28th, 2004, 8:23 AM   #11
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
well, I am not so sure about doing it this way.
These ideas expressed here are good, but the syntax on the textarea tag isn't correct.
There is no height attribute for this tag, there is only rows and cols
A corect one that is not able to be modified would look like this.

<textarea rows="20" cols="50" readonly="true">
Your text goes here. Play around with the rows and cols to make it the right size for you.
</textarea>

There is one problem though, try the same code, but instead of putting the text in, put in some links. It doesn't work. It actually just shows everything including your html tags. A good thing if you plan on giving a tutorial on how to code something and make it copy and pastable, but not much help with your current situation.

I did a little searching on google, and I know I have seen what you are talking about before. I found the following, and I didn't modify it, because I wanted to make sure the creater keeps credit for their work.

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

[COLOR=red]<!-- 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 -->[/COLOR]
</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 -->
what it does is actually automaticly scroll it for you, sort of like a marquee, like the beginning of a starwars movie...lol..
I highlighted the stuff that actually shows in the box in red. And instead of using the textarea it uses it actually is using tables, but it does get you basicly the same thing.
There may be a way to combine the two, lol, but I haven't been able to figure it out yet.
I hope this helps
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this &quot;frame&quot; situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Old Sep 28th, 2004, 8:29 AM   #12
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
Sorry, I did that last one wrong,

<!-- 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 -->
copy those all in that order, that will do the trick, but what is in red is what actually shows in the box
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this &quot;frame&quot; situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:12 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC