jense Posted April 7, 2006 Share Posted April 7, 2006 Hi all,I wasn't really sure where to put this. In the (X)HTML forums or the JS one. I have a huge background on my website. I used a preloading JS script to make sure my rollovers are there. Now, every time I click one of my inside links, my background reloads. It's really annoying. I know that I can use tables to make sure it stays when I click around, but I've seen a website that doesn't use tables and their background stays.I looked at their code, but I just couldn't make out how they did it.So, my question would be... How can I make sure my background is preloaded as well?Thanks in advance!~jense Link to comment Share on other sites More sharing options...
Little Goat Posted April 7, 2006 Share Posted April 7, 2006 it helps to post your code, such as your preload script, and your page content too. that makes it a lot easier for us to answer your question.LG Link to comment Share on other sites More sharing options...
scott100 Posted April 7, 2006 Share Posted April 7, 2006 Do you realise that your site breaks when it is viewed by a 800x600 resolution? You might want to have a look at it... Link to comment Share on other sites More sharing options...
jense Posted April 8, 2006 Author Share Posted April 8, 2006 I've tried to put my background as a preloaded page now. Doesn't seem to work, heh... Here's the code for one of my pages (it's not uploaded yet): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Virtuous Immorality @ Soronrille.com</title><meta name="description" content="Soronrille.com - A Personal Website" /><link rel="stylesheet" type="text/css" href="versionfourzero.css" /><script>/*Preload images scriptBy JavaScript Kit (http://javascriptkit.com)Over 400+ free scripts here!*/var myimages=new Array()function preloadimages(){for (i=0;i<preloadimages.arguments.length;i++){myimages[i]=new Image()myimages[i].src=preloadimages.arguments[i]}}//Enter path of images to be preloaded inside parenthesis. Extend list as desired.preloadimages("http://www.soronrille.com/v4.o/graphics/bg.jpg")</script></head><body><script type="text/javascript">/***************************************************** DOM Image rollover:* by Chris Poole* http://chrispoole.com* Script featured on http://www.dynamicdrive.com* Keep this notice intact to use it :-)****************************************************/function init() { if (!document.getElementById) return var imgOriginSrc; var imgTemp = new Array(); var imgarr = document.getElementsByTagName('img'); for (var i = 0; i < imgarr.length; i++) { if (imgarr[i].getAttribute('hsrc')) { imgTemp[i] = new Image(); imgTemp[i].src = imgarr[i].getAttribute('hsrc'); imgarr[i].onmouseover = function() { imgOriginSrc = this.getAttribute('src'); this.setAttribute('src',this.getAttribute('hsrc')) } imgarr[i].onmouseout = function() { this.setAttribute('src',imgOriginSrc) } } }}onload=init;</script><script language=JavaScript><!--//Disable right mouse click Script//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive//For full source code, visit http://www.dynamicdrive.comvar message="Copyright © 2005-2006 Soronrille. All Rights Reserved.";///////////////////////////////////function clickIE4(){if (event.button==2){alert(message);return false;}}function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){alert(message);return false;}}}if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}document.oncontextmenu=new Function("alert(message);return false")// --> </script><div class="stats"><!-- Start of StatCounter Code --><script type="text/javascript" language="javascript"><!-- var sc_project=1369029; var sc_invisible=0; var sc_partition=11; var sc_security="496cfe97"; var sc_text=1; //--></script><script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img src="http://c12.statcounter.com/counter.php?sc_project=1369029&java=0&security=496cfe97&invisible=0" alt="best tracker" border="0"></a> </noscript><!-- End of StatCounter Code --> visitors |<!-- Start FastOnlineUsers.com --><script type="text/javascript" src="http://fastonlineusers.com/on4.php?d=www.soronrille.com"></script> online<br><!-- End FastOnlineUsers.com --><!-- Start FastWebCounter.com --><script src="http://fastwebcounter.com/secure.php?s=www.soronrille.com"></script> hits since 3-9-06</a><!-- End FastWebCounter.com --></div><div style="position:absolute; left:565px; top:156px;"><img src="./graphics/nautonnier.jpg" hsrc="./graphics/nautonnierhover.jpg" border="0" /></div><div style="position:absolute; left:600px; top:156px;"><img src="./graphics/nautonnier.jpg" hsrc="./graphics/nautonnierhover.jpg" border="0" /></div><div style="position:absolute; left:635px; top:156px;"><img src="./graphics/nautonnier.jpg" hsrc="./graphics/nautonnierhover.jpg" border="0" /></div><div style="position:absolute; left:670px; top:156px;"><img src="./graphics/nautonnier.jpg" hsrc="./graphics/nautonnierhover.jpg" border="0" /></div><div style="position:absolute; left:705px; top:156px;"><img src="./graphics/nautonnier.jpg" hsrc="./graphics/nautonnierhover.jpg" border="0" /></div><div style="position:absolute; left:534px; top:72px;"><img src="./graphics/gun.jpg" hsrc="./graphics/bam.jpg" border="0" /></div><div style="position:absolute; left:319px; top:406px;"><a href="tag.html" onClick="MyWindow=window.open('http://www.soronrille.com/shoutbox/shout.php','tagboard','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=200,height=350,left=80,top=50'); return false;"><img src="./graphics/tag.jpg" border="0" /></A></div><div style="position:absolute; left:171px; top:506px;"><a href="http://jense.livejournal.com" title="Livejournal" target="_blank"><img src="./graphics/lj.jpg" border="0"></A></div><div style="position:absolute; left:507px; top:562px;"><a href="updates.php"><img src="./graphics/home.jpg" border="0"></A></div><div style="position:absolute; left:564px; top:562px;"><a href="portfolio.html"><img src="./graphics/portfolio.jpg" border="0"></A></div><div style="position:absolute; left:643px; top:562px;"><a href="site.html"><img src="./graphics/site.jpg" border="0"></A></div><div style="position:absolute; left:693px; top:562px;"><a href="www.html"><img src="./graphics/www.jpg" border="0"></A></div><div id="text"><div class="header">www</div><div class="module"></div><div class="module"></div><div class="module"></div><div class="module"></div><table width="75%" cellpadding="0" cellspacing="0"><tr><td valign="top"> <img src="./graphics/list.jpg" /> affiliates</td> <td valign="top"> [<a href="affiliates.html"><b>x</b></a>] </td> </tr><tr><td valign="top"> <img src="./graphics/list.jpg" /> collective</td> <td valign="top"> [<a href="collective.html"><b>x</b></a>] </td> </tr><tr><td valign="top"> <img src="./graphics/list.jpg" /> resources</td> <td valign="top"> [<a href="resources.html"><b>x</b></a>] </td> </tr></table> </div></body></html> Hope this helps? Link to comment Share on other sites More sharing options...
jense Posted April 8, 2006 Author Share Posted April 8, 2006 Do you realise that your site breaks when it is viewed by a 800x600 resolution? You might want to have a look at it...<{POST_SNAPBACK}> Ummm... No, I didn't? How do I fix that? I do know though that when you view my new page in FF, that my rollover images are a positioned a little bit higher than in IE. Does that have something to do with position: absolute? Any way I can fix that?Thanks for letting me know! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now