Mysterious FireFox DIVs
Posted: Sat Jul 31, 2010 5:31 pm
I've got a web application doing some basic AJAX stuff, but for some reason, when I view the source code in FireFox, the browser is showing a new DIV tag in the middle of two of mine, and then it puts in THREE closing DIV tags a whole element before I had programmed only one. Wtf? So here's what my code SHOULD be doing:
The DIV above is hidden by the CSS by default. An AJAX function makes a call and then replaces the innerHTML of this DIV above with its response text, and changes the style of the DIV to display it.
This is what the response text is should be generating (inside the "formDisplay" DIV):
The problem is that when I view the source (FireFox), the beginning actually looks like this:
The DIV tags in red are not supposed to be there at all (or the last one should be AFTER the input element). Does anyone know what FireFox would be adding these DIVs? The same code PHP code is used elsewhere (in between a uniquely named DIV) and those extra tags don't appear.
Thanks!
Code: Select all
<div id="FormDisplay_Inactive">One moment...</div>This is what the response text is should be generating (inside the "formDisplay" DIV):
Code: Select all
<div id="CustForm_<?php echo $CustomerID; ?>"> <!--Note that the #### is dynamically generated by the PHP-->
<div id="CustForm_header">
<span class="leftLabel"> </span>Status:<br/>
<span class="leftLabel"> </span><input type="checkbox" name="Status[]" id="Status" tabindex="14" value="Active" <?php if($Status_chk){echo $Status_chk;}else{echo 'checked="checked"';} ?>/>
ACTIVE (uncheck to de-activate)
<input name="CustomerID" type="hidden" id="CustomerID" size="5" maxlength="5" readonly="readonly" value="<?php echo $CustomerID; ?>"/>
</div>
<div id="CustForm_body">stuff...
</div>
<div id="CustForm_footer">
</div>
</div> <!--close of the "CustForm_####"Code: Select all
<div id="FormDisplay_Inactive">[color=#FF0000]<div>[/color]<div id="CustForm_1078">
<div id="CustForm_header">
<span class="leftLabel"> </span>Status:<br>
<span class="leftLabel"> </span><input name="Status[]" id="Status" tabindex="14" value="Active" checked="checked" type="checkbox">
ACTIVE (uncheck to de-activate)
[color=#FF0000]</div></div></div>[/color]<input name="CustomerID" id="CustomerID" size="5" maxlength="5" readonly="readonly" value="1078" type="hidden">
<div id="CustForm_body">Thanks!