Get-value return blank with IE6

cherrydan

New Member
Hello, i'm new in webspeed.
I've got an html file which contains a form, and i want to take the value of an input text. The get-value don't work. How can I do?
I've got this code:

<script language="JavaScript" type="text/javascript">
function test()
{
<!--wss
define variable test as character no-undo.
assign test = get-value("nom":U).
find customer where customer.name = test no-lock no-error.
-->
window.location= "<!--WSS
{&OUT} IF AVAILABLE(customer) THEN "proforma2_non.html" ELSE "default.html". -->";

}
</script>

<body bgcolor="#3366CC">
<form name="form1" method="post">
<center>
<table>
<tr>
<td> nom </td>
<td> <input type="text" name="nom"> </td>
</tr>


<tr>
<td> <input type="button" name="Submit" value="Rechercher" onclick=test()> </td>
</tr>
</table>

</center>
</form>
</body>
</html>
 
You are mixing up things.
The JavaScript is executed client site while the progress code is executed serverside.

If you need progress logic to make a decision on what page you want to go. Just submit to a .p which has the logic in it.

You could make a dispatch procedure dispatch.p which does this. So your action for the form will be action=dispatch.

There you can do a get-value of the text and depending on the outcome run a html page (.r) from you progress session.

Casper.
 
Hello casper thanks for your response.
I'm creating an procedure dispatch.p and i'm write action= dispatch.p in the form who is define in my html page.
I can compile dispatch.p because there is an error with get-value. Progress don't understand get-value.
Can you see if my code is ok.
thanks you very much .
cherrydan

/**********dispatch.p ****************/
define variable test1 as character no-undo.
assign test1 = get-value("nom").
find customer where customer.name = test1 no-lock no-error.
IF AVAILABLE(customer) THEN do:
RUN proforma2_non.html.
END.
ELSE DO:
RUN default.html.
END.


You are mixing up things.
The JavaScript is executed client site while the progress code is executed serverside.

If you need progress logic to make a decision on what page you want to go. Just submit to a .p which has the logic in it.

You could make a dispatch procedure dispatch.p which does this. So your action for the form will be action=dispatch.

There you can do a get-value of the text and depending on the outcome run a html page (.r) from you progress session.

Casper.
 
Sorry for that you, have to include the following file to use get-value, &OUT, get-session etc...:
Code:
{src/web2/wrap-cgi.i}

You can only run the HTML files if they are compiled and in the propath. If you want a static HTML file to run then you either have to compile it or go there by means of Javascript.

Remember this:

client:
webbrowser handles:
HTML, XHTML, JavaScript, Ajax etc...

webserver:
Here reside:
static HTML pages, css, JS libraries, images

dbserver:
Where the appserver runs:
generating Dynamic HTML pages
Progress code execution (and db access).

Casper.
 
Back
Top