Blog Portfolio Components Sitefinity
Contact
Blog Portfolio Components Sitefinity
Published on
Wednesday, November 27th 2013

Make your LoginWidget react to a clientside login

Authors
  • Twitter Avatar
    Name
    Steve McNiven
    Twitter
    @stevemcniven

Personally I miss the old click, postback, login of Sitefinity Forms Auth.  The problem with the client Auth is if there’s “lag” waiting for the server to respond…user sees zero feedback in the native widget.  However, the clientside ajax claims method lets us do some neat things where we don’t need to modify teleriks code :)

jQuery has a few global methods you can hook into that will let you know when an ajax call is taking place.  So on a page like a dedicated login where the ONLY ajax would be the LoginWidget this works great!

This code assumes you’ve cached your jQuery selector to $loginPage.loginWidget.  Feel free to modify as you need.  You SHOULD cache it, just…you know…remember it’s a jquery object in this case.

Also please note…the classes I’m adding are to hide and show messages…you could just as easily change the message text with jquery directly in this script.

This code also has a “long” mode where if for some reason the login is just godawful slow, the user won’t worry that it’s frozen.  I like to hide or disable the login button when it’s “authenticating” so they can’t click it again.

Steve

Next Article

Sitefinity Cache

Previous Article

Show Alt Text in the Sitefinity Images Module Grid

Top Posts

  • Kendo Grid: cannot read property data of undefined
  • Avoid Version errors with Assembly Binding
  • Remote certificate is invalid error
  • Sitefinity forms popup template
  • Angular widgets in Sitefinity
  • Testing functionality with cypress.io
  • Supercharge Sitefinity load times with Roslyn
← Back to the blog

Boost your online presence.

Let us create the perfect digital experience for your company.

Contact us now
Twitter GitHub LinkedIn

© 2022 Sitefinity Steve. All rights reserved. XS SM MD LG XL