cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes.Bec...@o2.com
Subject Re: ESQL and JavaScript
Date Wed, 08 Jan 2003 11:38:52 GMT

Hi,

just like this:

...
<script type="text/javascript" language="JavaScript">
function example()
                  {
                        i=0;
                        <esql:connection>
                              <esql:pool>xxx</esql:pool>
                              <esql:execute-query>
                                    <esql:query>
                                          SELECT description, service_id
                                          FROM report
                                          WHERE report_id
= <xsp:expr>report_id</xsp:expr>)
                                          ORDER BY display_order
                                    </esql:query>
                                    <esql:results>
                                          <esql:row-results>
                                                document.getElementById
("SERVICE_ID").options[i++] = new Option("<esql:get-string column
="description"/>","<esql:get-string column="service_id"/>");
                                          </esql:row-results>
                                    </esql:results>
                                    <esql:no-results>
                                          document.getElementById
("SERVICE_ID").options[i++] = new Option("","");
                                    </esql:no-results>
                                    <esql:error-results>
                                          ...
                                    </esql:error-results>
                              </esql:execute-query>
                        </esql:connection>

                        service_dropdown_change();
                  }

</script>
...


Jonny



|---------+---------------------------->
|         |                            |
|---------+---------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                                       |
  >------------------------------------------------------------------------------------------------------------------------------|




On 08.Jan.2003 -- 11:50 AM, Johannes.Becker@o2.com wrote:
>
> Hi,
>
> I know its not the (to be harmless)  nicest way, but my ESQL in
JavaScript
> works fine. I just wanted to know if it is possible in
Javascript-Functions
> to place passed parameters in ESQL-Statements.

I'm missing something here: how do you manage to have ESQL in
javascript? AFAIK there is no logicsheet for esql + javascript XSP.

             Chris.





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message