jkewlo Posted September 10, 2009 Share Posted September 10, 2009 Hello, First i am using an image rollover script which is working on top-level pages and fails inside iframes which is another script listed in the same functions file, i hate to use tons of .js files when i can combine all scripts in one file also the first script has a validation problem, there's no oversrc in xhtml anyways this should solve the validation problem but again it conflicts with everything else function SimpleSwapSetup() { var images = document.getElementsByTagName(”img”); for (var i=0; ioff.”)) { images[i].oversrcimg = new Image(); images[i].oversrcimg.src = images[i].getAttribute(”src”).replace(”off.”, “on.”); images[i].onmouseover = new Function(”SimpleSwap(this, ‘oversrc’);”); images[i].onmouseout = new Function(”SimpleSwap(this);”); images[i].setAttribute(”origsrc”, images[i].src); images[i].setAttribute(”oversrc”, images[i].oversrcimg.src); } } } and of course it uses window.onload function to get executed when the page loads, please note that i injected 2 other functions [semi-Facebook Ajax Popup and Adavnced Ajax Captcha] to prevent any possible conflicts ! Ohh the Dynamic Iframe Function is all the pain, it suppose to work with main navigation menu which uses the previous image rollover script, well i get error by firebug "home_loader is not defined" even with the fact it's not a function anyway any script inside this cursed iframe doesn't work and the following is the code i used in the index page to combine Dynamic Iframe Function with Image Rollover Function but with No luck. <a href="javascript:void(0)" title="Home" onclick="home_loader(); return false;"><img src="images/navhome_00.gif" oversrc="images/navhome_01.gif"></a> So what do you think the problem is so I can solve this Thank You Link to comment https://forums.phpfreaks.com/topic/173796-o-what-a-head-ache/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.