WCM and Javascript Not viewing correctly

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2009 11:55 AM
Hi,
I am new to alfresco and though that the easiest way to test the WCM would be to import one of my web sites files into alfresco and see how it can help. I was very disappointed when it did not display my files correctly. Basically I use a style sheet which was picked up okay and three javascript files, one is a header file that just writes a header section, the second is a script definition and the third is a menu section. Alfresco does not seem to display the page correctly especially if the javascript contains document.write statements. The interesting aspect is that the menu section works in some files and not in others. My typical content document would look like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="images/styles.css" rel="stylesheet" type="text/css" />
<title> Test Page </title>
</head>
<body>
<script src="header1.js"></script>
<script src="images/xaramenu.js"></script>
<script menumaker src="images/efc.js"></script>
<p class="stylebn">Testing a view</p>
</body>
</html>
Is there a problem with this or am I doing something wrong, or have I set the system up incorrectly?
I'm running Alfresco 3.0 stable on a SUSE lynux vm and everything looks to be okay with the set up, no errors reported or anything appearing in the logs.
Thanks
Graham
I am new to alfresco and though that the easiest way to test the WCM would be to import one of my web sites files into alfresco and see how it can help. I was very disappointed when it did not display my files correctly. Basically I use a style sheet which was picked up okay and three javascript files, one is a header file that just writes a header section, the second is a script definition and the third is a menu section. Alfresco does not seem to display the page correctly especially if the javascript contains document.write statements. The interesting aspect is that the menu section works in some files and not in others. My typical content document would look like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="images/styles.css" rel="stylesheet" type="text/css" />
<title> Test Page </title>
</head>
<body>
<script src="header1.js"></script>
<script src="images/xaramenu.js"></script>
<script menumaker src="images/efc.js"></script>
<p class="stylebn">Testing a view</p>
</body>
</html>
Is there a problem with this or am I doing something wrong, or have I set the system up incorrectly?
I'm running Alfresco 3.0 stable on a SUSE lynux vm and everything looks to be okay with the set up, no errors reported or anything appearing in the logs.
Thanks
Graham
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2009 06:31 AM
Hi,
I am also having trouble displaying the GB pound sign (£). this works in most browsers but when you view the symbol with Alfresco it comes with a wrong symbol. A simple piece of html will show the problem:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Display a pound sign</title>
</head>
<body>
<p>Does Alfresco display the GBP sign correctly?<br />
£
</p>
</body>
</html>
Thanks
Graham
I am also having trouble displaying the GB pound sign (£). this works in most browsers but when you view the symbol with Alfresco it comes with a wrong symbol. A simple piece of html will show the problem:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Display a pound sign</title>
</head>
<body>
<p>Does Alfresco display the GBP sign correctly?<br />
£
</p>
</body>
</html>
Thanks
Graham

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2009 06:54 AM
Hi,
For information I have now solved my problem. The first is linked with what I deem as a fault with alfresco. If you have a reference to a file in the current directory, either an image or a script include file, when you try and view that html file in alfresco it cannot find the file, even if you reference the file ./filename. If you locate any include files in a subdirectory alfresco picks up the file and the display works.
The other problem is one of my mistake and sloppy html. Alfresco is unforgiving of sloppy html and forces you to write correct html. This is a good thing and £ signs should be written as £ and & signs as & this way there will be no ambiguity when displayed on foreign browsers.
Graham
For information I have now solved my problem. The first is linked with what I deem as a fault with alfresco. If you have a reference to a file in the current directory, either an image or a script include file, when you try and view that html file in alfresco it cannot find the file, even if you reference the file ./filename. If you locate any include files in a subdirectory alfresco picks up the file and the display works.
The other problem is one of my mistake and sloppy html. Alfresco is unforgiving of sloppy html and forces you to write correct html. This is a good thing and £ signs should be written as £ and & signs as & this way there will be no ambiguity when displayed on foreign browsers.
Graham
