AW: [opencms-dev] Javascript in HTML (plain) files - found solution

Mark Miller mark.miller at hema.ch
Wed May 28 12:45:02 CEST 2003


Just in case anyone else had this as a problem 
. I did the following
 
Created a Javascript file as a resource
 
Then in my main template I included the following
 
    <script src="<cms:link><cms:property name="scriptfile"
/></cms:link>" language="javascript" type="text/javascript"></script>
 
and then defined a new property for the pages called scriptfile
and simply write the link to the script file in here 
 
seems to work nicely.
 
All the best,
 
Mark
 
PS 
 I also now realised that in html page file one can stop the cdata
tag and then restart it 
. Hence can then use the <cms:link />  tag
Eg. 
 
<![CDATA[
            <html>
            <body
background=']]><link>/system/galleries/pics/back.jpg</link><![CDATA['>
</html>
]]>
 
just thought Id post this incase anyone else had the same issues 
 as I
said before 
 very much a begginer !!!!
 
-----Ursprüngliche Nachricht-----
Von: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org] Im Auftrag von Mark Miller
Gesendet: 28 May 2003 09:32
An: 'OpenCMS Mailing List'
Betreff: [opencms-dev] Javascript in HTML (plain) files
 
How do I stop the IE page editor from screwing around with my javascript
???? 
 I have put the javascript code in using the source editor, but I
want others to be able to edit the page using the page editor. When the
page is saved it messes about and puts all sorts of line breaks in the
code which in short, breaks it.
 
I still don’t really understand how to set links in these html plain
pages. I am setting a background and using an image map
 
Eg.
 
--------------------------------------------------
This works fine and the link gets translated
<IMG
src="/opencms/opencms/system/galleries/pics/HemaProductsERP/ProfitexLogo
.jpg" align=left border=0>
 
This link I have to put in manually for the statically exported site 

will not translate
<table width='600' cellpadding='0' cellspacing='0' border='0'
background='/resources/images/erp/ProfitexBackground.jpg'>
 
These will also not translate
<MAP name='dienstleistung'>
<area shape=RECT coords="145,25,260,125"
href="products/crm/consolidate_4_0.html" alt="crm ">
</MAP>
--------------------------------------------------
 
This means I have to put the link in as it would be on the statically
exported site (not such a big deal) but means I can’t test from the
dynamic site.
I did try to use the <link> tag but to no avail.
 
Any help greatly appreciated.
 
All the best,
 
 
mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20030528/ec541d61/attachment.htm>


More information about the opencms-dev mailing list