0

I may have worded my title poorly so I hope this explanation sums my question up.

I have an email template page that allows users to enter in information to set up a custom email.

There is a second table at the bottom which lists previously created templates.

I have some jQuery in place that when a user clicks a previously created email template, it populates the top table with all of that information. Essentially, a user can save the table and let all of the information update instead of making a new template.

NOTE - everything populates correctly in FireFox, and everything updates correctly.
When I click the email names in IE, everything populates correctly but three check boxes. Each checkbox should display as "checked" if the value pulled from the database is "YES".
Otherwise, it is left unchecked. In IE, either all of the checkboxes are checked, or none of them are checked.

For reference, please check out my previous post: Need assistance with window.onload and IE

Here is the jQuery I currently have in place:

$(window).on('load', function() {
    $('.test').on('click', function() {
    var id = $(this).html();
    $.get("/includes/adminPages/Update_Email.inc.php?selection_id=" + id, function(data) {
        $('#test').html(data);
        });
    });
});

Here is an example of one of the checkboxes that is displaying incorrectly.

<?php 
if($email['copy_user'] == 'YES')
{
echo '
<input type="checkbox" name="user" id="user" value="YES" checked />Autocopy User
';
}
if($email['copy_user'] == 'NO' || $email['copy_user'] == "")
{
echo '
<input type="checkbox" name="user" id="user" value="YES" />Autocopy User
';
}
?>

I did not post my query string as it works properly in Firefox.

4

0 回答 0