Alpha DevCon 2018
Results 1 to 4 of 4

Thread: Dialog "Initial Focus"

  1. #1
    "Certified" Alphaholic
    Real Name
    Louis Nickerson
    Join Date
    Aug 2002

    Default Dialog "Initial Focus"


    I have a dialog component on an a5w page.

    I would like to set the "Initial Focus" to a specicfic field (much like you can do in X-Dialog), so that when the user navigates to the page, the cursor will already be placed in the first field of the dialog.

    Is this possible and if so, how is it accomplished?



  2. #2
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Alpha Software

    Default RE: Dialog

    You can add Javascript to your A5W page to move the focus to the field you'd like to start at. Switch to the Source view in the HTML editor and modify the "body" tag to include something like

    "body onLoad="document.form.field.focus();""

    In the above, you'll also need to change "form" and "dield" to the names of your form and field


  3. #3
    "Certified" Alphaholic
    Real Name
    Louis Nickerson
    Join Date
    Aug 2002

    Default RE: Dialog


    Thank you!


  4. #4
    Real Name
    Jack Lim
    Join Date
    Jun 2005

    Default Re: Dialog "Initial Focus"


    Please advice where to add the code to set focus:

    My form name is = Party_Information
    Focus Field Name = Party_Code

    This is my Script:
    HTML Code:
    Delete tmpl_Customer_Dialog
    DIM tmpl_Customer_Dialog as P
    tmpl_Customer_Dialog = a5w_load_component("Customer_Dialog")
    'Following code allows you to override settings in the saved component, and specify the component alias (componentName property).
    'Tip: Keep the componentName property short because this name is used in page URLs, and it will help keep the URLs short.
    'Each component on a page must have a unique alias (componentName property).
    with tmpl_Customer_Dialog
    	componentName = "Customer_Dialog"
    end with 
    '=======================================compute the HTML for the Component=======================================
    delete x_Customer_Dialog
    dim x_Customer_Dialog as p
    x_Customer_Dialog = a5w_run_Component(tmpl_Customer_Dialog)
    if x_Customer_Dialog.RedirectURL <> "" then 
    end if 
    <!--Alpha Five Temporary Code Start - Will be automatically removed when page is published -->
    <!--CSS for tmpl_Customer_Dialog -->
    <link rel="stylesheet" type="text/css" href="file:///C:/Program Files/A5V8/css/Corporate/style.css">
    <!--Alpha Five Temporary Code End -->
    <meta name="generator" content="Alpha Five HTML Editor Version 8 Build 1680-3089">
    <body class="CorporatePageBODY">
    		<td><%A5 ?x_Customer_Dialog.Output.Body.Dialog_Echo %></td>
    		<td><%A5 ?x_Customer_Dialog.Output.Body.Xbasic_Code_Errors %></td>
    		<td><%A5 ?x_Customer_Dialog.Output.Body.Dialog_HTML %></td>
    Last edited by AaronBBrown; 07-06-2007 at 01:10 PM. Reason: added [html][/html] tags
    Many Thanks.

    Jack Lim

Similar Threads

  1. "Setting Security" dialog box not closed
    By mronck in forum Alpha Five Version 7
    Replies: 0
    Last Post: 10-12-2005, 05:49 AM
  2. Form.view (formname'"Dialog") leaves fil
    By Mike Thomson in forum Alpha Five Version 6
    Replies: 4
    Last Post: 08-05-2005, 02:28 PM
  3. Dialog "Cancel" Button does not stop scr
    By Hoyt in forum Alpha Five Version 5
    Replies: 1
    Last Post: 11-27-2004, 01:07 AM
  4. Dialog box: "Now Printing XXX Report"?
    By David Farr in forum Alpha Five Version 5
    Replies: 8
    Last Post: 08-10-2003, 02:40 PM
  5. Order of files in "Open database" dialog
    By Jim Cooper in forum Alpha Five Version 4
    Replies: 2
    Last Post: 12-06-2001, 04:35 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts