View Full Version : changing the location of iframe in script
Shecky
03-09-2003, 01:45 AM
document.frames(songshow).src = "page_songshow.php?lyrics="+lyrics;
i think its resonably easy to figure out what i wanted there... what am i doing wrong?
document.frames('songshow').src = "page_songshow.php?lyrics="+lyrics;
document.frames['songshow'].src = "page_songshow.php?lyrics="+lyrics;
document.frames.songshow.src = "page_songshow.php?lyrics="+lyrics;
pick one. :)
chrismiceli
03-09-2003, 04:29 AM
or give it an id and do this
document.getElementById("id").src = "page_songshow.php?lyrics="+lyrics;
or, also using DOM2, do this:
window.document.getElementsByName('songshow')[0].src = "page_songshow.php?lyrics="+lyrics;
^_^ so many ways, so little time to use them all...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.