asking for help in get method

aviovda

New Member
hello all
(i am a new user of webspeed and also not very much familiar with
html.)
can you guid me please how to corect the attached program
for :
1. not display the input box demo1.
2. to get into it automaticly the value of `pod_part` when the user
makes his selection via the select box.

i am traying to pass tow variables , pod_nbr and pod_part
this when i am using only the select box.

thank you very much.

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<META NAME="AUTHOR" CONTENT="">
<TITLE>WebSpeed Script</TITLE>
</HEAD>
<body bgcolor=white text=blue>
<center><h1>Vendor-Parts List!</h1></center><hr>
<FORM ACTION="bomexpven.html" METHOD="get" style= "HIGHT: 22PX;WIDTH: 220px">
<h3>ELMO-Part</h3></center><hr>
<tr><td>
<input type="text" value = '' name='demo1' size="25">
</td><tr>
<tr><td>
<SELECT id=ponbr name=ponbr1 style="HIGHT: 22PX;WIDTH: 250px">
</td></tr>
<!--WSS
def var info as char format "x(8)".
for each pod_det no-lock where pod_status <> "c"
break by pod_nbr by pod_part
:
if last-of(pod_part) then
-->
<OPTION value = `(pod_nbr)` > `pod_nbr` -- `pod_part` </OPTION>
<BR> <BR>
<!--WSS
end.
-->
<tr><td>
<INPUT type="submit" value=submit name=submit1>
</td></tr>
</BODY>
</HTML>
 

Casper

ProgressTalk.com Moderator
Staff member
Hi,

I don't exactly know what you want. But I made some adjustments to your code. This example works for the sports2000 database.
At first the input is not visible, after choosing a customer number the name of the customer is shown in the input field.
I allways work with <%,%> for code and <%= and %> for values. So that's what I used.
I'm not a web expert, so there are probably much more and better ways to accomplish this....

Code:
<HTML>
<HEAD>
<META NAME="AUTHOR" CONTENT="">
<TITLE>WebSpeed Script</TITLE>
<script language="JavaScript">
   function hide(){
      document.pageform.demo.style.visibility = 'hidden';
   }
   function fshow(){
      document.pageform.demo.style.visibility = 'visible';
      document.pageform.demo.value = document.pageform.option.value;
   }
</script>
</HEAD>
<body bgcolor=white text=blue onload="hide()">
  <center><h1>Vendor-Parts List!</h1></center><hr>
  <FORM ACTION="question" METHOD="post" name="pageform">
    <h3>ELMO-Part</h3>
    <input type="text" value = '' name='demo' size="25" id='demo'>
    <SELECT name="option" size="1" onchange="fshow()">
    <OPTION value="default blank" >Choose customer</OPTION>
    <%for each customer where customer.custnum  < 10: %>
        <OPTION value="<%=customer.name%>"><%=string(customer.custnum)%></OPTION>
    <%end.%>
      <INPUT type="submit" value=submit name=submit1>
    </select>
  </form>
</BODY>
</HTML>


HTH,

Casper.
 

Claude Simon

New Member
Obviously, our topic opener doesn't use speedscript, and it is a best way to program.

Well, you have in your webspeed generated program, two procedures or function, it depends how you want to declare at posteriori, something like
http-get and http-post.
Get Method is the treatment at the entry in this servered-web-page,
Post Method is the treatment at the output of this stand-alone-web-page, the user filling the formula or/and your webpage being re-managered with the http-get method, the http-post releving html widgets (all the fields selectionnable by the user, or all the listeners).
 

Casper

ProgressTalk.com Moderator
Staff member
?

Obviously, our topic opener doesn't use speedscript, and it is a best way to program.

If I'm not mistaking, he does.....

<!--WSS
def var info as char format "x(8)".
for each pod_det no-lock where pod_status <> "c"
break by pod_nbr by pod_part
:
if last-of(pod_part) then
-->

Casper.
 

Claude Simon

New Member
Progress is really against use of Speedscript, they don't want to go in this way if I remember. So, it's not a professional way to program, and there should be not a lot of support on it. Whatever, I didn't never use it so I can't help you.
 

Casper

ProgressTalk.com Moderator
Staff member
Hi,

First, I didn't ask the question.
Second the answer I gave never had no reply, but the code I gave is a perfectly valid way of handling such matters. And also, maybe more important: definetely supported by Progress!

If you don't use tags like <!--wss or <% how do you do your coding, you only use cgi-wrappers?

There is no difference in using <wss tags or <% tags.

Casper.
 

Casper

ProgressTalk.com Moderator
Staff member
If that was his question.... :D

I didn't understand what he wanted to, but he never gave a reply so I figured it was allright.

I just replied to you to because:
So, it's not a professional way to program, and there should be not a lot of support on it

Which I strongly disagree with.

Casper.
 

Claude Simon

New Member
Of course for treatment around html widget, speedscript is really interesting, instead of encapsulating cgi-wrappers tag in javascript function.

Question : did you use speedscript for a big commercial application for instance ?
 

Casper

ProgressTalk.com Moderator
Staff member
We use webspeed for a commercial application. But not a very big one. If we intend to make a big commercial application then we probably choose for eScript from Progress UK.

To me SpeedScript is essential to use, otherwise you have to use cgi-wrappers or some HTML-mapping which can be pretty akward. To me speedscript (embedded progress 4GL in HTML) is the same as making for instance java servlets and jsp pages.

We don't use cgi-wrappers because it is very difficult for people who don't know progress to add style to the pages. Therefore we use progress 4gl .p's to gather the information and after that we run a HTML page with temp-tables as input parameters. In the HTML pages itself the 4GL is limited to filling the page with the appropriate data.

With eScript the HTML and 4GL are compeltely seperated which even more enables you to let the BL be done by the 4GL programmers and HTML interface by webdesigners.

Casper.
 

Claude Simon

New Member
So, if I well understand, in your application, cgi-wrapper and escript boosted, you can choose between HTML, XHTML or XML-XSL technology.
If you don't want to choose, then you will choose after time, isn't ?

I've got for a long be questionned why Progress was preferring to separate cleanly server code from client code.
But if it is possible, the best way is cgi-wrapper-escript inside of cgi-wrapper/speedscript.

Whatever, the choose between these client technologies still doesn't warn us from differences between navigators.

The dog can still beat his queue.
 

Casper

ProgressTalk.com Moderator
Staff member
All the processing (except the javascript) is done serverside. (e.g speedscript aswell).
I don't use cgi-wrapper because of reasons mentioned earlier.
The emphasis of Progress is not to seperate server code from client code, but to seperate business logic from UI. (OERA)
With HTML the client is a thin client which knows nothing about Progress. The client side just handles pure HTML (or XHTML or XML/XLS..). Navigators are only known at the client side during execution time of the page, so to handle different kinds of navigators you need client coding (javascript) in your HTML like every other webpage who needs to be compatible with different navigators.

Since there are different expertises involved (webdesign vs Progress 4GL) it's more efficient if you succed in seperating HTML from Progress 4GL as much as possible.
That's why I mentioned eScript before, because with e-script you have a framework with which you can design webpages and fill it with data from Progress using progress without the need to put Progress inside a Webpage. So the webdesigner can make his pages and the 4GL developper can make the routines to supply the webpages with data from the database and neither has to have any knowledge of the
expertise of the other.

Casper.
 

aviovda

New Member
hello all and first i want to thanks casper very much,
and i am sorry for the delay in my replay.
as i mentioned the question i have asked was as a very new
beginner (now may be i can call my self a beginner),
and it was misleading.
all what i needed is to send to the next page two parameters
when the user is selecting only one
i.e using the "&" sign
(hope you laugh)

i didn't mean to start a comparison about differences between
methods and i know to use only speed script (for reports only)
i can tell you that i enjoy it a lot and the results
are great.

thank you again
 
Top