R
rrichard
Hello,
I have the (apparently) same ASP .NET ASPX page running on two different
servers. I have checked the framework versions, and they are the same. (both
2.1.21022). I have a drop down listbox control that in the selected index
changed handler populates another drop down list box with data. On one server
it works, and the other I get a javascript error "Invalid character."
Upon viewing the source when the page is rendered, I noticed that on the
server which WORKS, the code looks like this:
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
On the page that fails, it looks like this:
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
The only thing I can think is we are missing something with the versions
here?Please advise, and thanks in advance.
I have the (apparently) same ASP .NET ASPX page running on two different
servers. I have checked the framework versions, and they are the same. (both
2.1.21022). I have a drop down listbox control that in the selected index
changed handler populates another drop down list box with data. On one server
it works, and the other I get a javascript error "Invalid character."
Upon viewing the source when the page is rendered, I noticed that on the
server which WORKS, the code looks like this:
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
On the page that fails, it looks like this:
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
The only thing I can think is we are missing something with the versions
here?Please advise, and thanks in advance.