Layout destroyed, when copying layout - Bug?

Hi,

I found this really strange problem, when copying a more complicated layout from one page to another. It is a layout with nested gridpanels and tables inside the girdpanels, in oder to let the (JSF) tables grow and have them all displayed properly.

If I copy this layout to new page, it shows correct in JSC 2 Update 1, but in Firefox it is messed up. I found this strange piece of html in the page, which seems to be the problem:

/*

* Disable all table actions if no rows have been selected.

*/

function disableActions(){

// Determine whether any rows are currently selected

var table = document.getElementById("form1:table1");

var disabled = (table.getAllSelectedRowsCount() > 0) ?false :true;

// Set disabled state for top actions

document.getElementById("form1:table1:tableActionsTop:deleteTop").setDisabled(disabled);

// Set disabled state for bottom actions

document.getElementById("form1:table1:tableActionsBottom:deleteBottom").setDisabled(disabled);

}</script><script /><script /><script /><table id="form1:gridPanel2" style="height: 94px; left: 24px; top: 240px; position: absolute" width="717">

<tbody>

<tr>

<td><table id="form1:gridPanel3" style="height: 216px" width="983">

<tbody>

<tr>

<td><input id="form1:add_ObservationPoint1" name="form1:add_ObservationPoint1" class="Btn2" onblur="return this.myonblur();" onfocus="return this.myonfocus();" onmouseout="return this.myonmouseout();" onmouseover="return this.myonmouseover();" type="submit" value="New Observation Point" /><script type="text/javascript">sjwuic_assign_button('form1:add_ObservationPoint1', defaultButtonStrings, true, false,false);</script></td>

</tr>

I didn't add the hole javascript here, but I hope you get the idea. It guess it is this piece of rather strange html, that Firefox doesn't like: </script><script /><script /><script />

How does that get in there? In the JSP the script tag is just closed and there is no more <script/> ... Firefox should just render that anyway I guess, be it doesn't. So maybe it is a bug in Firefox (Gecko getting confused with all the <script/>?) but the Appserver shouldn't add it anyway. Or is there an explanation for this, which I failed to see? How do I get rid of it, I don't want to recreate the page.

[3315 byte] By [maxhuetter] at [2007-11-26 9:36:46]
# 1

If the document is eventually served as text/html, then the <script/> syntax is not valid HTML (it's actually the same as <script>>). The closing tag is not optional for the SCRIPT element.

Therefore for HTML, <script></script> will work but not </script>. If the mime-type is set to "application/xhtml+xml" then <script /> should work.

KarthikR at 2007-7-7 0:29:13 > top of Java-index,Development Tools,Java Tools...