aleX_hill Posted October 26, 2007 Share Posted October 26, 2007 I am wracking my brains trying to figure out how to fix this problem, so I hope someone out there has seen it before, or can help me fix it. Basically I have a rollover menu which when rolled over, the image itself changes, and changes another image as well. This can be seen on my site at www.hcdesigns.com.au The problem, however, is that when you rollover one of the menu items before they all load, the image does not load (the image properties are pointing at hcdesigns.com.au/undefined . If the page has finished loading, everything works fine. Another small problem is with the portfolio section, When the page loads, it should set the opacity of each div to 40%. This doesnt happen though, unless it is the second time you view the page (well load that part using AJAX). The images are all preloaded though, so I dont know how to get around this. Any help is greatly appreciated. Alex Quote Link to comment Share on other sites More sharing options...
fenway Posted October 26, 2007 Share Posted October 26, 2007 Then don't enable the rollovers until page load is complete... Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted October 26, 2007 Share Posted October 26, 2007 the problem is with the onmouseover the part "javascript:" remove that it should work fine then Quote Link to comment Share on other sites More sharing options...
aleX_hill Posted October 26, 2007 Author Share Posted October 26, 2007 rajivgonsalves : The "javascript:" is only in the href= section, not on any events. fenway : How would I disabe rollovers until the page has loaded? (I am only new to js). Thanks Quote Link to comment Share on other sites More sharing options...
aleX_hill Posted October 26, 2007 Author Share Posted October 26, 2007 I solved the problem... The js grabbed the current image in the header. and set it to a global var. This was then used in the revertImage function. The var wasnt getting the src though because the rollover was called before the source was displayed. Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.