473,654 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with w3c validator in script definition of doPostBack

Hi:
I'm doing a web page using asp.net and framework 1.1. When I upload the
page to server and try it with html validator of w3c, trying with html 4.01
an xhtml 1.0, I receive an error in the script definition of __doPostBack
method because de element type is not defined. This script is automatically
generated by the compiler or by the server.
I used the same page into an IIS over windows XP and generates correct
code (script with element type). The problem becomes when I use the page
into an IIS over windows 2003, the script generated in that case not
includes the element type. The framework of both versions are the same:
1.1.4322.
Is there any way to configure this definition?

It must be:
<script language="javas cript" type="text/javascript">
---------------------
<!--
function __doPostBack(ev entTarget, eventArgument) {
var theform;
if (window.navigat or.appName.toLo werCase().index Of("microsoft" ) > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
theform.__EVENT ARGUMENT.value = eventArgument;
theform.submit( );
}
// -->
</script>
and IIS on Windows 2003 generates:

<script language="javas cript">
<!--
function __doPostBack(ev entTarget, eventArgument) {
var theform;
if (window.navigat or.appName.toLo werCase().index Of("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
theform.__EVENT ARGUMENT.value = eventArgument;
theform.submit( );
}
// -->
</script>

Lot of thanks
Alfonso Alvarez Pérez
Nov 18 '05 #1
2 2052
its actually worse, the hidden fields:

__EVENTTARGET
__EVENTARGUMENT

are not legal element id's or names.

-- bruce (sqlwork.com)


"Alfonso Alvarez" <fo***@futuver. com> wrote in message
news:uc******** ******@TK2MSFTN GP09.phx.gbl...
Hi:
I'm doing a web page using asp.net and framework 1.1. When I upload the page to server and try it with html validator of w3c, trying with html 4.01 an xhtml 1.0, I receive an error in the script definition of __doPostBack
method because de element type is not defined. This script is automatically generated by the compiler or by the server.
I used the same page into an IIS over windows XP and generates correct
code (script with element type). The problem becomes when I use the page
into an IIS over windows 2003, the script generated in that case not
includes the element type. The framework of both versions are the same:
1.1.4322.
Is there any way to configure this definition?

It must be:
<script language="javas cript" type="text/javascript">
---------------------
<!--
function __doPostBack(ev entTarget, eventArgument) {
var theform;
if (window.navigat or.appName.toLo werCase().index Of("microsoft" ) > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
theform.__EVENT ARGUMENT.value = eventArgument;
theform.submit( );
}
// -->
</script>
and IIS on Windows 2003 generates:

<script language="javas cript">
<!--
function __doPostBack(ev entTarget, eventArgument) {
var theform;
if (window.navigat or.appName.toLo werCase().index Of("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
theform.__EVENT ARGUMENT.value = eventArgument;
theform.submit( );
}
// -->
</script>

Lot of thanks
Alfonso Alvarez Pérez

Nov 18 '05 #2
Hi:
I don't understand your response. My problem (by now) is not this
fields. The problem becomes before in de script definition.
Anyway, this fields are created by server into the html page that
returns.
Thanks
Alfonso Alvarez

"bruce barker" <no***********@ safeco.com> escribió en el mensaje
news:uN******** ******@TK2MSFTN GP12.phx.gbl...
its actually worse, the hidden fields:

__EVENTTARGET
__EVENTARGUMENT

are not legal element id's or names.

-- bruce (sqlwork.com)


"Alfonso Alvarez" <fo***@futuver. com> wrote in message
news:uc******** ******@TK2MSFTN GP09.phx.gbl...
Hi:
I'm doing a web page using asp.net and framework 1.1. When I upload

the
page to server and try it with html validator of w3c, trying with html

4.01
an xhtml 1.0, I receive an error in the script definition of __doPostBack method because de element type is not defined. This script is

automatically
generated by the compiler or by the server.
I used the same page into an IIS over windows XP and generates correct code (script with element type). The problem becomes when I use the page
into an IIS over windows 2003, the script generated in that case not
includes the element type. The framework of both versions are the same:
1.1.4322.
Is there any way to configure this definition?

It must be:
<script language="javas cript" type="text/javascript">
---------------------
<!--
function __doPostBack(ev entTarget, eventArgument) {
var theform;
if (window.navigat or.appName.toLo werCase().index Of("microsoft" ) > -1) { theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
theform.__EVENT ARGUMENT.value = eventArgument;
theform.submit( );
}
// -->
</script>
and IIS on Windows 2003 generates:

<script language="javas cript">
<!--
function __doPostBack(ev entTarget, eventArgument) {
var theform;
if (window.navigat or.appName.toLo werCase().index Of("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
theform.__EVENT ARGUMENT.value = eventArgument;
theform.submit( );
}
// -->
</script>

Lot of thanks
Alfonso Alvarez Pérez


Nov 18 '05 #3

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

Similar topics

11
1836
by: Jonny | last post by:
Netscape 7.02 is giving me a headache with a downloaded snow script. Starting with a blank page, I inserted the script and checked it in IE 6 and Netscape 7.02. Everything worked and looked fine. A check on CPU usage (Windows Task Manager>Performance) gave a 0% to 2% reading for both browsers on a Pentium 4, 3.06GHz running XP. As I added text, images, tiled background and so on. I noticed the mouse was becoming jerky in Netscape 7....
16
2279
by: Dave | last post by:
Hello all, I'm getting a strange error when I try to validate my page(s). The error occurs when I use SELECT and INPUT tags inside of the FORM tag. I am trying to use the XHTML 1.0 Strict standard. I am also using ColdFusion, but I having been using regular FORM tags instead of the proprietary CFFORM tags. If you can't put SELECT and INPUT tags inside of the FORM tag, where are you supposed to put them??? Take a look and tell me what...
1
2018
by: fuzzyman | last post by:
I have a very odd problem that has boggled my head. I've been trying to get a 2 column layout working with CSS. The problem seems to occur with the use of the <script> tag in the document. I've been reworking the CSS to use percentages rather than fixed widths. I'd like a two column page with header, footer, main body -with sidebar. I'd like the sidebar to have a fixed size and the mainbody to follow the browser window size *preferably*...
6
4840
by: MickG | last post by:
Hi, I am trying to validate these values, this seems to work fine for the phone number and name but I am trying to get the program to fail to submit and set the focus on the date when 2006 is selected and submitted. Thanks in advance for any help.
8
2022
by: fuzzyman | last post by:
I have a very odd problem that has boggled my head. I've been trying to get a 2 column layout working with CSS. The problem seems to occur with the use of the <script> tag in the document, not the CSS. I've been reworking the CSS to use percentages rather than fixed widths. I'd like a two column page with header, footer, main body -with sidebar. I'd like the sidebar to have a fixed size and the mainbody to follow the browser window size...
15
1959
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 : theform = document._ctl0:frmPage; I noticed a solution at http://msdn.microsoft.com/msdnmag/issues/02/10/WebQA/ However, this seems like a heck of an overhead for every page!
3
4106
by: Mad Scientist Jr | last post by:
I have some javascript I would like to run after a doPostBack occurs: onchange="javascript:__doPostBack('Text1','');" The doPostBack is being added dynamically by .NET when it renders the control. If anyone can tell me how to tell .NET to add the doPostBack BEFORE any javascript in the onchange event, it would be most appreciated.
5
1300
by: bspittles | last post by:
Can anyone tell me why the following script doesn't work in Firefox 1.5 (not sure about other versions) when it works fine in IE6 and Netscapes 7.1? Almost as importantly ;) can ayone tell me how to fix it? <script language=javascript> function showphoto(pic, player, w, h, winname) { photowin = window.open("",winname, "menubar=no,width=" + w + ",height=" + h + ",resize=no"); photowin.document.write("<HTML><HEAD><TITLE>" + player +
0
1189
by: Dhanashree | last post by:
I have a RangeValidator which uses AJAX to call server-side validation function from the client. The code works fine, but I have one problem. following is my range validator class: public class RangeValidator: BaseValidator,ICallbackEventHandler { public event ServerValidateEventHandler ServerValidate; String _controlToValidateValue;
0
8379
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8709
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7309
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.