Is this the expected behavior?
No, at least not on a Mac (could be different on Windows).
What sense does this question make? When you push data to the web viewer through concatenation of "data:text/html," and some calculated HTML code, you already have the content in the calculation. No need to read it out again via web viewer.
Not if I didn't write the content. In this case, I wrote the initial content (HTML form presenting dynamic fields on the layout) and the Data URI is rewritten through a javacript onclick in order to return the HTML form values that I can then parse/import into the database. When I try to grab the "content" it is blank. I can, however, grab the source, but I then have to URL decode it. My understanding was that the "content" would be the current content, but this doesn't appear to be the case.
dbmike ha scritto:
When I try to grab the "content" it is blank.
How did you tried that ?
With a calculation field ?
Aha. Then it makes sense.
So there is probably no way around with the current functionality of GetLayoutObjectAttribute. The HTML source code (aka "content" in GetLayoutObjectAttribute) is what was loaded from the server; the updated DOM is what was added/changed a posteriori in the browser/webviewer memory.
Datum: Thu, 22 Mar 2012 08:18:13 -0700
Betreff: Re: Expected value of Web viewer "content" with data URI?
I am not sure what exactly you mean by that.
Makes sense. The one caveat is that it didn't rewrite content within, it did a window.location with the new "dat:text/html,[content]". So I would think it would be a new page load, not just a DOM change within the page.
In a script using the getlayoutobjectattribute(objectname,attribute) - in my case GetLayoutObjectAttribute("myobject";"content")
I use calculated HTML forms with javascrpt onload script to post data to PHP scipts via web viewer and run in to the same issue (GetLayoutObjectContent is the form HTML rather than the returned values from the PHP script). I agree that it seems that the web viewer content should return the response rather than the initial form. The only way I have found to get the required functionality is via Troi URL plug-in.