Click to See Complete Forum and Search --> : scrolling background


zabel
10-04-2004, 05:02 AM
Hello everyone, hope someone can help with this. I have a scrolling background on my webpage, the background scrolls down diagnally. The problem is when I put in an "external" link that opens a new window, the background on my page dissapears. It works fine if I open a new window to a page on my server. Any idea why it does this?
My Website (http://www.intergate.com/~zabel)
(It's a very simple personal website and I'm new to building so don't make fun)
Thanks for your time!

Fang
10-04-2004, 06:15 AM
You can only change your page not anyone else's.

zabel
10-04-2004, 06:16 AM
hmmm... I just went to the reviews forum and read on the sticky about validating your code, went to the place and did it. seems I have a mess on my hands soooo, I think I better work on this a little more. Any helpful info would still be nice :)

Fang
10-04-2004, 09:36 AM
173 validation errors, you are aiming too high with the xhtml DTD.
Replace it with:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Most of the problems are easily resolved by placing element styles in CSS.
http://www.w3schools.com/css/default.asp

The JavaScripts you are using are, old and outdated, not supporting modern browsers.
The <layer> element used is for old Netscape browsers. Unless you specifically wish to support them, it would be better to remove those sections of script.

zabel
10-04-2004, 12:20 PM
thanks fang
I know the document type was wrong, I've just been trying to find something that would make it valid. I had nothing in there before. I think I need to start from scratch again. I'm going to check out that css tutorial. I've never explored that avenue yet. The scripts I'm using were gotten from other sources so I'm not sure if I can edit them. I'll have to check that out too. I don't know how to write scripts :P

Fang
10-04-2004, 12:26 PM
Start with the tutorials at http://www.w3schools.com/default.asp, and the validation can come later.

zabel
10-05-2004, 05:23 AM
Thanks so much Fang! I went there and learned alot. check out my code now! :D
http://www.intergate.com/~zabel/ (my site)
it's all valid too except for the guestbook.
But this still doesn't solve my background problem. When I open a blank target the background on my page gets all screwed up. Any idea?
Thanks again :)

Fang
10-05-2004, 06:18 AM
Change the function Scroll() and add Restart()
function Scroll()
{
posX++;
posY++;
ScrollThis.style.backgroundPosition=posX+" "+posY;
timer=setTimeout("Scroll()",Speed);

}
var timer=null;
function Restart() {
window.clearTimeout(timer);
Scroll();
}

Then in your links change:
<a href="http://www.lissaexplains.com" target="blank"><a href="http://www.lissaexplains.com" target="_blank" onclick="Restart();"> Note the change to _blank
I can not guarantee it will work as the effect only occurs online, but give it a try.

BTW This site is where I learned the basics of html.

zabel
10-05-2004, 07:05 AM
darn, that didn't work
can scripts be put on style sheets?

Fang
10-05-2004, 09:10 AM
No. There is one exception explained here (http://www.svendtofte.com/code/max_width_in_ie/), but is only supported by IE and will crash your browser if used incorrectly.

zabel
10-05-2004, 10:26 AM
thanks again Fang :)
guess I will just leave it out for now or just open the links in the same window until I figure something out. right now I have to format my other pages anyway. that will keep me busy for awhile!