Change to _doPostBack

  • Thread starter Thread starter david
  • Start date Start date
D

david

hi...

When using the .net framework 1.x, the _doPostBack server-generated
Javascript used to contain a test for the browser type:

function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft")
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}

But now, in VS2005, with .net framework 2.x, it seems to have lost the
brower test:

function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}

That appears to cause postbacks from pulldown menus not to execute
properly on Firefox, for example...perhaps.

Any idea why the change, or if that can be fixed with a setting?

thanks...
dave
 
in the old code, theForm was a local variable. in the new its a global. also
the old code default to IE mode then w3c, which causes problems with IE 7
(which is almost w3c compliant). so the new code tries w3c then IE. thus
the new code defaults to the firefox way first, then IE, so it should not
cause any problems, look elsewhere.

-- bruce (sqlwork.com)





hi...

When using the .net framework 1.x, the _doPostBack server-generated
Javascript used to contain a test for the browser type:

function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft")
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}

But now, in VS2005, with .net framework 2.x, it seems to have lost the
brower test:

function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}

That appears to cause postbacks from pulldown menus not to execute
properly on Firefox, for example...perhaps.

Any idea why the change, or if that can be fixed with a setting?

thanks...
dave
 
Back
Top