Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

Error: "_EVENTTARGET is null or not an object

Hi

I have a list control in a aspx page
<asp:ListBox id="ListBox1" runat="server" Rows="1" AutoPostBack="True">
<asp:ListItem Value=1>one</asp:ListItem>
<asp:ListItem Value=2>two</asp:ListItem>
</asp:ListBox>

When i select the dropdown, i get an javascript error "_EVENTTARGET is null or not an object". Same page has another control which does AutoPostBack without a problem. Any idea?

thanks
vj
0
sansoftura
Asked:
sansoftura
  • 5
  • 2
  • 2
  • +2
1 Solution
 
b1xml2Commented:
sounds like some dodgy client-side code trying to do some thing out of the ordinary.
0
 
raterusCommented:
I've gotten this sometimes when I've forgotten to end all statements of my own client-side code with semicolons ;
0
 
sansofturaAuthor Commented:
I dont have do anything in the client side. Can the a page have more than one autopostback? count that be a problem? - vj
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
laotzi2000Commented:
You should post the source code of html
IN BROWSER, not the .aspx file
0
 
sansofturaAuthor Commented:
Here is the HTML code
<select name="ListBox1" size="1" onchange="__doPostBack('ListBox1','')" language="javascript" id="ListBox1">
<option value="1">One</option>
<option value="2">Two</option>
</select>
0
 
laotzi2000Commented:
seems quite normal here.

Is the other control which does autopostback in the same form as this one?
0
 
sansofturaAuthor Commented:
I believe the problem is because of the aspnet_client javascript files got Corrupt. I am trying to install .NET framework and install it again. Will post if ithat works. Thanks to all.
0
 
raterusCommented:
aspnet_regiis -c will do that for you, no need to reinstall everything.  But I bet you already did that :-)
0
 
sansofturaAuthor Commented:
thanks i tired aspnet_regiis -c that still i am having the problem. One of the solution in the link http://dotnetjunkies.com/WebLog/donnymack/archive/2004/02/01/6424.aspx is to reinstall .NEtFramework and IIS.
0
 
sansofturaAuthor Commented:
I had the form tag declared above the body tag in the aspx page.(dont know how it got that way. may be ctrl+c ctrl+v) Any way the issue "_EVENTTARGET is null or not an object" is fixed. Anyone having similar issue, go through the code and see if you have the html tags in correct order. Also run it thru second pair of eyes. -vj

--- case closed ---
0
 
moduloCommented:
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now