Claims login button event, before the callback
What's the best way to be able to modify the username in the claims login widget BEFORE the username is sent?
We upgraded to claims and the problem is before they used to log in with "steve" and the forms backend would append the "@email.com" to validate...now I do it in javascript on blur of the inputs.
However some people use the browser default save password feature so the "blur" never triggers, and calling click on the button itself doesn't seem to maybe happen early enough because the authentication callback is sending the PREappended username.
Steve
Hi Steve,
You can try subscribing for the form onsubmit event, which is fired before the form is sent to the server. From there you can manipulate the username.
Here is the markup I used:
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <script> function onFormSubmit() alert('Hi'); </script></head><body> <form id="form1" runat="server" onsubmit="onFormSubmit()"> <div> <asp:Button runat="server" Text="Submit" ID="buttonSubmit" /> </div> </form></body></html>Actually also seems to work if you map the template and change OnClientClick="return false;" to OnClientClick="fixInput(); return false;"
:)
Thanks!