Show/Hide on TextField with note doesn't affect note

  1. #1

    Show/Hide on TextField with note doesn't affect note

    When using an ext tag as per below:

        <ext:TextField runat="server id="MyTextField" Note="My Note">
    Actual Behaviour: Using the javascript show()/hide() functions doesn't show/hide the text of the note.

    Expected Behaviour: The note should show/hide as appropriate.

    Workaround:
    function showHideWithNote(fieldWithNote, show)
    {
        var note = fieldWithNote.el.dom.parentElement.children[1];
        if (show)
        {
            fieldWithNote.show();
            note.style.display = 'block';
        }
        else
        {
            fieldWithNote.hide();
            note.style.display = 'none';
        }
    }
  2. #2

    RE: Show/Hide on TextField with note doesn't affect note

    Hi,

    Thanks. Fixed. Also we introduced showNote/hideNote methods.


    Small tip for your workaround: there is noteEl field. So, you can use
     fieldWithNote.noteEl.style.display= ....
  3. #3

    RE: Show/Hide on TextField with note doesn't affect note

    Thanks for the rapid response! :) I hadn't spotted the "noteEl", useful to know!

    My only concern with the showNote/hideNote methods would be discoverability as I (and others I know) use the Ext API Docs as a reference manual for Coolite, which obviously won't have the two new methods in them.... Would it perhaps make more sense from a functionality and API cleanliness point-of-view to instead modify the show()/hide() methods so that as well as showing and hiding the parent control, they also acquire responsibility for the note? :=)
  4. #4

    RE: Show/Hide on TextField with note doesn't affect note

    Hi,

    show/hide methods are show/hide note as well. So, you don't need to call both (like show and showNote or hide and hideNote). show/hide method shows/hides field and note

Similar Threads

  1. [CLOSED] Note Right Align
    By speedstepmem2 in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 22, 2013, 1:59 PM
  2. Replies: 3
    Last Post: Jul 08, 2010, 8:48 PM
  3. [CLOSED] CompositeField and Note
    By bethc in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 27, 2010, 12:41 PM
  4. CompositeField Note problem
    By thedarklord in forum 1.x Help
    Replies: 2
    Last Post: Apr 29, 2010, 10:12 AM
  5. [CLOSED] Field Note desn't Hide!
    By Immobilmente in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 09, 2009, 11:32 AM

Posting Permissions