cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ShengJie Xia <xiasheng...@gmail.com>
Subject problem with displaying a html file with js fuction call through pipeline
Date Wed, 17 Aug 2005 20:02:37 GMT
Hi,

I declare a java script file in the head section of html file and call
its function in the body. I use the resource reader in the pipeline to
display this page, but the browser warns me object expected on the
line of function call.

Another problem is that there is an syntax error at the <head> tag
when I declare more than one java script files in the head section.

The below is the source code.

******************* test.html ****************
<html>
	<head>
		<title>
			hello
		</title>
		
		<script language="JavaScript" src="test.js"></script>	
		<!-- <script language="JavaScript" src="test2.js"></script> -->
		
	</head>
	<body>
		
		<script>a_msg();</script> 
	</body>

</html>
******************* test.js *******************
function a_msg(){
	alert("how are you");
	document.write("dddddd");
}

******************* part of the pipeline *********
<map:match pattern="*/authoring/**.html">  
               <map:read type="resource"
	src = "test.html"
                mime-type = "text/html" >
              </map:read> 
</map:match>

Do you know how to solve these problems?

Thanks in advance!

Shengjie

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


Mime
View raw message