B
bunch92
Hi,
I am stuck with ideas guys ....
Can someone please tell me what I did wrong in the code below ? I think
it might be the <script> tag inside the function ?
Thank you
<SCRIPT LANGUAGE="JavaScript">
function playasound(thesound,thename,themethod)
{
if (themethod = 'W' || themethod = 'M' ){
var s=parent.pagebas.document;
s.open();
s.write('<html><head></head><body bgcolor="#009999"
text="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">');
s.write('<div align="center"><TABLE align="center" BORDER="0"
CELLPADDING="0" CELLSPACING="0" WIDTH="520"><TR><TD
width="400" bgcolor="#000000">');
s.write('<div align="center"><font color="#FFFFFF" face="Arial,
Helvetica, sans-serif" size="-2">');
s.write('Now loading and playing .... <i>',thename,'</i> .....
</font>');
s.write('<embed src="',thesound,'" height="20" width="100" hidden
autoplay="true">');
s.write('</embed></div></TD></TR></TABLE></div></body></html>');
s.close();
}
else if (themethod = 'X' || themethod = 'N'){
var s=parent.pagebas.document;
s.open();
s.write('<html><head></head><body bgcolor="#009999"
text="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">');
s.write('<div align="center"><TABLE align="center" BORDER="0"
CELLPADDING="0" CELLSPACING="0" WIDTH="520"><TR><TD
width="400" bgcolor="#000000">');
s.write('<div align="center"><font color="#FFFFFF" face="Arial,
Helvetica, sans-serif" size="-2">');
s.write('Now loading and playing .... <i>',thename,'</i> .....
</font>');
s.write('<SCRIPT LANGUAGE="JavaScript">
s.location.href="',thesound,'" </script>');
s.write('</div></TD></TR></TABLE></div></body></html>');
s.close();
}
}
</SCRIPT>
I am stuck with ideas guys ....
Can someone please tell me what I did wrong in the code below ? I think
it might be the <script> tag inside the function ?
Thank you
<SCRIPT LANGUAGE="JavaScript">
function playasound(thesound,thename,themethod)
{
if (themethod = 'W' || themethod = 'M' ){
var s=parent.pagebas.document;
s.open();
s.write('<html><head></head><body bgcolor="#009999"
text="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">');
s.write('<div align="center"><TABLE align="center" BORDER="0"
CELLPADDING="0" CELLSPACING="0" WIDTH="520"><TR><TD
width="400" bgcolor="#000000">');
s.write('<div align="center"><font color="#FFFFFF" face="Arial,
Helvetica, sans-serif" size="-2">');
s.write('Now loading and playing .... <i>',thename,'</i> .....
</font>');
s.write('<embed src="',thesound,'" height="20" width="100" hidden
autoplay="true">');
s.write('</embed></div></TD></TR></TABLE></div></body></html>');
s.close();
}
else if (themethod = 'X' || themethod = 'N'){
var s=parent.pagebas.document;
s.open();
s.write('<html><head></head><body bgcolor="#009999"
text="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">');
s.write('<div align="center"><TABLE align="center" BORDER="0"
CELLPADDING="0" CELLSPACING="0" WIDTH="520"><TR><TD
width="400" bgcolor="#000000">');
s.write('<div align="center"><font color="#FFFFFF" face="Arial,
Helvetica, sans-serif" size="-2">');
s.write('Now loading and playing .... <i>',thename,'</i> .....
</font>');
s.write('<SCRIPT LANGUAGE="JavaScript">
s.location.href="',thesound,'" </script>');
s.write('</div></TD></TR></TABLE></div></body></html>');
s.close();
}
}
</SCRIPT>