Cancel button not working in FireFox

csharp Nice, France
  • 9 years ago

    Hello  all,

     

    I am new to C#.I implemented a login panel for my webpage. When I click the "Cancel" button of my panel in FIREFOX  the panel is not being hidden ,where as it is perfectly fine in INTERNET EXPLORER.This is my piece of code:

     

    protected override void OnInit(EventArgs e)
            {
                base.OnInit(e);

                // Super ghetto.... change it later when i feel like dealing with the HtmlTextWriter and its 93403490 method calls to something minor!
                // LOLS this is sooooo NWA outta Compton
                if (pvtLoginPanel == null)
                {
                    pvtLoginPanel = new Panel();
                    pvtLoginPanel.CssClass = this.CssClass;
                    pvtLoginPanel.Controls.Add(new LiteralControl("<form name=\"loginForm\" action=\"https://login.gatorlink.ufl.edu/authenticate.cgi\" method=\"post\">"));
                    pvtLoginPanel.Controls.Add(new LiteralControl("<p><b>Enter your Gatorlink username and password.</b></p>"));
                    pvtLoginPanel.Controls.Add(new LiteralControl("<input type=\"hidden\" name=\"return\" value=\""));
                    pvtLoginPanel.Controls.Add(new LiteralControl(ReturnURL));
                    pvtLoginPanel.Controls.Add(new LiteralControl("\" />"));
                    pvtLoginPanel.Controls.Add(new LiteralControl("<p><br/>Username: <br><input type=\"text\" name=\"username\" maxlength=\"16\" /></p>"));
                    pvtLoginPanel.Controls.Add(new LiteralControl("<p>Password: <br><input type=\"password\" name=\"password\" /></p>"));
                    pvtLoginPanel.Controls.Add(new LiteralControl("<p><br/><input type=\"submit\" name=\"login\" value=\"Login\" /><input type=\"button\" onclick=\"loginPanel1.style.visibility='hidden'\" name=\"cancel\" value=\"Cancel\" /></p>"));
                    pvtLoginPanel.Controls.Add(new LiteralControl("</form>"));
                }
            }

     

    -Thanks
    Sravani 

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The greatest performance improvement of all is when a system goes from not-working to working.” - John Ousterhout