Hi All.
This is my first post, so don't be angry with me if I do something wrong.
I am using XSP on Cocoon 2.0.3, and I want to do the following:
given a name of the html file that contains javascript, I want to get the result of this javascript and
put it inside some element in XSP. But when I write the following code in XSP using javascript:
<p>
    <xsp:logic>
        var js = window.open("given-file.html");
        var result = js.document.body.innerHTML;
    </xsp:logic>
    <xsp:expr>result</xsp:expr>
</p>
 
nothing happens (even doesn't give any error).
If I am using this code inside an html file's script tag, it works fine.
If I am trying some simple Javascript functions in XSP (e.g. Date()), it works.
Maybe there is some problem with opening files in XSP?
 
Can somebody please tell me what am I doing wrong and how can I get the result of javascript code executed in some given file?
 
Thank you very much in advance.
 
Anna

Reply via email to