Zero-x252
07-30-2003, 12:29 PM
what did i do wrong in this script? i get the error on line 6 character 1. I need the function to work on the click of a button which it should but i'm not sure now that i apparently screwed it up...
function bgmusic() {
var bgm = prompt('Use what file/url as background music?')
while (bgm = "") {
document.write("")
}
else (bgm != "") {
document.write('<bgsound src="bgsound(bgm)"></bgsound><embed src="bgsound(bgm)"></embed>')
}
}
function bgmusic() {
var bgm = prompt('Use what file/url as background music?')
while (bgm = "") {
document.write("")
}
else (bgm != "") {
document.write('<bgsound src="bgsound(bgm)"></bgsound><embed src="bgsound(bgm)"></embed>')
}
}