473,698 Members | 2,198 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OnSelectedIndex Changed on DDL not working? IE6.0.2 bug?

I have a strange problem. It seems that for some reason, a
OnSelectedIndex Changed event is no producing an error in IE6. What concerns
me is that I just performed that large Windows update a couple of weeks ago
and it updated ActiveX "stuff" in IE. I'm not sure if the update has
effected IE or there's something wrong with mt .net application.

I have a simple DDL. It calls a sub when the value in the DDL is changed.
Now, when I change the value, IE displays the js error msg box and says:

'event' is null or not an object.Line X, character X.

It gets weird. It refers to a place in my code that makes no sense. There's
no javascript or anything .net generated on line X. Furthermore, I deleted
massive amounts of makr up code as a test. I wanted to see if the reference
to line x changed. I refreshed and tested the page. Same error even though
a 100+ lines of code are now gone (html), it still references to the same
place in my code! The page works fine as it always did in Firefox 1.5.

My simple code:

<asp:DropDownLi st ID="ddlCapitalI tems" runat="server" BackColor="#FFF FFF"
Font-Names="Verdana, Arial" Font-Size="8pt" AutoPostBack="T rue"
OnSelectedIndex Changed="ddlCap italItems_Selec tedIndexChange" />

Protected Sub ddlCapitalItems _SelectedIndexC hange(ByVal Sender As Object,
ByVal E As EventArgs)

'------------------------------------------------------------------------------------

'- This sub routine is called when the Capital Items Drop Down List is
changed. -

'- If checks to see if the user selected "Other" and if so, it will enable
the -

'- the txtOtherDesc control and related validation controls. -

'------------------------------------------------------------------------------------

If ddlCapitalItems .SelectedValue = 1 Then

txtOtherDesc.En abled = True

txtOtherDesc.Te xt = ""

OtherDescRequir ed.Enabled = True

Else

txtOtherDesc.En abled = False

txtOtherDesc.Te xt = "Not Required"

OtherDescRequir ed.Enabled = False

End If

End Sub


May 17 '06 #1
1 1864
to add additional info. I tested my page on someone else's PC with IE6 and
it fails there too. Make me think it is not the Windows update but rather
my application. I whipped up a quick test page like below and it works
fine.

Any ideas?? Thanks!


<%@ Page Language="VB" %>

<script runat="server">

Protected Sub DropDownList1_S electedIndexCha nged(ByVal sender As Object,
ByVal e As System.EventArg s)

Label1.Text = DropDownList1.S electedValue

End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitl ed Page</title>

</head>

<body>

<form runat="server">

&nbsp;<asp:Labe l ID="Label1" runat="server" Text="Label"></asp:Label><br />

<br />

<br />

<asp:DropDownLi st ID="DropDownLis t1" runat="server"
OnSelectedIndex Changed="DropDo wnList1_Selecte dIndexChanged"
AutoPostBack="t rue">

<asp:ListItem>R ed</asp:ListItem>

<asp:ListItem>B lue</asp:ListItem>

</asp:DropDownLis t>

</form>

</body>

</html>



"Groove" <no***@noemail. com> wrote in message
news:O5******** ******@TK2MSFTN GP05.phx.gbl...
I have a strange problem. It seems that for some reason, a
OnSelectedInde xChanged event is no producing an error in IE6. What
concerns me is that I just performed that large Windows update a couple of
weeks ago and it updated ActiveX "stuff" in IE. I'm not sure if the update
has effected IE or there's something wrong with mt .net application.

I have a simple DDL. It calls a sub when the value in the DDL is changed.
Now, when I change the value, IE displays the js error msg box and says:

'event' is null or not an object.Line X, character X.

It gets weird. It refers to a place in my code that makes no sense.
There's no javascript or anything .net generated on line X. Furthermore,
I deleted massive amounts of makr up code as a test. I wanted to see if
the reference to line x changed. I refreshed and tested the page. Same
error even though a 100+ lines of code are now gone (html), it still
references to the same place in my code! The page works fine as it always
did in Firefox 1.5.

My simple code:

<asp:DropDownLi st ID="ddlCapitalI tems" runat="server" BackColor="#FFF FFF"
Font-Names="Verdana, Arial" Font-Size="8pt" AutoPostBack="T rue"
OnSelectedIndex Changed="ddlCap italItems_Selec tedIndexChange" />

Protected Sub ddlCapitalItems _SelectedIndexC hange(ByVal Sender As Object,
ByVal E As EventArgs)

'------------------------------------------------------------------------------------

'- This sub routine is called when the Capital Items Drop Down List is
changed. -

'- If checks to see if the user selected "Other" and if so, it will enable
the -

'- the txtOtherDesc control and related validation controls. -

'------------------------------------------------------------------------------------

If ddlCapitalItems .SelectedValue = 1 Then

txtOtherDesc.En abled = True

txtOtherDesc.Te xt = ""

OtherDescRequir ed.Enabled = True

Else

txtOtherDesc.En abled = False

txtOtherDesc.Te xt = "Not Required"

OtherDescRequir ed.Enabled = False

End If

End Sub


May 17 '06 #2

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

Similar topics

0
1497
by: Jon Maz | last post by:
Hi, I have a user control which contains a DropDownList, and I want to be able to set the OnSelectedIndexChanged method of the DDL in the User Control from the holding aspx page. Depending on which aspx page is holding the user control, the name of the method to be called when this event fires is different, so I want to pass the name of the method to the DDL via a public property of the User Control.
6
7747
by: DotNetGruven | last post by:
I have a webform that has a DataGrid on it with a RadioButtonList in each row. It is a simple On & Off. When the User Clicks on either of the RadioButtons, I need to postback to the server and update the database. Here is the control containment hierarchy: ASP Page Static User Control // just provides a pretty border around
6
2064
by: srallen | last post by:
I have a simple page that has a dropdown with autopostback=true and onselectedindexchanged is set to a function that never gets called (checked during debug). This page is subclassed from custom class of mine that I subclassed from Page. I have overridden a couple of methods (OnPreRender, OnUnload, OnInit) to provide for html template layout, all of the base functions are called as well. Can anyone lend some help as to why the...
2
1634
by: bienwell | last post by:
Hi, Does the OnSelectedIndexChanged event work when we mark on the checkbox on the cell of Datagrid control ? I tried to call this event; it didn't affect anything. Do you know any event that make the selection on the checkbox work ? Please give me your advise. Thanks
1
5067
by: RedGST | last post by:
Hello, Im somewhat new to asp.net, so bear with me. I have created a form that has a Listbox along with 2 command buttons & a few other non-important controls. The command button is tied to the OnClick Event. My problem is that when the command button is clicked, the Listbox OnSelectedIndexChanged event gets fired before the command buttons OnClick
1
4421
by: Paul L | last post by:
Hi, I have an issue with the OnSelectedIndexChanged event not firing for a DropDownList control which is in the ItemTemplate of a DataList. I have made an exact copy of the DropDownList control, and placed it outside of the DataList and it fires the event just fine. So it's definitely to do with it being in a template. I've managed to reproduce the issue on a small test app, the code and html is below:
0
1723
by: Bengt-Erik Eliasson | last post by:
Hi! In a DataGrid I have a 'Add New'-field in the footer. I want to hide an control (txtNewFe_name) if the value of cmbNewFe_num is >0. How do I do that? The OnSelectedIndexChanged does not seem to response to anything, even though I tryed with just: Function CheckFe_num() Response.Write("Hello World!") End Function
2
16092
by: glenn | last post by:
Hi folks, I am trying to determine which item in a DropDownList Web control has been selected. I have posted an OnSelectedIndexChanged subroutine in my code with a reference to the subroutine in my asp tag as shown here: <asp:DropDownList id="ddlTo" runat="server"
0
1509
by: Groove | last post by:
(repost!) I have a simple and common scenario. I'm developing pages in VWD and FTP-ing them over to a test servr running Window 2003, NET2 Framework. On my page, I have a DDL that causes a postback and executes a sub when the value has changed. For some reason, it just quit working. I get a js error in IE6 (but NOT in FF 1.5) and gives me a vague error about: 'event' is null or not an object.Line X, character X.
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.