Custom Alert button label

How could I change the label of the standard Alert.OK Button
to "accept" for example ?
If I use Alert.show method its return an instance of Alert
object but there is no attribute that could be used to set the
label of a button showed in the Alert.
Help me
Thank you at all

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="horizontal">
<mx:Script>
<![CDATA[
import mx.controls.Alert
private function handleDefaultLabels():void
Alert.show("This is an alert pop-up using default button
labels",
null,Alert.OK|Alert.CANCEL);
private function handleCustomLabels():void
Alert.okLabel = "Sure"
Alert.cancelLabel = "No Way"
Alert.show("Tihs is an alert pop-up using custom button
labels",
null,Alert.OK|Alert.CANCEL);
]]>
</mx:Script>
<mx:Button label="Default Labels"
click="handleDefaultLabels()" />
<mx:Button label="Custom Labels"
click="handleCustomLabels()" />
</mx:Application>

Similar Messages

  • Custom Alert Buttons

    With the Alert control is it possible to change the text of
    the Alert buttons so instead of having OK, Cancel, Yes or No you
    can define your own? e.g. Proceed To Checkout and Continue
    Shopping?
    Thanks
    Katy

    "g-s-b" <[email protected]> wrote in message
    news:g74r1l$39b$[email protected]..
    > Yes.
    > I think it is like: Alert.OK = "new ok text";
    >
    > ...but you should look it up in the help files.
    >
    This might help improve the efficiency of your Help searches:
    http://flexdiary.blogspot.com/2008/07/getting-help-in-flex-builder.html

  • Flex 4.1: alert button label is null.

    When an Alert dialog was displayed its button showed the label “null” rather than the expected “OK”.
    I tried to do this:
    http://www.sapphiresteel.com/Tutorials/Amethyst-Tutorials/case-studies/article/debugging-i nto-the-flex-sdk
    but it's not working
    Please help.

    example:
    <?xml version="1.0"?>
    <!-- controls\alert\AlertSimple.mxml -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
            ]]>
        </fx:Script>
        <s:VGroup>
            <s:TextInput id="myInput"
                          width="150"
                          text=""/>
            <s:Button id="myButton"
                       label="Copy Text"
                       click="myText.text = myInput.text;
                Alert.show('Text Copied!', 'Alert Box', mx.controls.Alert.OK);"/>
            <s:TextInput id="myText"/>
        </s:VGroup>
    </s:Application>

  • Trapping - "Do you want to save changes" alert button pressed

    When exiting a data block with unsaved changes, the user is prompted with "Do you want to save the changes you have made ?" The possible button click responses are "Yes", "No", "Cancel"
    Is there a way to programmatically catch the click on the "Cancel" button ?
    Oracle Forms 10g

    Thanks for the suggestion W1zard. Here is the solution that I have come up based on the recommendation.
    Essentially I create my own custom alert that mimics the system generated alert. In this manner I am able to control the behavior based on the alert button pressed by the user. This method also suppresses the system generated alert, so the user isn't prompted twice.
    At the form level I have created the KEY-EXIT and the KEY-ENTQRY triggers. Additionally I created an ALERT titled SAVE_CHANGES with buttons Yes, No, Cancel.
    h4. KEY-EXIT Trigger
    DECLARE
         alert_id     ALERT;
         alert_button     NUMBER;
    BEGIN
         IF :SYSTEM.FORM_STATUS IN ('CHANGED') THEN
              alert_id := FIND_ALERT('SAVE_CHANGES');
              alert_button := SHOW_ALERT(alert_id);
              -- ALERT_BUTTON1 is Yes, ALERT_BUTTON2 is No, ALERT_BUTTON3 is Cancel
              IF alert_button = ALERT_BUTTON1 THEN
                   EXIT_FORM(DO_COMMIT);
              ElSIF alert_button = ALERT_BUTTON2 THEN
                   EXIT_FORM(NO_COMMIT);
              ELSE
                   RAISE FORM_TRIGGER_FAILURE;
              END IF;
         ELSE
              EXIT_FORM;
         END IF;
    END;h4. KEY-ENTQRY Trigger
    DECLARE
         alert_id     ALERT;
         alert_button     NUMBER;
    BEGIN
         IF :SYSTEM.FORM_STATUS IN ('CHANGED') THEN
              alert_id := FIND_ALERT('SAVE_CHANGES');
              alert_button := SHOW_ALERT(alert_id);
              -- ALERT_BUTTON1 is Yes, ALERT_BUTTON2 is No, ALERT_BUTTON3 is Cancel
              IF alert_button = ALERT_BUTTON1 THEN
                   COMMIT_FORM;
                   ENTER_QUERY;
              ElSIF alert_button = ALERT_BUTTON2 THEN
                   CLEAR_FORM(TO_SAVEPOINT);
                   ENTER_QUERY;
              ELSE
                   RAISE FORM_TRIGGER_FAILURE;
              END IF;
         ELSE
              ENTER_QUERY;
         END IF;
    END;

  • My custom alerts stopped working.

    For some time now without issue I have been using rintones and text tones I created with garage band. The last week or so, they stopped working. The odd time one will work. Under settings for my contacts, nothing has changed. I even tried to reset the custom alerts to the contacts and also did a reset (not sure if I did hard or soft reset [home and power button]. If you have any advice, please help.
    I am using iphone 4s with software 7.0.4

    6 string strummer wrote:
    not sure if I did hard or soft reset [home and power button]. If you have any advice, please help.
    There is only one kind of reset on an iPhone. It's just called a "reset" and you do it by pressing and holding the Home and power buttons until the silver apple appears.
    I'd try resyncing the tones from iTunes.

  • Custom Alert is throwing an error in APPS.GMS_INSTALL

    1. We have created a custom alert and using Alert Manager we defined this new alert in applications.
    2. In order to test this alert we navigated to Request -> Check and gave the Application Name, Alert Name and Start Date and submitted a new request.
    3. To view this new alert, we have navigated to Request -> View.
    4. The status shows Completed Normal, but when we click on view output, it is throwing the following error:
    FRM-40735: WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA-06502.
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at "APPS.GMS_INSTALL", line 31
    Did anyone came across this error message? Any input is highly appreciated.
    Thanks.

    So, you are saying that the method runs successfully in SWO1 but fails when run inside the workflow? If that is the case, then, something is missing in the binding. Make sure your binding is correctly done. There are several levels of bindings:
    Method <-> Standard Task, and Standard Task <-> Workflow Template. Make sure the binding in both places is correct. Clicking the check button often times provides hints at what could be wrong. Keep special attention to passing header lines to internal tables and vice versa.
    If you are sure the binding is correct, then, set a break point in the method. There are many ways you can do that. First, you can change the standard task to "foreground" instead of "background" and assign yourself as the agent. The task will then show up in your inbox. Executing it will take you to the break point. The second trick is to write an infinite loop in the method as follows:
    DATA:
      l_char1  VALUE '1',
      l_char2.
    WHILE l_char1 = '1'.
      l_char2 = 'a'.
    ENDWHILE.
    What will happen is that when the task is executed in background, it will get stuck in this loop. Go to transaction SM50 to find the stuck process. Select that line then select menu option: Program/Session --> Program --> Debugging. This will open the debugger for you. In the debugger change the value of l_char1 to anything other than 1 and you'll exit the loop and be able to debug the rest of the code. If you forget to change the value and click F8, just go to SM50 again.

  • Using a custom menu button on the slide to open and close TOC in Captivate 7

    HI
    I have a custom menu button. When the user clicks I want to show TOC, ( I see there is a state to show TOC) but when the user clicks the same menu button again on that slide how can I hide the TOC. ie toggle between hide and show.
    thanks

    I described some possible scenarios: Toggle Shape buttons - Captivate 6 - Captivate blog

  • I would like to have an email account that is password-protected that I can access on my Mac, Iphone and Ipad, separate from the Mail application, with an alert button that indicates unread messages

    I would like to have an email account that is password-protected that I can access on my Mac, Iphone and Ipad, separate from the Mail application, with an alert button that indicates unread messages

    Try a search... I'm sure if you put forth a little effort you can find a solution that will work for you.

  • I would like to have an email account that is password-protected that I can access on my Mac, Iphone and Ipad, separate from M, with an alert button that indicates unread messages

    I would like to have an email account that is password-protected that I can access on my Mac, Iphone and Ipad, separate from M, with an alert button that indicates unread messages

    Try a search... I'm sure if you put forth a little effort you can find a solution that will work for you.

  • I have installed a trial of Adobe illustrator on my macbook pro. I want to trace an image using the custom trace button but can't. Does anyone have any ideas how I could custom trace?

    I have installed a trial of Adobe illustrator on my macbook pro. It is the 2014 release of adobe illustrator. I want to trace an image using the custom trace button.
    I start a new document. Then I place my scanned pencil/colored pencil drawing, in to the document. I have tried scanning and then placing it as a jpeg, bitmap, and tiff file. I have tried scanning and then placing it, in color and in black and white. The scan mode I use is flatbed. Adobe illustrator allows me to select the default button and one of eleven preset buttons (e.g high fidelity photo), but it does not allow me to click the custom trace button. The custom trace button is grey while all the other buttons are white.
    Does anyone have any ideas how I could custom trace?

    It seems pointless to adjust it afterwards because it is then only a couple a pencil lines rather then a full drawing. And how do I adjust it afterwards? Would I do this using the different buttons under the window button?

  • Custom Alert Email Templates Issue - List Alerts emails not using customized XML alert template

    I have recently customized the XML alerts template (AlertTemplates.xml) for our site collection in SharePoint 2010 to exclude specific fields in the email when users who have subscribed to a list using the "Alert Me" feature.  I
    have renamed the custom alerts XML file and loaded the custom template in the following directory (%ProgramFiles%\Common Files\Microsoft Shared\Web server extensions\14\TEMPLATE\XML) and
    restarted IIS.  Once users subscribe to the alerts using the list using the "alert me" function they received the customized email as intended. 
    We needed to auto-subscribe users to the email alerts so what I did was used a powershell script to add users to the alert subscriptions using the script shown in below:
    Import-Csv D:\Temp\filename.csv | ForEach-Object{
    $webUrl=$_.WebUrl
    $listTitle=$_.List
    $alertTitle=$_.AlertTitle
    $subscribedUser=$_.SubscribedUser
    $alertType=$_.AlertType
    $deliveryChannel=$_.DeliveryChannel
    $eventType=$_.EventType
    $frequency=$_.Frequency
    $oldAlertID=$_.ID
    $web=Get-SPWeb $webUrl
    $testAlert = $web.Alerts | WHERE { $_.ID -eq $oldAlertID }
    IF ($testAlert) {
    $web.Alerts.Delete([GUID]$oldAlertID)
    Write-Host Old alert $oldAlertID deleted. -Foregroundcolor Cyan
    $list=$web.Lists.TryGetList($listTitle)
    $user = $web.EnsureUser($subscribedUser)
    $newAlert = $user.Alerts.Add()
    $newAlert.Title = $alertTitle
    $newAlert.AlertType=[Microsoft.SharePoint.SPAlertType]::$alertType
    $newAlert.List = $list
    $newAlert.DeliveryChannels = [Microsoft.SharePoint.SPAlertDeliveryChannels]::$deliveryChannel
    $newAlert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
    $newAlert.AlertFrequency = [Microsoft.SharePoint.SPAlertFrequency]::$frequency
    if($frequency -ne "Immediate"){
    $AlertTime=$_.AlertTime
    $newAlert.AlertTime=$AlertTime
    $newAlert.Update()
    Write-Host Created $newAlert.Title for $subscribedUser . -Foregroundcolor Cyan
    } ELSE {
    Write-Host Alert $alertTitle for $subscribedUser already done. Moving on. -Foregroundcolor Magenta
    When I ran the script and added the users and restarted the service, all users who were auto-subscribed via this method would get the email without the customizations that were done in the custom template.  All users who manually subscribed to the list
    using the "Alert Me" function would get the customized email. 
    Does anyone know why users who manually subscribe would get the custom email alert and why users who were auto-subscribed using the powershell script do not get the custom email alert?

    Hi  ,
    According to your description, my understanding is that users who were auto-subscribed using the PowerShell script do not get the custom email alert.
    For your issue, it can be caused by the auto-subscribed alert email which is generated by PowerShell script is  using OOTB alert template. You can add the following script into your script for setting
    the alerts’ alert email template:
    $contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
    $AlertsTemplateCollection =new-object Microsoft.SharePoint.SPAlertTemplateCollection($contentService)
    $newAlert.AlertTemplate = $AlertsTemplateCollection["YOUR_UNIQUE_TEMPLATE_NAME_VALUE"]
    Reference:
    http://sadomovalex.blogspot.com/2012/03/one-problem-with-updating-alert.html
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Eric Tao
    TechNet Community Support

  • How to get "Selected" color for custom toolbar buttons?

    RH 8.0.2.208
    RoboHelp HTML
    WebHelp output
    I'm getting flack from internal QA folks about the custom toolbar buttons not having the same "selected" color as the default buttons (Contents, Index). I've copied the background color info from the <btnselected></btnselected> section for the built-in Contents to the <btnselected></btnselected> section for a custom toolbar button, but RH is ignoring it.
    Any hints?
    Leon

    You could try using the raw converter. Open one file and edit it (File>Open, pick the image and choose Camera Raw as the format before you click Open). Then open the next image and click the little four-lined square on the upper right side of the ACR window and choose Previous Conversion from the flyout menu.

  • Form Alignment issue in table: Custom submit button

    Yesterday as I was putting together a "check availability"
    form within a horizontal table, I ran into difficulties getting the
    form to vertically align in the middle, it kept aligning to the
    top. I was able to correct the problem using the following CSS:
    <style>
    form {
    display:inline;
    </style>
    Now this morning I was switching the generic "submit" button
    with a custom gif button using this code within the form:
    <input type="image" name="submit" src="image.jpg"
    width="110" height="20">
    This worked fine, but every part of the form is aligning to
    the middle correctly except the custom button which is sticking to
    the top. I'm completely lost on how to resolve this issue. If
    anyone has any information on how I can fix the button to align
    with the rest of the form I would greatly appreciate your help. I
    am a beginner at adjusting code.
    Thank you so very much!

    Hello Ram,
    > No custom coding.
    The current forum is for developers. That's why I'd recommend asking non-programming questions in the
    Using SharePoint Designer, InfoPath and Other Customizations forum instead.

  • Trying to assign an XML attribute value to a button label

    I have a Flex app (developed in FLEX 2) that reads from
    multiple XML files and populates datagrids with element values.
    What I'm trying to do now, is to create a second column with a
    button, enabling users to view archived versions for each current
    report.
    My problem is: I can't get the <mx:Button> label to
    accept the attribute "name". I've tried atleast 10 - 20 different
    syntax.
    My XML file looks like this:
    <metrics>
    <report name="test">
    <link>test Report 10/28/2008</link>
    <url>test-10_28_2008.zip</url>
    <status>active</status>
    </report>
    </metrics>
    The mxml looks like this:
    <mx:Button buttonMode="true" useHandCursor="true"
    click="handleClick()" label="{data.@name}" width="80">
    <mx:Script>
    <![CDATA[
    public function handleClick():void{
    var url:URLRequest = new
    URLRequest([L=http://new.test.com/pages/r_archive_apps/"+data.link+".html");[/L]]http://n ew.test.com/pages/r_archive_apps/"+data.link+".html");[/L][/L]
    navigateToURL(url,"_blank");
    ]]>
    </mx:Script>
    </mx:Button>
    When I try to label a button with an element it works fine.
    Some of the other sytax I've used are:
    - label="{data.report.@name}"
    - label="{data.report.(@name=='test')}"
    - label="{data.report.(@name='test')}"
    - label="{data.@name}"
    - label="{data.metrics.report.@name}"
    - label="{data.metrics.report.(@name=='test')}"
    - label="{data.metrics.report.(@name='test')}"

    quote:
    Originally posted by:
    rtalton
    Can you post some code so we can see how you are using the
    button? I think you may be using the button within a datagrid
    itemRenderer, which might make a difference.
    You're right, the button is in a datagrid itemRenderer. I've
    pasted more dataGrid code below - thanks again.
    <mx:DataGrid id="dgCatalog" dataProvider="{_xlcCatalog}"
    rowCount="4" editable="false" sortableColumns="false"
    left="148" top="65" bottom="42" borderStyle="solid"
    alternatingItemColors="[#ecf8ff, #ffffff]"
    themeColor="#ffff80" alpha="1.0" cornerRadius="0"
    dropShadowEnabled="true" dropShadowColor="#000000" width="549"
    creationCompleteEffect="{glow3}">
    <mx:columns>
    <mx:Array>
    <mx:DataGridColumn editable="false" headerText="Daily -
    Report Names" dataField="link" textAlign="left" width="200">
    <mx:itemRenderer>
    <mx:Component>
    <mx:LinkButton click="handleClick()" label="{data.link}"
    >
    <mx:Script>
    <![CDATA[
    public function handleClick():void{
    var url:URLRequest = new URLRequest("
    http://test.new.com/test/"+data.url);
    navigateToURL(url,"_blank");
    ]]>
    </mx:Script>
    </mx:LinkButton>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <mx:DataGridColumn editable="false" headerText="Daily -
    Report Archives" dataField="link" textAlign="left" width="80">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Button buttonMode="true" useHandCursor="true"
    click="handleClick()" label="{data.report.@name}" width="80">
    <mx:Script>
    <![CDATA[
    public function handleClick():void{
    var url:URLRequest = new URLRequest("
    http://test.new.com/pages/test_apps/"+data.link+".html");
    navigateToURL(url,"_blank");
    ]]>
    </mx:Script>
    </mx:Button>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <!--mx:DataGridColumn headerText="URL" dataField="url"
    width="350"/>
    <mx:DataGridColumn headerText="Status" dataField="status"
    width="70"/-->
    </mx:Array>
    </mx:columns>
    </mx:DataGrid>

  • How do I create a Calendar custom repeat or custom alert other than the choices given?

    I would like to create a custom repeat for my calendar such as every 6 weeks or, every other month or whatever choice - - the only choices are "Every Day, Every week, every 2 weeks, every month, every year"?    I would also like to create a custom alert for 2 weeks before or 10 days, etc and there is no "custom" option???

    Whenever you find out let me know. I wanted to assign a text tone to someone and now in iOS 7 i can't. Or I haven't figured this out yet.

Maybe you are looking for

  • Is it possible to use that in the Alert????

    Dear all, We have a table XTR_BOND, so i want whenever the user enter any value to get that record by anevent alert(After insert for that table) so is it possible to use it like that??? select t.bond_issue_code, t.DESCRIPTION into &bond_issue_code, &

  • 16:9 sequence becomes 4:3 QT movie

    I'm using FCPHD 4.5 with 16:9 DV footage (720x480 anamorphic) I edit my sequence in FCP in 16:9 (Pixel aspect is NTSC CCIR 601 and Anamorphic is checked) and do an Export/Quicktime Movie (DV NTSC 48 kHz Anamorphic) I open the resulting file in QT Pro

  • Capture problem with Panasonic PV-GS35

    I have tried for 2 days to find the answer to this . Suddenly I cannot capture video from my minidv camera via usb into Premiere Elements 3. At the capture screen in the upper left corner where the picture of a camera is has the exclamation point and

  • Properly pasting 720x480 footage from a 1080i sequence onto a 720x480 seq..

    I usually edit 1080i footage so I have my FCP sequence settings set up accordingly, but when a friend asked me to edit a tape of 720x480 footage I forgot to change the settings. Now I am almost done editing and need to figure out how to properly past

  • What is the code to get the  Label of  radio button item at runtime?

    Hi All I am working on forms 10g(version 10.1.2.0.2 ) with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 on windows 2000 platform. My requirement is to dynamically get the label of the radio button item in a radio group.I am able to get t