Web Connection
__doPostback
Gravatar is a globally recognized avatar based on your email address. __doPostback
  Stein Goering
  All
  May 17, 2023 @ 04:50am

A blast from the past with one of my Web Control Framework pages. I have enabled the AutoPostBack property for a WebRadioButtonList control. This renders as:

<input type="radio" id="radSuggestProxy_1" name="radSuggestProxy" onclick="__doPostBack('radSuggestProxy','change','')" value="XW0020299">

This works fine except one of our customers added their own scripting to the page and we now get this warning when trying that selection:

Form submission cancelled because the form is not connected

with a reference to __doPostBack.
Any idea how to work around that? I can't even figure out where the __doPostBack routine comes from.

--sg

Gravatar is a globally recognized avatar based on your email address. re: __doPostback
  Rick Strahl
  Stein Goering
  May 17, 2023 @ 06:16am

__doPostBack gets generated into the page when the HTML is rendered.

Form submission cancelled because the form is not connected

This sounds like something related to some client side framework, not from Web Connection.

This probably isn't just some script they are running, but some probably some sort of SPA framework, and the framework is getting confused by the overridden onsubmit handling of __doPostBack.

You'll need to figure out what is actually going wrong by looking at JavaScript the code running in the page.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: __doPostback
  Stein Goering
  Rick Strahl
  May 19, 2023 @ 04:14pm

Yes, in fact they were loading the Vue.js library. Evidently they were calling a Vue function when rendering the mobile display. We got them to drop Vue and use jQuery instead.

--sg

Gravatar is a globally recognized avatar based on your email address. re: __doPostback
  Rick Strahl
  Stein Goering
  May 20, 2023 @ 11:27am

You can use Vue with Web Connection, but you have to understand the page life cycle. I suspect they updated some data of the page that from outside of Vue or wrapped the Vue root element around the form that submits to the server.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: __doPostback
  Stein Goering
  Stein Goering
  May 25, 2023 @ 07:24am

We have app pages that use Vue, adapted from your SWFox session examples. It plays fine with WC when properly integrated but there was no attempt to do that in this case.

© 1996-2024