Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problems with onLoad interference w/ other scripts...

    So I am not that hot with programing and just now getting my nose into it. I have used ImageReady/Photoshop to splice a page up. I used ImageReady's rollover image capability because of it's simplicity. However I needed to add a different javascript to add a special rollover effect for a few links. When I try and use both it will not work at the same time. I have gone to the <body tag and removed the onload="preloadImages(); which was put there by ImageReady. When I did this the rollovers made by ImageReady stop working and the new rollovers work. If I add them back in the opposite happens.

    This is where I got the javascript for the new rollovers.
    http://lab.arc90.com/2006/07/link_thumbnail.php

    The old page can be viewed at www.incandco.com.

    I just want to use both at the same time. I am sure this is a very common problem but I have searched all over and can not find anything that can help me. All of the scripting for the old page can be found on the first page and all of the new script is on www.incandco.com. If there is anything else you need to see just holler at me.

    Are there any quick fixes that you hXc guys know of, or is there a thread already made that could help me out?

    Thanks in advance for any help at all you can provide!
    -Bentley

  • #2
    New Coder
    Join Date
    Aug 2006
    Location
    Illinois
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know if you still need help with this, but you can try calling a function in the body onload tag which in turns calls the other functions you need to fire onload. You can list as many functions as you want here and they will all be executed.

    Code:
    <html>
    <head>
    	<script language="JavaScript">
    	<!--
    		function windowOnload()
    		{
    			preloadImages();
    			secondFunctionCallHere();
    		}
    	-->
    	</script>
    </head>
    
    <body onLoad="javascript:windowOnload();">
    	body content goes here...
    </body>
    </html>
    Sarah


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •