<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
when you use the direct edit function within a container page in
OpenCms 8 the HTML fragment for the changed content will be
generated by the server to replace the previous content on the
client side. Any java-script you included in the HTML will be
removed before inserting the HTML into the DOM to avoid errors that
would be caused by any document write operations. Also java-script
code that is run on document load won't be executed again for the
newly included HTML.<br>
<br>
This is probably the reason for you jquery pugin not to work.<br>
<br>
Currently it is not possible to supply a callback function that
would be called after the edited content is included into the page.
You can request this feature using bugzilla.<br>
<br>
Even though this won't help you plugin to work, on the server side
you can access the information, if the HTML your element formatter
jsp is generating will used to load a whole new page or just a
content fragment when editing a page. Use EL to access
${cms.edited}, this will be true if your element content is not
generated in the context of a whole page and therefore java-script
will not be executed on it (@see
org.opencms.jsp.util.CmsStandardContextBean.isEdited()). You can use
this to supply the user with information, why your java-script will
only work, after the page was saved.<br>
<br>
Greetings, Tobias<br>
<br>
<pre class="moz-signature" cols="300">--
Alkacon Software GmbH - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> -- <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a>
</pre>
Am 06.08.2011 10:02, schrieb yangguang:
<blockquote
cite="mid:60338c1b.fe5e.1319e1dbafc.Coremail.sun.java@163.com"
type="cite">
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">
<div><span class="Apple-style-span" style="font-family: verdana;
line-height: 25px; font-size: 13px; ">
<div><span><font color="#808080">hi.</font></span></div>
<div><span><font color="#808080">I use v8.0.1 . I use a
jquery slider, it works when the page load first time.
but when I edit any html with the direct, it did not
work ,because it did not load the jquery slider. so I
must refresh the page.</font></span></div>
</span></div>
<div><font class="Apple-style-span" color="#808080"
face="verdana" size="2"><span class="Apple-style-span"
style="line-height: 25px;"><br>
</span></font></div>
<div><font class="Apple-style-span" color="#808080"
face="verdana" size="2"><span class="Apple-style-span"
style="line-height: 25px;">my question is : when I
finished editing page , is there a way to add my callback
javascript function ?</span></font></div>
<div><font class="Apple-style-span" color="#808080"
face="verdana" size="2"><span class="Apple-style-span"
style="line-height: 25px;"><br>
</span></font></div>
<div><font class="Apple-style-span" color="#808080"
face="verdana" size="2"><span class="Apple-style-span"
style="line-height: 25px;">thanks.<br>
</span></font><span class="Apple-style-span"
style="font-family: verdana; line-height: 25px; font-size:
13px; ">
<div><span><font color="#808080"><br>
</font></span></div>
<div><span><font color="#808080"><br>
</font></span></div>
<div><span><font color="#808080"><br>
</font></span></div>
<div><span><font color="#0000ff"><font color="#808080"
size="2">*******************************************</font></font></span> </div>
</span></div>
</div>
<br>
<br>
<span title="neteasefooter"><span id="netease_mail_footer"></span></span>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></pre>
</blockquote>
</body>
</html>