Solved

Javascript doesn't work on loginpage

Posted on 2015-02-11
3
70 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS question 16 62
Natural height and jquery 6 40
Sticking text to shapes in Raphael.js 6 40
ASP.NET VB code for check and insert in a table 4 44
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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…

732 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