Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7773957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:15:27+00:00 2026-06-01T17:15:27+00:00

I have a form, when I typed it out like this: <form name=formLogin id=formLogin

  • 0

I have a form, when I typed it out like this:

<form name="formLogin" id="formLogin" action="index.aspx" method="post">

My javascript works, and the source code of the webpage is the same as listed above.

When I type it out like this:

<form name="formLogin" id="formLogin" runat="server">

My page breaks down. I am basically working with a third party template and trying to convert it to asp.net.

The source code that is displayed is this:

<form id="formLogin" action="index.aspx" method="post">

It seems when I use the runat="server" option it recreates the form element with no name? Must I use runtat="server" if on .net and want to handle Jquery and Server side validation?

Will I still be able to validate in the code behind page if I do not include the runat="Server"?

      $(document).ready(function () {     
            onfocus();
            $(".on_off_checkbox").iphoneStyle();
            $('.tip a ').tipsy({gravity: 'sw'});
            $('#login').show().animate({   opacity: 1 }, 2000);
            $('.logo').show().animate({   opacity: 1,top: '30%'}, 800,function(){           
                $('.logo').show().delay(1200).animate({   opacity: 1,top: '0%' }, 300,function(){
                    $('.formLogin').animate({   opacity: 1,left: '0' }, 300);
                    $('.userbox').animate({ opacity: 0 }, 200).hide();
                 });        
            })  
        }); 

        $('.userload').click(function(e){
            $('.formLogin').animate({   opacity: 1,left: '0' }, 300);               
              $('.userbox').animate({ opacity: 0 }, 200,function(){
                  $('.userbox').hide();             
               });
        });

    $('#but_login').click(function(e){              
          if(document.formLogin.username.value == "" || document.formLogin.password.value == "") // BREAKS HERE
          {
              showError("Please Input Username / Password");
              $('.inner').jrumble({ x: 4,y: 0,rotation: 0 });   
              $('.inner').trigger('startRumble');
              setTimeout('$(".inner").trigger("stopRumble")',500);
              setTimeout('hideTop()',5000);
              return false;
          }     
         hideTop();
         loading('Checking',1);     
         setTimeout( "unloading()", 2000 );
         setTimeout( "Login()", 2500 );
    }); 

function Login(){
    $("#login").animate({   opacity: 1,top: '49%' }, 200,function(){
         $('.userbox').show().animate({ opacity: 1 }, 500);
            $("#login").animate({   opacity: 0,top: '60%' }, 500,function(){
                $(this).fadeOut(200,function(){
                  $(".text_success").slideDown();
                  $("#successLogin").animate({opacity: 1,height: "200px"},500);                  
                });                           
             }) 
     }) 
    setTimeout( "window.location.href='dashboard.html'", 3000 );
}

$('#alertMessage').click(function(){
    hideTop();
});

function showError(str){
    $('#alertMessage').addClass('error').html(str).stop(true,true).show().animate({ opacity: 1,right: '0'}, 500);   

}

function showSuccess(str){
    $('#alertMessage').removeClass('error').html(str).stop(true,true).show().animate({ opacity: 1,right: '0'}, 500);    
}

function onfocus(){
                if($(window).width()>480) {                   
                        $('.tip input').tipsy({ trigger: 'focus', gravity: 'w' ,live: true});
                }else{
                      $('.tip input').tipsy("hide");
                }
}

function hideTop(){
    $('#alertMessage').animate({ opacity: 0,right: '-20'}, 500,function(){ $(this).hide(); });  
}   

function loading(name,overlay) {  
      $('body').append('<div id="overlay"></div><div id="preloader">'+name+'..</div>');
              if(overlay==1){
                $('#overlay').css('opacity',0.1).fadeIn(function(){  $('#preloader').fadeIn();  });
                return  false;
         }
      $('#preloader').fadeIn();   
 }

 function unloading() {  
        $('#preloader').fadeOut('fast',function(){ $('#overlay').fadeOut(); });
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:15:28+00:00Added an answer on June 1, 2026 at 5:15 pm

    If you dont runat=Server you won’t be able to access the actual form / any control not marked runat=server in code behind (server side). Please post your jquery code and I can edit this answer if I see something odd.

    Use $("#username").val().length and the same for your password to see if a name / password exists. You have a mixup of both js and jquery making it all the more difficult to find the culprit.

    if($("#username").val().length == 0 && $("#password").val().length == 0)

      //enter here if one is missing
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have form like this: <div class=satu> <input type='text' size='1' maxlength='1' name='score[1][]' id='score[1][]'> </div>
I have form like this: <input type='text' name='people' id='namepeople'> <input type='hidden' name='idpeople' id='idpeople'> <input
I have an HTML form like this: form.html: <html> <body> your name is :<br><br>
I have a form that looks like this: <form id=addClassesToDoc action=> <table id=classesTable style=border-collapse:
I'd like to be able to have something like this: <form> <input type=date name=params.date/>
I have HTML that looks like this: <form id=kinodForm> <input type=text name=element[5] value=krispy kreme
please help me out with this problem.I have a contact form like this: <div
I would like to send out a value in a PHP form like this:
I know this seems like I should have immediately found the one example out
I have a form like the one below which is posted to contacts.php ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.