Trouble with passing variables

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Trouble with passing variables

    Hi would be really grateful for some help. I am very new to app dev't have
    done a tiny bit of programming in the past but am only using the facilities
    available in MX 2004 at the moment. ASP/VB script.

    I am working on a risk management application and have created a logon form
    where currently three types of users can log in - Manager, Locality, Director.
    Once logged in the user then enters their code to display risk relevant to
    their department. When the code is entered it displays a master detail page
    - a list of all the relevant risks and then you can click into the detail for
    each risk. Hope you are with me so far!

    Once you have clicked into the chosen risk, there may be more than one action
    associated with each individual risk. So at this point i want to display the
    action master/detail for that particular risk with a link at the bottom saying
    "show actions".

    I am able to retreive the orignial form variable (the manager code) and pass
    this to display on both the master and detail page. But when i try to pass the
    same variable to a further page. Its not showing.

    Also I am unable to pass the risk ID number through to the next page in order
    to pick up any actions associated with this risk.

    I am using forms and hidden fields to store the variables and from the
    information i have gleaned so far it seems that it should be possible for me to
    do this.

    I would be really grateful for any assistance.

    Kind regards
    Emma

    galeemma Guest

  2. Similar Questions and Discussions

    1. Passing Variables
      Hi there, I just managed to install apache2 webserver with php 4.3.8. I'm developing some php files. Previously I used an external webserver but...
    2. Passing variables from one swf to another
      I am facing problem to pass variable from one swf to another. I am using loadMovie to load another swf. how can I pass a variable value to another...
    3. Passing ASP Variables
      I have a form that submits to a SQL database. The table in SQL uses an identity field for the primary key called "entry". This is so I can get the...
    4. Passing Variables from swf to swf
      Is there a good tutorial to do this? I am building greeting cards - I am loading a seperate file before I print them out so I am trying to pass...
    5. trouble passing arguments
      I have a RedHat Linux 8.0 system. I have started the httpd (Apache 2.0.40) process and can now fetch pages from the server. I have a test htlm...
  3. #2

    Default Re: Trouble with passing variables

    As you have discovered Form variables have a very short life. In fact
    without resetting them they are only available on the page after they are
    set.

    If you wish to preserve your variables over several page then you need to
    convert them into session variables. The code is very easy

    <%
    session("sessionname") = request.form("fieldname")
    %>

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "galeemma" <webforumsuser@macromedia.com> wrote in message
    news:d42ifu$6gc$1@forums.macromedia.com...
    > Hi would be really grateful for some help. I am very new to app dev't
    have
    > done a tiny bit of programming in the past but am only using the
    facilities
    > available in MX 2004 at the moment. ASP/VB script.
    >
    > I am working on a risk management application and have created a logon
    form
    > where currently three types of users can log in - Manager, Locality,
    Director.
    > Once logged in the user then enters their code to display risk relevant to
    > their department. When the code is entered it displays a master detail
    page
    > - a list of all the relevant risks and then you can click into the detail
    for
    > each risk. Hope you are with me so far!
    >
    > Once you have clicked into the chosen risk, there may be more than one
    action
    > associated with each individual risk. So at this point i want to display
    the
    > action master/detail for that particular risk with a link at the bottom
    saying
    > "show actions".
    >
    > I am able to retreive the orignial form variable (the manager code) and
    pass
    > this to display on both the master and detail page. But when i try to
    pass the
    > same variable to a further page. Its not showing.
    >
    > Also I am unable to pass the risk ID number through to the next page in
    order
    > to pick up any actions associated with this risk.
    >
    > I am using forms and hidden fields to store the variables and from the
    > information i have gleaned so far it seems that it should be possible for
    me to
    > do this.
    >
    > I would be really grateful for any assistance.
    >
    > Kind regards
    > Emma
    >

    Paul Whitham TMM Guest

  4. #3

    Default Re: Trouble with passing variables

    AHAHahahhhh!!! Thank you so much for your reply.

    To update, I made significant progress yesterday although I didnt change the
    variables to session variables. I shall try that now though. Thank you.

    What I did in the end was find the "Go to related page" server behavior and
    apply this to the hyperlink taking me to the next page. I checked both URL and
    form parameters. This seem to work. Is there any reason why I shouldnt do
    this?

    Also, I know this may sounds very stupid but am I right in thinking that the
    code you have given me above will be placed on the page requesting the
    variable, where I have placed the hidden fields?

    With very best wishes
    emma


    galeemma Guest

  5. #4

    Default Re: Trouble with passing variables

    You can use the MM behaviour if you like. I personally don't because I find
    that the code is a little chunky for my liking.

    Yes the code would go on the page that the intial form goes to in its
    action.

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "galeemma" <webforumsuser@macromedia.com> wrote in message
    news:d455kc$5gn$1@forums.macromedia.com...
    > AHAHahahhhh!!! Thank you so much for your reply.
    >
    > To update, I made significant progress yesterday although I didnt change
    the
    > variables to session variables. I shall try that now though. Thank you.
    >
    > What I did in the end was find the "Go to related page" server behavior
    and
    > apply this to the hyperlink taking me to the next page. I checked both
    URL and
    > form parameters. This seem to work. Is there any reason why I shouldnt
    do
    > this?
    >
    > Also, I know this may sounds very stupid but am I right in thinking that
    the
    > code you have given me above will be placed on the page requesting the
    > variable, where I have placed the hidden fields?
    >
    > With very best wishes
    > emma
    >
    >

    Paul Whitham TMM Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139