I have a simple asp:RadioButtonList within a form tag but for some reason it isn't keeping it's value on postback
Here's what I've got
<form runat="server">
<div class="Form">
<span class="FirstField">
<asp:RadioButtonList runat="server" ID="radiolist1" AutoPostBack="true" RepeatDirection="Horizontal">
<asp:ListItem Text="Yes" />
<asp:ListItem Text="No" />
</asp:RadioButtonList>
</span>
</div>
</form>
At the moment all I'm trying to do is get it to keep it's value on postback - it works in Safari but not in Firefox or Internet Explorer.
Any ideas?
Edit:
I've just found out that it is something to do with my javascript in the head of my page
$(document).ready(function() {
var originalValues = new Array();
$("input").focus(function() {
if (!originalValues[this.id]) {
originalValues[this.id] = $(this).val()
}
if ( $(this).val()==originalValues[this.id]) {
$(this).val('').css({'color': "#000", 'font-style': 'normal'});
}
$(this).css({'background-color':'#E8E8E8' });
});
$("input").blur(function() {
if ( $(this).attr("value")=="") {
$(this).val(originalValues[this.id]).css({'color': "#666", 'font-style': 'normal', 'font-weight': 'normal'});
}
$(this).css({'background-color':'#fff' });
});
});
input type=radiofrom this jQuery-function.