473,324 Members | 2,313 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,324 software developers and data experts.

eventtarget is null or is not an object

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

Any suggestion ?
Note on the bug:
http://support.microsoft.com/default.aspx?kbid=817779
--
Thanks Karl

"Karl" <none> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl... 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" <ma**********@persisten.co.in> wrote in message
news:e5*************@TK2MSFTNGP09.phx.gbl...
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("n etscape") > -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




Nov 18 '05 #1
1 5469
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("m icrosoft") > -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(":");
Nov 18 '05 #2

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

Similar topics

99
by: Mikhail Teterin | last post by:
Hello! Consider the following simple accessor function: typedef struct { int i; char name; } MY_TYPE; const char *
5
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream...
1
by: MeDhanush | last post by:
Can sb pl tell me When & how do you use i) RegisterHiddenField() ii) Hidden field EVENTTARGET iii) Hidden fieldEVENTARGUMENT I noticed ii) and iii) in the form. Any docs pointing to this...
64
by: yossi.kreinin | last post by:
Hi! There is a system where 0x0 is a valid address, but 0xffffffff isn't. How can null pointers be treated by a compiler (besides the typical "solution" of still using 0x0 for "null")? -...
3
by: toton | last post by:
Hi, In some cases when my function returns, I need to return a object of null state. This is when I return object by value. (Just like for by pointer, I can return a null pointer ). It has to be...
46
by: lovecreatesbea... | last post by:
Do you prefer malloc or calloc? p = malloc(size); Which of the following two is right to get same storage same as the above call? p = calloc(1, size); p = calloc(size, 1);
11
by: MikeT | last post by:
This may sound very elementary, but can you trap when your object is set to null within the object? I have created a class that registers an event from an object passed in the constructor. When...
9
by: Francois Grieu | last post by:
When running the following code under MinGW, I get realloc(p,0) returned NULL Is that a non-conformance? TIA, Francois Grieu #include <stdio.h> #include <stdlib.h>
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.