[opencms-dev] RE: XmlHttpRequest and OpenCms Direct Edit

Jonathan Woods jonathan.woods at scintillance.com
Thu Nov 16 20:00:53 CET 2006


Roman -

As you know, the direct edit machinery relies on buttons etc being
registered by Javascript called in the <head> element - but your included
stuff is presumably not executable like this, because its <head> element is
not that of the whole browser page.  Would that explain it?  (It's been a
while... I gave up on direct edit some time ago.)

Jon

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Jonathan Woods
Sent: 16 November 2006 18:51
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] RE: XmlHttpRequest and OpenCms Direct Edit

Second thought: session management/cookie problem, though I don't see why
the XMLHttpRequest shouldn't be made by the browser with the same session
cookie presented (unless there's some odd difference in the host part of the
URL).  I guess you could test this by including in the page some kind of
getCurrentProject() call and seeing what the result is - should be
non-online project, of course.

Jon

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Roman Uhlig
Sent: 16 November 2006 18:29
To: opencms-dev at opencms.org
Subject: [opencms-dev] RE: XmlHttpRequest and OpenCms Direct Edit


Unfortunately not. There's nothing except some "unidentified entities"
caused as usual by special (german) chars.

Roman


Jonathan Woods wrote:
> 
> First thought: some kind of Javascript scoping problem.  Try doing all 
> this in Firefox and enabling the Javascript [error] console to see if 
> anything crops up.
> 
> Jon
> 
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Roman Uhlig
> Sent: 16 November 2006 17:57
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] XmlHttpRequest and OpenCms Direct Edit
> 
> 
> Hi,
> 
> I'm currently trying to implement some simple asynchronous 
> functionality by using XMLHttpRequest inside OpenCms. So far 
> everything is working as expected, except the rendering of OpenCms 
> direct edit buttons. They don't get displayed. This is quite strange, 
> since I'm not doing anything unusual.
> 
> The generated HTML response from XMLHttpRequest is valid and contains 
> everything a page with direct edit functionality needs (CSS and 
> JavaScript inside the head). If I call this page directly without 
> XMLHttpRequest, everything works fine. As soons as I load it inside 
> another page by using XMLHttpRequest, the direct edit buttons don't 
> show up. I'm using it like
> this:
> 
> JSP:
> 
> ...
> <div id="async_content">
> </div>
> <input type="button" value="Load async content"
> onClick="loadCnt('async_content', '<%=
> cms.link(some_page_with_direct_edit)
> %>'">
> ...
> 
> 
> JavaScript:
> 
> function loadCnt(id, src) {
> ...
> http_request = new XMLHttpRequest();
> ...
> http_request.open('GET', src, true);
> http_request.send();
> document.getElementById(id).innerHTML = http_request.responseText; }
> 
> 
> 
> That's basically all. Does anyone have an idea why this is happening?
> 
> Thank you in advance,
> Roman
> --
> View this message in context:
> http://www.nabble.com/XmlHttpRequest-and-OpenCms-Direct-Edit-tf2644797
> .html#
> a7383194
> Sent from the OpenCMS - Dev mailing list archive at Nabble.com.
> 
> 
> _______________________________________________
> 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 
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 
> 
> _______________________________________________
> 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 
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 

--
View this message in context:
http://www.nabble.com/XmlHttpRequest-and-OpenCms-Direct-Edit-tf2644797.html#
a7383780
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.


_______________________________________________
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
http://lists.opencms.org/mailman/listinfo/opencms-dev



_______________________________________________
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
http://lists.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list