[JS CS3] Add shortcutKey to Button?

I wrote a script with a UIdialog asking for replacing several things or not. It works fine but I'm not able to add a shortkey to my "replace"-button?
Did anyone know what I've forgot or done wrong?
var myDialog = new Window('dialog', 'Search and Replace', undefined, {maximizeButton:false, minimizeButton:false});
with(myDialog){
    with(add('group')){
        myReplaceButton = add('button', undefined, "Replace", {name:'ok'});
        myReplaceButton.shortcutKey = "F3";
        myReplaceButton.onClick = function(){ myDialog.close(1) };
        myReplaceButton.onShortcutKey = function(){ myDialog.close(1) };
        myCloseButton = add('button', undefined, "Cancel", {name:'cancel'});
        myCloseButton.onClick = function(){ myDialog.close(2) };
Regards
H.

Are you sure? ...
I copied your original script, added 'myDialog.show()' at the bottom. Hotkey "F3" didn't work. Changed it to 'r', and it worked. I'm on CS4, and some ScriptUI features changed just a bit, so I tried the same in CS3. It worked there as well. Really.
The hotkey, by the way, is plain 'r', not with alt or shift or control down as well (or option or command -- okay, that's a joke). Add this alerts
myReplaceButton.onClick = function(){ myDialog.close(1); alert ("okayed"); };
myReplaceButton.onShortcutKey = function(){ myDialog.close(1); ; alert ("okayed by r"); };
myCloseButton.onClick = function(){ myDialog.close(2); alert ("cancelled"); };
and you will able to see which event occurred.

Similar Messages

  • How do I add a PayPal button to a page in my site?

    My client has a PayPal account and they would like me to add a button that enables visitors to click the button and submit donations.
    Is this something that is supported by Muse?

    Yes - you can add a PayPal button using arbitrary HTML.
    Create the donation page in Muse. If desired, you can also create a second confirmation page, that thanks the visitor for their donation after it is submitted.
    Publish both pages.
    Log into your PayPal account on their website. Use their system to generate the donation payment button.
    Copy the source code for the button.
    Return to Muse and go to Object > Insert HTML..., paste the code in the HTML Code area and Click OK.
    Position the HTML block where you want the button to appear on the page.
    Publish the page again and click the button to test that the button works as expected. It should jump from the Muse donation page to the PayPal page where the visitor can enter their donation into your client's account.
    You can style the PayPal page to look more like your site's design, which creates a more seamless appearance. If desired, you can also configure the PayPal payment page to redirect to the confirmation/thank you page you created in step 1 after processing the transaction.

  • How do i grab datalist ID and add it to button onclick to update that item

    Hi, I have pulled over some data from my sql server 2012 in VB C# DataList view. I would like to add a custom button to each item that will allow me to delete an item from the database and also update a database column onclick. EG: Update the paid (bit)
    column to 1 when the paid button is clicked. Here is what i have so far as i am new at this:
    my aspx page:
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:DataList ID="dlActiveBills" runat="server" DataSourceID="SqlDataSource1">
    <ItemTemplate>
    Amount:
    <asp:Label ID="AmountLabel" runat="server" Text='<%# Eval("Amount") %>' />
    <br />
    DateReg:
    <asp:Label ID="DateRegLabel" runat="server" Text='<%# Eval("DateReg") %>' />
    <br />
    Deadline:
    <asp:Label ID="DeadlineLabel" runat="server" Text='<%# Eval("Deadline") %>' />
    <br />
    Notes:
    <asp:Label ID="NotesLabel" runat="server" Text='<%# Eval("Notes") %>' />
    <br />
    Name:
    <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
    <br />
    <br />
    <asp:Button id="btnPaid" runat="server" Text="Paid" Commandname="update" />
    </ItemTemplate>
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ProjectConnectionString %>" SelectCommand="SELECT
    d.Amount,
    d.DateReg,
    d.Deadline,
    d.Notes,
    r.Name
    FROM
    Details d
    LEFT JOIN
    ReminderTypes r
    ON
    d.ReminderTypesId = r.ReminderTypesId
    WHERE
    d.Paid = 0"></asp:SqlDataSource>
    </asp:Content>
    my aspx.cs page
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using System.Data.SqlClient;
    public partial class active_bills : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
    protected void MainContent_dlActiveBills_btnPaid_0_Click(object sender, EventArgs e)
    string dbConnection ="Data Source=somthing;Initial Catalog=somthing;Integrated Security=true;";
    SqlConnection sqlConnection;
    sqlConnection = new SqlConnection(dbConnection);
    sqlConnection.Open();
    SqlCommand cmd = new SqlCommand();
    cmd.Connection = sqlConnection;
    cmd.CommandText = "UPDATE Details SET Paid = 1 WHERE DetailsId = ?";
    cmd.ExecuteNonQuery();
    sqlConnection.Close();
    This doesn't work but can it be done in this way somehow?

    Hi irishwestman,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help
    System, and Visual Studio Editor.
    Based on your issue, it is related to the ASP.NET, so I suggest you can post this issue directly to the ASP.NET forum:http://forums.asp.net/
    you will get better support.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Have you attempted a restore?

  • Add on custom button to ALV toolbar in std tcode ME51N, ME52N and ME53N.

    Hi All,
    I have the requirement to add on the custom button to ALV toolbar in ITEM OVERVIEW for standard transaction ME51N, ME52N and ME53N. Does anyone know what enhancement point or user exit i should apply and how i can add on the custom button?
    Thanks.

    There are no user exits or badi's for COOIS. You may have to make copy of the PPIO_ENTRY to ZPPIO_ENTRY including all the varians without changing their names like copy SAP&COOIS to SAP&COOIS. Create a T-Code ZCOOIS and replace COOIS in variant SAP&COOIS to ZCOOIS not in the name of the variant but in the field "Check Authorization for".
    The PF-Status is found in the include LCOISOUTPUTF16 which is located in the function group COISOUTPUT you may have to copy that too. Finally you need to copy SAPLCOISOUTPUT with its GUI status GENERAL and add your custom button there.

  • How to add header and button

    i want to add header to my ALV report
    i am using cl_salv_table method
    i want to write a few sentences.
    in addition i want to add a button to my report,
    which will display the values the user put in the selection screen.
    please give me detailed explenation
    thanks

    Display header:--steps
    1. call the factory method and it reruns the ref variable..
          try.
              call method cl_salv_table=>factory
                exporting
                  list_display = list_display
                importing
                  r_salv_table = vref_alv
                changing
                  t_table      = i_sflight.
            catch cx_salv_msg into oref_error.
              l_text_alv_e = oref_error->get_text( ).
              message i000 with l_text_alv_e.
              leave list-processing.
          endtry.
    2. Create header object and attached it with ALV
      data: lr_grid type ref to cl_salv_form_layout_grid.
    1st step: create the grid object
      create object lr_grid.
    2nd step: add some text items
      lr_grid->create_header_information( row = 1  column = 1
                             text = 'Flight List Grp ##'(fll) ).
      lr_grid->create_text( row = 2  column = 1
                             text = 'Please check utilization'(uti) ).
    3rd step: declare grid as header of list
      vref_alv->set_top_of_list( value = lr_grid ).
    Display - button steps:
    1. Create pf status and Set pf status:
    Create pf-status and add ur custom button with a fcode then set this status with alv.
      vref_alv->set_screen_status( pfstatus = 'SALV_TABLE_STANDARD'
                                report = sy-repid
                           set_functions = p_alv->c_functions_all ).
    2. Get all the events and set the event handler for this added button.
      data: lr_event type ref to cl_salv_events_table.
    get the EVENT object
      lr_event = p_alv->get_event( ).
      set handler :
      lcl_handler=>on_added_function for lr_event,
    2. Create the local class to handle this event:
    class lcl_handler definition.
      public section.
        class-methods:
        on_added_function for event added_function of cl_salv_events_table
                importing e_salv_function, " type salv_de_function
    endclass. "lcl_handler definition
    CLASS lcl_handler IMPLEMENTATION
    class lcl_handler implementation.
      method on_added_function.
        data: l_oref_columns type ref to cl_salv_columns_table,
              l_oref_column  type ref to cl_salv_column_table,
              l_oref_column1 type ref to cl_salv_column,
              l_except1      type ref to cx_salv_not_found,   "Exception
              l_text1        type string,                     "Exception msg
              l_lvc_s_colo type lvc_s_colo.
        case e_salv_function.
          when '<fcode of ur button>'.
        write ur logic here.
       endcase.
      endmethod.
    endclass. "lcl_handler IMPLEMENTATION
    Regards,
    Joy.
    Edited by: Joyjit Ghosh on Jul 13, 2008 12:16 PM

  • Add a Print button to a Report Page

    I'm trying to add a Print button to a report page to render the page in printer-friendly mode and then give the user the option to send to a printer. I started with just trying to add a print button. I added a button to the region and added to the button request value javascript:window.print();. When I click on the print button, nothing happens. So I tried to add some html code:
    <form>
    <input type="BUTTON" value="Print" onClick="window.print()">
    <form>
    as a condition in Expression 1 when I selected "Current page is NOT in Printer Friendly mode". Nothing happens when I click on the print button. Can anyone offer some steps to create this functionality or point me to documentation on how to do this? I have tried the help documentation within APEX and isn't clear to me.
    Thanks

    The documentation wasn't very clear to me. I did try one suggestion to create a region on the report page and call it Print. The suggestion is then to add the following code to the Source Region section:
    <form>
    <input type='BUTTON' value="Print this page" onClick="window.print()">
    <form>
    The example however leaves out some significant information however. What is the region created as e.g. HTML, Report, Form, URL, etc?

  • How do i add an email button to an editable pdf

    how do i add an email button to an editable pdf

    Hi Rocco290,
    You will need Acrobat to add an email button to that PDF. Here are instructions from the Acrobat X Help: http://help.adobe.com/en_US/acrobat/X/pro/using/WSBB6EF75F-BC3D-4094-B787-FB76DAE1EBDC.w.h tml
    If you have a different version of Acrobat, you'll find a link to both the Acrobat 9 and Acrobat XI Help in the bottom-right corner of the page I've linked you to.
    Please let us know how it goes!
    Best,
    Sara

  • How do I add a Linkedin button to my email signature in Outlook 2011?

    Hi,
    I'm trying to add a Linkedin button to my emails, or an image of a linkedin button hyperlinked to my profile, but not having much luck. I'm using a Macbook Pro with Lion and my email client is Outlook 2011.
    Does anyone have any idea how to do this?
    Cheers,
    Alex

    I would like to know how to do this as well. All I'm able to do is add the link, but not the button. My colleague has done this on his Outlook on his HP. I'm not sure why this is so difficult!

  • How do I add a venmo button to my website?

    I am trying to add the Venmo button to my wedding site.  I've followed directions from the venmo website, which includes the code.  I've tried to add by adding to metdata in page properties, and by selecting Insert HTML.  Please help!

    when I add the head section code to the head section in page properties, and then the button code in page layout I get this
    When I add the <iframe> to the page using Object> Insert HTML I get this

  • How do I add a FullScreen button to Project Playback Skin?

    How do I add a fullscreen button to the project playback skin? I know how to load another skin (using Project -> Skin Editor) and how to add a custom playback skin (paste custom skin SWF into C:\Program Files\Adobe\Adobe Captivate 5\en_US\Gallery\Playbars) but I'm having a little trouble figuring out how to add a fullscreen button when editing the Flash AS3 so that it will show up in my custom playback skin when loaded into Captivate via Project->Skin Editor. Any ideas?

    Hi there
    I might assume that seeing as you were able to work the magick with the CC button it would be a simple task to pick apart the other elements and add the desired button without hijacking the CC button.
    I mean, if you are that deep in Flash territory and all, it doesn't seem like much of a stretch to figure out how the buttons are added, no?
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • How do I add the rotate button to the main toolbar for all users

    How do I add the rotate button to the main toolbar for all users. I have a Windows 2003 Citrix farm with Adobe Reader 8. I can add it user by user but I want to add it to all users at once. All users need this rotate button,
    Thanks in advance
    ND

    Try the Reader forum. I have no clue.

  • How do I add the rotate button to toolbar for all users.

    How do I add the rotate button to the main toolbar for all users. I have a Windows 2003 Citrix farm with Adobe Reader 8. I can add it user by user but I want to add it to all users at once. All users need this rotate button,
    Thanks in advance.

    Try the Reader forum. I have no clue.

  • How do I add a submit button to a pdf form?

    hello
    I am trying to add a submit button to a pdf form... is this possible though forms central or Acrobat Pro?

    If it is a PDF you created with FormsCentral, then yes, it should have a Submit button. See this for more info: http://helpx.adobe.com/acrobat-com/formscentral/help/create-fillable-pdf-form.html  and http://helpx.adobe.com/acrobat-com/formscentral/help/create-forms-locally-save-them.html
    If it's a fillable form created with Acrobat Pro, and you want to collect data with FormsCentral, then you import that existing PDF file into FormsCentral and add a Submit button to the form: http://helpx.adobe.com/acrobat-com/formscentral/help/navigate-formscentral.html#import_exi sting_fillable_pdf_forms
    I hope that helps,
    Brian

  • How do i add a submit button to a form

    ho do i add a submit button to a form.

    Hi;
    If you are using the FormsCenral website to create a form it will have a submit button by default for the HTML (web) form and also by default it you are saving as PDF (there is an option to create a PDF without Submit, but by default it does submit to FormsCentral). 
    If you are using the FormsCentral desktop application that is bundled with Acrobat XI you would have to sign into the service to create forms with Submit buttons.  You can also create a form without submit button in FormsCentral Desktop and then edit the form in Acrobat XI adding a submit button using your preferred submit method such as by email.
    Let me know if you need more information on either of these, it will be easier to assist knowing more about what you are using.
    Thanks,
    Josh
    PS - if this is a question about adding a submit button in Acrobat not related to FormsCentral your question would be best asked in http://forums.adobe.com/community/acrobat

Maybe you are looking for