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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:24:13+00:00 2026-05-25T17:24:13+00:00

I have two web pages which work basically the same, code-wise, but one of

  • 0

I have two web pages which work basically the same, code-wise, but one of them does not seem to cache information. By ‘cache’, I mean on the client/browser side. The text field does not retain previously entered information. In the first example below, if you register and then log in, the next time you log in, your username will be cached in the the browser to be selected; while in the second example, it does not retain that info.

http://www.dixieandtheninjas.net/hunter/ has a login prompt. once you’ve logged in once from a browser, when you revisit the page it has cached your username.

http://www.dixieandtheninjas.net/dynasties/ also has a login prompt, but it does not cache! And I cannot figure out why.

Perhaps because the second one is not within FORM tags? Maybe there’s some other tiny coding mistake I’ve made which causes this.

Here’s the code from the first example:

<form method = "post"
  action = "">

Username: <input type="text" name="login_name" value="" />
<br><br>
Password: <input type="password" name="password" value="" />
<br><br>
<input type="submit" value="Login" />
</form>

Here is code from the second example: Note that the clicks are handled by jquery in the second example, while the first just uses pure html and php

<p>
Email address: <input type="text" id="logininfo" value="" />
<br>
Password: <input type="password" id="password" value="" />
<br>

<input type="button" id="loginbutton" value="Login" />
</p>

Here is the jquery used in the second example:

    <script type ="text/javascript">
        $(function(){


        $('#loginbutton').click(function(){
            var loginvar = $('#logininfo').val();
            var passvar = $('#password').val();



            //alert(loginvar + ", " + passvar);

            if (loginvar != '' && passvar != '') {

                var subdata = {
                   logindata : loginvar,
                   passdata : passvar
               };


           $.ajax({
            url: "index_backend.php",
            type: 'POST',
            data: subdata,

                success: function(result) {
                    //alert(result);
                    if (result == '1') {
                        // success
                        window.location.replace("http://www.dixieandtheninjas.net/dynasties/playermenu.php")
                    } else if (result == '2') {
                        //$('#logininfo').empty();
                        $('#logininfo').attr('value', '')
                        $('#password').attr('value', '')
                        alert("Login failed.  Please try again, or register if you have not already created an account.");
                    } else {
                        alert("Something has gone wrong!");
                        alert (result);
                    }
                } // end success
           });  // end ajax

            } else {
                alert ("Please enter a username and password.");
            }

        });   /// end click function for button



        });   //// end

        </script>
  • 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-05-25T17:24:14+00:00Added an answer on May 25, 2026 at 5:24 pm

    Since you aren’t truly submitting the form in the jQuery one, the browser doesn’t know that the user has attempted to use this as input vs just typed something in and then went to another page. Because of that, you won’t be seeing it in the stored form data.

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

Sidebar

Related Questions

We have some web pages which have two frames, with one frame in the
I have two web applications running in the same Tomcat Instance. In one of
This the situation: I have one webservice without SSL, which provides two pages for
I have two web applications in the same server like this: /basedir/app1path/default1.aspx /basedir/app2path/default2.aspx How
I have two web applications in the same solution. They both use different membership/profile
We have two separate web-apps, say 'retailUI' and 'bulkUI'. These two are basically two
I have a web solution (in VS2010) with two sub-projects: Domain which holds the
I have two fields on my web page ie: BookAuthor and BookDescription.On submit,the page
I have two web applications and both are developed in ASP.NET. Now I want
I have two web applications that are running on a single Tomcat server and

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.