Author |
Message |
Robocrotch
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 03, 2004
Posts: 28
|
Posted:
Mon Oct 11, 2004 12:14 pm |
|
I just found out that the code below works when im onmousingover, but when I onmouseout it has to load mach1.jpg |
Last edited by Robocrotch on Tue Oct 12, 2004 8:33 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Robocrotch
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Oct 11, 2004 12:15 pm |
|
Sorry about this. It's just because I'm trying to make a post with some code in it but Sentinel keeps blocking me and saying that i'm banned... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Robocrotch
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Oct 11, 2004 12:17 pm |
|
Am I doing something wrong? (im posting this in HTML because Sentinel wont let me post this same php code... !!??)
Code:
mach1initial = new Image;
mach1initial.src = "mach1.JPG";
mach1onoffswitch = new Image;
mach1onoffswitch.src = "mach1onoffswitch.JPG";
<p align="center"><b>MACH 1</b></p>
<p align="center"><map name="FPMap0">
<area coords="157, 118, 160, 117, 161, 132, 169, 138, 167, 143, 161, 153, 162, 160, 165, 166, 157, 167, 155, 165, 153, 148, 152, 145, 149, 143, 148, 137, 152, 134" shape="polygon" nohref onMouseOver="mach1.src=mach1onoffswitch.src" onMouseOut="mach1.src='mach1.JPG'">
</map>
<img border="0" src="mach1.JPG" width="300" height="385" usemap="#FPMap0" name="mach1"></p>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Robocrotch
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Oct 11, 2004 12:17 pm |
|
Ok it's because it wont allow me to post..
script langage=" Javascript ">
</ script > |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Oct 11, 2004 12:18 pm |
|
You are probably trying to post html script and/or javascript tags. Nuke does not allow it and neither does NukeSentinel. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Robocrotch
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Oct 11, 2004 12:19 pm |
|
So anyways, my problem is that everytime i onmouseover or onmouseout it redownloads the image... Thanks for your help.
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
$index = 0;
OpenTable();
echo"<script langage=\"Java script\">"
. ""
. "mach1initial = new Image;"
. "mach1initial.src = \"modules/teamthemachs/mach1.JPG\";"
. ""
. "mach1 = new Image;"
. "mach1.src = \"modules/teamthemachs/mach1.JPG\";"
. ""
. "mach1onoffswitch = new Image;"
. "mach1onoffswitch.src = \"modules/teamthemachs/mach1onoffswitch.JPG\"; "
. ""
. "</ script>"
. ""
. "<p align=\"center\"><b>MACH 1</b></p>"
. ""
. "<p align=\"center\"><map name=\"FPMap0\">"
. "<area coords=\"157, 118, 160, 117, 161, 132, 169, 138, 167, 143, 161, 153, 162, 160, 165, 166, 157, 167, 155, 165, 153, 148, 152, 145, 149, 143, 148, 137, 152, 134\" shape=\"polygon\" nohref onMouseOver=\"mach1.src=mach1onoffswitch.src\" onMouseOut=\"mach1.src=mach1initial.src\">"
. "</map>"
. "<img border=\"0\" src=\"modules/teamthemachs/mach1.JPG\" width=\"300\" height=\"385\" usemap=\"#FPMap0\" name=\"mach1\"></p>";
CloseTable();
include("footer.php");
?> |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Robocrotch
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Oct 12, 2004 11:05 am |
|
And I've tried installing two different preloader on my site and I guess they don't have one that works for 7.4 yet
sniff sniff |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
Spouse Contemplates Divorce
![](modules/Forums/images/avatars/d1ecfa674c890aee2698b.jpg)
Joined: Jan 02, 2003
Posts: 2496
|
Posted:
Tue Oct 12, 2004 2:14 pm |
|
Thats a fairly large image to preload but anything you can do in a html page should work fine as long as it doesn't conflict with any other java already loading.
You might try putting the preload code into either includes/my_header.php or includes/javascript.php or directly into the header.php above the previously mentioned to see if it loads better when called before the java that may be included in those.
I'd wrap it in something like this to prevent it loading on other pages.
if (stristr($_SERVER['REQUEST_URI'],'teamthemachs')) {
_Your preload image code here_
} |
_________________ [b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Robocrotch
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Oct 12, 2004 3:20 pm |
|
http://www.worldwidehell.com/modules.php?name=teamthemachs
I have done what you said, for some reason whenever you onmouse out, the image has to load...
index.php code:
Code:
. "<p align=\"center\"><map name=\"FPMap0\">"
. "<area coords=\"222, 165, 229, 167, 228, 184, 227, 189, 237, 198, 234, 206, 230, 211, 232, 235, 225, 238, 220, 211, 214, 205, 212, 198, 214, 191, 219, 189, 219, 168\" shape=\"polygon\" nohref onMouseOver=\"mach1.src=mach1onoffswitch.src\" onMouseOut=\"mach1.src=mach1initial.src\">"
. "</map>"
. "<img border=\"0\" src=\"modules/teamthemachs/mach1.JPG\" usemap=\"#FPMap0\" name=\"mach1\"></p>";
|
My includes/my_header.php code:
Code:
if (stristr($_SERVER['REQUEST_URI'],'teamthemachs')) {
echo"<script langage=\"Java script\">"
. ""
. "mach1initial = new Image;"
. "mach1initial.src = \"modules/teamthemachs/mach1.JPG\";"
. ""
. "mach1onoffswitch = new Image;"
. "mach1onoffswitch.src = \"modules/teamthemachs/mach1onoffswitch.JPG\"; "
. ""
. "</ script>";
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Oct 12, 2004 4:21 pm |
|
Seems to work ok for me with firefox and IE6 using Sun Java. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Robocrotch
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Oct 12, 2004 4:25 pm |
|
oh really?
The onmouseover for me loads automatically, while the other one takes 1-2 seconds to load and at the bottom (status bar) says downloading mach1.jpg...
Hmm.. okay... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|