a page with a bit of MVC code:
<%=Html.SubmitButton("ChooseWebinar.Submit", "Continue to Registration Details")%><br/>
that generates an input button where the '.' is embedded in the name:
<input id="ChooseWebinar_Submit" name="Webinar.Submit" type="submit" value="Continue" />
At page load this control (the submit button) is hidden - when one of two different dropdowns registers a value, the button is shown:
function toggleChooseWebinarSubmit() {
if ($("#ChooseWebinar_RecordedWebinarId").val() || $("#ChooseWebinar_UpcomingWebinarId").val()) {
$("#ChooseWebinar_Submit").show();
} else {
$("#ChooseWebinar_Submit").hide();
}
I've just received a report from an IE8 user who says that after selecting a value in a dropdown, the button is _not displaying. I can't reproduce the condition (i've tried compatibility mode too).
Obviously the show/hide is targeting the 'ID' selector but i can't help but wonder about that period in the control's name.
Any known issues? - or perhaps the .change is problematic and the toggle's never getting called:
$(window).load(function() {
toggleChooseWebinarSubmit();
$("#ChooseWebinar_UpcomingWebinarId").change(function() {
if ($(this).val()) {
$("#ChooseWebinar_RecordedWebinarId").val("");
}
toggleChooseWebinarSubmit();
});
$("#ChooseWebinar_RecordedWebinarId").change(function() {
if ($(this).val()) {
$("#ChooseWebinar_UpcomingWebinarId").val("");
}
toggleChooseWebinarSubmit();
});
});
thx