Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
Robocrotch
Hangin' Around


Joined: Aug 03, 2004
Posts: 28

PostPosted: Mon Oct 11, 2004 12:14 pm Reply with quote

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 
View user's profile Send private message
Robocrotch
PostPosted: Mon Oct 11, 2004 12:15 pm Reply with quote

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...
 
Robocrotch
PostPosted: Mon Oct 11, 2004 12:17 pm Reply with quote

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>

 
Robocrotch
PostPosted: Mon Oct 11, 2004 12:17 pm Reply with quote

Ok it's because it wont allow me to post..
script langage=" Javascript ">


</ script >
 
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Mon Oct 11, 2004 12:18 pm Reply with quote

You are probably trying to post html script and/or javascript tags. Nuke does not allow it and neither does NukeSentinel.
 
View user's profile Send private message
Robocrotch
PostPosted: Mon Oct 11, 2004 12:19 pm Reply with quote

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");

?>
 
Robocrotch
PostPosted: Tue Oct 12, 2004 11:05 am Reply with quote

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

Crying or Very sad sniff sniff
 
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2496

PostPosted: Tue Oct 12, 2004 2:14 pm Reply with quote

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 
View user's profile Send private message
Robocrotch
PostPosted: Tue Oct 12, 2004 3:20 pm Reply with quote

Only registered users can see links on this board! Get registered or login!

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>";

}
 
sixonetonoffun
PostPosted: Tue Oct 12, 2004 4:21 pm Reply with quote

Seems to work ok for me with firefox and IE6 using Sun Java.
 
Robocrotch
PostPosted: Tue Oct 12, 2004 4:25 pm Reply with quote

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...
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©