Re: ESQL and JavaScript

2003-01-09 Thread Cocoon User

can someone explain me how is it possible this code to be  valid without
syntax errors?


how can we have a markup language elemend [esql:any/] inside a
javascript function (){   }

or your are talking about something else than clientside javascript


thnx
stavros



On Wed, 8 Jan 2003 [EMAIL PROTECTED] wrote:


 Hi,

 just like this:

 ...
 script type=text/javascript language=JavaScript
 function example()
   {
 i=0;
 esql:connection
   esql:poolxxx/esql:pool
   esql:execute-query
 esql:query
   SELECT description, service_id
   FROM report
   WHERE report_id
 = xsp:exprreport_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, [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: ESQL and JavaScript

2003-01-09 Thread Christian Haul
On 09.Jan.2003 -- 05:10 PM, Cocoon User wrote:
 
 can someone explain me how is it possible this code to be  valid without
 syntax errors?
 
 how can we have a markup language elemend [esql:any/] inside a
 javascript function (){   }

Remember that the esql tags are already processed on the server and
produce the final javascript that is send to the client...

Thus

  script type=text/javascript language=JavaScript
  function example() {
  i=0;

multiple lines of this (of course with the query results!)

  document.getElementById(SERVICE_ID).options[i++] = 
  new Option(esql:get-string 
column=description/,esql:get-string column=service_id/);

or this one

  document.getElementById(SERVICE_ID).options[i++] = new Option(,);

 
  service_dropdown_change();
}
 
  /script

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




ESQL and JavaScript

2003-01-08 Thread Johannes . Becker
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:poolcdr/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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: ESQL and JavaScript

2003-01-08 Thread Christian Haul
On 08.Jan.2003 -- 10:53 AM, [EMAIL PROTECTED] 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
[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: ESQL and JavaScript

2003-01-08 Thread Johannes . Becker

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.

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.



|-+--
| |   Christian Haul |
| |   [EMAIL PROTECTED]|
| |   rmstadt.de|
| |  |
| |   01/08/03 11:30 AM  |
| |   Please respond to  |
| |   cocoon-users   |
| |  |
|-+--
  
--|
  |
  |
  |   To:   [EMAIL PROTECTED]
  |
  |   cc:  
  |
  |   Subject:  Re: ESQL and JavaScript
  |
  
--|




On 08.Jan.2003 -- 10:53 AM, [EMAIL PROTECTED] 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
[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]






-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: ESQL and JavaScript

2003-01-08 Thread Christian Haul
On 08.Jan.2003 -- 11:50 AM, [EMAIL PROTECTED] 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.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: ESQL and JavaScript

2003-01-08 Thread Johannes . Becker

Hi,

just like this:

...
script type=text/javascript language=JavaScript
function example()
  {
i=0;
esql:connection
  esql:poolxxx/esql:pool
  esql:execute-query
esql:query
  SELECT description, service_id
  FROM report
  WHERE report_id
= xsp:exprreport_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, [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




esql and javascript in xsp

2002-11-28 Thread Johannes . Becker
Hi,

I' having problems with JavaScript
functions in XSP-Pages. This is part of my
funnction:

function
populate_service_dropdown(report_id)
{
report_id =

document.reportFrm.report_id.options[document.reportFrm.report_id.selectedIndex].id;
i=0;
esql:connection
esql:driveroracle.jdbc.driver.OracleDriver/esql:driver
esql:dburljdbc:oracle:thin:@XX::X/esql:dburl
esql:usernameX/esql:username
esql:passwordXX/esql:password
esql:execute-query
esql:query
SELECT description, service_id
FROM report_services
WHERE report_id = '16' AND
active_ind = 'Y'
ORDER BY display_order
/esql:query
esql:results

I want the passed parameter (report_id) put
in the select-statement like this:
WHERE id = report_id
I was told it would work something like
this:
WHERE id
= xsp:exprreport_idxsp:expr.
But this didnt't help.
Do I have to store the passed parameter
first in a variable?
What should I do?

Thanks
Jonny




-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]