[CLOSED] Changing the Textfields CSS

  1. #1

    [CLOSED] Changing the Textfields CSS

    Hi all

    In need to mark some Textfields with a green Border.
    I think about this CSS

    .withConfirmationsCode {
      border-color: green;
    }
    Which Method can I use to apply the CSS ?

    Peter
    Last edited by Daniil; May 09, 2013 at 3:57 AM. Reason: [CLOSED]
  2. #2
    Hello!

    You can apply it in this way:

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <style>
            .withConfirmationsCode {
                border-color: green;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        
        <ext:TextField runat="server" FieldCls="withConfirmationsCode"></ext:TextField>
    </body>
    </html>
  3. #3
    Quote Originally Posted by Baidaly View Post
    <ext:TextField runat="server" FieldCls="withConfirmationsCode"></ext:TextField>
    And from Java Script ?

    Peter
  4. #4
    Hi,

    In that case I would use the Cls property and addCls/removeCls methods.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <!DOCTYPE html>
     
    <html>
    <head runat="server">
        <style>
            .withConfirmationsCode input.x-form-text  {
                border-color: green;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
         
        <ext:TextField ID="TextField1" runat="server" Cls="withConfirmationsCode" />
    
        <ext:Button runat="server" Text="Add" Handler="App.TextField1.addCls('withConfirmationsCode');" />
    
        <ext:Button runat="server" Text="Remove" Handler="App.TextField1.removeCls('withConfirmationsCode');" />
    </body>
    </html>

Similar Threads

  1. [CLOSED] Problems textfields empty
    By JCarlosF in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 05, 2013, 12:45 AM
  2. AjaxMethod and and textfields
    By FreddieBoo in forum 1.x Help
    Replies: 1
    Last Post: Jul 20, 2009, 6:47 AM
  3. MessageBox With 2 prompts/textfields?
    By Tbaseflug in forum 1.x Help
    Replies: 2
    Last Post: Jun 10, 2009, 10:22 AM
  4. html tags in textfields
    By [WP]joju in forum 1.x Help
    Replies: 0
    Last Post: Apr 16, 2009, 9:46 AM
  5. Adding textfields to tabs
    By sz_146 in forum 1.x Help
    Replies: 0
    Last Post: Nov 13, 2008, 10:35 AM

Posting Permissions