473,418 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Where is __doPostBack defined?

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("m icrosoft")
-1) {

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("n etscape") >
-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?
Nov 17 '05 #1
0 1510

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: E | last post by:
I have 2 aspx pages... neither of which do anything out of the ordinary. One of the pages automatically generates this block of code when viewed at the client:...
15
by: Steven Livingstone | last post by:
I am running into the "colon in javascript" problem as discussed here http://www.bdragon.com/entries/000324.shtml. Basically, i have nested controls and get the error on a line such as : ...
1
by: Adrian | last post by:
I appear to be losing ViewState information when calling the __doPostBack function. I am attempting to use the showModalDialog to load a new web page which confirms that a user wishes to save a...
3
by: Marcelo | last post by:
Hello, I am trying to create a postback event, and it is working, just not calling the sub. I have a datagrid which has <asp:DataGrid id="Mensajes" ... <Columns> <asp:HyperLinkColumn ....
3
by: Steve Wonderful | last post by:
I checked the rendered html and found __doPostBack() function was not found in the html source. Is there a reason? How do I force it to be generated. The page seems to function properly for post...
1
by: Philip | last post by:
I am attempting to use the ASP.NET generated __doPostBack JavaScript function in my custom JavaScript and I can use it successfully but only after the web page is loaded and idle. I prefer to...
0
by: AncaT | last post by:
Hi, I have just started working w/ asp.net, vb.net. I have a .aspx page that contains user defined controls. Inside these controls, I have a 'Delete' hyperlink. This is the code: Inside...
0
by: =?Utf-8?B?Uml0YUc=?= | last post by:
Hello. I'm maintaining a C# Web based project that has a class which adds a "Show All" / "Show By Page" functionality to a datagrid that allows paginating. This class works when there are...
0
by: codeshelp | last post by:
I have a gridview that has a ButtonField(Insert) that calls a detailsview which allows you to insert data to the gridview. The postback for this buttonField is:...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.