Can speedscript be called from onblur?

jdcotton

New Member
I would like to do a calculation after a field(birthday) is filled in and display the answer(age) as text on the web page. What is an easy way of displaying it? I know I can call a javascript function but I would like to use a speedscript procedure to do the calculation. Can I call the procedure from the js function. I want to do something along these lines:

#in head#
<script type="text/javascript">
function newage(){
<% run p-birth. %>
document.getElementById("theage").innerHTML = "&nbsp `uage` ";
}
</script>

<%procedure p-birth.
code to do calculation and assign uage
%>

#in body#
<tr>
<td align="right" width="157">
Birth Date:
</td>
<td width="255">
<input type="text" name="birth" size="15" xlength="10"
value="`qbirth format "99/99/9999"`" onblur="newage()"/>

Age:<span id="theage"> `qage` </span>
</td>
</tr>
 
No,

You must remember that the speedscript is just Progress and that is being run by the progres executable server side. The only stuff which gets to the client is the HTML-ish stuff and the javascript (which is being handled client side).

So in order to run p-birth.p you have to submit the page. So the program can be run and the right HTML can be generated.

Casper.
 
I knew that, but forgot it. Tutorials, howtos and examples are few. If our existing app wasn't already done in progress v9, I would not be attempting to convert it to webspeed. Documention is needed badly.

Thanks
 
Back
Top