Where is __doPostBack defined?

F

Frankieboy

Where is __doPostBack-function defined?

I've got an application which generates a different
__doPostBack-function when the code is being run on the server
compared to the one on my laptop. The version on server generates a
script-error in the __doPostBack, while it runs without any problem on
my developer-machine.

The server is a Windows 2003 Server Standard Edition, while my
developer machine is Windows XP Professional. Visual Studio.Net is
installed on the developer machine.

When checking folders on server I find that there is a folder
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322. I interpret this as the
server is running version 1.1.4322 of .net, which actually is the same
that seems to be running on the developer-machine.

Code on developer-machine is testing for Microsoft, and has a slightly
different synthax related to forms (probably because this one tests
for Netscape):

DEVELOPER-MACHINE:
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft")
theform = document.__aspnetForm;
}
else {
theform = document.forms["__aspnetForm"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>



SERVER:
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") >
-1) {
theform = document.forms["defaultframeworkefaultForm"];
}
else {
theform = document.defaultframeworkefaultForm;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>

Is there a way of altering the __doPostBack, to make these similar?
 

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

Top