By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,454 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,454 IT Pros & Developers. It's quick & easy.

Problem with w3c validator in script definition of doPostBack

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.