Loading ...
Sorry, an error occurred while loading the content.

passing $Request->Params() ?

Expand Messages
  • raptor
    hi, How to pass Params-hash to other script..what I want is : add.asp -----calls-- do_add.asp Now in do_add.asp I want to do some stuff and after that want
    Message 1 of 10 , Feb 14, 2005
    • 0 Attachment
      hi,

      How to pass Params-hash to other script..what I want is :

      add.asp -----calls--> do_add.asp

      Now in do_add.asp I want to do some stuff and after that want to
      call add.asp again with the Params-hash so that I can refill the
      add.asp-Form with data...
      What is the best way to do it ?
      I thought to use Session !! then Include with parameters !?
      both seems unsuitale for this task or is it ?!

      your proposals ?

      tia

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Helmut Zeilinger
      Hi Tia, ... what do you mean by call ? is it a link (
      Message 2 of 10 , Feb 15, 2005
      • 0 Attachment
        Hi Tia,

        >
        > How to pass Params-hash to other script..what I want is :
        >
        > add.asp -----calls--> do_add.asp
        >
        > Now in do_add.asp I want to do some stuff and after that want to
        > call add.asp again with the Params-hash so that I can refill the
        > add.asp-Form with data...

        what do you mean by "call"?

        is it a link (<a href=..) in add.asp that points to do_add.asp
        or do you include do_add.asp into add.asp via $Response->Include ()?

        > What is the best way to do it ?
        > I thought to use Session !! then Include with parameters !?
        > both seems unsuitale for this task or is it ?!
        >

        Helmut

        ---------------------------------------------------------------------
        To unsubscribe, e-mail: asp-unsubscribe@...
        For additional commands, e-mail: asp-help@...
      • Helmut Zeilinger
        ... no, not so clear, but anyway, you like data created in add.asp to be accessable in do_add.asp (or vice versa) - right? add.asp: .. my $params = { some hash
        Message 3 of 10 , Feb 15, 2005
        • 0 Attachment
          > I want add.asp to get the focus/be-executed (like it been typed in the
          > url-bar, not like <a>-link), but get the same data which was typed in the
          > first-add.asp-FORM.
          > Like this :
          > add.asp ---> do_add.asp --> add.asp--.
          > I__________________|
          >

          no, not so clear, but anyway, you like data
          created in add.asp to be accessable in do_add.asp
          (or vice versa) - right?

          add.asp:
          ..
          my $params = { some hash };
          ..

          do_add.asp:
          ..
          my $params = { same hash}
          ..

          - you can use a Session variable - as you stated - but be aware
          of the 1024 byte limit of SDBM_File and that you assign the hash
          in ONE step (for both see Apache::ASP man page)

          ..
          $Session->{complex} = {data => $data}; # Write ok, all at once.
          ..

          - you can also use the Storable module with "store" and "retrieve"
          and some unique filename for the stored data
          or a database like mysql etc.


          Helmut

          ---------------------------------------------------------------------
          To unsubscribe, e-mail: asp-unsubscribe@...
          For additional commands, e-mail: asp-help@...
        • raptor@tvskat.net
          I want add.asp to get the focus/be-executed (like it been typed in the url-bar, not like -link), but get the same data which was typed in the
          Message 4 of 10 , Feb 15, 2005
          • 0 Attachment
            I want add.asp to get the focus/be-executed (like it been typed in the url-bar, not like <a>-link),
            but get the same data which was typed in the first-add.asp-FORM.
            Like this :
            add.asp ---> do_add.asp --> add.asp--.
            I__________________|



            |Hi Tia,
            |
            |>
            |> How to pass Params-hash to other script..what I want is :
            |>
            |> add.asp -----calls--> do_add.asp
            |>
            |> Now in do_add.asp I want to do some stuff and after that want to
            |> call add.asp again with the Params-hash so that I can refill the
            |> add.asp-Form with data...
            |
            |what do you mean by "call"?
            |
            |is it a link (<a href=..) in add.asp that points to do_add.asp
            |or do you include do_add.asp into add.asp via $Response->Include ()?
            |
            |> What is the best way to do it ?
            |> I thought to use Session !! then Include with parameters !?
            |> both seems unsuitale for this task or is it ?!
            |>
            |
            |Helmut
            |
            |---------------------------------------------------------------------
            |To unsubscribe, e-mail: asp-unsubscribe@...
            |For additional commands, e-mail: asp-help@...
            |
            |


            -----
            http://linuxtoday.com/news_story.php3?ltsn=2004-12-08-004-32-OS-BZ-DT-0005
            snip> MS Office is popular in the same way as heart disease is the most popular way to die.

            ---------------------------------------------------------------------
            To unsubscribe, e-mail: asp-unsubscribe@...
            For additional commands, e-mail: asp-help@...
          • Josh Chamas
            ... Sure, you could stuff the $Session with data like: use File::Basename qw(basename); $Session- {basename($0)} = $Request- Params; and access it later the
            Message 5 of 10 , Feb 15, 2005
            • 0 Attachment
              raptor@... wrote:
              > sorry for not be able to describe it more clearly :")) (not native english speaker)
              > on the first invocation of do_add.asp data is available via $Request->Params()..
              > after that do_add.asp call again add.asp (via redirect or include !!!), now I want to pass this data to the newly
              > called add.asp.. and then again the same4
              > and was wondering does Session is suitable for such thing...:"( 1024 bytes is not a good news
              >
              >

              Sure, you could stuff the $Session with data like:

              use File::Basename qw(basename);
              $Session->{basename($0)} = $Request->Params;

              and access it later the same method. Right on point though with 1024 bytes,
              issue, but default is now MLDBM::Sync::SDBM_File which does not have this
              limit, however if you do this alot consider DB_File or GDBM_File for StateDB
              setting which can be faster for larger data sets.

              Also consider $Server->Transfer() API to execute another script,
              so you could see the current $Request->Params is still available.

              Regards,

              Josh

              ---------------------------------------------------------------------
              To unsubscribe, e-mail: asp-unsubscribe@...
              For additional commands, e-mail: asp-help@...
            • raptor@tvskat.net
              sorry for not be able to describe it more clearly : )) (not native english speaker) on the first invocation of do_add.asp data is available via
              Message 6 of 10 , Feb 15, 2005
              • 0 Attachment
                sorry for not be able to describe it more clearly :")) (not native english speaker)
                on the first invocation of do_add.asp data is available via $Request->Params()..
                after that do_add.asp call again add.asp (via redirect or include !!!), now I want to pass this data to the newly
                called add.asp.. and then again the same4
                and was wondering does Session is suitable for such thing...:"( 1024 bytes is not a good news



                |> I want add.asp to get the focus/be-executed (like it been typed in the
                |> url-bar, not like <a>-link), but get the same data which was typed in the
                |> first-add.asp-FORM.
                |> Like this :
                |> add.asp ---> do_add.asp --> add.asp--.
                |> I__________________|
                |>
                |
                |no, not so clear, but anyway, you like data
                |created in add.asp to be accessable in do_add.asp
                |(or vice versa) - right?
                |
                |add.asp:
                |..
                |my $params = { some hash };
                |..
                |
                |do_add.asp:
                |..
                |my $params = { same hash}
                |..
                |
                |- you can use a Session variable - as you stated - but be aware
                |of the 1024 byte limit of SDBM_File and that you assign the hash
                |in ONE step (for both see Apache::ASP man page)
                |
                |..
                |$Session->{complex} = {data => $data}; # Write ok, all at once.
                |..
                |
                |- you can also use the Storable module with "store" and "retrieve"
                |and some unique filename for the stored data
                |or a database like mysql etc.
                |
                |
                |Helmut
                |
                |---------------------------------------------------------------------
                |To unsubscribe, e-mail: asp-unsubscribe@...
                |For additional commands, e-mail: asp-help@...
                |
                |


                -----
                http://linuxtoday.com/news_story.php3?ltsn=2004-12-08-004-32-OS-BZ-DT-0005
                snip> MS Office is popular in the same way as heart disease is the most popular way to die.

                ---------------------------------------------------------------------
                To unsubscribe, e-mail: asp-unsubscribe@...
                For additional commands, e-mail: asp-help@...
              • raptor
                ... ]- I have been using Apache::ASP in the past..and have GDBM_File set in apache.conf : )) ... In the Script_OnStart() I parse the
                Message 7 of 10 , Feb 15, 2005
                • 0 Attachment
                  |and access it later the same method. Right on point though with 1024 bytes,
                  |issue, but default is now MLDBM::Sync::SDBM_File which does not have this
                  |limit, however if you do this alot consider DB_File or GDBM_File for StateDB
                  |setting which can be faster for larger data sets.
                  ]- I have been using Apache::ASP in the past..and have GDBM_File set in apache.conf :"))

                  |Also consider $Server->Transfer() API to execute another script,
                  |so you could see the current $Request->Params is still available.

                  |]- it seems that this is the solution to my problem...one thing is still causing me problems..
                  In the Script_OnStart() I parse the $Request->ServerVariables('SCRIPT_NAME') and use
                  the script_name to choose what template to use to render the HTML..
                  So in the this case the templete that will be used will be do_add.asp instead of add.asp
                  which is wrong....
                  How to solve that...?


                  ---------------------------------------------------------------------
                  To unsubscribe, e-mail: asp-unsubscribe@...
                  For additional commands, e-mail: asp-help@...
                • raptor@tvskat.net
                  ... ]- i ve manualy hardcoded my $script_name value to what i want in add.asp and it seems to work this way.... In fact what is compiled from ASP.pm is one big
                  Message 8 of 10 , Feb 16, 2005
                  • 0 Attachment
                    ||Also consider $Server->Transfer() API to execute another script,
                    ||so you could see the current $Request->Params is still available.
                    |
                    ||]- it seems that this is the solution to my problem...one thing is still causing me problems..
                    |In the Script_OnStart() I parse the $Request->ServerVariables('SCRIPT_NAME') and use
                    |the script_name to choose what template to use to render the HTML..
                    |So in the this case the templete that will be used will be do_add.asp instead of add.asp
                    |which is wrong....
                    |How to solve that...?

                    ]- i've manualy hardcoded my $script_name value to what i want in add.asp and it seems to
                    work this way.... In fact what is compiled from ASP.pm is one big script which includes
                    all ASP.pm stuff from global.asa isn't it ?


                    -----
                    http://linuxtoday.com/news_story.php3?ltsn=2004-12-08-004-32-OS-BZ-DT-0005
                    snip> MS Office is popular in the same way as heart disease is the most popular way to die.

                    ---------------------------------------------------------------------
                    To unsubscribe, e-mail: asp-unsubscribe@...
                    For additional commands, e-mail: asp-help@...
                  • Josh Chamas
                    ... No, global.asa is basically loaded as a module, but a module in the same namespace as your scripts so you can access subs defined there and such. Regards,
                    Message 9 of 10 , Feb 16, 2005
                    • 0 Attachment
                      raptor@... wrote:
                      > ||Also consider $Server->Transfer() API to execute another script,
                      > ||so you could see the current $Request->Params is still available.
                      > |
                      > ||]- it seems that this is the solution to my problem...one thing is still causing me problems..
                      > |In the Script_OnStart() I parse the $Request->ServerVariables('SCRIPT_NAME') and use
                      > |the script_name to choose what template to use to render the HTML..
                      > |So in the this case the templete that will be used will be do_add.asp instead of add.asp
                      > |which is wrong....
                      > |How to solve that...?
                      >
                      > ]- i've manualy hardcoded my $script_name value to what i want in add.asp and it seems to
                      > work this way.... In fact what is compiled from ASP.pm is one big script which includes
                      > all ASP.pm stuff from global.asa isn't it ?
                      >

                      No, global.asa is basically loaded as a module, but a module in the same
                      namespace as your scripts so you can access subs defined there and such.

                      Regards,

                      Josh

                      ---------------------------------------------------------------------
                      To unsubscribe, e-mail: asp-unsubscribe@...
                      For additional commands, e-mail: asp-help@...
                    • Josh Chamas
                      ... Maybe parse $0 instead of the ServerVariables ? --Josh ... To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org For additional commands, e-mail:
                      Message 10 of 10 , Feb 16, 2005
                      • 0 Attachment
                        raptor wrote:
                        > |and access it later the same method. Right on point though with 1024 bytes,
                        > |issue, but default is now MLDBM::Sync::SDBM_File which does not have this
                        > |limit, however if you do this alot consider DB_File or GDBM_File for StateDB
                        > |setting which can be faster for larger data sets.
                        > ]- I have been using Apache::ASP in the past..and have GDBM_File set in apache.conf :"))
                        >
                        > |Also consider $Server->Transfer() API to execute another script,
                        > |so you could see the current $Request->Params is still available.
                        >
                        > |]- it seems that this is the solution to my problem...one thing is still causing me problems..
                        > In the Script_OnStart() I parse the $Request->ServerVariables('SCRIPT_NAME') and use
                        > the script_name to choose what template to use to render the HTML..
                        > So in the this case the templete that will be used will be do_add.asp instead of add.asp
                        > which is wrong....
                        > How to solve that...?

                        Maybe parse $0 instead of the ServerVariables ?

                        --Josh

                        ---------------------------------------------------------------------
                        To unsubscribe, e-mail: asp-unsubscribe@...
                        For additional commands, e-mail: asp-help@...
                      Your message has been successfully submitted and would be delivered to recipients shortly.