Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

londonweb

macrumors 6502
Original poster
Sep 14, 2005
260
0
london
Hi there

I've been using a piece of code accross a number of my sites for a while that toggles displayed images by changing the src of an img tag. I assumed it would work fine with the embed tag too, but it seems it doesn't. Any ideas?

Code:
//on head:

function loadmov(moviename) {	
    document.embeds['movieid'].src = ("../path/"+ moviename); 
    focus();
}


//on icon:

onClick="loadmov('mymovie')"

ps. Does anyone know any good javascript or dhtml forums?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.