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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:27:20+00:00 2026-06-02T00:27:20+00:00

One my home works in my classic ASP class is to create a simple

  • 0

One my home works in my classic ASP class is to create a simple logon form, a page that processes the form by saving values to cookies, and then a display page that takes the values from the cookie, stores them into session variables and then displays the results in an html page.

I have found that this homework works properly in IE, Chrome, Opera, Safari, Maxthon, Avant and SOME versions / installations of Firefox. This has baffled me greatly. Firefox has been my browser of choice for a couple of years now. I have Firefox 5 and 9 at home, on Win7 64 bit machines. And everything returns as “undefined” on these two machines. The Win XP 32 bit / Firefox on the machines at school render this homework properly. This leads me to believe that the 64bit OS – Firefox combination is the problem.

Here’s my code:

Register.asp

    <form name="frmLogon" id="frmLogon" method="post" action="session.asp">

        <h3>Logon</h3>  

                <label for="txtUserName">
                    Username:
                    <input type="text" name="txtUserName" maxlength="20" />
                </label>

                <br /><br />

                <label for="txtPassword">
                    Password:
                    <input type="text" name="txtPassword" maxlength="20" />
                </label>

                <input type="hidden" name="hidSessionID" value="Session.SessionID"/>

                <br /><br />

        <center>
            <input type="submit" value="Submit" name="btnSubmit"/>
            <input type="reset" value="Reset" name="btnReset" />
        </center>

    </form>

</body>

Session.asp

<body>

<%   
    // Populate the cookie      
    Response.Cookies("registration")("UserName") = Request.Form("txtUserName");
    Response.Cookies("registration")("Password") = Request.Form("txtPassword");
    Response.Cookies("registration")("SessionID") = Session.SessionID;
    Response.Cookies("registration")("Date") = Date();
    Response.Cookies("registration")("Referer") = Request.ServerVariables("HTTP_REFERER");
    Response.Cookies("registration")("RemoteIP") = Request.ServerVariables("REMOTE_ADDR");

    // script required to set expiration date. (Not shown in textbook or sample code...)        
    var dtmDate;
    dtmDate = new Date()
    intMonth = dtmDate.getMonth() + 1
    dtmDate.setDate(dtmDate.getDate() + 7)
    strExpireDate = intMonth + "/" + dtmDate.getDate() + "/" + dtmDate.getFullYear()
    Response.Cookies("registration").Expires = strExpireDate

    Response.Redirect("Display.asp");
%>
</body>

Display.asp

<body>

<%
Break();
Response.write("<font color='blue'>The cookies keys and values:</font>");
Break();
Response.write("UserName: " + (Request.cookies("registration")("UserName")));
Break();
Response.write("Password: " + (Request.cookies("registration")("Password")));
Break();
Response.write("SessionID: " + (Request.cookies("registration")("SessionID")));
Break();
Response.write("Date: " + (Request.cookies("registration")("Date")));
Break();
Response.write("Referer: " + (Request.cookies("registration")("Referer")));
Break();
Response.write("RemoteIP: " + (Request.cookies("registration")("RemoteIP")));
Break();
Response.write("<hr />");
Break();

// Assign the cookie values to Session variables              
Session("UserName") = Request.Cookies("registration")("UserName")
Session("Password") = Request.Cookies("registration")("Password")
Session("SessionID") = Request.Cookies("registration")("SessionID")
Session("Date") = Request.Cookies("registration")("Date")
Session("Referer") = Request.Cookies("registration")("Referer")
Session("RemoteIP") = Request.Cookies("registration")("RemoteIP")


// Display the session variables populated from the cookie.
Response.write("<font color='blue'>The session variables, populated by the cookies keys and values:</font>");
Break();
Response.write("UserName: " + Session("UserName"))
Break();
Response.write("Password: " + Session("Password"))
Break();
Response.write("SessionID: " + Session("SessionID"))
Break();
Response.write("Date: " + Session("Date"))
Break();
Response.write("Referer: " + Session("Referer"))
Break();
Response.write("Remote IP: " + Session("RemoteIP"))
Break();
Response.write("<hr />");
Break();

// Display the session variables populated from the cookie.
Response.write("<font color='blue'>The unformatted output of the 'Response.Write(Request.ServerVariables('HTTP_COOKIE'))' command:</font>");
Break();
Response.Write(Request.ServerVariables("HTTP_COOKIE"))

function Break()
{
    Response.write("<br></br>")
}

%>


</body>

Can anyone explain why this entire exercise returns “undefined” variables only in Firefox on Win 7 64 bit?

  • 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-02T00:27:23+00:00Added an answer on June 2, 2026 at 12:27 am

    First, WHY are you writing that all to cookie? Why not write that all directly to session. Cookies can provide security risk in the username and password later. I think it would be better to set all the session variables in “session.asp”, but I guess that may be personal…

    Back to your question, it is most likely that “Cookies” are disabled. Click here to learn about enabling cookies in firefox.

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

Sidebar

Related Questions

I have two scripts that are identical but one works on my home testing
I have a simple controller that goes to a view under views/mobile/home/index.html.haml It works
I have one wordpress blog whose home page is showing a list of 10
I have one <asp:Image ID=imgBanner1 runat=server/> control in my aspx page, then in code
I have created one application which contains several buttons to home page clicking on
Hopefully this should be a simple one... Here is my test.sh file: #!/bin/bash patch_file=/home/my
We have a classic VBScript default.asp page in the root of our site. (This
I've got the undoubted joy of having to put a very simple 'classic ASP'
I can't run nose with several processes programmatically. This works...: PYTHONPATH=/home/developer/Downloads/unittest2-0.5.1: nosetests --processes=4 It
In my home and work pc's and in one friend of mine's it runs

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.