Change to _doPostBack

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
 
B

bruce barker

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,477
Members
44,898
Latest member
BlairH7607

Latest Threads

Top