I have a page using a bunch of tables that are generated by a .NET repeater on page_load. These tables can have one of two classes: fileExists
or fileDoesNotExist
. On document.ready
, I have the following:
$document.ready(function () {
$('.fileDoesNotExist').each(function () {
$(this).html("<h3>FILE #" + $(this).attr('id').replace('T', '') + ":</h3><p><a href=\"/cp/media-upload.aspx?seq=" + $(this).attr('id').replace('T', '') + "\">click here to upload an MP3 or video</a></p>");
$(this).css('border', 'none');
});
});
Which should affect this bit of HTML (there are more elements involved, but this is the basic gist):
<table class="fileDoesNotExist" style="width: 100%;margin-top: 1em;" id="T1">
<tr>
<th colspan="3">FILE 1</th>
</tr>
<tr>
<td>Media Title:</td>
<td colspan="2">
<input name="txtTitle" type="text" maxlength="255" size="50" id="txtTitle" />
</td>
</tr>
</table>
This code fires fine in Chrome, Firefox, IE8 and IE9. When trying to view the page in IE7, it does all of nothing. I can replicate it in IE9 using IE7 standards for the document mode, and when trying to run the script directly in the console, it does all of nothing and returns no helpful error message.
The .each
is definitely properly firing (I replaced the $(this).html
with alert($(this).attr('id'));
and that spit out the IDs of the tables with the fileDoesNotExist
class) but it seems that the html/css replacements just aren't taking.
Is there something funky with IE7 (besides, you know, it being IE7) that I'm missing here? I looked through the suggested questions listed w/ my topic, but nothing seemed to touch upon .html or .css not firing at all.