Jump to content

O what a Head ache


jkewlo

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.