PDA

View Full Version : Shoutcast HTML widget renders incorrectly when inside a <form> tag


dbenson
6th August 2009, 12:43
The shoutcast HTML widget will not render correctly in firefox when inside a <form> tag. In IE, it will just not show up, with an oh-so-helpful script error "Unknown runtime error".
This is frustrating as many server side languages, such as .net, put most of their code inside a form. It's a pretty easy bug to replicate too - just put the following into a new HTML document:


<html>
<head><title>test</title></head>
<body>
<form>
<div style="width:350px;">
<script src='http://www.shoutcast.com/script/u3embed_module.js'></script>
<div id='sc_embed_module'></div>
<script language='JavaScript' type='text/javascript'>scEU3EmbedModule('MOST_POPULAR', '', 0);</script>
</div>
</form>
</body>
</html>


Thanks.

--Dben

dotme
9th August 2009, 16:46
Your putting Javascript inside a form. What if the javascript itself includes a form attribute? I haven't inspected the js code, but since the widget allows users to submit information, it wouldn't surprise me if the js code included a form.

As far as I know, PHP (and Classic ASP) do not need code wrapped in form tags. I'd be surprised if .NET were different. Try putting the widget in a table cell instead.