Results 1 to 9 of 9

Thread: Remembering Values

  1. #1

    Thread Starter
    Hyperactive Member parkes's Avatar
    Join Date
    Jan 1999
    Location
    Unitied Kingdom
    Posts
    303

    Remembering Values

    Apart from using sessions, what is the best way of remembering values when moving from one screen to another.
    Thanks in advance for any help provided.

    VB 6 Enterprise Edition SP4
    ADO, SQL 7/2000, ASP and some JavaScript


    >> Life goes on, but for how long? <<
    If you can smile when things go wrong, you have someone in mind to blame

  2. #2
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    I would go for session. But if that is not avail... you can always use the hidden input types and pass the values page to page.

    I had to do that ... pass the value page for page. It's tedious... but keeping all the names the same is becomes a breaze..

    You can probbly store it in a cookie... but if cookies are disabled your are up the creek!

    Hope it helps

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    If cookies are disabled, you are up a creek with sessions as well..
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  4. #4
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    Partly an answer to one of your other questions. If you are using Frames you can store values on the main frame page:
    Code:
    <script LANGAUGE = "JavaScript">
    var custName = "";
    var custNumber = 0;
    </script>
    You can access these variables in JavaScript by:
    parent.custName;
    parent.custNumber;
    From any other of pages in the other frames.

    But if you are using ASP, Session variables are much better.


    Chris
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  5. #5
    CMangano
    Guest
    An easier way then through hidden fields would be to pass it through the querystring. Of course, if you have secure information (passwords, credit card numbers, etc.) then you want to use the hidden fields. Of course, this means you have to submit a form on every page, kind of a pain in the a$$

  6. #6
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Hidden field values can be viewed in the page source.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  7. #7

    Thread Starter
    Hyperactive Member parkes's Avatar
    Join Date
    Jan 1999
    Location
    Unitied Kingdom
    Posts
    303

    Question

    Right I've got information going between frames storing common info in the title frame which is always there. Next trouble is, is there anyway to get info from Javascript to ASP.
    Thanks in advance for any help provided.

    VB 6 Enterprise Edition SP4
    ADO, SQL 7/2000, ASP and some JavaScript


    >> Life goes on, but for how long? <<
    If you can smile when things go wrong, you have someone in mind to blame

  8. #8
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You could put a session id in the URL or Querystring and write it in every link once the user starts. It's a very limited method, though - if they click to another site you lose the session.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  9. #9
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    You could try using the querystring through a javascript function. Create a function like:

    function sendInfo(){

    window.location = 'http://myAspScript.asp?info=' + parent.myVar;

    }

    Call the function whenever you want to navigate to the asp script.

    <a HREF = "javascript:sendInfo();">Click Here</a>
    <input TYPE = "button" VALUE = "Click Here" ONCLICK = "sendInfo();">


    Chris
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width