Solved

Javascript doesn't work on loginpage

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now