After re-reading your message I think I know what you want to know.

It is possible to generate Javascript from Active4D because a4d processes
EVERY Active4D tag before sending out the resulting page. For example in our
online store we have the following line of code

<%
    $bDisplayProduct:=true
    $l_product_id:=5
%>
<Body ......... <% if ($bDisplayProduct) %>onload="displayProduct(<%
=$l_product_id %>)"<% end if  %> >

The output will be:
<Body ......... onload="displayProduct(5)">

displayProduct is a javascript function that is declared elsewhere.

There are a number of times in our site where I generate large chunks of
Javascript from Active4D so I know it works. If you want to see a larger
example of generated Javascript within a script tag then email me privately
and I can get you the link.

Michael Bond
http://www.keep-up.de/

----- Original Message -----
From: "William Swann" <[EMAIL PROTECTED]>
To: "Active4D Developer Discussion List" <[EMAIL PROTECTED]>
Sent: Tuesday, April 22, 2003 10:29 PM
Subject: Re: [Active4d-dev] Very new to Active4D...


>   (To Derrell & Jim) I wholly agree with the both of your suggestions
> of server side validation. There is plan for this as a final step.
> The idea was to not have the user enter 20 fields and find out there
> is an error. Suffice it to say, this is a secure network. I still
> need to understand how to process anything back and forth between A4D
> and javascript, if it is at all possible. I know that 4D's  web
> server ignores 4DSCRIPT tags, etc within the <script> tag.
>
> I guess another way to phrase my question would be: can I embed an
> A4D  or 4D call into a javascript method? My naive understanding of
> A4D is that it is preprocessing the  '.a4d' html files for sending to
> the client. Does A4D allow embedding calls inside of a javascript
> declaration? If not, then any suggestions?
>
> Thanks again,
>
> -Bill
>


Reply via email to