Enter event  field color change issue

I'm trying to make a script that will change the color of a field's content area when the user enters it (either through clicking or tabbing to the field). It seems simple enough to do, but I haven't been able to get it working.
I downloaded the sample .pdf file that describes how to do this at: http://partners.adobe.com/public/developer/en/livecycle/designer/pdfs/FieldFillColor.pdf
Push the button, the colors change. Seems to work fine, right? Except for the horrible, horrible period in the color definition, of course. Publishing a 2 line script with a bug as an EXAMPLE? For shame.
But, when you move the code to the Enter event, the caption changes color, but the content area does not... until you LEAVE the text box, at which point it DOES change color. This doesn't make any sense to me. Is there something undocumented going on here that I don't know about, or is this just another bug?

This won't speed it up, but I suggest making your code a lot cleaner by making use of this class (I haven't tested it):
public class ColorRange {
   private Color min, max;
   public ColorRange(Color min, Color max) {
      this.min = min; this.max = max;
   public boolean contains(Color c) {
      return c.getGreen() >= min.getGreen() && c.getGreen() <= max.getGreen() &&
         c.getRed() >= min.getRed() && c.getRed() <= max.getRed() &&
         c.getBlue() >= min.getBlue() && c.getBlue() <= max.getBlue();
//...SNIP...
ColorRange blue, red, green, yellow; //initialize these
//...SNIP...
   if ( blue.contains(robot.getPixelColor(640,480) ) {Furthermore, I would introduce constants for your sample locations:
Point blueLoc = new Point(640, 480); //etcEdited by: endasil on 14-Sep-2009 10:21 AM

Similar Messages

  • Acrobat 8, "Highlight Fields" color change

    Hi, I'm trying to help a friend trace a random change in the color of form fields when you select highlight fields. Previously it was the same as mine, a light, opaque blue. Now it's changed to a dark gray making text hard to read. The only thing I can guess caused this was an automatic update to Vista. Before the update it was blue, after the reboot the fields are gray. Does this sound familiar to anyone? Is there a fix? I've searched every menu and can't find even an option to change the color. Is there an option in Vista to change the form field colors? Or is this a glitch caused by the update that requires a repair install?
    Any advice is appreciated.
    Thanks
    sasha

    ? related to the highlighted fields'. When you open a pdf, in the
    upper right corner there is a box to check, if you want the fields
    to be filled in, highlighted.
    Is there a way in the properties to set a default for the page, when
    the pdf is opened, that this 'highlight fields' box is always checked.
    My user doesn't want to have to check this 'box' each time entering the pdf upon opening.
    Thanks for any guidance Lfiacco

  • Required Field - Color Change

    Hello every one,
    We have a requirement, Field A, Field D
    We are on 11.5.10 Forms 6i
    Field A - LOV - (XX,YY)
    Field B - Text Item
    In Field A if the user Picks YY - Field D has to become a required (which I am able to achieve) as follows
    IF :BLOCK.FIELD ='YY'
    THEN
    SET_ITEM_INSTANCE_PROPERTY('BLOCK.FIELD',
         v_current_record,
         REQUIRED,
         PROPERTY_TRUE);
    END IF;
    But the required field is not changing the color to required field color. Can someone tell me how to achieve this?
    Thanks
    Edited by: user468323 on May 18, 2010 10:40 AM

    As you are working with the Oracle Enterprise Business Suite (EBS) there are exact guidelines for developing custom form. If you develop your forms to conform to Oracle Applications User Interface Standards for Forms-Based Products and Oracle Applications Developer's Guide you should not have to manually change the color as the EBS Framework will handle all of this for you. These documents can be found in the Applications Documentation site. Following Oracle's Guidelines are required if you ever need to contact Oracle Support for assistance with a Custom form. If your Custom form does not conform to their guidelines - support will not help you.
    Also, you might want to post any EBS related Forms questions in the General EBS Discussion Forum.
    Hope this helps,
    Craig B-)
    If a response is helpful or correct, please mark it accordingly.

  • Simon Says Bot - color change issue

    Hi,
    I'd like to create an app that can play the internet game Simon Says ...
    I have a pretty good idea of the algorithm but lack some vital skills.
    This is what i got so far...
    package org.kodejava.example.awt;
    import java.awt.Color;
    import java.awt.Robot;
    import java.awt.AWTException;
    import java.awt.event.InputEvent;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.*;
    public class Bot {
         public static void main(String[] args) throws NumberFormatException,
                   IOException, AWTException {
              InputStreamReader isr = new InputStreamReader(System.in);
              BufferedReader in = new BufferedReader(isr);
              Robot robot = new Robot();
              ArrayList<Integer> volgorde = new ArrayList<Integer>();
              // TODO Auto-generated method stub
              System.out.println("tot hoeveel wil je gaan?");
              int tot = Integer.parseInt(in.readLine());
              int o = 10;
              try {
                   Thread.sleep(5000); // do nothing for 5000 miliseconds (5 second)
              } catch (InterruptedException e) {
                   e.printStackTrace();
              // 515 - 360
              robot.mouseMove(515, 360);
              // Press the mouse button #1.
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
              System.out.println("1");
              try {
                   Thread.sleep(2000); // do nothing for 5000 miliseconds (5 second)
              } catch (InterruptedException e) {
                   e.printStackTrace();
              System.out.println("2");
              Color rood = robot.getPixelColor(480, 370); // 500-400
              Color blauw = robot.getPixelColor(480, 580); // 500-520
              Color geel = robot.getPixelColor(690, 580); // 670-520
              Color groen = robot.getPixelColor(690, 370); // 670-400
              for (int i = 1; i < tot + 1; i++) {
                   System.out.println("test?");
                   int a = 0;
                   int b = 0;
                   do {
                        System.out.println("Do While");
                        if (!(rood.getBlue() < (robot.getPixelColor(480, 370).getBlue() + o)
                                  && rood.getBlue() > (robot.getPixelColor(480, 370)
                                            .getBlue() - o)
                                  && rood.getGreen() < (robot.getPixelColor(480, 370)
                                            .getGreen() + o)
                                  && rood.getGreen() > (robot.getPixelColor(480, 370)
                                            .getGreen() - o)
                                  && rood.getRed() < (robot.getPixelColor(480, 370)
                                            .getRed() + o)
                                  && rood.getRed() > (robot.getPixelColor(480, 370)
                                            .getRed() - o))) {
                             volgorde.add(1);// rood
                             b++;
                             a = 1;
                             System.out.println("rood");
                             try {
                                  Thread.sleep(500); // do nothing for 5000 miliseconds (5 second)
                             } catch (InterruptedException e) {
                                  e.printStackTrace();
                        if (!(groen.getBlue() < (robot.getPixelColor(690, 370).getBlue() + o)
                                  && groen.getBlue() > (robot.getPixelColor(690, 370)
                                            .getBlue() - o)
                                  && groen.getGreen() < (robot.getPixelColor(690, 370)
                                            .getGreen() + o)
                                  && groen.getGreen() > (robot.getPixelColor(690, 370)
                                            .getGreen() - o)
                                  && groen.getRed() < (robot.getPixelColor(690, 370)
                                            .getRed() + o)
                                  && groen.getRed() > (robot.getPixelColor(690, 370)
                                            .getRed() - o)) && a != 1) {
                             volgorde.add(2);// groen
                             b++;
                             a = 1;
                             System.out.println("groen");
                             try {
                                  Thread.sleep(500); // do nothing for 5000 miliseconds (5 second)
                             } catch (InterruptedException e) {
                                  e.printStackTrace();
                        if (!(geel.getBlue() < (robot.getPixelColor(690, 580).getBlue() + o)
                                  && geel.getBlue() > (robot.getPixelColor(690, 580)
                                            .getBlue() - o)
                                  && geel.getGreen() < (robot.getPixelColor(690, 580)
                                            .getGreen() + o)
                                  && geel.getGreen() > (robot.getPixelColor(690, 580)
                                            .getGreen() - o)
                                  && geel.getRed() < (robot.getPixelColor(690, 580)
                                            .getRed() + o)
                                  && geel.getRed() > (robot.getPixelColor(690, 580)
                                            .getRed() - o)) && a != 1) {
                             volgorde.add(3);// geel
                             b++;
                             a = 1;
                             System.out.println("geel");
                             try {
                                  Thread.sleep(500); // do nothing for 5000 miliseconds (5 second)
                             } catch (InterruptedException e) {
                                  e.printStackTrace();
                        if (!(blauw.getBlue() < (robot.getPixelColor(480, 580).getBlue() + o)
                                  && blauw.getBlue() > (robot.getPixelColor(480, 580)
                                            .getBlue() - o)
                                  && blauw.getGreen() < (robot.getPixelColor(480, 580)
                                            .getGreen() + o)
                                  && blauw.getGreen() > (robot.getPixelColor(480, 580)
                                            .getGreen() - o)
                                  && blauw.getRed() < (robot.getPixelColor(480, 580)
                                            .getRed() + o)
                                  && blauw.getRed() > (robot.getPixelColor(480, 580)
                                            .getRed() - o)) && a != 1) {
                             volgorde.add(4);// blauw
                             b++;
                             a = 1;
                             System.out.println("blauw");
                             try {
                                  Thread.sleep(500); // do nothing for 5000 miliseconds (5 second)
                             } catch (InterruptedException e) {
                                  e.printStackTrace();
                        a = 0;
                   } while (b < i);
                   System.out.println("kleur verandering gevonde");
                   for (int y = 0; y < i; y++) {
                        try {
                             Thread.sleep(1000); // do nothing for 1000 miliseconds (1
                             // second)
                        } catch (InterruptedException e) {
                             e.printStackTrace();
                        switch (volgorde.get(y)) {
                        case 1:
                             robot.mouseMove(500, 400);
                             robot.mousePress(InputEvent.BUTTON1_MASK);
                             robot.mouseRelease(InputEvent.BUTTON1_MASK);
                             System.out.println("rood click");
                             break;
                        case 2:
                             robot.mouseMove(670, 400);
                             robot.mousePress(InputEvent.BUTTON1_MASK);
                             robot.mouseRelease(InputEvent.BUTTON1_MASK);
                             System.out.println("groen click");
                             break;
                        case 3:
                             robot.mouseMove(670, 520);
                             robot.mousePress(InputEvent.BUTTON1_MASK);
                             robot.mouseRelease(InputEvent.BUTTON1_MASK);
                             System.out.println("geel click");
                             break;
                        case 4:
                             robot.mouseMove(500, 520);
                             robot.mousePress(InputEvent.BUTTON1_MASK);
                             robot.mouseRelease(InputEvent.BUTTON1_MASK);
                             System.out.println("blauw click");
                             break;
                   }volgorde.clear();
                   try {
                        Thread.sleep(400); // do nothing for 1000 miliseconds (1
                        // second)
                   } catch (InterruptedException e) {
                        e.printStackTrace();
              try {
                   Thread.sleep(400); // do nothing for 1000 miliseconds (1
                   // second)
              } catch (InterruptedException e) {
                   e.printStackTrace();
              robot.mousePress(InputEvent.BUTTON1_MASK); //press wrong button to ende game and save score ...
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
    }it can handle a sequence of about 9 clicks long ... after that it doesn't detected all the color changes correctly and therefor waits for another change wich doesn't come ...
    is there anyway to speed up the change detection ? anyone know a faster algorithm than my 'do-while' function?
    help would be appreciated.
    Thnx in Advance,
    a rookie with an idea.
    Edited by: tooster on Sep 13, 2009 7:37 PM

    This won't speed it up, but I suggest making your code a lot cleaner by making use of this class (I haven't tested it):
    public class ColorRange {
       private Color min, max;
       public ColorRange(Color min, Color max) {
          this.min = min; this.max = max;
       public boolean contains(Color c) {
          return c.getGreen() >= min.getGreen() && c.getGreen() <= max.getGreen() &&
             c.getRed() >= min.getRed() && c.getRed() <= max.getRed() &&
             c.getBlue() >= min.getBlue() && c.getBlue() <= max.getBlue();
    //...SNIP...
    ColorRange blue, red, green, yellow; //initialize these
    //...SNIP...
       if ( blue.contains(robot.getPixelColor(640,480) ) {Furthermore, I would introduce constants for your sample locations:
    Point blueLoc = new Point(640, 480); //etcEdited by: endasil on 14-Sep-2009 10:21 AM

  • Field color change

    hi
    i have a field qty on report .. i want that if qty is less than 12 .. its backgroud or text color become red ..autmatically
    thanks

    Hi,
    You can use this function:
    SRW.SET_FOREGROUND_FILL_COLOR('color');
    or
    SRW.SET_BACKGROUND_FILL_COLOR('color');
    Inside the Conditional Formating.
    -Marilyn

  • Can you make an enter event in topmostsubform that gets the field name of any field thats entered

    Looking for some help.
    I have a modified Enter Event I'm trying to use. What my expected results are: When you click on a field on the PDF, it would open up a certain webpage or file depending on what field is entered. I currently have:
    if (xfa.host.name == "Acrobat") {
              app.launchURL("www.cnn5.com" + "/" + event.target.documentFileName + "&" + this.name, true);
    else {
              xfa.host.gotoURL("www.cnn5.com");
    In this example, i'm using a bogus address obviously. "event.target.documentFileName" gives me the PDF name which is what I want, but I need to scrub off the ".pdf" at the end of it. I know I can use this in every field that I want it in, but I'm looking to see if I can get this code in just the topmostsubform only due to having hundreds of forms I might be using this form and to save time.
    When this is used in the topmostsubform, it gives me the URL: "www.cnn5.com/PDFname.pdf&TopmostSubform" no matter what field i click into. Is there something i can change this.name to? Any help would be greatly appreciated.
    Also, i'll need to have this event to be able to use multiple times, because currently in the topmostsubform, it only activates on the first field that I enter and doesn't activate on fields after that. Suggestions please? Thank you

    Hi,
    Are you using event propagation?  If you are try
      xfa.event.target.name
    Otherwise have a look at this  http://blogs.adobe.com/formfeed/2009/03/xfa_30_event_propagation.html
    Regards
    Bruce

  • Color change of a field  in ALV Grid Control

    Hi,
    One small help needed....
    My req is explained below:
    I have 3 fields empno, ename and deptno. and the records of these fields would be displayed in ALV grid control.
    When I hover the mouse on ename field, the color of the complete field should change to other color, say "RED".
    How do I get this. Are there any Mouse events in SAP?
    Kalyan

    Hi,
    Once i changed the color of a field in a alv (not grid alv), i suspose that the same in alv grid. Also i used an mouse event.
    To manage the color:
    TYPE-POOLS : SLIS, and check this type:  SLIS_T_SPECIALCOL_ALV.
    when you call the function to display the alv, there is a parameter in which you should pass an internal table that references the type  SLIS_T_SPECIALCOL_ALV.
    To manage the mouse:
    1.- You should add the event user command:
    for example:
    DATA: I_EVENT TYPE SLIS_ALV_EVENT.
    Llamo al la función que obtiene los eventos validos para el ALV
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE     = 0
           IMPORTING
                ET_EVENTS       = P_EVENTS
           EXCEPTIONS
                LIST_TYPE_WRONG = 1
                OTHERS          = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
      agrega evento user command
        READ TABLE P_EVENTS INTO I_EVENT
          WITH KEY NAME = SLIS_EV_USER_COMMAND.
        IF SY-SUBRC EQ 0.
          I_EVENT-FORM  = SLIS_EV_USER_COMMAND.
          MODIFY P_EVENTS FROM I_EVENT INDEX SY-TABIX.
        ENDIF.
      ENDIF.
    2.- you work with the user command event:
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD .
      CASE R_UCOMM.
        WHEN C_DOBLE_CLICK.
        here you do the things that you need when the mouse *     bottom it's pressed
          PERFORM xxxxxxx.
      ENDCASE.
    ENDFORM.
    3.- you can change the form of the mouse, but i don't remember exactly how to do that... try to check that, it's helpfull in order to display the fields that can execute a funtion in your alv.
    I hope this help you, and sorry for my english.
    Albio.-

  • Event for value change of an input field

    Hello,
    I'm a newbie in WD4A.
    I've got a input field. Is there a event that's fired, if the value of an input field is changed?
    Regards Christian

    No.  There is only an event when the user presses enter.  You can check the online help for all events of all UI elements.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d7/ef8841e3af1609e10000000a155106/frameset.htm
    In 7.02 there is an AJAX based change event on the inputField, but it is not available as a normal WD Event. It instead triggers the attached SearchHelp without the WD Phase Model.  This is the new SuggestValues feature in 7.02.

  • Color Changes when form field added

    When I add a form filed to a pdf, the color changes on the output of the pdf.
    Print out the attached pdf pages 1 and 3. Look at the green button. It is darker on the pages with the form field(p1) then on page 3. they are the same source file. It like when I add the form field, it changes the page to a CMYK color space and the images are in a RGC Color space.
    Any ideas

    Follow-up:
    One of my colleagues is working on a product feature that involves checkboxes (this is how I came across this issue in the first place). His checkboxes aren't contained within a form element whereas in my test page I described in my question when I removed the form from the page the issue didn't manifest.
    However, the page he's working on does contain other forms so I decided to modify my test page to try to replicate this scenario. I found some really odd behavior.
    If I have a form on a page but the checkboxes are not children of that form, and if I dynamically add a single INPUT element or a single TEXTAREA input, the checked values just disappear on page refresh. That's expected since the lack of a parent form should eliminate the memory of the checkbox values, right?
    Well, when I dynamically add '''both''' an INPUT element and a TEXTAREA element it goes right back to remembering '''and''' moving the checked value, but only by one step. By comparison, if the checkboxes and the dynamically added form fields are contained with a form the checked value will move by a number of steps equal to the number of dynamically added form fields.
    Strange, strange behavior I can't really decode with certainty across the entire range of possible scenarios...

  • Changing fields color in CL_GUI_ALV_GRID using class

    Hi,
    I've written a lot of posts but still I have problem with changing color for CL_GUI_ALV_GRID.
    I have class ZKSL_CL_4_17_ALV_GRID_OO with 3 methods : SELECT, HANDLE_DBL_CLICK AND DISPLAY_ALV
    I want to change fields color every time I double click on IT.
    METHOD SELECT.
       DATA:
             lt_sflight                TYPE TABLE OF           zkslt_sflight,
             ls_layout                 TYPE                    lvc_s_layo,
             lr_custom_container       TYPE REF TO             cl_gui_custom_container,
             lr_my_class               TYPE REF TO             zksl_cl_4_17_alv_grid_oo.
       SELECT *  FROM zkslt_sflight  INTO TABLE mt_sflight
          WHERE carrid    = iv_carrid AND
              ( fldate    IN it_date  OR
                price     IN it_price OR
                planetype IN it_type )
    CALL FUNCTION 'Z_KSL_SCREEN'.
    ENDMETHOD.
    from FM z_ksl_screen i call screen 400 and from status_400 output  I call method DISPLAY_ALV
    METHOD display_alv.
       DATA:
              lr_custom_container       TYPE REF TO             cl_gui_custom_container,
              lt_sflight                TYPE TABLE OF           zkslt_sflight,
              lt_catalog                TYPE STANDARD TABLE OF  lvc_s_fcat,
              ls_catalog                LIKE LINE OF            lt_catalog,
              ls_layout                 type                    slis_layout_alv,
              lr_my_class               TYPE REF TO             zksl_cl_4_17_alv_grid_oo.
       CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
         EXPORTING
           i_structure_name = 'ZKSLT_SFLIGHT'
         CHANGING
           ct_fieldcat      = lt_catalog[].
    ************BULID LAYOUT
       ls_layout-no_input = 'X'.
       ls_layout-colwidth_optimize = 'X'.
       ls_layout-totals_text       = 'Totals(201)'.
       ls_layout-info_fieldname    = 'LINE_COLOR'.
       IF mr_gui_alv_grid IS INITIAL.  "-----------------------------------if----------------------&
         CREATE OBJECT: lr_custom_container
           EXPORTING
             container_name = 'DISPLAY',
             lr_my_class.
         CREATE OBJECT mr_gui_alv_grid
           EXPORTING
             i_parent = lr_custom_container.
         SET HANDLER lr_my_class->handle_dbl_click FOR mr_gui_alv_grid.
         CALL METHOD mr_gui_alv_grid->set_table_for_first_display
           EXPORTING
             i_structure_name = 'ZKSLT_SFLIGHT'
            is_layout        =   ls_layout
             i_save           = 'A'
           CHANGING
             it_outtab        = Mt_sflight
             it_fieldcatalog  = lt_catalog.
       ELSE.     "-------------------------------------------------ELSE---------------------&
         mr_gui_alv_grid->refresh_table_display( ) .
       ENDIF.
    ENDMETHOD.
    In handler i am trying to change fields color and call method display sending new out_table
    CALL METHOD me->display_alv
         CHANGING
           ct_fieldcat = lt_fieldcat.
    Please give me some easy advice how to do that.
    thank you in advice.

    Thank you Klaus for your reply,
    The problem is that I need to make this using classes.
    I tried to make my structure data with LVC_T_SCOL as you wrote,
    a field of table type LVC_T_SCOL in the structure of your output table
    DATA BEGIN OF lt_data. 
           INCLUDE STRUCTURE sflight.
           DATA cellcolors  TYPE lvc_t_scol .
       DATA END OF lt_data.
    TYPES: BEGIN OF mtt_tab.
    *         INCLUDE STRUCTURE ZKLST_sflight.  " I get error that I cannot use ref to abap dic
               INCLUDE TYPE ZKSLT_SFLIGHT.
               TYPES: cellcolors  TYPE lvc_t_scol ,
                 END OF mtt_tab.
    After making type mtt_tab
    i declare data   lt_tab                    TYPE STANDARD TABLE OF  mtt_tab.
    and when I try to copy table mt_sflight (it is atribut of calss) like below
    LOOP AT mt_sflight INTO ls_mt .
    *   READ TABLE lt_tab INDEX sy-tabix ASSIGNING <ls_tab>.
    *   MOVE-CORRESPONDING <ls_mt> TO <ls_tab>.
    *    UPDATE lt_tab FROM TABLE mt_sflight.
         MOVE-CORRESPONDING ls_mt to lt_tab.
       ENDLOOP.
    I am getting error "lt_tab is not internal str or table with header"
    Can you help me with this? 

  • Color Changes in Spry Data Fields

    Hi All,
    I'm new to Javascript & PHP  programming. Currently I have coded neccesary apperances for the Web  Page and also Spry Data Set to read an external XML date source file.
    What I need  to do is one of the fields, needs to have color based status changes  based on certain data or criterias received.
    For example,
    I have a  Spry Table displayed on my browser,
    Name
    Current  Status
    Lane
    Jane
    6  Mins
    1
    Peter
    Boarding
    2
    Sally
    Arriving
    3
    Alex
    Delayed
    4
    With the  above, what I need is when the current status show in minutes, the text  color will be white (This has been coded with CSS Style)
    For the  Current Status color changes, when I received anything apart from  minutes, the display will be as of below :-
    Minutes = Black
    Boarding  = Red
    Arriving = Green
    Delayed = Yellow
    My question  is can this be coded with just Javascript, HTML and normal CSS
    OR
    This  needs to be coded in PHP, ASP ?
    I'm not familiar with ASP and only have very  little knowledge of PHP. If anyone here have some experience with this,  can offer some advice on how I can apply this theory into my existing.  And if possible some code example would be great.
    Thanks.

    I have tried many times on Ben's method and it didn't work.
    I have also tried the method from Adobe's documentation site.
    Method 1
    <ul spry:region="dsStates" spry:if="{ds_RowCount} != 0" spry:repeat="dsStates" spry:test="'{name}'.match(/^[amn]/i);" spry:choose="choose">
         <li spry:when="'{name}'.match(/^n/i);" style="color: red;">{name}</li>
         <li spry:when="'{name}'.match(/^m/i);" style="color: blue;">{name}</li>
         <li spry:when="'{name}'.match(/^a/i);" style="color: green;">{name}</li>
    </ul>
    Method 2
    <div spry:region="dsStates" spry:if="{ds_RowCount} != 0">
    <table border="1" spry:repeatchildren="dsStates" spry:test="'{name}'.match(/^[amn]/i);" spry:choose="choose">
         <tr spry:when="'{name}'.match(/^n/i);" style="background-color: red;"><td>{name}</td></tr>
         <tr spry:when="'{name}'.match(/^m/i);" style="background-color: blue;"><td>{name}</td></tr>
         <tr spry:when="'{name}'.match(/^a/i);" style="background-color: green;"><td>{name}</td></tr>
    </table>
    </div>
    Can anyone make it plain and simple of how the data source should look like ?
    I'm posting my source code here to make things easy.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    var KomtarETA = new Spry.Data.XMLDataSet("KomtarETA.xml", "komtareta/bus", {useCache: false, loadInterval: 100});
    </script>
    </head>
    <body>
    <div spry:region="KomtarETA">
      <table>
        <tr>
          <th>Route</th>
          <th>Current</th>
          <th>Destination</th>
          <th>Next</th>
          <th>Lane</th>
        </tr>
        <tr spry:repeat="KomtarETA">
          <td>{route}</td>
          <td>{current}</td>
          <td>{destination}</td>
          <td>{next}</td>
          <td>{lane}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>
    The above is the HTML file I start working with.
    The {Current} field needs to have it's data periodically changing color & addition of flashing effect based on it's input from the XML data.
    So my question is how do I work about ? I don't quite get the explanation above.
    Thanks.

  • How enter event or change event in screen dialog program

    Hi anybody
    I want use enter event or change event in screen dialog program.
    how do i use it? anybody please tell me.
    Thanks
    S.Muthu.

    Hi Subu,
    From your thread i understood like you want to use enter key from keyboard.
    write the statement as below your eneter event will be triggered,
    When Next or ''.
    call screen 100. " or what ever you want to trigger.
    If this is not the answer you were expecting revert bacl more precisely what you expect actually.
    Cheers!!
    Venkat

  • Highlight fields that changed its value

    Hi all,
    I'm working on a form that goes from one user to another.  It's a fairly large and complex form (about 7 pages) with calls to multiple web  services.
    After the form is opened and some information is  populated into the fields, a user will be able to change the values of some  fields, and then will submit the form.  The next user in the process will get the form and open it up from  his/her To-Do queue.  The fields with the  changed values (changed by the previous user) would need to be visually  identified to this next user.  When that  user finishes working on the form and submits it, it is opened by the next user  in line. and the changed information STILL needs to be visually identified.  We have found it is easy to highlight a  changed field while a user is working on the form (using the change event) but  it is more difficult to make that highlight stay visible all the way through the  process as different people get the form. I thought about making a hidden field  for every field in the form and compare the values in the validation event. but  this would effectively double the size of the form and all those hidden values  would need to be included in the XML schema (doubling the size of the XML  schema).
    We would appreciate ANY assistance on a proper  approach.

    That does make things clearer.  You will have to save the change information in the XML.  I realize that you don't want to save an xml node for every field, but there is a better way.  You can use scripting to add data nodes to the XML data in the form.  I'm thinking of the following:
    Include an empty container node in your XML schema: <HighlightedFields></HighlightedFields>
    When a field is changed, in the field's change event call a common script: HighlightChangedField, passing in the object.  The script will highlight the field (set the border a certain color or whatever).  It will also add node underneath the HighlightedFields data node with the SOM expression of the field.  The SOM expression is the "path" of the object in the form heirarchy, sort of like an xpath.  So if you have a subform named Subform1 and you change the Name and Address textfields, you might end up with something like:
    <HighlightedFields>
        <HighlightedField>
            <SOMExpression>xfa[0].form[0].myform[0].Subform1[0].Name[0]</SOMExpression>
         </HighlightedField>
        <HighlightedField>
            <SOMExpression>xfa[0].form[0].myform[0].Subform1[0].Address[0]</SOMExpression>
         </HighlightedField>
    </HighlighedFields>
    The upside of this is that you only store XML nodes for what is changed instead of needing a specific XML node for each field.  The downside is that you will need a call to the common script in every field's change event: HighlightChangedField(this);
    Now, to make this work when a form is loaded the next time, in the initialize event at the topmost subform in the hierarchy you add a script that walks the HighlightedFields data node, and for each HighlighedField entry you highlight the contained object.  You can get a reference to an object using its SOM expression, so just take the SOM expression from each entry and do an xfa.resolveNode(SOMExpression) to get the object, then set whatever attributes you want to highlight the field.
    The big issue I see with this would be if you have dynamically added objects on your form.  In that case you would probably need to store the instance index along with the SOM expression for each changed object, then use that instance number when highlighting on form load.
    I don't know how much you know about scripting, so I hope the above makes sense.  If you need more help I can try to mock something up.
    Regards,
    Kevin

  • Dynamic form font color changes after saving

    I have a dynamic form that before the user clicks inside a textfield ghost text appearance is set to red once the user starts typing I have an event set to turn the font to black.
    The problem is, once form is saved and reopened the font color is red instead of black. How can I get the font color to remain black?
    I am thinking that script should be in the PreSave event if so, please provide an example of how it should be written.
    Thanks

    I have several events happening in the text field
    for the ghost text (tool tip) I have set an initialize event: (by the way I did choose the color red for the font in the color picker for the tooltip color)
    this.execEvent("exit");
    this.format.picture.value = "null{' " + this.assist.toolTip.value + " '}";   
    Enter event: (this changes the font to black and bullets appear)this.fontColor + "0,0,0";
    this.font.posture = "normal";
    if(this.rawValue === null)
        this.rawValue = "l ";
    Exit event
    if (this.isNull)
       this.fontColor = "255,0,0,";
       this.fontposture = "italic";

  • Enter event not triggering for read-only checkbox

    I have some objects in a form that get "locked" when the user signs the form.  I'm not using the digital signatures.  Instead, when the user types their name into the signature text field, a script runs on the change event that makes all of the fields in the form read only.  It also unlocks the fields if the signature is deleted.
    I was worried that we would get a lot of phone calls with users that didn't understand that the form had locked ("Why doesn't this form work?!"), so I added some code to the enter event for all of the fields that would pop up a messagebox to explain to people trying to edit a signed form that the form was locked and that they would need to delete the signature to edit the form.
    This plan works perfect for my text fields and decimal fields.  It does NOT work at all for my checkboxes.  For some reason, the enter event is never triggered for read-only checkboxes.  I don't see any other events that would obviously work for me though.  Any ideas?
    Thanks

    Thanks, those are reasonable suggestions.
    In the first suggestion, I'm unclear about one aspect of how I would accomplish this.  I assume I would allow people to modify fields in the form, but that when they did, a msgbox would pop up that would inform them that, if they continued with this modification to a signed form, the signature would be removed.  I'm all good to that point.  But if they answered that they do not want to continue modifying that field and removing the signature, how can I code it to set the value back to what it was before the change?  Is there some method that will give me access to the value of the field BEFORE the attempted modification?  I went looking for something like $.previousvalue, but found nothing.
    I'd suggest that I could use a two-stage solution, in which I store the previous value on the enter event, and save it just in case they do not want to change the field when prompted by the msgbox, but since the enter event does not exist for checkboxes (my original problem), that seems like it won't work.
    As far as radio button suggestion, I like radio buttons very much except for one fatal flaw: they aren't (as far as I can tell) clearable.  That is a shame.  Clearly some people (like me) want both exclusivity AND clearability.  And we'd like the controls to have an enter event.  But I know I'm demanding   Anyway, as it is, I just end up having to use checkboxes and create a boatload of silly code to make them exclusive.
    Emily

Maybe you are looking for

  • CASE Expression question

    Hi, I am wondering how to implement case logic where THEN statement would be written only once for many WHEN's. This example is from the oracle documentation, I extended it a bit. SELECT cust_last_name, CASE credit_limit WHEN 100 THEN 'Low' WHEN 200

  • Guest OS communication

    Hi Folks, I am trying VMware for 1st time and stuck at network config. Running host OS Win7.. installed VM 4.1 and created 2 guest OS (Win XP). I want to setup communication (main aim it to create cluster) between two newly created guest OS. So for n

  • Need help setting up a mac to mac network (2 machines)

    First, I apologize for the cross posting, but this got no replies in the networking category. I have a new mac mini and I'm struggling to setup a network with the mini that shows my old G5 dual 1.8. The old computer has two internal hard drives. I've

  • IWeb is open but my blog won't come up

    This has been happening for a few days now. Whenever I open iWeb, it is open, in fact it has the big red 1 on it, meaning something new has happened to my blog, but my blog is nowhere to be found! I've tried quitting and restarting, restarting the wh

  • Shooting night video with the G16

    I'm looking for advice. I've only had my Canon G16 for about a month and I need to do some extensive night video. I'm wondering what's the best setup to use. Can I adjust ISO, white balance, etc. while shooting video? (I know I can adjust exposure co