How to turn icons enabled/disabled by js

Hi, I'm looking for suggestions abouts the best way to turn icons from enabled to disabled (e.g. grayed) and the contrary by means of js only, e.g. without reloading the page. Candidates I know of:
- render both icons, using hidden visibility for the unwanted one.
- render both icons at the same absolute position, turning zIndex as needed.
- use transparent icons, playing with background color.
Thanks for any suggestion.

Just replace images using JS.
var image = document.getElementById('image');
image.src.indexOf('enabled.gif') > -1 ? image.src = 'disabled.gif' : image.src = 'enabled.gif';I am using indexOf instead of == , because it usually returns the absolute path instead of just the relative path.

Similar Messages

  • How to turn on/enable sql logging

    Our environment is Java EE 5, JPA, Weblogic 10, KODO 4.1.2, and our DB is Oracle 10gr2. We are trying to figure out what to do/what has to be set up in order to see the actual SQL going to the database. I have the following in the persistence.xml:
    <properties>
    <property name="kodo.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>
    </properties>
    which I found posted somewhere while trying to resolve this, but it does nothing. There is no sql syntax whatsoever in any weblogic log or on the weblogic console. For what it's worth, we have tried both XA and the thin drivers, but that has no effect either. We have tweaked the logging options in the WL console as well, but nothing seems to have any impact on SQL logging. Any help would be greatly appreciated.

    Russ Burkert wrote:
    That did not work. There is nothing on the console or any of the logs that is new concerning sql logging. What didn't work?
    Added the specified properties to the driver using the console and modified the
    commEnv script so wlspy.jar is included in the WEBLOGIC_CLASSPATH. WebLogic was restarted.
    However, spy.log is created and at least I can now see some database errors
    (ORA-xxxx) coming back from Oracle (which is very helpful). But, no actual SQL in that log, either.
    Upon further scrutiny of spy.log, I can see this kind of stuff:
    PreparedStatement[35].setString(int parameterIndex, String x)
    parameterIndex = 39
    x = RN22
    OK
    All of our database transactions right now are inserts. I see how this maps to the JPA
    objects, but it is quite grueling to have to figure out the index/offset of each piece
    of data in the object and then cross-reference that to its DB table/column equivalent.
    Is there any way to just see a simple INSERT statement somewhere?There has to be INSERT statements in the spy log. They may well be done by PreparedStatements,
    which show their SQL once at the prepare, early in the log, and then re-executed indefinitely.
    Find the SQL for a given prepared statement so you can know what failed when the XXXth execute()
    returns a SQLException.
    Joe

  • How can I re-enable "Disable Protection on This Page " option?

    Accidentally chosed option Disable Protection on This Page instead of Not Now.
    Because of that my antivirus program is launchig warnings very often.
    It bothers me a lot and scares me.
    Please, help me.
    Thank you.

    The warnings may be related to content injected by an add-on. You may check for unwanted extensions on the Add-ons page. Either:
    * Ctrl+Shift+a
    * orange Firefox button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then, if in doubt, disable.
    Usually a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    Does that help?
    If you do find anything suspicious, it would be a good idea to also:
    (1) Go to the Windows Control Panel, Add/Remove Programs, and click on the Installed On column heading to bring the most recent additionals to the top. You may be able to remove crap here.
    (2) Supplement your regular security software with some additional "on demand" scans using the clean-up tools listed in this article: [[Troubleshoot Firefox issues caused by malware]].

  • InvokeMethod and enabled/disabled

    Hi.
    I have created AM implementation and add new method. Exposed it to client.
    And by drag'n'drop-ing this exposed method to JSF there is a button which executes this method.
    By default on this button there is one property Disabled which is set to #{!bindings.methodName.enabled}.
    How do I handle enabled/disabled from my AM implementation? My logic for disabled toggle is very complex and I want it to put it in Java implementation not inside EL.
    Thx
    Regards
    Boris

    On my PageDef there is a
      <methodAction id="methodName" RequiresUpdateModel="true"
                      Action="invokeMethod" MethodName="methodName"
                      IsViewObjectMethod="false"
                      DataControl="AppModuleDataControl"
                      InstanceName="AppModuleDataControl.dataProvider"/>I can add permission to that method action like
      <methodAction id="methodName" RequiresUpdateModel="true"
                      Action="invokeMethod" MethodName="methodName"
                      IsViewObjectMethod="false"
                      DataControl="AppModuleDataControl"
                      InstanceName="AppModuleDataControl.dataProvider">
          <permission xmlns="http://xmlns.oracle.com/adf/security"/>
        </methodAction>How do I implement that permission(s)?
    Regards

  • How do i enable/disable call waiting option in iphone5

    How to enable/disable call waiting option in iphone5. setting --> phone does not show up call waiting / call forwarding options

    I've gone through your message completely, if you do not have the Call Waiting option under Settings > iPhone it means your carrier does not let you access that feature on the phone. Contact them and see if they have dialing codes to turn it off and back on.

  • TS4036 How Can I re-enable my disabled from my Computer(the Ipad doesn't allow me any access to the Ipad)

    How can I re-enable a disabled Ipad from my computer?

    By not allowing enough time to reset, do you mean you have tried a reboot by holding both the power and home buttons until the apple logo appears, ignoring the red slider?  If so, are you able to power down just using the power button?  Does it then restart on its own?
    If you cannot get it to reboot, stay powered down, take it to an Apple store genius bar and have the technicians test it to see what is wrong...that is most likely a hardware issue.

  • Does anyone know how to enable/disable a dropdown menu in Forms at runtime?

    Is there a way how to disable/enable dropdown menu for menus that have multiple sub levels in Oracle Forms? I am trying to use the set_menu_item_property function but this takes 'menu.item' format for the first argument. I am trying to enable/disable a menu item in the form of 'menu.item.subitem' and was not able to do it using this function. If anyone knows a different function or method, please reply. I have shown an example below.
    Setup -> Software -> Front Page
    From the above example, I can enable/disable Software using set_menu_item_property function. But, how do I enable/disable the Front Page menu in Oracle forms at runtime?
    Thanks
    Edited by: user480347 on Aug 24, 2010 3:37 PM

    Yes you are on the right track. You need to pass then complete menu name to set_menu_item_property
    Immediate_parent menu.item_name e.g
    For example you have menu like this
    Id like
    A1    A10 > A1010
    Home > Input > Form 1
    A1    A10 > A1020
    Home > Input > Form 2 To disable Form 2 you must pass menu name as
    A10.A1020Hope it helps

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

  • The first time i turn on my personal hotspot, i chosen usb only, how can i re-enable wifi hotspot?

    The first time i turn on my personal hotspot, i chosen usb only, how can i re-enable wifi hotspot?

    Yeah, I just noticed it   So does this mean I can't wake my S10 thru LAN right?  Anyway, do you have any suggestions?  I'm looking for a Docking Station, but I can't find any.   Can a USB replicator turn this on?  Any ideas would be greatly appreciated

  • How to enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • How can i move or disable my facetime icon?

    How can I move or disable my facetime icon?

    Hold it down until the icon 'wiggles' and drag it to a back page or a folder you create for unused apps.

  • How to Enable/Disable suppressUpload and suppressDownload

    my xml doesnt have this attribute
    how to enable /disable supressUpload and suppressDownload.
    <?xml version="1.0" encoding="utf-8" ?>
    - <MeRepApplication schemaVersion="1.1" id="ZAM_09" version="09">
      <Property name="CLIENT.BUILDNUMBER" />
      <Property name="C_APPLRESOLVE" />
      <Property name="DATA_VISIBLE_SHARED">X</Property>
      <Property name="E_APPLRESOLVE" />
      <Property name="FACADE_C_CLIENT">X</Property>
      <Property name="FACADE_E_CLIENT">X</Property>
      <Property name="HOMEPAGE.INVISIBLE" />
      <Property name="INITVALUE" />
      <Property name="RUNTIME">JSP</Property>
      <Property name="TYPE">APPLICATION</Property>
    - <SyncBO id="ZAM_09" version="2" type="twoWay" allowCreate="false" allowModify="true" allowDelete="false" reqDirectSync="true" downloadOrder="1">
    - <TopStructure name="TOP">
    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">
      <Input type="create">false</Input>
      <Input type="modify">false</Input>
      </Field>
    - <Field name="BUKRS" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="ANLN1" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="ANLN2" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <ChildStructure name="010">
    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">
      <Input type="create">false</Input>
      <Input type="modify">false</Input>
      </Field>
    - <Field name="BUKRS" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="ANLN1" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="ANLN2" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="KOSTL" type="C" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="WERKS" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="STORT" type="C" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="TXT50" type="C" length="50" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="TXA50" type="C" length="50" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
      </ChildStructure>
      </TopStructure>
      </SyncBO>
      </MeRepApplication>

    Just adding on to Nameeta's post, there is a supress download checkbox in the advanced setting s link(Settings -> Advanced Settings) on the client, this will supress downloads for all syncbos and not just for any one syncbo. Also there are no tools in the middleware to add these settings, the only way to do this is to modify the xml manually.
    Best Regards,
    Karthik
    Message was edited by:
            Karthik V Setty

  • How to enable /disable MWI ?

    Hi,
    I want to write a small application to enable/disable IP Phone lamp. But confused by how to enable MWI(Message Waiting indicator). TAPI ? AXL ? or some others , which can implement it . Could you give me some direction, thank you !

    I never checked what happens on a database level. However, for any actions that have a direct influence on a device, writing directly into the database is the wrong approach.
    As an example: if you set a forward (callforward all) via database (and not AXL), calls may well be forwarded, but the phone's status won't be adapted (so you don't have the callforward indicator and no information about the callforward). If you set the callforward via JTAPI or AXL, the phone's status will also be updated to show that it has been forwarded.
    When you configure a phone, you'll see the same thing in many cases.. especially in older CCM releases, you were often told that you need to reset the phone to apply a change you've made. In newer versions, this is often (but not always done automatically.. you'll see the phone restart after pressing update).. it's the same thing here.. you write into the database, but then you also have to apply those changes to the phone (one good example is changing a line label.. you won't get the label to change on the phone by just writing to the database.. you have to restart the phone for it to load the new label name).
    Even if you need to get the mwi status, JTAPI will do that for you (CiscoAddress.getMessageWaiting - and to set it, it's CiscoAddress.setMessageWaiting). Since you need a CTI command to set the MWI, you can as well resort to CTI to get the MWI status as well and don't bother with the database.
    fkcallingsearchspace_mwi is definitely not it though - I can tell you that without looking at the diagram since fk_anything is a foreign key and you have an uuid value in that field. The mwi status would be a boolean since it can have just two values. In fact, it's numplan.ismessagewaitingon but as I said.. with any element that has a direct influence on a phone's appearance or behavior, you cannot just change it... at best you need a phone reset. And if you do it with JTAPI (and probably TAPI too.. I can't be sure because I've never done TAPI and hope to never have to), you can change the MWI status on the fly without having to restart the phone, which is much more elegant.

  • Cmfctoolbarcomboboxbutton, how to enable/disable

    Hi,
    I inserted a CMFCToolBarComboBoxButton object in my toolbar. all work fine except enabling and disabling ComboBox according state of my App.
    I used EnableWindow but the control still actived.
    Any idea?
    Tanks.
    My creation code :
    if (wParam == IDR_MAINFRAME24) {
    m_ComboButton = new CMFCToolBarComboBoxButton(ID_MONTH_FILTER, GetCmdMgr()->GetCmdImage(ID_MONTH, FALSE),
    CBS_DROPDOWNLIST);
    CString strMonths, strMonth;
    int i, curPos = 0;
    if (strMonths.LoadStringW(IDS_MONTHS)) {
    i = 1;
    //m_ComboButton->AddItem(_T(""), 0);
    strMonth = strMonths.Tokenize(_T(";"), curPos);
    while (strMonth != _T("")) {
    m_ComboButton->AddItem(strMonth, i);
    strMonth = strMonths.Tokenize(_T(";"), curPos);
    i++;
    m_wndToolBar.ReplaceButton(ID_MONTH, *m_ComboButton);
    CMFCToolBarComboBoxButton * pMonthCombo = CMFCToolBarComboBoxButton::GetByCmd(ID_MONTH_FILTER, FALSE);
    if (pMonthCombo) {
    pMonthCombo->SetCenterVert(false);
    pMonthCombo->SetText(_T("Advanced filter"));
    pMonthCombo->EnableWindow(FALSE);

    Tank you for your help.
    you are right, but a update cammand ui message is not send by CMFCToolBarComboBoxButton object.
    I make a test on my side and mesajflaviu's suggestion really helpful. Using ON_UPDATE_COMMAND_UI macro, I can disable the CMFCToolBarComboBoxButton in the CMFCToolBar. See my test code snippet:
    BOOL m_enable; //use to detect if enable the combo box
    afx_msg void OnUpdateCombo(CCmdUI *pCmdUI);
    ON_UPDATE_COMMAND_UI(IDR_COM, &CMainFrame::OnUpdateCombo)
    void CMainFrame::OnUpdateCombo(CCmdUI *pCmdUI)
    pCmdUI->Enable(m_enable);
    void CMainFrame::OnEditDisable()
    // TODO: Add your command handler code here
    m_enable = FALSE;// use a menuitem to disable the combo box
    ///////create the CMFCToolBarComboBoxButton//////////
    LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM lp)
    UINT uiToolBarId = (UINT)wp;
    TRACE("CMainFrame::OnToolbarReset : %i\n", uiToolBarId);
    switch (uiToolBarId)
    case IDR_TOOLBAR1:
    m_ComboButton = new CMFCToolBarComboBoxButton(IDR_COM, GetCmdMgr()->GetCmdImage(IDR_COM, FALSE), CBS_DROPDOWNLIST);
    m_ComboButton->EnableWindow(true);
    m_ComboButton->SetCenterVert();
    m_ComboButton->SetDropDownHeight(25);
    m_ComboButton->SetFlatMode();
    m_ComboButton->AddItem(_T("OPTION1"));
    m_ComboButton->AddItem(_T("OPTION2"));
    m_ComboButton->SelectItem(0);
    m_wndToolBar.ReplaceButton(IDR_COM, *m_ComboButton);
    break;
    return 0;
    Check the result screenshot:
    Enable:
    Disable: Color is turning yellow and cannot click
    Best regards,
    Shu
    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.

  • How to create "Verbose mode" (Enable/disable trace output)?

    Hi there! I'd like to do as Papervision:
    // Block Papervison3D trace output
    Papervision3D.VERBOSE = false;
    that is, a global variable for enabling/disabling the trace outputs of my own program. I come up with creating
    a class and putting a static boolean member variable. But there is something I'm not sure about: How to use
    it...
    For example: every time I need to do a trace, would I have to put this ? -->
    if( MyClass.VERBOSE ) trace("whatever");
    So it isn't needed to instance the object because a static variable is used. That's the way, isn't it?
    Thanks and regads.

    From the book I'm reading, the author uses it the same way you're saying:
    Inside your Classes, you have
    private var _verbose:Boolean = false;
    I noticed he uses it always (or almost) in the constructor of the classes:
    public function whatever (var:*, verbose:Boolean);
    //I tend to use verbose:Boolean = false on the constructor too so you don't have to always set it.
    inside the constructor you have:
    _verbose = verbose;
    and normaly inside methods handling events like Event.OPEN, Event.INIT, IOErrorEvent.IO_ERROR, HTTPStatusEvent.HTTP_STATUS, you have something like this:
    private function onOpen (e:Event):void {
         if (_verbose) {
              trace("The loading process has begun, or whatever");

Maybe you are looking for

  • [SOLVED] External USB HDD drive gets disconnected randomly

    Hi, I'm encountering problem with external HDD drive. Recently I've installed a new drive and reinstalled Arch. I use my old disk as external one connected by USB. Unfortunately it get's disconnected randomly. This is what I found in journal: journal

  • How to update certificate into ACE

    need to upload cert file (.pem) received fro CA and getting bellow error message: LB1#   crypto import terminal wwwtest.domain.com Please enter PEM formatted data. End with "quit" on a new line. -----BEGIN CERTIFICATE-----MIIG3zCCBcegDb2x1bWJpYTEQMA4

  • Employee Information iViews dont display in MSS

    Hi All, I installed and configured MSS Business packages. All the MSS is views seems to work fine but for the  <b>Employee Information iViews</b>. We have ERP2005, EP7.0 of NW2004s SP9. After logging into the Portal as an MSS user I go to Team and wh

  • SQL Query very slow.

    I have a table which has 40million data in it. Of-course partitioned!. begin pk_cm_entity_context.set_entity_in_context(1); end; SELECT COUNT(1) FROM XFACE_ADDL_DETAILS_TXNLOG; alter table XFACE_ADDL_DETAILS_TXNLOG rename to XFACE_ADDLDTS_TXNLOG_PTPA

  • System out of memory during deployment

    Hello everybody, I have a J2EE project and a respective EAR-project to deploy my application on the WebAS 6.40 (SP13). Since yesterday I have the problem that when I add a new entity bean to my J2EE project I got the following error during deployment