OnChange and DropDownList's - event not being dispatched

I can't get an onChange event to fire when making a ListItem selection in a DropDownList control. Am I doing something wrong? (I'm running XP Pro 32bit)
     var dlg = new Window('dialog');
     var pnl = dlg.add('panel');
     var myDDList1 = pnl.add('dropdownlist',undefined,['one', 'two', 'three'], {name: 'ddList1'});
     myDDList1.addEventListener('change', myFunction);
     var myDDList2 = pnl.add('dropdownlist',undefined,['one', 'two', 'three'], {name:'ddList2'});
     myDDList2.addEventListener('change', myFunction);
     var myDDList3 = pnl.add('dropdownlist',undefined,['one', 'two', 'three'], {name:'ddList3'});
     myDDList3.addEventListener('change', myFunction);
      function myFunction(ev)
          var ddl = ev.target;
          var props = ddl.properties;
          if(props.hasOwnProperty('name'))
               switch(props.name)
                    case 'ddList1':
                        alert ('change made in ddList1');
                    break;
                    case 'ddList2':
                        alert ('change made in ddList2');
                    break;
                    case 'ddList3':
                        alert ('change made in ddList3');
                    break;
          ddl = null;
          props = null;
     dlg.show();

Thank you, that works perfectly. Is it because invoking the function using this method
myDDList1.onChange = myFunction;
the onChange Event actually contains a copy of myFunction(), and the this keyword used in the function is a reference to the element the onChange event is registered to; in this case myDDList1? Whereas, invoking the function using this method
myDDList1.addEventListenter('change', myFunction);
myFunction() is not copied, but only referred to when the onChange event happens? Still not sure why it wouldn't work, though. Mousedown, mouseover, and other Events trigger the function using this method and event.target can be used to refer to the element that triggered the Event.
Thanks again!

Similar Messages

  • [svn:osmf:] 14473: Adding a 'dispatchInitialChangeEvent' parameter to the ' watch' method in order to allow the initial change event from being dispatched.

    Revision: 14473
    Revision: 14473
    Author:   [email protected]
    Date:     2010-02-28 23:45:28 -0800 (Sun, 28 Feb 2010)
    Log Message:
    Adding a 'dispatchInitialChangeEvent' parameter to the 'watch' method in order to allow the initial change event from being dispatched.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/metadata/MetadataWatcher.as

    Perhaps you're not handling the "EndOfStreamEvent" correctly/at all, and thus not freeing up the socket to listen for the "NewReceiveStreamEvent " after the initial stream has ended...
    ?

  • All day calendar events not being displayed in the notification centre for iphone 5 post ios 7 upgrade. Please help. Is it a bug?

    All day calendar events not being displayed in the notification centre for iphone 5 post ios 7 upgrade. Please help. Is it a bug?
    With iOS 6, the all day events showed up in the notification centre but it lacks in the upgrade iOS 7.

    Same problem here. Some people pointed out that all-day events do show up in their notification center, but that seems only to be the case for birthdays (and only as text like the weather). I've tried it myself on my iPhone and iPad and it did work for birthdays but not for any other all-day events. I already sent this to Apple as a product feedback as well, as should everyone of you. The more people mention it, the faster Apple's going to fix this issue. In its current state, notification center is not a very helpful feature in my opinion. There's absolutely no point in not showing all-day events in the 'today' calendar overview.
    Here's a link to the product feedback page: http://www.apple.com/feedback/
    I posted my message in the iPhone section since I couldn't find a page specifically dedicated to iOS 7.
    I really love the look & feel of iOS 7 but it's kinda sad to see notification center not tapping its full potential.
    Cheers!

  • The apexafterrefresh event not being fired in Chart IR's

    Hi all,
    I am adding additional functionality to IR reports using the plug-in architecture in Apex 4.1.1. A Dynamic action has been added to the "After Refresh" event for the #apexir_WORKSHEET_REGION jQuery selector.
    This works fine in all cases except when no data is found in the report. This has been fixed in 4.2 so I can live with this until the upgrade. However, it also does not work when a chart is created in the report, the apexafterrefresh event does not get raised. Therefore my dynamic action will not fire. Looking at the apex_interactive_reports_4_1.js this event gets raised for the table element with an ID stored in apexir_WORKSHEET_ID ie:
    apex.jQuery('#' + $v("apexir_WORKSHEET_ID")).trigger('apexafterrefresh', that.report_id);However this table element does not get rendered when a Chart is displayed and therefore the apexafterrefresh will not get raised.
    In apex 4.2 the widget.interactiveReport.js has been modified to handle the no data found but not charts:
    var lTriggeringElement$, lWorksheetId;
                            lWorksheetId = $v( "apexir_WORKSHEET_ID" );
                            if ( $x( lWorksheetId ) ) {
                                // If the table element containing data exists (ie when the report returns rows),
                                // use that to trigger the event.
                                lTriggeringElement$ = apex.jQuery( '#' + lWorksheetId );
                            } else {
                                // Otherwise, use the span holding the no data found message.
                                lTriggeringElement$ = apex.jQuery( '#apexir_NO_DATA_FOUND_MSG' );
                            lTriggeringElement$.trigger( 'apexafterrefresh', that.report_id );I have created a test case on apex.oracle.com - http://apex.oracle.com/pls/apex/f?p=41357:1 In this example I simply display an alert from a Dynamic action with the following attributes:
    Event - After Refresh
    Selection Type - Region
    Region - Interactive Report
    As can be seen when the user navigates to the report the alert displays, however when you navigate to the Chart the alert does not display.
    In my mind this is a bug and the IR reports JavaScript should be modified to raise the event apexir_WORKSHEET DIV Element instead. This would fix both issues.
    Any ideas on how to overcome this issue?
    Thanks
    Chris.

    For everyone's information Bug 16029272 - ALERT (APEXAFTERREFRESH EVENT) NOT BEING FIRED IN CHART OF INTERACTIVE REPORTS has been raised regarding this issue.

  • [svn:osmf:] 14474: Adding a 'dispatchInitialChangeEvent' parameter to the ' watch' method in order to allow the initial change event from being dispatched, continued.

    Revision: 14474
    Revision: 14474
    Author:   [email protected]
    Date:     2010-02-28 23:53:31 -0800 (Sun, 28 Feb 2010)
    Log Message:
    Adding a 'dispatchInitialChangeEvent' parameter to the 'watch' method in order to allow the initial change event from being dispatched, continued.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/metadata/MetadataWatcher.as

    *Feedback*
    "Use the form below to send us your comments. We read all feedback carefully, but please note that we cannot respond to the comments you submit."
    http://www.apple.com/feedback/ipad.html
    We can complain about Apple's business decisions, but these discussions are user to user talk about possible solutions.
    Here are the places to report bugs:
    Get an account at
    http://developer.apple.com/  then submit a bug report to http://bugreporter.apple.com/
    Once on the bugreporter page,
       -- click on New icon
       -- See if you need to attach a log file or log files, clicking on Show instructions for gathering logs.  Scroll down to find the area or application that matches the problem.
       -- etc.

  • [svn:osmf:] 14758: Fix FM-556: When MediaPlayer enters error state, capabilities should be set to false, and capability change events should be dispatched.

    Revision: 14758
    Revision: 14758
    Author:   [email protected]
    Date:     2010-03-15 12:27:47 -0700 (Mon, 15 Mar 2010)
    Log Message:
    Fix FM-556: When MediaPlayer enters error state, capabilities should be set to false, and capability change events should be dispatched.  Also fixed typo in one of the capability change event names.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-556
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/events/MediaPlayerCapabilityChangeEvent.as
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamLoadTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/media/TestMediaPlayer.as

    Well, I can tell you that this kind of error is not OS related, but rather a HW thing.  It happens where there is a general detection of something going wrong.  Sometimes it can happen randomly and might not be an indication of a problem.  But sometimes it can be caused by things that are improperly functioning within the system like bad capacitors. 
    Unfortunately I don't really know what to do about such things except give you machine a proper inspection.  But if things are working fine, and continue to do so, I wouldn't worry about it.  If it becomes a regular occurance, then I'd worry.

  • I'm being asked to enter my ID password on my ipad for icloud, but the email is no longer active and reset remails are not being received.

    I'm being asked to enter my ID pswd on my ipad 2 for icloud. but the email address and ID are no longer being used, and reset emails are not being received. How can I deactivate this? I have another ID which works fine, but this issue with the old ID is not allowing me to use my ipad.  thanks.

    If your iPad is signed into an old ID and you are trying to change it, if the old ID is yours, and if it is an earlier version of your current ID, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iDevice, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • I've had my ipod shuffle (2nd generation) for a long time now and after a year and a bit of not being in use it doesn't work. When I connect it to the computer it doesn't come up. Can my ipod be charged or fixed?

    I've had my ipod shuffle (2nd generation) for a long time now and after a year and a bit of not being in use it doesn't work. When I connect it to the computer it doesn't come up. Can my ipod be charged or fixed? Please help!

    That is about normal. You can maximize battery life by changing some settings. See:
    Apple - Batteries - iPod
    Apple will exchange your iPod for a refurbished one for with a new battery for $79. They do not fix yours.
    Apple - iPod Repair price                       
    A third-party place like the following will replace your battery for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the battery yourself if you are up to it. You can purchase a replacment for about $10
    iPod Touch Repair – iFixit                  

  • HT1386 Since installing the latest itunes to windows 8 my iphone and ipod touch is not being recognized in itune

    Since installing the latest itunes to windows 8 my iphone and ipod touch is not being recognized in itunes, therefore i can't change playlists or add songs etc. Is this a fault with itunes as it was fine with the older version or is there something i can do. I'm not on IOS yet but would like to backup my phone first but can't do that atm due to not being able to view my phone on itunes!
    Thanks

    Hi, jodie_0182.
    I would recommend the steps in the article below.  See the section labeled Verify that the Apple Mobile Device USB Driver is installed > For Windows Vista, Windows 7, and Windows 8 > Update the Apple Mobile Device Driver.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    If the above step does not resolve the issue, try all remaining steps in the article. 
    Cheers,
    Jason H.

  • IPhone 6 and iPod Touch 5 not being detected by iTunes 12

    iPod 5 and iPhone 6 is not being detected after I downloaded iTunes 12.1.2
    Tried changing the lightning conductor, that didn't help either.
    Re-installed iTunes but it was of no use. :/

    See iPhone, iPad, or iPod not recognized in iTunes for Windows - Apple Support
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • HT201210 I have an unknown error (1621) and my iPod is not being recognised in iTunes or the Finder, even in Disc mode.  Anyone know what's going on?

    I have an unknown error (1621) and my iPod is not being recognised in iTunes or the Finder, even in Disc mode.  Anyone know what's going on?

    Try and force iPod into Recovery Mode:
    1. Turn off iPad
    2. Connect USB cable to computer; leave the other end alone
    3. Press and hold the Home button down and connect the docking end of cable to iPad
    4. Continue holding the Home button until you see the "Connect To iTune" screen
    5. Release the Home button
    6. Open iTune
    7. You should see "iTunes has detected an iPad in recovery mode"
    8. Use iTune to restore iPod
    Note: You need to be patient and repeat the above many times to recover your iPad

  • I am having trouble with the Jpeg icons and also now thumbnails not being visable in bith teh Apple finder and now also Adobe Bridge. Can anyone shed any light on this ?

    I am having trouble with the Jpeg icons and also now thumbnails not being visable in bith teh Apple finder and now also Adobe Bridge. Can anyone shed any light on this ?

    Argh - once again, I find my solution right after posting this. Left out one modification to the SWIG script, now it runs in 29 seconds vs C 16 seconds, I can live with that.

  • HT4972 I bought my iPad off a friend and it is hacked. I can't upgrade the software to iOS 5.1 it says unable to update. And something about me not being eligible. I need help please

    I bought my iPad off a friend and it is hacked. I can't upgrade the software to iOS 5.1 it says unable to update. And something about me not being eligible. I need help please

    If the device is jail broken - and the message is that the iPad is not eligible for the requested build - there are tons of articles on the internet that discuss how to fix the iPad. Use Google.

  • My computer's power adapter is plugged into a power source, yet the indicator light is not working and my computer is not being charged.

    My computer's power adapter is plugged into a power source, yet the indicator light is not working and my computer is not being charged.

    I have the same issue.
    The magsafe goes orange for about 20 seconds, the battery shows 0% then it goes to a black X indicating no battery installed.
    With a new battery the same happens, although it can run on battery but does not charge.
    It runs fine on mains power, the green light is always lit.
    I have tried several things so far:
    1. Cleaned the magsafe contacts on cable and macbook
    2. Reset SMC and PRAM
    3. Installed latest battery update
    4. Tried new battery
    5. Put old battery in fridge for an hour
    I work in IT and am fairly confident taking it apart, what should I try next?
    Some people recommend a new battery connector, which doesn't seem to make sense as the battery has never been removed before.  Also some people say it will need a new logic/motherboard.
    Any experts here managed to sucessfully fix one of these?

  • Dispatched Event not being caught

    I have the following custom event:
    package
    import flash.events.Event;
    public class TestCustomEvent extends Event
    public static const EVENT_NAME:String = "TestCustom";
    public var _message:String;
    public function TestCustomEvent(message:String)
    super(EVENT_NAME,true,false);
    this._message = message;
    public override function clone():Event
    return new TestCustomEvent(_message);
    public override function toString():String
    return formatToString("TestCustomEvent", "type", "bubbles",
    "cancelable", "eventPhase", "_message");
    which I am trying to dispatch from the following class:
    package
    import flash.events.EventDispatcher;
    import flash.events.IEventDispatcher;
    import flash.events.Event;
    public class TestDispatch implements IEventDispatcher
    private var dispatcher:EventDispatcher;
    public function TestDispatch()
    dispatcher = new EventDispatcher(this);
    public function RaiseEvent():void
    var ev:TestCustomEvent = new TestCustomEvent("catch this");
    this.dispatchEvent(ev);
    public function addEventListener(type:String,
    listener:Function, useCapture:Boolean = false, priority:int = 0,
    useWeakReference:Boolean = false):void{
    dispatcher.addEventListener(type, listener, useCapture,
    priority);
    public function dispatchEvent(evt:Event):Boolean{
    return dispatcher.dispatchEvent(evt);
    public function hasEventListener(type:String):Boolean{
    return dispatcher.hasEventListener(type);
    public function removeEventListener(type:String,
    listener:Function, useCapture:Boolean = false):void{
    dispatcher.removeEventListener(type, listener, useCapture);
    public function willTrigger(type:String):Boolean {
    return dispatcher.willTrigger(type);
    but in my application the event doesn't get caught:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()" initialize="addListeners()">
    <mx:Script>
    <![CDATA[
    private function addListeners():void
    this.addEventListener( TestCustomEvent.EVENT_NAME,
    onEventCaught );
    private function init():void
    var t:TestDispatch = new TestDispatch();
    t.RaiseEvent();
    public function onEventCaught(event:TestCustomEvent):void
    trace("caught");
    ]]>
    </mx:Script>
    </mx:Application>
    Not sure why event is not being caught.
    Thanks,
    EE

    I updated my code a little:
    //Using a sprite so it should be part of the diplay list now.
    package
    import flash.display.Sprite;
    public class TestClass2 extends Sprite
    public function TestClass2()
    super();
    public function RaiseEvent():void
    var ev:TestCustomEvent = new TestCustomEvent("catch this");
    this.dispatchEvent(ev);
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()" initialize="addListeners()"
    xmlns:local="*">
    <mx:Script>
    <![CDATA[
    private function addListeners():void
    this.addEventListener( TestCustomEvent.EVENT_NAME,
    onEventCaught );
    private function init():void
    tc2.RaiseEvent();
    public function onEventCaught(event:TestCustomEvent):void
    trace("caught");
    ]]>
    </mx:Script>
    <local:TestClass2 id="tc2" width="100" height="50" />
    </mx:Application>
    But event still not being caught.

Maybe you are looking for

  • File works in Encore 1.0.1 but gives problems in Encore 2.0

    Try downloading this file http://www.ecs.homechoice.co.uk/Adobe_test.mpg It's a recording of a trailer off BBC1 and is typical of the problems I am experiencing with Adobe Enmcore 2.0 If you play back teh above file on Windows Media player it looks f

  • Global Expense Report System

    Hello all, Global Expense Report System produce a file and need to process the file content with SAP R/3 for GL Post and AP. I came to know following the BAPIs can do job for GL Post and AP BAPI_ACC_DOCUMENT_CHECK BAPI_ACC_DOCUMENT_POST I want to mak

  • Excel 2007  send by email

    I an having trouble trying to e mail this and then downloading on excel 2007 is this something I can do?

  • How the bleepin-bleep do I get this **** thing to work?

    I'm trying to create an automation that opens a series of excel files (got that to work), and then runs a series of steps (like the old macros used to do) on each one. However, my pseudo-macro doesn't work, all I get is a generic "encountered an erro

  • Collection.extend doubt

    hi all... the way we use collection_name.extend in the same way can we use tablename%rowtype.extend ??? please help.... in that case how can i do that??