You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jose de Miguel <jd...@tcpsi.es> on 2001/11/20 16:59:57 UTC

Cocoon2 and Javascript

Hi !

I´m developing with Cocoon2 and Tomcat 4.0.1 and I get bad text in the browser when I write in, for example, a confirm of Javascript characters like ?, ¿ , etc...

Do you know something about that ????

Can anybody tell me how to solve this problem ????


Jose de miguel Jiménez
email: jdemiguel@tcpsi.es
Madrid 
(España)



Re: Cocoon2 and Javascript

Posted by S�rgio Carvalho <se...@acm.org>.
You are better off having the Javascript be served from something other
than cocoon. Like other non-xml content, it is troublesome to have it
pass through the XML pipeline. 

You can, however, put it inside a CDATA section of the main document.


On Tue, 2001-11-20 at 15:59, Jose de Miguel wrote:
> Hi !
> 
> I´m developing with Cocoon2 and Tomcat 4.0.1 and I get bad text in the browser when I write in, for example, a confirm of Javascript characters like ?, ¿ , etc...
> 
> Do you know something about that ????
> 
> Can anybody tell me how to solve this problem ????
> 
> 
> Jose de miguel Jiménez
> email: jdemiguel@tcpsi.es
> Madrid 
> (España)
> 
> 
-- 
Sergio Carvalho
---------------
sergio.carvalho@acm.org

If at first you don't succeed, skydiving is not for you


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

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


RE: Cocoon2 and Javascript

Posted by Sérgio Carvalho <se...@acm.org>.
Include the encoding of the stylesheet in the xml declaration:
<?xml version="1.0" encoding="iso-8859-1"?>
or use numeric entities for the internation characters. Those seem like
spanish characters, so you should be ok with iso-8859-1 or utf8.

On Tue, 2001-11-20 at 16:32, Jose de Miguel wrote:
> Thanks karl.
> 
> My codeline is :
> 
> <a href="javascript:if(confirm('¿Desea salir de la aplicación?')) window.open('index','_top')"                                    onMouseOver="window.defaultStatus='';window.status='Salir';return true"><img alt='Salir' border='0' src='/images/botones/saliron.jpg'/></a>
> 
> 
> and the javascript confirm doesn´t work. I´m in a XSL page.
> 
> I will try with your solution.
> 
> Jose.
> Madrid.
> España.
> 
> 
>   ----- Original Message ----- 
>   From: Karl Øie 
>   To: cocoon-users@xml.apache.org 
>   Sent: Tuesday, November 20, 2001 5:08 PM
>   Subject: RE: Cocoon2 and Javascript
> 
> 
>   are you placing the javascript in a cdata section?
>    
>       <SCRIPT>
>       <xsl:comment><![CDATA[
>           function hahaha() {
>               }    
>       ]]>
>       </xsl:comment>
>       </SCRIPT>
>    
>   mvh karl øie
>     -----Original Message-----
>     From: Jose de Miguel [mailto:jdemiguel@tcpsi.es]
>     Sent: 20. november 2001 17:00
>     To: cocoon-users@xml.apache.org
>     Subject: Cocoon2 and Javascript
> 
> 
>     Hi !
> 
>     I´m developing with Cocoon2 and Tomcat 4.0.1 and I get bad text in the browser when I write in, for example, a confirm of Javascript characters like ?, ¿ , etc...
> 
>     Do you know something about that ????
> 
>     Can anybody tell me how to solve this problem ????
> 
> 
>     Jose de miguel Jiménez
>     email: jdemiguel@tcpsi.es
>     Madrid 
>     (España)
> 
> 
-- 
Sergio Carvalho
---------------
sergio.carvalho@acm.org

If at first you don't succeed, skydiving is not for you


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

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


RE: Cocoon2 and Javascript

Posted by Jose de Miguel <jd...@tcpsi.es>.
Thanks karl.

My codeline is :

<a href="javascript:if(confirm('¿Desea salir de la aplicación?')) window.open('index','_top')"                                    onMouseOver="window.defaultStatus='';window.status='Salir';return true"><img alt='Salir' border='0' src='/images/botones/saliron.jpg'/></a>


and the javascript confirm doesn´t work. I´m in a XSL page.

I will try with your solution.

Jose.
Madrid.
España.


  ----- Original Message ----- 
  From: Karl Øie 
  To: cocoon-users@xml.apache.org 
  Sent: Tuesday, November 20, 2001 5:08 PM
  Subject: RE: Cocoon2 and Javascript


  are you placing the javascript in a cdata section?
   
      <SCRIPT>
      <xsl:comment><![CDATA[
          function hahaha() {
              }    
      ]]>
      </xsl:comment>
      </SCRIPT>
   
  mvh karl øie
    -----Original Message-----
    From: Jose de Miguel [mailto:jdemiguel@tcpsi.es]
    Sent: 20. november 2001 17:00
    To: cocoon-users@xml.apache.org
    Subject: Cocoon2 and Javascript


    Hi !

    I´m developing with Cocoon2 and Tomcat 4.0.1 and I get bad text in the browser when I write in, for example, a confirm of Javascript characters like ?, ¿ , etc...

    Do you know something about that ????

    Can anybody tell me how to solve this problem ????


    Jose de miguel Jiménez
    email: jdemiguel@tcpsi.es
    Madrid 
    (España)



RE: Cocoon2 and Javascript

Posted by Karl Øie <ka...@gan.no>.
are you placing the javascript in a cdata section?

    <SCRIPT>
    <xsl:comment><![CDATA[
        function hahaha() {
            }
    ]]>
    </xsl:comment>
    </SCRIPT>

mvh karl øie
  -----Original Message-----
  From: Jose de Miguel [mailto:jdemiguel@tcpsi.es]
  Sent: 20. november 2001 17:00
  To: cocoon-users@xml.apache.org
  Subject: Cocoon2 and Javascript


  Hi !

  I´m developing with Cocoon2 and Tomcat 4.0.1 and I get bad text in the
browser when I write in, for example, a confirm of Javascript characters
like ?, ¿ , etc...

  Do you know something about that ????

  Can anybody tell me how to solve this problem ????


  Jose de miguel Jiménez
  email: jdemiguel@tcpsi.es
  Madrid
  (España)