You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ling Kok Choon <ko...@brel.com> on 2001/11/06 07:54:24 UTC

Cocoon2 and javascript

Hi,

   I have developed a website ( use frameset) with cocoon2b1 and javascript ( for menu bar, i 
use hierMenu version 4 from www.javascript.com ). The website run well on the IE4 and IE5, but 
not on NS4+. The problem is the menu bar javascript is not loaded at the first time, but if i 
reload the frame,then the menu bar javascript will be loaded. May i know what is going wrong ? 
and any solutions ?

Include here with a part of the source code:

...
<HEAD>
<TITLE></TITLE>
<META content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<Link type="text/css" rel="stylesheet" href="css/thefont.css">
<SCRIPT TYPE="text/javascript" SRC="js/sidemenu/imageX.js" LANGUAGE="JavaScript1.2"></SCRIPT>
<SCRIPT SRC="js/sidemenu/menuStyle.js" TYPE="text/javascript" LANGUAGE="JavaScript1.2"></SCRIPT>
<SCRIPT SRC="js/sidemenu/HM_Loader.js" TYPE="text/javascript" LANGUAGE="JavaScript1.2"></SCRIPT>
</HEAD>
...
...
...
<!-- here is shown how i use the script -->

<A onmouseover="popUp('elMenu1',event);MM_swapImage('Image1','','pic/sidemenu/aboutus2.gif',1)" 
onmouseout="popDown('elMenu1');MM_swapImgRestore()" href="#">
...
...

Note: the imageX.js is the image Swaping javascript.

Is it the right way to define javascript with cocoon2 ?

Here is the website's url, if u r free, please on your netscape to view it:

http://www-eng.tp.edu.sg


Thank you.


regards,
Ling Kok Choon.


--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 11/06/01
Time: 14:54:25

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------


---------------------------------------------------------------------
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 Ling Kok Choon <ko...@brel.com>.
Hi again,

   Here i include the source code for the main page, and kindly have a view on it.

Thank you.

regards,
Kok Choon.


___________________________________________ Previous___________________________________________
Hi,

   I have developed a website ( use frameset) with cocoon2b1 and javascript ( for menu bar, i 
use hierMenu version 4 from www.javascript.com ). The website run well on the IE4 and IE5, but 
not on NS4+. The problem is the menu bar javascript is not loaded at the first time, but if i 
reload the frame,then the menu bar javascript will be loaded. May i know what is going wrong ? 
and any solutions ?

Include here with a part of the source code:

...
<HEAD>
<TITLE></TITLE>
<META content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<Link type="text/css" rel="stylesheet" href="css/thefont.css">
<SCRIPT TYPE="text/javascript" SRC="js/sidemenu/imageX.js" LANGUAGE="JavaScript1.2"></SCRIPT>
<SCRIPT SRC="js/sidemenu/menuStyle.js" TYPE="text/javascript" LANGUAGE="JavaScript1.2"></SCRIPT>
<SCRIPT SRC="js/sidemenu/HM_Loader.js" TYPE="text/javascript" LANGUAGE="JavaScript1.2"></SCRIPT>
</HEAD>
...
...
...
<!-- here is shown how i use the script -->

<A onmouseover="popUp('elMenu1',event);MM_swapImage('Image1','','pic/sidemenu/aboutus2.gif',1)" 
onmouseout="popDown('elMenu1');MM_swapImgRestore()" href="#">
...
...

Note: the imageX.js is the image Swaping javascript.

Is it the right way to define javascript with cocoon2 ?

Here is the website's url, if u r free, please on your netscape to view it:

http://www-eng.tp.edu.sg


Thank you.


regards,
Ling Kok Choon.

___________________________________________ Previous___________________________________________


--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 11/07/01
Time: 12:39:50

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------

RE: Cocoon2 and javascript

Posted by Jeremy Aston <je...@yahoo.co.uk>.
Hi Choon

I doubt the problem is with Cocoon.  I have seen similar problems even with
static sites where the JS does not load as quickly as the rest of the page,
sometimes not at all.  As developers of e-learning content we have had
problems with navigation where moving forward and backward does not work.
We have got round it by checking for the existance of a global variable,
defined in the JS include file, and not doing anything if that var is null.
When the JS finally loads then the var is not null and all is OK.

I loaded the page no problems first time using NS6 on Win 2000 Pro.

The problem may be related to Cocoon only in that perhaps the files are
being served slowly but that is more down to your hardward than Coccon.

Sorry I can't be more helpful.

Jez



-----Original Message-----
From: Ling Kok Choon [mailto:kokchoon@brel.com]
Sent: 06 November 2001 06:54
To: cocoon-users@xml.apache.org
Subject: Cocoon2 and javascript


Hi,

   I have developed a website ( use frameset) with cocoon2b1 and javascript
( for menu bar, i
use hierMenu version 4 from www.javascript.com ). The website run well on
the IE4 and IE5, but
not on NS4+. The problem is the menu bar javascript is not loaded at the
first time, but if i
reload the frame,then the menu bar javascript will be loaded. May i know
what is going wrong ?
and any solutions ?

Include here with a part of the source code:

...
<HEAD>
<TITLE></TITLE>
<META content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<Link type="text/css" rel="stylesheet" href="css/thefont.css">
<SCRIPT TYPE="text/javascript" SRC="js/sidemenu/imageX.js"
LANGUAGE="JavaScript1.2"></SCRIPT>
<SCRIPT SRC="js/sidemenu/menuStyle.js" TYPE="text/javascript"
LANGUAGE="JavaScript1.2"></SCRIPT>
<SCRIPT SRC="js/sidemenu/HM_Loader.js" TYPE="text/javascript"
LANGUAGE="JavaScript1.2"></SCRIPT>
</HEAD>
...
...
...
<!-- here is shown how i use the script -->

<A
onmouseover="popUp('elMenu1',event);MM_swapImage('Image1','','pic/sidemenu/a
boutus2.gif',1)"
onmouseout="popDown('elMenu1');MM_swapImgRestore()" href="#">
...
...

Note: the imageX.js is the image Swaping javascript.

Is it the right way to define javascript with cocoon2 ?

Here is the website's url, if u r free, please on your netscape to view it:

http://www-eng.tp.edu.sg


Thank you.


regards,
Ling Kok Choon.


--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 11/06/01
Time: 14:54:25

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------


---------------------------------------------------------------------
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>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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>