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 8256179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:46:32+00:00 2026-06-08T01:46:32+00:00

I have a website written in asp.net ( this part is just HTML and

  • 0

I have a website written in asp.net ( this part is just HTML and jQuery though ) with a form with a submit button. I wrote my own validation for each text box in jquery, if each passes, then it sends the form through ajax to c# codebehind. This works in every browser just fine, even IE7 and IE8 , the problem is when I look at the page through the IPad ( Safari ) it completely skips the validation and refresh the entire page. I only have a 4 year old ipad with ios2 i believe or maybe ios3 , either way I would like this to work in all browsers.

code:

    <input type="button" id="btnLogin"  class="button" value="Login" style="top: 325px;" onclick="fnSignUp();" />


    function fnSignUp() {
        // Check for Valid EMail
        var rege = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
        if (rege.test($('#<%= txtEmail.ClientID %>').val())) { }
        else {
            $('#<%= lblErrorSignUp.ClientID %>').text("Invalid EMail");
            return;
        }

        //Check For Empty First Name
        if ($('#<%= txtFNameSignUp.ClientID %>').val() == "") {
            $('#<%= lblErrorSignUp.ClientID %>').text("Enter First Name");
            $('#<%= lblFNameError.ClientID %>').text(" *");
            return;
        }
        else $('#<%= lblFNameError.ClientID %>').text("");

        //Check For Empty Last Name
        if ($('#<%= txtLNameSignUp.ClientID %>').val() == "") {
            $('#<%= lblErrorSignUp.ClientID %>').text("Enter Last Name");
            $('#<%= lblLNameError.ClientID %>').text(" *");
            return;
        }
        else $('#<%= lblLNameError.ClientID %>').text("");

        //Check For Empty Zip Code      
        if ($('#<%=  txtZipSignUp.ClientID %>').val() == "") {
            $('#<%= lblErrorSignUp.ClientID %>').text("Enter Your ZipCode");
            return;
        }

        // Check For Valid Zip Code
        if (IsValidZipCode == false) {
            $('#<%= lblErrorSignUp.ClientID %>').text("Invalid US ZipCode");
            return;
        }

        //Check If Password is left empty
        if ($('#<%=  txtPass1.ClientID %>').val() == "") {
            $('#<%= lblErrorSignUp.ClientID %>').text("Enter A Password");
            return;
        }

        //Check that both Passwords match
        if ($('#<%=  txtPass1.ClientID %>').val() != $('#<%=  txtPass2.ClientID %>').val()) {
            $('#<%= lblErrorSignUp.ClientID %>').text("Both Passwords Must Match");
            return;
        }
        var email = $('#<%=  txtEmail.ClientID %>').val();
        var fname = $('#<%=  txtFNameSignUp.ClientID %>').val();
        var lname = $('#<%=  txtLNameSignUp.ClientID %>').val();
        var zip = $('#<%=  txtZipSignUp.ClientID %>').val();
        var city = $('#<%=  hidcity.ClientID %>').val();
        var state = $('#<%=  hidstate.ClientID %>').val();
        var lat = $('#<%=  hidLatitude.ClientID %>').val();
        var longi = $('#<%=  hidLongitude.ClientID %>').val();
        var pass = $('#<%=  txtPass1.ClientID %>').val();

        $.ajax({
            type: "POST",
            url: "Login.aspx/SignUpNewUser",
            data: "{'email':'" + email + "', 'fname' : '" + fname + "' ,  'lname' : '" + lname + "', 'zip' : '" + zip + "',  'city' : '" + city + "' ,  'state' : '" + state + "' ,  'lat' : '" + lat + "',  'longi' : '" + longi + "',  'pass' : '" + pass + "' }",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (msg) {
                var obj = $.parseJSON(msg.d);
                if (obj.login == "false") $('#<%= lblLoginMessage.ClientID %>').text("Login Failed");
                if (obj.login == "true") {
                    location.reload(true);
                }
            }
        });
        return false;
    }
  • 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-08T01:46:33+00:00Added an answer on June 8, 2026 at 1:46 am

    I don’t have an ipad to test with, but you can try one or a combination of the following:

    1. use return false; instead of return; to cancel the default button behavior.
    2. bind the click event using jquery instead of the onclick attribute.

      $("#btnLogin").click(fnSignUp);
      

      binding using jquery is better anyways, because you separate the logic from the view of the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website written using ASP.NET. We have a development machine and a
I have a website that is written in asp.net where the text is resourced
I have a website that returns search results from Twitter, written in C# ASP.NET.
We have a data driven ASP.NET website which has been written using the standard
I have a website written in ASP.NET MVC and I have a parameter set
I have a main website app written in ASP.NET's MVC 3. Now, what I
I've recently taken over development of a website written in asp.net. Before taking this
I have a website written in asp.net MVC2 that shows random images, each image
I have a website written in ASP.NET MVC 3. I have put together some
I have a personal website written in ASP.NET Web Pages, with a small SQL

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.