Solved

Javascript doesn't work on loginpage

Posted on 2015-02-11
3
71 Views
Last Modified: 2015-03-04
My website has a login-page on which you need to enter your username and password.
All goes well when you click the login-button, you are then redirected to the startwebpage.
However, I also want my visitors to login using enter after entering their username and password.
Therefore I've used Javascript.

Problem is that the Javascript is not executed, probably because you're not logged in yet.
I have Forms Authentication, and my guess is that I have to add something in the web.config like:

   <location path="login.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>

This does not do the trick, I hope somebody can help me with this.
0
Comment
Question by:adiemeer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 167 total points
ID: 40604727
JavaScript has nothing to do with whether you are logged in or not, it executes in the browser. Post your JavaScript, it probably has a bug in it.
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 167 total points
ID: 40604781
What type of ASP.NET web site are you working with?

With a web forms web site, there is the Panel.DefaultButton property, that you can use to set the button for the <Enter> key.

Using the DefaultButton Property of a Panel in ASP.NET
http://www.aspnettutorials.com/tutorials/controls/defaultbutton-panel-aspnet/
0
 
LVL 36

Assisted Solution

by:Miguel Oz
Miguel Oz earned 166 total points
ID: 40604889
Did you check that JavaScript is enabled in your browser?
To test it, Just add the noscript tag to your html:
<noscript>Your browser does not support JavaScript!</noscript>
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question