I have an anchor tag that is marked runat="server"
and has a Handles save.ServerClick
event attached to it. I'm trying to modify the contents of the tag after it is clicked with jQuery, but it should not interfere with the postback to the server-side Handle.
The iOS version of Safari (specifically I'm testing on iOS 8.4) will trigger the postback correctly, but the html contents of the anchor tag are not updated after I click the button. This problem is not present in the iOS version of Google Chrome or any desktop browser that I have tried.
What's interesting though, is that I put an alert()
inside the .click()
jQuery handler, and Safari does show the alert box; it simply does not appear to update the anchor tag with the .html()
method (maybe a reflow is not triggered if loading a new page / submitting the form?), like what happens in Chrome and desktop browsers. Is there a way to make it update the anchor tag?
Html Anchor Tag:
<a id="save" runat="server" clientidmode="Static">Save Changes</a>
jQuery:
$("a#save").click(function () {
$(this).html("Saving... <i class='fa fa-circle-o-notch fa-spin'></i>");
});