473,387 Members | 1,512 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,387 software developers and data experts.

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="javascript" type="text/javascript">
---------------------
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
and IIS on Windows 2003 generates:

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

Lot of thanks
Alfonso Alvarez Pérez
Nov 18 '05 #1
2 2045
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**************@TK2MSFTNGP09.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="javascript" type="text/javascript">
---------------------
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
and IIS on Windows 2003 generates:

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("n etscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.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**************@TK2MSFTNGP12.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**************@TK2MSFTNGP09.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="javascript" type="text/javascript">
---------------------
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) { theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
and IIS on Windows 2003 generates:

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("n etscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.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
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...
16
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...
1
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...
6
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...
8
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...
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 : ...
3
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...
5
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...

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.