Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xf:submission with @method="post" and @replace="all" causes popup error #73

Open
backplane-import opened this issue Oct 16, 2011 · 3 comments

Comments

@backplane-import
Copy link

Imported from backplanejs Google Code issue 73.

Reporter [email protected]
Date 12 Jul 2010 4:38:30 PM UTC

Attached forms demonstrate that when using Internet Explorer and trying to do a POST submission of instance data to a resource, errors occur.

When running the attached files on a local webserver, I expect clicking "Submit" in the test-submission-POST.html form to do the following:

  • Send data to assets/echo.aspx
  • Browser address bar URL change to echo.aspx
  • The posted XML instance is displayed as a tree of XML (as per screen-shot-1.gif).
  • Selecting "View Source" in the browser to show the XML that was submitted

Currently the following happens:

  • Data is sent to echo.aspx (verified with Fiddler)
  • Browser address bar URL stays as test-submission-POST.html
  • Pop-up error 'Runtime Error has occured' (as shown in screen-shot-2.gif)
  • No tree of XML is shown
  • Selecting "View Source" shows the XML that was submitted (* although in other browsers, the original document source is shown)

I've attached the screen shots, the test-submission-POST.html and echo.aspx files that show the behaviour described above.

screen-shot-1.gif shows the results when the formsPlayer plugin is used with the form. I have also attached that form, test-submmission-POST-fp.html.


Priority: High
Type: Defect


Attachments

echo.aspx (592 bytes)
test-submission-POST-fp.html (1.2 KB)
test-submission-POST.html (1.2 KB)
screen-shot-1.gif (34.4 KB)
screen-shot-2.gif (53.8 KB)

@backplane-import
Copy link
Author

Comment by markbirbeck on 15 Jul 2010 3:37:54 PM UTC

Setting module label to 'XForms' and accepting the issue. Also marking it as 'critical' since it is crucial for 1st Software's forms.


Updates

Ticket status set to Accepted

Module: XForms
Priority: High → Critical

@backplane-import
Copy link
Author

Comment by creaven on 4 Aug 2010 3:50:01 PM UTC

errors fixed in http://code.google.com/r/creavenmoro-backplanejs/source/detail?r=9b227d991bef8bccce3ce9b7a3240c491eed4e5c

now it works as described here: http://www.w3.org/TR/2003/REC-xforms-20031014/slice11.html

"For a success response including a body, when the value of the replace attribute on element submission is "all", the event xforms-submit-done is dispatched, and submit processing concludes with entire containing document being replaced with the returned body."

It replaces current document (using document.write):

//submission.prototype.processResult
case "all":
oObserver.ownerDocument.logger.log("@replace = 'all'", "submission");

if (oResult.method === "PUT") {
    document.location.href = oResult.resourceURI;
} else {
    this.replaceDocumentContent(sData); // replace document
}
break;

//submission.prototype.replaceDocumentContent
document.write(data);
document.close();

@backplane-import
Copy link
Author

Update by markbirbeck on 4 Aug 2010 5:45:41 PM UTC

Owner set to creaven

Ticket status set to FixPending

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant