Home > Archive > dBASE Web Applications > April 2005 > Using buttons to branch between executables.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Using buttons to branch between executables.
Dan Anderson

2005-04-07, 7:01 am

dB+ This should be simple but the solution escapes me. I have a webpage
within an interactive application in which the user selects between three
buttons, each of which needs to branch to a different executable.
Specifically, button one allows the user to enter enough information to
submit an application for a quote. Button two allows the user to view the
status of their submissions. And, button three allows the user to select
submissions that have been quoted and provide additional informat needed to
bind an insurance policy. So I have three form buttons. How do I make this
work?

My first inclination is to send the program flow to and executable that
branches based on the button pushed. But that leads me to two problems: (1)
how do I distinguish between which button was pushed and (2) I have always
branched from a webpage to an executable and back to a webpage, etc. How do
I pass the data from one executable to another? It's 5:30 a.m. here so my
brain is broken.



--
Dan Anderson
UBI Processing Dept.
andersond@ubinc.com
800-444-4824 ext 101


Michael Nuwer [dBVIPS]

2005-04-07, 7:01 am

Dan Anderson wrote:
> dB+ This should be simple but the solution escapes me. I have a webpage
> within an interactive application in which the user selects between three
> buttons, each of which needs to branch to a different executable.
> Specifically, button one allows the user to enter enough information to
> submit an application for a quote. Button two allows the user to view the
> status of their submissions. And, button three allows the user to select
> submissions that have been quoted and provide additional informat needed to
> bind an insurance policy. So I have three form buttons. How do I make this
> work?
>
> My first inclination is to send the program flow to and executable that
> branches based on the button pushed. But that leads me to two problems: (1)
> how do I distinguish between which button was pushed and (2) I have always
> branched from a webpage to an executable and back to a webpage, etc. How do
> I pass the data from one executable to another? It's 5:30 a.m. here so my
> brain is broken.



1. It is not a good idea for one CGI applet to call a second applet.
This is because the second applet would stream a response page but that
applet would not be able to communicate with the web server.

A better idea is to use a single prg (applet) that branches with a CASE
(or if/elseif) statement

case oCGI.isKey("buttonOne")
// do procedure one
case oCGI.isKey("buttonTwo")
// do procedure two
etc.

Each submit button on the HTML page should have a unique name. Only one
button name will be submitted with the CGI data.


2. A second alternative is to design your HTML page with three forms.
Each form has one pushbutton and each "action" property points to a
different CGI applet. This design is easy when each HTML form contains
its own unique entry fields.

If, however, the HTML forms would need to share a single entry field,
then you would need use one HTML form and some javaScript to format the
submission. If you want to use this javaScript option, let us know and
we can give you an example.

--
Michael Nuwer
http://www.nuwermj.potsdam.edu/dLearn/
http://www.nuwermj.potsdam.edu/dSamples/
Dan Anderson

2005-04-07, 8:01 pm

Thanks. I like that idea of three forms one the calling .html page. I'm
going to try that first. Like I said, it's early and I'm brain dead.



--
Dan Anderson
UBI Processing Dept.
andersond@ubinc.com
800-444-4824 ext 101
"Michael Nuwer [dBVIPS]" <nuwermj@nospam.please.yahoo.com> wrote in message
news:5nceDG2OFHA.432@news-server...
> Dan Anderson wrote:
>
>
> 1. It is not a good idea for one CGI applet to call a second applet. This
> is because the second applet would stream a response page but that applet
> would not be able to communicate with the web server.
>
> A better idea is to use a single prg (applet) that branches with a CASE
> (or if/elseif) statement
>
> case oCGI.isKey("buttonOne")
> // do procedure one
> case oCGI.isKey("buttonTwo")
> // do procedure two
> etc.
>
> Each submit button on the HTML page should have a unique name. Only one
> button name will be submitted with the CGI data.
>
>
> 2. A second alternative is to design your HTML page with three forms. Each
> form has one pushbutton and each "action" property points to a different
> CGI applet. This design is easy when each HTML form contains its own
> unique entry fields.
>
> If, however, the HTML forms would need to share a single entry field, then
> you would need use one HTML form and some javaScript to format the
> submission. If you want to use this javaScript option, let us know and we
> can give you an example.
>
> --
> Michael Nuwer
> http://www.nuwermj.potsdam.edu/dLearn/
> http://www.nuwermj.potsdam.edu/dSamples/



Dean Watson

2005-04-07, 8:01 pm

Hi Dan,

I have recently been transforming web pages that previously used normal <a
href=></a> giving the typical underlined text to "virtual buttons", by
attaching GIF files to each of the <a href=></a> statements. You can see an
example at www.fastconnect.net.au. Although the front page is a static page
(created in dBase Editor), click on any of the "buttons" on this page and
you will go to a dynamic page generated by dBase. If you View the code, you
will see how I have done it. I have also attached attributes to Submit and
Reset buttons to make them match my "virtual buttons".
I have created 3 template GIFs for the various size buttons I need, using
VCW Vicman's Photo Editor (freeware version). I then simply add the
appropriate text to one of the templates and save the new "virtual button".
I trust this may be of some help to you.

Regards, Dean

PS: Thanks to Michael Nuwer for his response on customising Submit and Reset
buttons. Michael, I decided to simply use the attributes instead.

"Dan Anderson" <andersond@ubinc.com> wrote in message
news:YCLvLO1OFHA.432@news-server...


Claus Mygind

2005-04-07, 8:01 pm

Mike, Just a question about this comment you made here?

> 1. It is not a good idea for one CGI applet to call a second applet.
> This is because the second applet would stream a response page but that
> applet would not be able to communicate with the web server.


I have a number of apps where I use this technique ie: my search window
(call it "app B) which is called from shall we say "app A". First the
search window is a dialouge box asking the user to input search info. The
search is made and the response is put into what was the search dialouge box
of available matches with an anchor for each match found from the search.
The user can then click on a choice and auto fill the main form A. These
are all a series of CGI applets that call each other, based on technology
that you taught me.

In other applets you have shown how a CGI can call another with
"location.href=" instead of a response page. Granted here you have to be a
little more careful to encode your data, but it is still possible, right?



Michael Nuwer [dBVIPS]

2005-04-08, 7:01 am

Claus Mygind wrote:
>
> I have a number of apps where I use this technique ie: my search window
> (call it "app B) which is called from shall we say "app A". First the
> search window is a dialouge box asking the user to input search info. The
> search is made and the response is put into what was the search dialouge box
> of available matches with an anchor for each match found from the search.
> The user can then click on a choice and auto fill the main form A. These
> are all a series of CGI applets that call each other, based on technology
> that you taught me.
>
> In other applets you have shown how a CGI can call another with
> "location.href=" instead of a response page. Granted here you have to be a
> little more careful to encode your data, but it is still possible, right?


Hi Claus,

In your above examples, the client browser is calling the CGI exe. The
situation that I was talking about is where a prg/exe program uses the
dBASE RUN() funtion to call another prg/exe.


--
Michael Nuwer
http://www.nuwermj.potsdam.edu/dLearn/
http://www.nuwermj.potsdam.edu/dSamples/
Claus Mygind

2005-04-08, 7:01 am

I get it now.

"Michael Nuwer [dBVIPS]" <nuwermj@nospam.please.yahoo.com> wrote in message
news:OOFvNPCPFHA.320@news-server...
> Claus Mygind wrote:
The[color=darkred]
box[color=darkred]
search.[color=darkred]
These[color=darkred]

technology[color=dar
kred]
be a[color=darkred]
right?[color=darkred]
>
> Hi Claus,
>
> In your above examples, the client browser is calling the CGI exe. The
> situation that I was talking about is where a prg/exe program uses the
> dBASE RUN() funtion to call another prg/exe.
>
>
> --
> Michael Nuwer
> http://www.nuwermj.potsdam.edu/dLearn/
> http://www.nuwermj.potsdam.edu/dSamples/



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com