eventtarget is null or is not an object

G

Guest

I install the framework SP1 as descrbed in the following article ... but i
still get the same problem.

Any suggestion ?



--
Thanks Karl



Karl said:
This is a known bug in ASP.Net 1.1, there's a hotfix to fix it.
Alternatively, you can write a simple class to fix it.
Note on the bug:
http://support.microsoft.com/default.aspx?kbid=817779

Server control to fix it:
public class NoBugForm : HtmlForm {
public override string UniqueID {
get {
string id = base.UniqueID;
return id.Substring((id.LastIndexOf(":") + 1));
}
}
}


If you are building an application that'll go out to client, using the
NoBugForm instead of a normal form is a safer bet unless you can guarantee
they'll have that hotfix.

Karl

Manoj Mathew said:
I get a javascript error while loading an ASP.Net page. The page
contains
a
form to which ASP.Net inserts a name which has ":" charachter. The
javascript generated by ASP.Net gives an error of an Expected ";". The
javascript code generated is

function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1)
{
theform = document.forms["_ctl0:_ctl0:MediaPartnerForm136"];
}
else
{
theform = document._ctl0:_ctl0:MediaPartnerForm136;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}


The form has the attributes

<form name="_ctl0:_ctl0:MediaPartnerForm136" method="post"
action="lightbox.aspx" id="_ctl0__ctl0_MediaPartnerForm136">

Can someone give me some insight on this if this can be handled?


Manoj
 
G

Guest

Sorry for the brief description .... But when I post the message I was
hurried ... and probably i refer to the wrong bug.
Now I try to be more precise .... hoping that someone could help me.
I get a java script error on Internet Explorer when changing the index of a
drop down list control inside a form.
the error is: __EVENTTARGET is null or is not an object
The code is auto generated by the framework library, and the error is in the
following function:


<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();
}
// -->
</script>

the error is on the line: theform.__EVENTTARGET.value =
eventTarget.split("$").join(":");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top