Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Multiple Event fires on OptionDialog

$
0
0

I create option dialog in Alloy xml file.Then after, I fired onclick event in multiple options.But I gets multiple event firing on one particular option in option dialog. I doing some following code:

<OptionDialog id="dialog" title="Options">
 
            <!-- The Options tag sets the options property. -->
             <Options>
                <Option>Take a picture</Option>
                <Option>Upload a picture/Video</Option>
                <Option>Record a video</Option>
                <Option>Embed a Youtube video</Option>
                <Option>Cancel</Option>
            </Options>
</OptionDialog>
 
 
$.dialog.show();
    $.dialog.addEventListener('click',function(event){
 
        switch(event.index){
            case 0: alert("take photo");
                    break;
            case 1: alert("upload photo");
                    break;
 
        }

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>