Retaining the Color of the row when it is refreshed in Javascript

Hi,
I have a checkbox when it is checked it will highlight the row with the color. When it is unchecked the color will go off. This is happening fine.
But the problem i have is that when i refresh the page or goes to some other page and come back the color is not retained eventhough the checkbox is checked.
I want the color to be retained even when the page gets refreshed.
Please do provide a solution for this since it is urgent. I will be waiting for ur replies..
Thanks,
M.Ananthu

try to make a hidden form that will hold the value of the colored form
ex. <input type="hidden" name="name" value="<%=colorOfForm%>"
you can pass this value to the next page.. so that when you go back to that page.. you will get the value of the hidden using request.getParameter(''name"); and set the color of the form using javascript

Similar Messages

  • Can you change the color of a row in a SUD

    Is it possible to change the color in a selected row in a SUD? I have multiple tables in my SUD were the user can select multiple rows from each table. The problem is that when the user selects rows in another table the last one selected in the previous table is not hi-lighted. I thought that if I change the color of the row when selected the user can see all the selections once he/she goes to another table.
    Thanks,
    AJL

    Hi AJL,
    There is no way to color rows of the table control in a SUDialog. You could consider using the ActiveX container control and using the Microsoft ActiveX table control, which might have that functionality. Note though, that then you need to either ensure that control is always on all your client machines or make provisions for it to be installed/registered.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How to change the color of specific row in ALV tree

    Hi,
    I m using method set_table_for_first_display of a class CL_GUI_ALV_TREE.
    The req is to change the color of specific row. Now can anybody tell me how to change the color of ALV tree. As in ALV tree and in this method 'set_table_for_first_display', there is no parameter IS_Layout.
    Pls suggest...

    hi
    hope this code will help you.
    Reward if help.
    REPORT zsharad_test1.
    TABLES: ekko.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    line_color(4) TYPE c, "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-datatype = 'CURR'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
    gd_layout-info_fieldname = 'LINE_COLOR'.
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    is_variant = z_template
    TABLES
    t_outtab = it_ekko
    EXCEPTIONS
    program_error = 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.
    ENDIF.
    ENDFORM. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    DATA: ld_color(1) TYPE c.
    SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekko.
    *Populate field with color attributes
    LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
    i.e. wa_ekko-line_color = 'C410'
    ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
    IF ld_color = 8.
    ld_color = 1.
    ENDIF.
    CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
    MODIFY it_ekko FROM wa_ekko.
    ENDLOOP.
    ENDFORM. " DATA_RETRIEVAL

  • How to set the color to the particular row in a report

    Hi
    I have a report in which I have an edit link(I changed the id as edit link)..When I click that link, all the details(the whole row details) will be appearing on the items nearer to the report to save the changes....
    I want to set the color for the particular row when a link is clicked and the color should not be changed until I save the changes in items...After saving the changes, the report should come in the normal color...this is my requirement..i refered many forums regarding this...But could not find solution....If anyone knows,please help me...
    Fazila

    Here is how I would implement
    Create renderer
    Add SkinnableContainer element and create a skin for this container namely SkinnableContainerSkin
    find the fill section in the skin
    add bitmap fill to the fill section and give the source of the image which you are planning to use(Hopefully this is a direct way of doing, may be you need to hack this a little to get it to work)
    I've never tried this, but should help you give some idea.

  • Set the color of a row depending the value of the column in JTable?

    Hi All,
    I have a JTable that add rows when the user clicks on the button. In this way there can be any no. of rows in my table. My table contains five columns. When a new row is added , it is added with new data each time. Also the data of the rows keep on changing time to time.
    My problem is that when the data value for the third column comes out to be -ve then color of the row should be red and if its value is +ve then the color of the row should be green.
    I have tried for this in the way but it is not working properly.
    public Component prepareRenderer(TableCellRenderer renderer,int rowIndex, int vColIndex)
         Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
    if(change<0 && rowIndex<table.getRowCount() )
              c.setForeground(Color.red);
              c.setFont(new Font("TimesRoman",Font.PLAIN,11));
    else if(change>0&&rowIndex<table.getRowCount() )
    c.setForeground(new Color(20,220,20));
         c.setFont(new Font("TimesRoman",Font.PLAIN,11));
    return c;
    where change is the value of the third column.
    Any help is highly appreciated.
    Thanx in advance.
    Regards,
    Har Krishan

    Why do you have 3 postings on this topic all made within minutes of each other? (see [url http://forum.java.sun.com/thread.jspa?threadID=574547&tstart=0]here and [url http://forum.java.sun.com/thread.jspa?threadID=574543&tstart=0]here).
    If you created a post by mistake then make a comment in the posting so people don't waste there time attempting to answer an old post.
    where change is the value of the third column.How do you know "change" is the value of the third column? Did you use a System.out.println(...) to verify this.
    A better approach is to use:
    Object o = table.getModel().getValueAt(row, 2);
    Then convert the Object to an int value and do your testing. This way you are guaranteed to be testing against the correct value.

  • I am trying to connect a Macbook Pro to a projector for a Powerpoint presentation. When I use a VGA cable, the color of the projected images are not good. When I use a USB cable, the projected image includes the presenter notes on my computer screen?

    I am trying to connect a Macbook Pro to a projector for a Powerpoint presentation. When I use a VGA cable, the color of the projected images are not good. When I use a USB cable, the projected image includes the presenter notes on my computer screen?

    To move an iPhoto Library to a new machine:
    Link the two Macs together: there are several ways to do this: Wireless Network,Firewire Target Disk Mode, Ethernet, or even just copy the Library to an external HD and then on to the new machine...
    But however you do choose to link the two machines...
    Simply copy the iPhoto Library from the Pictures Folder on the old Machine to the Pictures Folder on the new Machine.
    Then hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library'
    and select the Library that you moved.  That's it.
    This moves photos, events, albums, books, keywords, slideshows and everything else.
    Your first option didn't work because you imported one Library to another. Every version and thumbnail is imported like a distinct photo, you lose all your Albums, Keywords etc., the link between Original and Previews is destroyed, the non-destructive editing feature is ruined and so on. In summary: it's mess.
    Your second option didn't work because you simply referenced her library on the old machine.
    Regards
    TD

  • Just updated to new Firefox - now when clicking on a website to visit the color of the print no longer changes to indicate that I have visited that site already. How can I get that feature again?

    Since updating to new firefox I have lost a very helpful tool. Before, when I clicked on a website to visit, the color of the print would change from blue to purple to indicate that I had visited that site. Now it does not do that so it is difficult to keep track of what sites I have visited and what sites I haven't when looking down the list of possible sites to visit.

    Make sure that you do not run Firefox in permanent Private Browsing mode.
    *https://support.mozilla.com/kb/Private+Browsing
    *You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    *To see all History and Cookie settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    * Deselect: [ ] "Permanent Private Browsing mode"
    Make sure that the History is enabled:
    * Tools > Options > Privacy > Firefox will: "Use custom settings for history" > Remember my browsing history
    See also http://blog.mozilla.com/security/2010/03/31/plugging-the-css-history-leak/

  • In Dreamweaver 6, I created a new fluid layout. I set up (4) DIVs. In the 3rd div, I changed the font color. The new color shows up on the website when viewed in my computer desktop, but, when viewed in a tablet and a cell phone, the color of the font doe

    In Dreamweaver 6, I created a new fluid layout. I set up (4) DIVs. In the 3rd div, I changed the font color. The new color shows up on the website when viewed in my computer desktop, but, when viewed in a tablet and a cell phone, the color of the font does not change. It's the same in Dreamweaver's Live view. It shows the new color on Desktop view and not in the cell phone or tablet view. Also, I changed the font itself in one of the DIVs and it shows up in the new font on the desktop view and website viewed thru the computer, but, not on the tablet or cell phone. Can someone please explain. I want to be able to change the fonts and colors for viewing in the tablet and cell phone, also. The fonts were all standard fonts. Sans-erif and Verdana and Arial were tried. Thanks.

    I will lock this discussion because of duplicate post.

  • When will the color of the  battery icon  in the top bar will become red?

    What is the percentage of battery life at which the color of the  battery icon  in the top bar will become red? 20% or 10%?

    it is not a good idea to drain you macbook all the way down to see when it turns red.  if it ever does - i've never seen mine red when it's down to 10%.
    if you follow some of the threads here - some people who drained their battery all the way down to 0% can't turn their macbook back on.
    From Apple's website:
    Standard Maintenance
    For proper maintenance of a lithium-based battery, it’s important to keep the electrons in it moving occasionally. Apple does not recommend leaving your portable plugged in all the time. An ideal use would be a commuter who uses her notebook on the train, then plugs it in at the office to charge. This keeps the battery juices flowing. If on the other hand, you use a desktop computer at work, and save a notebook for infrequent travel, Apple recommends charging and discharging its battery at least once per month. Need a reminder? Add an event to your desktop’s iCal. When your battery no longer holds sufficient charge to meet your needs, you may choose to replace it. If your notebook came with a built-in battery, you should have the battery replaced only by an Apple Authorized Service Provider.

  • On my screen the image is clear and the colors are right, However when I print to either my epson of HP the image color is off.

    On my Mac screen my photo image is clear and the color are right, however when I print to either my epson 2200 or my HP printer bother the colors are off and the image is not as clear as on the screen.

    Hi there,
    This article should cover the issue you are experiencing. Give the steps outlined a shot and let us know if it helps.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • I was in the middle of using my iPhone 4 running on the latest iOS before iOS 6 and the screen went black but you can see it is still on because the color of the screen is blueish blackish like when your phone is turning off. Any suggestions?

    I was in the middle of using my iPhone 4 running on the latest iOS before iOS 6 and the screen went black but you can see it is still on because the color of the screen is blueish blackish like when your phone is turning off. Any suggestions?

    Reset the device by pressing and holding the home and power buttons for 15-20 seconds until the white Apple logo appears.

  • When using pdfFactory with Firefox, why are the colors on the pdf not correct?

    The colors are vastly different when using pdf Factory with Firefox. When using pdfFactory with IE, they are both the same.

    There doesn't seem to be a one-size-fits-all answer, because what works for one printer doesn't necessarily work for another, and I don't have your printer so I can't advise on specifics...
    However, perhaps we can discover a set of settings that will work...
    If you File - Print, choose Photoshop Manages Colors, in the Printer Profile section do you see profiles specific to your printer (e.g., with the name Kodak in them)?
    If so, choose one of them that seems appropriate given the paper you're using.
    If not, try choosing sRGB IEC61966-2.1.
    Now, before you continue, press the [Print Settings...] button.  This brings up the printer driver dialog.  You may have to go through [Advanced] buttons or whatever, but what you're looking to do here is to disable the printer driver's color management logic.  In other words, if you can find a color-management / ICC profile handling section, set it to "no color management" or equivalent.  OK back out to Photoshop's print dialog, then press [Print].
    The key here is that if Photoshop manages the color transforms, the printer driver should not be set to do so - or vice versa.
    If you're presented with the printer driver's dialog again, double check that the settings you chose above are still set, for good measure, and try a test print.
    -Noel

  • How do I change the color of the highlight when hovering over answers in the quiz?

    Hi
    I am trying to change the color of the highlight when hovering over answers in the quiz.  My companies standard font color is grey and so is the highlight when i hover answers.
    Is it possible to change this?
    Thanks
    Charlene

    No, it is (still) not possible to change that hover color, not even in CP8.0.1. I recommend to enter a feature request: Adobe - Feature Request/Bug Report Form

  • When I visit a site the color of the link seldom changes to the color I have selected. also even when it does change, it reverts to the unvisited color in a day or so.

    When I visit a site the color of the link seldom changes to the color I have selected. Also even when it does change, it reverts to the unvisited color in a day or so. The history is set to over 300 days and everything is there as far as I can tell.

    Does this problem affect all sites, or only some? Try going to a Google search results page and click a few links. Then, come back a day later and see if they are still visited.
    It may be that the links that get reset are coming from a frameset. Firefox only remembers history from framesets temporarily, which affects sites that use them. (An example would be the craigslist forums)

  • Changing the color of a JButton when it is pressed

    Hey all,
    What I want to do probably is fairly simple, but I just can't seem to get the job done. I want to create JButtons which have a specific color (let's say Color.blue), which is dark blue when it is not pressed and becomes lighter blue when it is pressed. After I release my mouse button, it should become dark blue again. Since I want to do a bit more with those buttons, I created a special class that extends the JButton. It looks like this:
    public class MemjogButton extends JButton
    private Color brightColor;
    private Color darkColor;
    public MemjogButton(Color c)
    brightColor = c;
    darkColor = c.darker();
    setBackground(darkColor);
    addMouseListener(new MemjogButtonEar());
    class MemjogButtonEar extends MouseAdapter
    public void mousePressed(MouseEvent e)
    setBackground(brightColor);
    public void mouseReleased(MouseEvent e)
    setBackground(darkColor);
    Now when I use such a button, when I press it, it still gets the same grey color as always when pressing a normal JButton. This probably has something to do with painting, or some setting but i'm not sure. when I press the button and move my mousepointer (mousebutton still pressed) off the button, the color of the button changes to the bright color!
    Can you tell me what the problem is? Many thanx in advance!

    I testet your program with
    new MemjogButton(Color.lightGray);
    and it works fine!

Maybe you are looking for

  • Where do Software Updates reside until they're installed?

    A while back I enabled Software Update to "automatically download important software updates". So now the updates are of course downloaded and waiting for my OK to install them. I suspect though that many updates which I don't need or want are downlo

  • New ipod & cover flow

    Hi, I've recently bought the new 80gb ipod classic. I also updated the itunes running on my pc to the latest version. After I installed this the cover flow no longer groups my albums properly. Albums with numerous artists featured appear several time

  • Time Machine Initial Setup

    Hi, I have been searching post and havent found a clear cut answer. It is regarding the intial setup of Time Machine on an External Hardrive that I already have files on. Do I have to delete these files that I have on my external just to install Time

  • Casting jobjects

    Hi, i face a problem in casting jobject in JNI. From Java layer i receive a DataType of super class object. but in JNI layer i need to access the methods of subclass, for that i need to cast to subclass. I tried to cast the jobject to my DataType. Th

  • How to prevent click through?

    Basically I have mulitple buttons on the stage. Every button on the stage is an instance of the same component. When one of the buttons is pushed, that component imports an MC from the library to the stage (popup window). It then creates a text box a