Hi,
I am using document.write() to generate a new page with an mp3 in an iframe.
At the end of the function there is a document.close() tag which used to work.
Now with the new Safari (1.3 and 2) it gets ignored, the pages get written one on top of another and all music tracks play at once.
You can view the site at [url]http://www.anabelcentral.com
Please help me if you can,
Thanks
Jenny
Below is the code that I need help with:
[CODE]function setMusic(link, name) {
mywindow = parent.mp3;
mywindow.document.write (
‘<html><body link=”#000000″ vlink=”#000000″ alink=”#000000″>’ +
‘<table width=”308″ cellpadding=”0″ cellspacing=”0″ border=”0″>’ +
‘<tr>’ +
‘<td align=”right”>’ +
‘<img src=”img/spacer.gif” width=”1″ height=”16″ border=”0″><br>’ +
‘<object classid=”clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B” width=”270″ height=”16″ codebase=”http://www.apple.com/qtactivex/qtplugin.cab”>’ +
‘<param name=”src” value=”tracks/’ + link + ‘.mp3″>’ +
‘<param name=”AUTOPLAY” value=”true”>’ +
‘<param name=”CONTROLLER” value=”true”>’ +
‘<embed id=”embed1″ src=”tracks/’ + link + ‘.mp3″ width=”270″ height=”16″ autoplay=”true” controller=”true” pluginspage=”http://www.apple.com/quicktime/download/”>’ +
‘</embed>’ +
‘</object><br>’ +
‘<font style=”font-family: Verdana, Helvetica, Arial; font-size: 11px; font-style: normal”><a href=”tracks/’ + link + ‘.mp3″ target=”_blank” style=”text-decoration: none; border-bottom: 1px dotted #000000″>’ + name + ‘</a><br>’ +
‘<font style=”color: #75AB4D”>right click song name to download</font>’ +
‘</font>’ +
‘</td>’ +
‘</tr>’ +
‘</table>’ +
‘</body></html>’);
mywindow.document.close();
}