You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jo...@o2.com on 2003/01/08 10:53:00 UTC

ESQL and JavaScript

I have a Javascript-Function, which gets a parameter passed. I want this
parameter now in my ESQL-Statement. Is there a way to do this?

My (Example)-Function:

function insert(ID)
                  {
                        <esql:connection>
                              <esql:pool>cdr</esql:pool>
                              <esql:execute-query>
                                    <esql:query>
                                          SELECT *
                                          FROM table_1
                                          WHERE id_1 = <<<<< Here I want
the Parameter (ID) >>>>>
                                    </esql:query>
                                    <esql:results>
                                          <esql:row-results>
                                                      ...
                                          </esql:row-results>
                                    </esql:results>
                                    <esql:no-results>
                                          ...
                                    </esql:no-results>
                                    <esql:error-results>
                                          ...
                                    </esql:error-results>
                              </esql:execute-query>
                        </esql:connection>
                  }

Thanks
Jonny

----------------------------------------------------------------------------------------------------

This electronic message contains information from the mmo2 plc Group which
may be
privileged or confidential. The information is intended to be for the use
of the
individual(s) or entity named above. If you are not the intended recipient
be aware
that any disclosure, copying, distribution or use of the contents of this
information
is prohibited. If you have received this electronic message in error,
please notify
us by telephone or email (to the numbers or address above) immediately.




---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: ESQL and JavaScript

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 08.Jan.2003 -- 10:53 AM, Johannes.Becker@o2.com wrote:
> I have a Javascript-Function, which gets a parameter passed. I want this
> parameter now in my ESQL-Statement. Is there a way to do this?

Javascript (if client side) is completely unrelated to XSP and ESQL in particular.

Server side Javascript (i.e. flow script) can pass parameters to the
XSP. See examples (e.g. calculator) for this and in particular
jpath.xsl. Passing values using request attributes is also possible.

For dynamic queries with ESQL please see the docs. Starting with 2.0.4
there is a section dedicated to this on the ESQL page.
http://xml.apache.org/cocoon/userdocs/xsp/esql.html

	Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add "SUMMARY: " to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>