Jump to content

Problem with new log in page


GrizzlyJohn

Recommended Posts

If this has been pointed out before I am sorry to repeat it.

 

I am getting a scripting error on the log in page after logging in. It looks like the onLoad script for the page is trying to set focus on the user name textbox on the repost of the page after a successful log in. That is causing an error because the textbox is hidden if the log in was good.

 

I know I was one person that suggested to set the focus on the user name textbox and I really like and thank TPTB for doing that. So I feel bad seeing that error pop up. Because I have a very hard time of pointing out problems without also suggesting a solution let me suggest one.

 

I would use the RegisterClientScriptBlock in .NET and add it or not depending on what the page needed. In the code behind page on the Page_Load event check if IsPostBack. If not register the script to the form object. If IsPostBack and not a successful log in then register the script. Else then don't register the script and it won't run.

 

There are of course other ways to fix this but just trying to come up with something quick off the top of my head this was the first thing that came to mind.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...