1

Got myself a bit of a problem (only occurring in Tomcat 8.5, but I'll need to handle it)...

I'm trying to open up a dojox.widget.DialogSimple, using an href, that has a long url/data string. Setting the HREF on instantiation causes it to fail as a malformed URL, because it's too long. So, I want to be able to do it as an xhrPost. Is there a way to set this up using the ioArgs property? I haven't been able to find any documentation giving examples of this.

1 Answers1

1

You are correct. An over-long URL string for an HTTP "GET" can cause problems: Web Services: maximum length of HTTP GET request?. In general, the solution is to do a "POST" instead.

Would this solution work for you?

Dojo - how to submit data using a Dialog form

<div dojotype="dijit.Dialog" id="subscription" title="subscription form" execute="alert('Transmitted');">
  <form action="PATH_TO_PHP_PAGE" method="POST">
      <!--input widgets-->
      <!--submit button widgets-->
  </form>
</div>
paulsm4
  • 114,292
  • 17
  • 138
  • 190
  • Hi paulsm4. Yeah, that would work, if it occurred only in one location in my application. I have a generic function call that creates dialogs, that is used all over the application, and this is where the trouble lies. I need to be able to handle it there... I'd like the dialog object to execute an xhrPost rather than a xhrGet.... – Dan Piccolo Jul 07 '17 at 18:46
  • You didn't mention that in your original post;) Q: Why not create your own Dijit? A Dojo widget is the combination of 1) .js + 2) .html. It sounds like EXACTLY what you're looking for. Here's a brief tutorial: https://www.ibm.com/support/knowledgecenter/en/SSRTLW_9.0.0/com.ibm.rad.samptut.doc/tutorials/web/topics/dojo_lesson7.html – paulsm4 Jul 08 '17 at 04:07