Click to See Complete Forum and Search --> : Up & Down Vertical Scroller


JJudy
03-12-2003, 08:24 AM
Hi everyone ... I am having a problem trying to find where I put the other text to have the page open up there.I have read the codes and must be having a brain fart , because I can't get this to work.
I have created the extention file...( scroller.html ) but to connect them ? OMG ... Could someone PLEASE save me..?

Here is the url for the script.
http://javascript.internet.com/scrolls/up-down-vertical.html

Thank you so very much in ADVANCE. I really have tried to figure it out first.:confused:

pyro
03-12-2003, 08:28 AM
It goes in this tag:

var divTxt_content = ('Your text to scroll here...');

JJudy
03-12-2003, 08:31 AM
pyro


TY .... I dont recall seeing that ...but hey ..been there done that before..LOL :D

pyro
03-12-2003, 08:32 AM
What they have is this, if it makes it easier for you to spot. ;)

var divTxt_content = ('<b>These are ACTUAL letters to "Dear Abby"</b><hr><P><br>Dear Abby, I have a man I never could trust. He cheats so much on me I\'m not even sure this baby I\'m carrying is his.<P><br>Dear Abby, I am a twenty-three year old liberated woman who has been on the pill for two years. It\'s getting expensive and I think my boyfriend should share half the cost, but I don\'t know him well enough to discuss money with him.<P>Dear Abby, I suspected that my husband had been fooling around, and when I confronted him with the evidence he denied everything and said it would never happen again.<P>Dear Abby, Our son writes that he is taking Judo. Why would a boy who was raised in a good Christian home turn against his own?<P>Dear Abby, I joined the Navy to see the world. I\'ve seen it. Now how do I get out?<P>Dear Abby, I was married to Bill for three months and I didn\'t know he drank until one night he came home sober.<P>Dear Abby, My forty-year-old son has been paying a psychiatrist $50 an hour every week for two-and-a-half years. He must be crazy.<P>Dear Abby, I have always wanted to have my family history traced, but I can\'t afford to spend a lot of money to do it. Any suggestions? Signed, Sam Dear Sam, Yes. Run for public office.<P>');

JJudy
03-12-2003, 08:37 AM
You need to put files in two different places. I have created this file and named it... scroller.html
Then you put the bottom part of the codes in the body.
Well I did this and NOW cant get the scroller.html file to show when you click on the button.
I dont know where to put the file scroller.html in . When I click on the button..a 404 code comes up not finding the file..
Does that make sense ?

pyro
03-12-2003, 08:41 AM
zip the files that you are using and post them.

JJudy
03-12-2003, 08:51 AM
I found it and why it wont call it up.... I left off the S ..in scroller..... LOL
DuHHHHHHHHHHHH :rolleyes:
I named the file ...croller ....no wonder it wont call it ....
THANKS pyro.

Anyways ..I think thats the problem ...LOL we shall see...:confused: :rolleyes: :D

cyberade
03-12-2003, 08:56 AM
When you created the two files did you make sure you saved them in the same place (the same directory) and did you add in the html/head etc tags?

cyberade
03-12-2003, 08:58 AM
that would do it;) ...all's well that ends well!

JJudy
03-12-2003, 09:12 AM
I can't figure it out. I dont know why it wont call up that script...
I get this when I click oh the button...
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

I have NO idea now... the file was right.

Do I put something here?


var divTop_content=""; <-----------right here?

if(iex) document.write('<DIV ID="divTop" STYLE="position:absolute; top:0;
left:'+lft+'; width:300; height:100; background-color:white;
z-index:3">'+divTop_content+'</DIV>');
if(nav) document.write('<LAYER ID="divTop" position="absolute" top="0"
left="'+lft+'" width="300" height="100" bgcolor="white"
z-index="3">'+divTop_content+'</LAYER>');

pyro
03-12-2003, 09:50 AM
Want to let us see the files you are using...?

JJudy
03-12-2003, 09:58 AM
here is what I am using ....

And I have created the file ( scroller.html )

pace, or scroll back and read any information they wish. Neat!

-->


<!-- TWO STEPS TO INSTALL UP & DOWN VERTICAL SCROLLER:

1. Copy the scroller coding into the BODY of a new HTML page
2. Add the second code into the BODY of the opening page -->

<!-- STEP ONE: Paste this code into a new HTML file, name it
croller.html -->

<BODY>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Mike McGrath (mike_mcgrath@lineone.net) -->
<!-- Web Site: http://website.lineone.net/~mike_mcgrath/ -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var msg = "This page requires version 4 or later of\n Netscape Navigator
or Internet Explorer"
var dyn = (document.layers || document.all) ? true : alert(msg);
var nav = (document.layers) ? true : false;
var iex = (document.all) ? true : false;
var lft = 10; // (window.screen.width/2);
var pos = 10; // initial top position
var stp = 10; // step increment size
var spd = 150; // speed of increment
var upr = -390; // upper limiter
var lwr = 100; // lower limiter
var tim; // timer variable
function scroll_up() {
if(pos > upr) pos -= stp;
do_scroll(pos);
tim = setTimeout("scroll_up()", spd);
}

function scroll_dn() {
if(pos < lwr) pos += stp;
do_scroll(pos);
tim = setTimeout("scroll_dn()", spd);
}

function do_scroll(pos) {
if(iex) document.all.divTxt.style.top = pos;
if(nav) document.divTxt.top = pos;
}

function no_scroll() {
clearTimeout(tim);
}

var divTop_content="";

if(iex) document.write('<DIV ID="divTop" STYLE="position:absolute; top:0;
left:'+lft+'; width:300; height:100; background-color:white;
z-index:3">'+divTop_content+'</DIV>');
if(nav) document.write('<LAYER ID="divTop" position="absolute" top="0"
left="'+lft+'" width="300" height="100" bgcolor="white"
z-index="3">'+divTop_content+'</LAYER>');

var divBtm_content =('<HR><TABLE BORDER="0" WIDTH="100%"><TR><TD
ALIGN="left"><A HREF="javascript://" ONMOUSEOVER="scroll_up()"
ONMOUSEOUT="no_scroll()">SCROLL DOWN</A></TD><TD ALIGN="right"><A
HREF="javascript://" ONMOUSEOVER="scroll_dn()"
ONMOUSEOUT="no_scroll()">SCROLL UP</A></TD></TR></TABLE>');

if(iex) document.write('<DIV ID="divBtm" STYLE="position:absolute;
top:350; left:'+lft+'; width:300; height:800; background-color:white;
z-index:2">'+divBtm_content+'</DIV>');
if(nav) document.write('<LAYER ID="divBtm" position="absolute" top="350"
left="'+lft+'" width="300" height="800" bgcolor="white"
z-index="2">'+divBtm_content+'</LAYER>');

var divTxt_content = ('<b>TIPS FOR GETTING THE MOST OUT OF THESE
RECIPES</b> <b>Ingredients</b> <p>
I believe a dish is only as good as its worst ingredient. That's why we
recommend using the most healthful and delicious foods -- preferably
organic, if you can find them in your area and afford them. Moderation is
the key; most recipes are low in fat and sugar. But you'll notice that
sometimes we use a little brown sugar or honey when we believe that their
addition enhances the flavor of the dish. Feel free to be creative and
substitute your favorite ingredients.
</p>
<p>
<b>Servings </b>
<p>
I hope you'll notice that our vegetable recipe portions may be larger than
you are used to; main dish portions may be smaller. We have done this on
purpose. Most of us need to eat more vegetables and less of the
higher-calorie foods on our plate. Remember that the calories and
nutritional analyses refer to one serving. Nutritional Analysis
We provide more extensive nutritional analyses than you usually find in
cookbooks. In addition to the usual calories, protein, fat, carbohydrate,
fiber and cholesterol, we include vitamin A (which includes beta-carotene),
vitamin E, vitamin C, calcium and magnesium.
</p>
<p>
<b>Salt </b>
<p>
We have not included sodium in the nutritional analysis of the dishes
because we call for salt to taste. I believe that you can easily get used to
less and become healthier for it.
</p>
<p>
Wine, alcohol and other optional items
Some of our recipes call for wine or other spirits. You can substitute
broth, water, flavored teas or fruit juice if you don't want to use the
alcohol. We have not included those foods in the nutritional analysis.</p>
');

if(iex) document.write('<DIV ID="divTxt" STYLE="position:absolute;
top:100; left:'+lft+'; width:300; font-family:verdana; font-size:10pt;
background-color:white; z-index:1">'+divTxt_content+'</DIV>');
if(nav) document.write('<LAYER ID="divTxt" position="absolute" top="100"
left="'+lft+'" width="300" font-family="verdana" font-size="10pt"
bgcolor="white" z-index="1">'+divTxt_content+'</LAYER>');
// End -->
</script>


<!-- STEP TWO: Add the second code into the BODY of the opening page -->

<BODY>

<center>
<form>
<input type=button value="Show Recipe"
onClick="window.open('scroller.html','','width=325,height=400');">
</form>
</center>

<!-- Or make it open automatically with this code -->

<script language="JavaScript">
<!-- Begin
var popup = "no"; // just change "no" to "yes"

if (popup == "yes")
window.open('scroller.html','','width=325,height=400');
// End -->
</script>

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

pyro
03-12-2003, 10:20 AM
Try this:

JJudy
03-12-2003, 10:26 AM
But how do I apply that to my site?

pyro
03-12-2003, 10:30 AM
I think you are starting to totally lose me... :(

Just upload the pages and they will work. If you want to add the button to popup the window from a page already existing on your site, add this code to the page:

<form>
<input type=button value="Show Recipe"
onClick="window.open('scroller.html','','width=325,height=400');">
</form>

JJudy
03-12-2003, 10:34 AM
I know.... I'm so sorry. You should be in my mind. LOL
Somewhere in that script is a place to put the ( scroller.html ) file.
So it will open to the file. On my site.

pyro
03-12-2003, 10:40 AM
Ok. I have no idea what you meant by your last post, but let me try to explain again.

Upload scroller.htm to you site, in whichever directory you would like it to be in....

No, on the page that you want to call the popup, you need to add this bit of code:

<form>
<input type=button value="Show Recipe"
onClick="window.open('scroller.html','','width=325,height=400');">
</form>

Now, when you click the button, it will open scroller.html in a new window. scroller.htm does the rest. (try opening scroller.htm by itself -- it still will scroll)

Does that help? :D

JJudy
03-12-2003, 10:45 AM
Maybe I have it wrong in my files .. I am just going to forget it.
Thanks for trying to help me.

pyro
03-12-2003, 10:51 AM
Post a link, I'll take a look at it for you... :p

JJudy
03-12-2003, 10:55 AM
Pyro ...I deleted it all .. I have worked on that for a week now..It makes me feel so stupid.
I think the file I created in my manager just isnt right. Why I dont know. But thats got to be it. The scroller .html file.:confused: :(

pyro
03-12-2003, 11:02 AM
Did you try downloading the .zip file I provided? That was working for me, in IE6 (that is all I tested in...)

JJudy
03-12-2003, 11:09 AM
Yes.it works fine as a zip file..but I stll cant get it to connect to the button...
I put it back on..and created an html file named. ( scroller.html)
and then went to my page five and put the other part of the code in. ... still doesnt work.
Somewhere in that code....I need to connect the two files together....

http://www.clickeasygifts.com
on Health page

pyro
03-12-2003, 11:22 AM
I see the problem...

Upload the file that I provided called scroller.html in your main directory, and it should work fine.

After you do that, http://www.clickeasygifts.com/scroller.html should give you the file that is a part of my zip folder with the same name.

What the problem is, is your code has line breaks where there shouldn't be any. I think you also forgot to \ out the ' if that makes sense...

JJudy
03-12-2003, 11:28 AM
Originally posted by pyro
I see the problem...

Upload the file that I provided called scroller.html in your main directory, and it should work fine.

After you do that, http://www.clickeasygifts.com/scroller.html should give you the file that is a part of my zip folder with the same name.

What the problem is, is your code has line breaks where there shouldn't be any. I think you also forgot to \ out the ' if that makes sense...

No it doesnt..I think my mind is blocked ... I have put the codes in exactly as the codes have been written.. I will play with it and see what I can do with the breaks .... Is the breaks in the bottom half where the button code is?

pyro
03-12-2003, 11:35 AM
You still have not uploaded the page I sent you named scroller.html as http://www.clickeasygifts.com/scroller.html

Please view http://www.infinitypages.com/scroller.html for a demonstration of that file in action.

JJudy
03-12-2003, 12:14 PM
I am taking it off.. I hate to do it..But it's driving me nuts... I will put it on another page and hook it up via web url...

Thanks Pyro... I just cant get it to work. :(

pyro
03-12-2003, 12:23 PM
Ok, no problem... I just wanted to be as helpful as I could be... ;)

Cheers!

JJudy
03-12-2003, 12:32 PM
And I really do appreciate you helping. Im just brain dead right now I think.
I have worked on it for so long now trying to figure it out....
Don't you ever just get brain dead?
Now I cant even get my manager to delete the darn file...:(

Javascript needs to think about US dummies out here..and make it known where things go in a script. Not all of us know all of the details of a script... I thought I knew something.But Now .... Im not to sure about anything...:D :confused:
There is just so much to learn ... I'll get back to it in a day or so ...I am NOT..and I repeat ...AM NOT... going to let this script get the best of me...LOL
Not counting today of course. But we won't let anyone know that...LOLOL
I need to laugh....Or Id sit here and cry right now.LOL

Big ((( HUG ))) Pyro .... Thanks a bunch...

Wanna look in my manager? LOL Just kidding....:D ;)