JavaScript to remove the contents of the fields based on the checkbox disabled

I'm writing a java script to delete the contents of the fields when a checkbox's checked to disabled.  I have a java script to fill in the field when the checkbox is enabled (which works perfectly).  But in the case where the user accidentally checks the field and wants to uncheck the box I would like the content of field that were initially filled from the first java script to be removed/disabled.

Here is my code:

Mouse Up Script for the checkbox (function() {}

Do something if this check box is not selected.
if(Event.Target.Value==="on") return;

Copy the values from text previously filled in those other fields.

getField("AP_Unit").value = Null;
getField("AP_StreetAddress").value = Null;
getField("AP_City").value = Null;
getField("AP_Province").value = Null;
getField("AP_ZIP").value = Null;
getField("AP_Country").value = Null;

})();

Sorry it works... that make three equal signs "=" means?

Here is my code

If {(event.target.value==="Off)"}
getField("AP_Unit").value =("");
getField("AP_StreetAddress").value =("");
getField("AP_City").value =("");
getField("AP_Province").value =("");
getField("AP_ZIP").value =("");
getField("AP_Country").value =("");

} else {}

getField("AP_Unit").value = getField("HO_Unit").valueAsString;
getField("AP_StreetAddress").value = getField("HO_StreetAddress").valueAsString;
getField("AP_City").value = getField("HO_City").valueAsString;
getField("AP_Province").value = getField("HO_Province").valueAsString;
getField("AP_ZIP").value = getField("HO_ZIP").valueAsString;
getField("AP_Country").value = getField("HO_Country").valueAsString;
}

Tags: Acrobat

Similar Questions

  • JavaScript to remove the subform

    Hello!

    Can someone please tell me what am I doing wrong and why the subform is not removed when I push the button 'Remove the position' ?

    I use the command _Subformname.removeInstance (1);

    Is that correct. Help, please!

    Set the property to "min" on each form as '0' (zero) before making a removeInstance and set the argument removeInstance on '0' (zero). The seal contains the update ' click on ' event as for Subform1 scripts, below.

    Form1. Subform1.Subform1.Button1::click - (JavaScript, client)

    Form1. Subform1._Subform1.occur.min = '0 '.

    Form1. Subform1._Subform1.removeInstance (0);

    Steve

  • Custom tabular remove - remove the checkboxes of the element one another.

    Hi all

    Request Express 4.2.4.00.08
    I have a dynamic action on the key press 'DELETE' to a tabular presentation.  This dynamic will launch a process that removes the row from the database, and then deletes the line in my application.
    Everything works fine, however, I have another question on the page (name of say P26_CHECKBOX) which gets deleted if it has been populated.
    I want to restrict the (this) .remove (); part of the code in my region in tabular form only.  Does anyone have a solution for this?  I would like to know if any other details must be provided or if I should put an example on apex.oracle.com.

    Brett Ch wrote:

    If you look at the first page, I have something in the box that is completely filled.  I've added a few lines with ename "Johnson" and "Paul".

    Now, try to remove one of these lines.  It will remove both the database and the application of front end.  However, P1_CHECKBOX options are now gone (this) .remove () part of the action dynamic javascript.  My goal is to delete lines in the form of tables and will affect all the other check boxes on the screen.

    You must use a selector more specific on line 6, so that only the check boxes in the report as a table are targeted, for example:

    var checkedRows = $('td[headers="CHECK$01"] input:checked').closest('tr'); 
    

    However, who could still target checkboxes in other reports or tabular shapes on the page. The best approach is to add a static region ID to the form region and use it in a selector boxes only targets in the report as a table in this region:

    var checkedRows = $('#report_tab_form .uReport td[headers="CHECK$01"] input:checked').closest('tr');
    
  • JavaScript to remove the signatures on certified form

    I have a form with 3 additional signature lines. Since resetData does not work on certified forms I need a javascript command to rest three signatures. Any help would be great.

    It is not possible via the script. The person who signed the form, only he can remove his signature. This is done to maintain security PDF.

  • How to set a value in a numeric field based on a checkbox field?

    I try to get a numeric field to return to a certain numerical value according to the response from the user for a checkbox control. Here is my code:

    If (CheckBox1 .rawValue [0] == 1) then $.rawValue == 969.00 else $.rawValue == "" endif

    When the form is displayed, the value of the numeric field poster in the form $1,00 and if I check the box it changes $ 0.00 - but I want him back $969,00 if checked and be empty when not checked.

    Can someone help me understand this?

    Hello

    FormCalc syntax, so make sure that you have set the language in the script in FormCalc Editor.

    Also, you are right when you test equal to use the double equal sign ==. However, when you set a value, you use a single equal sign.

    FormCalc does not need the .rawValue.

    Make sure you have set the 'specify values' tab of object/link check box and on = 1. [0] in your script also indicates that there is more than one occurrence of CheckBox1. I'd be inclined to objects of unique name, as it makes it easier to script.

    So it should work in the case of calculating the numeric field:

    if (CheckBox1 == 1) then
         $ = 969.00
    else
         $ = 0.00
    endif
    

    Configures the model of the numeric field for monetary symbols, etc.

    Good luck

    Niall

    PS you can put figs in quotes. Also having the calculate event script will automatically make the calculated - read only field. You can, but if you do not you can change it in the tab/value of the object. On the other hand, you can have a script similar to the output of the box event.

  • The JavaScript calendar date and access date incompatible field!

    I need some help here! My form has two fields where the user enters a beginning date and an end date. These dates are then used in a WHERE clause to retrieve all records in these dates. The problem is that access does not recognize dates and shows not all records. If I remove the WHERE clause, all records are displayed. I tried to change the area of access to the text, use the input mask, etc. nothing works. Any ideas?

    This is the code for the entry form;

    < html >
    < head >

    < style type = "text/css" >

    {.ds_box}
    background-color: #FFF;
    border: 1px solid #000;
    position: absolute;
    z index: 32767;
    }

    {.ds_tbl}
    background-color: #FFF;
    }

    {.ds_head}
    background-color: #333;
    color: #FFF;
    do-family: Arial, Helvetica, without serif.
    font size: 13px;
    make-weight: bold;
    text-align: center;
    letter-spacing: 2px;
    }

    {.ds_subhead}
    background-color: #CCC;
    Color: #000;
    do-size: 12px;
    make-weight: bold;
    text-align: center;
    do-family: Arial, Helvetica, without serif.
    Width: 32px;
    }

    {.ds_cell}
    background-color: #EEE;
    Color: #000;
    font size: 13px;
    text-align: center;
    do-family: Arial, Helvetica, without serif.
    padding: 5px;
    cursor: pointer;
    }

    {.ds_cell:hover}
    background-color: #F3F3F3;
    } / * This code hover does not work for IE * /.

    < / style >


    < style type = "text/css" >
    <!--
    . Style8 {do-family: Tahoma}
    ->
    < / style >

    < style type = "text/css" >
    <!--
    {body
    background-image: url();
    background-repeat: no-repeat;
    left margin: 0px;
    margin-top: 0px;
    }
    a: link {}
    text-decoration: none;
    }
    a: visited {}
    text-decoration: none;
    }
    a: hover {}
    text-decoration: none;
    }
    a: active {}
    text-decoration: none;
    }
    . Style9 {make-size: 12px}
    .style10 {do-size: 14px}
    .style11 {do-size: 16px}
    {.style12}
    do-size: 18px;
    make-weight: bold;
    }
    ->
    < / style >
    < / head >

    < title > manna Prime - Kit < /title > Report

    < body >

    < table class = "ds_box" cellpadding = "0" cellspacing = "0" id = "ds_conclass" style = "" display: none; ">"
    < tr > < id td = "ds_calclass" >
    < table > < /tr >
    < /table >

    < script type = "text/javascript" >
    <!-<! [CDATA]

    Project: Date Picker Dynamics (DtTvB) - 2006-03-16
    The script featured on JavaScript Kit - http://www.javascriptkit.com
    Code to start...
    Set the initial date.
    var ds_i_date = new Date();
    ds_c_month = ds_i_date.getMonth () + 1;
    ds_c_year = ds_i_date.getFullYear ();

    Get the item by Id
    function ds_getel (id) {}
    return document.getElementById (id);
    }

    Download the left and the top of the element.
    function ds_getleft (el) {}
    var tmp = el.offsetLeft;
    El = el.offsetParent
    {while (El)}
    tmp += el.offsetLeft;
    El = el.offsetParent;
    }
    return tmp;
    }
    function ds_gettop (el) {}
    var tmp = el.offsetTop;
    El = el.offsetParent
    {while (El)}
    tmp += el.offsetTop;
    El = el.offsetParent;
    }
    return tmp;
    }

    Output element
    var ds_oe = ds_getel ('ds_calclass');
    Container
    var ds_ce = ds_getel ('ds_conclass');

    Output control
    var ds_ob = ";
    function ds_ob_clean() {}
    ds_ob = ";
    }
    function ds_ob_flush() {}
    ds_oe.innerHTML = ds_ob;
    ds_ob_clean();
    }
    function ds_echo (t) {}
    ds_ob += t;
    }

    var ds_element; Text element...

    var ds_monthnames =]
    'January', 'February', 'March', 'April', 'May', 'June ',.
    'July', 'August', 'September', 'October', 'November', 'December '.
    ]; You can translate it into your language.

    var ds_daynames =]
    'Sun', 'Mon', 'Mar', 'Sea', 'Thursday', 'Sun', 'Sam '.
    ]; You can translate it into your language.

    Model calendar
    function ds_template_main_above (t) {}
    "return ' < table cellpadding = '3' cellspacing ="1"class ="ds_tbl">"
    + "< tr >".
    + ' < class td = "ds_head" style = "" cursor: pointer "onclick =" ds_py (); "> & lt; & lt; < table > '
    + ' < class td = "ds_head" style = "" cursor: pointer "onclick =" ds_pm (); "> & lt; < table > '
    + ' < class td = "ds_head" style = "" cursor: pointer "onclick =" ds_hi (); ' colspan = "3" > [close] < table > '
    + ' < class td = "ds_head" style = "" cursor: pointer "onclick =" ds_nm (); "> & gt; < table > '
    + ' < class td = "ds_head" style = "" cursor: pointer "onclick =" ds_ny (); "> & gt; & gt; < table > '
    + "< /tr >".
    + "< tr >".
    + '< td colspan = "7" class = "ds_head" >' t + '< table >.
    + "< /tr >".
    + "< tr >";
    }

    function ds_template_day_row (t) {}
    return '< class td "ds_subhead" = >' t + '< table > ";
    Set the width in CSS, XHTML Strict 1.0 does not have the width for her property.
    }

    function ds_template_new_week() {}
    return '< /tr > < tr > ";
    }

    function ds_template_blank_cell (colspan) {}
    return ' < td colspan = "' + colspan + '" > < table > '
    }

    function ds_template_day (d, m, y) {}
    return ' < class td = "ds_cell" onclick = "ds_onclick (d + ',' + m + ',' + y + ')" > ' d + '< table > ";
    Set the width of the line of the day.
    }

    function ds_template_main_below() {}
    return '< /tr > ".
    + '< /table > ';
    }

    It is inspired by calendar...
    function ds_draw_calendar (m, y) {}
    Start by removing the output buffer.
    ds_ob_clean();
    Here, we will make the header
    ds_echo (ds_template_main_above (ds_monthnames [m - 1] + ' ' + y));
    for (i = 0; I < 7; i ++) {}
    ds_echo (ds_template_day_row (ds_daynames [i]));
    }
    Make a date object.
    var ds_dc_date = new Date();
    ds_dc_date.setMonth (m - 1);
    ds_dc_date.setFullYear (y);
    ds_dc_date. SetDate (1);
    If (m == 1 | m == 3 | m == 5: m == 7 | m == 8 | m == 10: m == 12) {}
    days = 31;
    } Else if (m == 4: m == 6 | m == 9 | m == 11) {}
    days = 30;
    } else {}
    days = (y % 4 == 0)? 29: 28;
    }
    var first_day = ds_dc_date.getDay ();
    var first_loop = 1;
    Beginning of the first week
    ds_echo (ds_template_new_week());
    If Sunday is not the first day of the month, make an empty cell...
    If (first_day! = 0) {}
    ds_echo (ds_template_blank_cell (first_day));
    }
    var j = first_day;
    for (i = 0; I < days; i ++) {}
    Today is Sunday, a new week.
    If this Sunday is the first day of the month,
    We already have a new line for you.
    If (j == 0 & &! first_loop) {}
    New week!
    ds_echo (ds_template_new_week());
    }
    Do a rank of this day here!
    ds_echo (ds_template_day (i + 1, m, y));
    Is not first loop more...
    first_loop = 0;
    What is the next day?
    j ++;
    j % = 7;
    }
    Make the footer
    ds_echo (ds_template_main_below());
    And we will show...
    ds_ob_flush();
    To scroll in the display.
    ds_ce. ScrollIntoView();
    }

    Function to display the calendar.
    When the user clicks on the date, it will define the content of t.
    function ds_sh (t) {}
    Set the element to set.
    ds_element = t;
    Make a new date and set the current month and year.
    var ds_sh_date = new Date();
    ds_c_month = ds_sh_date.getMonth () + 1;
    ds_c_year = ds_sh_date.getFullYear ();
    Draw schedule
    ds_draw_calendar (ds_c_month, ds_c_year);
    To change the position correctly, we must show first.
    ds_ce.style.display = ";
    Move the calendar container!
    the_left = ds_getleft (t);
    the_top = ds_gettop (t) + t.offsetHeight;
    ds_ce.style.left = the_left + 'px ';
    ds_ce.style.top = the_top + 'px ';
    To scroll in the display.
    ds_ce. ScrollIntoView();
    }

    Hide the calendar.
    function ds_hi() {}
    ds_ce.style.display = 'none ';
    }

    Moves to next month...
    function ds_nm() {}
    Increase the current month.
    ds_c_month ++;
    We have past December, back to next year.
    Increase the current year and set the month of January.
    If {(ds_c_month > 12)
    ds_c_month = 1;
    ds_c_year ++;
    }
    Redraw the calendar.
    ds_draw_calendar (ds_c_month, ds_c_year);
    }

    Moves to the previous month.
    function ds_pm() {}
    ds_c_month = ds_c_month - 1; Impossible to use the dashboard dashboard here, getting the invalid page.
    We stayed in January, let's go back to the previous year.
    Decrease the current year and set the month of December.
    If (ds_c_month < 1) {}
    ds_c_month = 12;
    ds_c_year = ds_c_year - 1; Impossible to use the dashboard dashboard here, getting the invalid page.
    }
    Redraw the calendar.
    ds_draw_calendar (ds_c_month, ds_c_year);
    }

    Moves to next year...
    function ds_ny() {}
    Increase in the current year.
    ds_c_year ++;
    Redraw the calendar.
    ds_draw_calendar (ds_c_month, ds_c_year);
    }

    Moves to the previous year...
    function ds_py() {}
    Reduction in the current year.
    ds_c_year = ds_c_year - 1; Impossible to use the dashboard dashboard here, getting the invalid page.
    Redraw the calendar.
    ds_draw_calendar (ds_c_month, ds_c_year);
    }

    The format of the release date.
    function ds_format_date (d, m, y) {}
    2-digit month.
    M2 = '00' + m;
    M2 = m2.substr (m2.length - 2);
    day 2-digit.
    D2 = '00' + d;
    D2 = d2.substr (d2.length - 2);
    AAAA-MM-JJ
    return m2 + "/" + d2 + "/" + y;
    }

    When the user clicks on the day.
    function ds_onclick (d, m, y) {}
    Hide the calendar.
    ds_hi();
    Set the value of it, if we can.
    If (typeof (ds_element.value)! = 'undefined') {}
    ds_element. Value = ds_format_date (d, m, y);
    Maybe we want to define the HTML in there.
    } else if (typeof (ds_element.innerHTML)! = 'undefined') {}
    ds_element.innerHTML = ds_format_date (d, m, y);
    I don't know how we should view, only he warn the user.
    } else {}
    Alert (ds_format_date (d, m, y));
    }
    }

    And this is the end.

    []] >-->
    < /script >

    < are method = "post" action = "kit_report2.cfm" >
    < class p = 'style8 style12' > Kit Report < /p >
    < class p = "style8 style11" > report date span < /p >
    < p > < span class = 'style8 style11' > start date:
    < label >
    < Input onClick = "ds_sh (this); "name = 'Start' readonly ="readonly"value =" "style =" "cursor: text" / > ""
    < / label >
    End date:
    < label >
    < Input onClick = "ds_sh (this); "name = 'End' readonly ="readonly"value =" "style =" "cursor: text" / > ""
    < / label >
    </span > < span class = "style8 style10" > < label > < / label >
    </span > < span class = "style8 style9" > < label > < / label >
    </span > < span class = "style8" > < label > < / label >
    </span >
    < label > < / label >
    < /p >
    < p >
    < label >
    < name of entry = "Submit" type = "submit" id = "Submit" value = "Run report" >
    < / label >
    < /p > < / make >
    < / body >
    < / html >

    This is the query that is used on the page of action;

    < cfquery datasource = "manna_premier" name = "kit_report" >
    SELECT SaleDate,
    TerritoryManager,
    Distributor,
    DealerID,
    Variable
    Orders
    WHERE SaleDate BETWEEN #FORM. Start # AND #FORM. End #.
    ORDER BY SaleDate
    < / cfquery >

    ... The problem is that access does not like

    dates and not all records will display.

    ...

    WHERE SaleDate BETWEEN #FORM. Start # AND #FORM. End #.

    Use one of the available functions to convert the form field values in a date object. Learn more about the CreateODBCDate function

    WHERE DateColumn BETWEEN #CreateODBCDate (form.start) #...

    and the CFQueryParam tag

    WHERE DateColumn BETWEEN

    ....

    I tried to change the access to the text field

    No, do not use 'text' to store dates. Dates should always be kept as DateTime.

  • Help! 'remove the rendered JavaScript blocking' and 'leverage browser caching.

    My site Adobe Muse, www.realtorindfw.com, (desktop version) loading fine until yesterday. Now it loads very slowly, I tried to reduce the size of the image, thinking that maybe the problem (even if it used to load incredibly fast even when the images were 4 x greater, so I never thought that). When that didn't fix the problem I typed my website in Google PageSpeed and found that the main problem is that I need to 'remove the rendered JavaScript blocking' and "leverage browser caching."

    It seems that the main problem is that the file, http://webfonts.creativecloud.com/...eue:n4:all; open-without - condensed:n3:all.js, is apparently rendered blocking JavaScript which is causing all the rest to be delayed, because images can not load until this line is resolved and that can take up to a minute. Reading online, it seems that if I could move this line of code to the bottom, then it don't take everything, because no assets would be behind it. I obviously know nothing about good coding (that's why I use Muse). How can I go about solving this problem of render-blocking JavaScript?

    In addition, the issue of "leverage implementing caching of the browser" is that some images have an expiration are associated. I do not think this has nothing to do with me and is rather a kind of problem of Muse. Is there a way can I fix?

    My page was loading fine, until I downloaded randomly once again, and all these problems started. Please type my site in PageSpeed and address the problems of the desktop version and see if you can understand how this can be resolved. This is my professional site, so yes, I'm trying to get it fixed as soon as possible. I also discussed with support chat and they said that the best way to get it resolved would be to post it here. Thank you.

    debp83130756 if your page is slow to load, start a new thread here on the forum, ask for advice on improving the performance of page loading, and include the URL of the page. (A new thread will attract more attention than to post a reply in a thread that has been dormant for more than a year.)

    PageSpeed side has surprisingly little to page load performance as experienced by a visitor to the site and is not related to SEO or your Google page ranking.

    Him "generally render JavaScript blocking" on a Muse page is code that starts to load Web fonts. If it was moved later then the content of your page may appear a fraction earlier, but it appears in the wrong font, and then jump around to settle once the police you wanted has been loaded. Most of the people prefer to avoid content in the police hurt, insofar as that it can be avoided.

  • Remove the bar to "highlight fields" violet in acrobat/reader

    Hello

    I create an interactive document with many, many buttons that hover window on the effects, show / hiding other buttons, etc.

    Everything went well until page 8. I finally finished all my creation of button and the effects and exported to test the new buttons on, and suddenly the purple fields highlighter appeared. Before that the bar did not appear although each page has a lot of buttons. I looked through every single button to check if I had accidentally created a shape object, but they are all set to "button" s. I did nothing differently on this new page. Any ideas why this happens?

    I also tried removing the new page just to add a new, blank page, and there was always... I don't really know why? I tried the javascript code to disable automatically but I don't think that I'm doing it correctly because it doesn't seem to work.

    Can someone give me clear instructions, step by step on how to turn off the bar with javascript? Or perhaps indicate why the bar is suddenly popping up?

    I'm on Adobe Acrobat X Pro.

    See you soon,.

    Caroline

    This occurs when there are more than 100 buttons. You can prevent it from happening by setting security restrictions so that filling form is not allowed. The buttons still work and the purple bar are displayed.

  • Remove the red border of required fields

    Is there a way to remove the red border of required fields. ?

    No, but you can change whether a field is required or not. Whenever I've created a form to present, I'm almost always check through the fields using JavaScript to see if the form is filled enough and provide more useful if not messages. The color of the border of the required fields is controlled by a preference of the user (in forms) and JavaScript does not have the ability to control this preference.

  • How can I delete an email from apple mail after removing the content (by virus scan software?)

    Recently, I received an avalanche of emails with malicious attachments.  I have not opened any of the accessories, and my antivirus software has picked up malicious content and removed from the email.  Thus, I find myself with an email on my system, no content.  Unfortunately, the system does not allow me to then remove the (s) e-mail that is left.  How can I remove these 'empty' emails in my Inbox mailbox?

    ... my antivirus software has picked up malicious content and removed from the email.

    Allowing something to edit the database of e-mail will result by it becomes corrupted.

    If you use Time Machine, restore the email by "entering Time Machine" of in Mail and choose a time to restore. Then, just delete suspicious e-mails in the usual way. Exit full screen before entering Time Machine.

    You may not use software "anti-virus" not Apple on a Mac, for this reason and many others. Identify the product you use to get the uninstall instructions.

  • How can I remove the full name of the computer in my house windows basic.why that my system shows me on the field?

    I have a laptop computer HP with windows vista. My system shows that it is on the field.

    As I didn't join field that I don't know why he's on the field. I won't be on the field.

    so I want to remove the full computer name. How can I do so.

    Hello

    ·         When you connect to the internet from?

    ·         How do you know if your computer is on the field?

    ·         Is this a brand new computer?

    I suggest you follow the steps mentioned below:

    Method 1:

    Try it, you can select a network connection and remove it from the network and sharing Center. This should allow to forget any field that you could connect the computer.

    Method 2:

    If it is a brand-new computer nine try to reformat to get all the information system back to factory settings.

    Note: save all the important documents first.

  • I have deleted the content of several image files and now want to remove the file names. I don't find a way to remove the names.

    * Original title: file names of photos of Deletig Windows after emptying the file

    I have deleted the content of several image files and now want to remove the file names. I don't find a way to remove the names. How can I delete the file names?

    Right-click on the name of the image file, then choose 'delete '.

  • Remove the edge of the field button (JDK 4.5)

    Hello

    It is possible to remove the border around the bitmap button class slot? So everything that appears when the image is just the image without borders.

    Thank you.

    This is my class-

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.ui.Font;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Ui;
    Import net.rim.device.api.ui.component.ButtonField;

    /**
    * Field button with a bitmap as its label.
    */
    SerializableAttribute public class BitmapButtonNoClickField extends ButtonField {}
    private bitmap Bitmap;
    bitmapHighlight private bitmap;
    Private boolean stressed = false;
    private fonts fonts;
            
    /**
    * Instantiates a new button bitmap field.
    *
    @param bitmap bitmap to use as a label
    */
    public BitmapButtonNoClickField (bitmap image Bitmap image, image Bitmap bitmapHighlight, label As String, int width, make police) {}

    This (bitmap, bitmapHighlight, ButtonField.CONSUME_CLICK |) ButtonField.FIELD_HCENTER | ButtonField.NON_FOCUSABLE | ButtonField.FIELD_VCENTER
    the label, width, police);
              
    }

    public BitmapButtonNoClickField (bitmap image Bitmap image, image Bitmap bitmapHighlight, long style,
    String label, int width, make police) {}
    Super (style);
    This.Bitmap = bitmap;
    this.bitmapHighlight = bitmapHighlight;
    This.font = fonts;
    }

    / * (non-Javadoc)
    * @see net.rim.device.api.ui.component.ButtonField #layout (int, int)
    */
    Protected Sub layout (int width, int height) {}
    setExtent (getPreferredWidth (), getPreferredHeight());
    }

    / * (non-Javadoc)
    * @see net.rim.device.api.ui.component.ButtonField #getPreferredWidth)
    */
    public int getPreferredWidth() {}
    Return bitmap.getWidth ();
    }

    / * (non-Javadoc)
    * @see net.rim.device.api.ui.component.ButtonField #getPreferredHeight)
    */
    public int getPreferredHeight() {}
    Return bitmap.getHeight ();
    }

    / * (non-Javadoc)
    * @see net.rim.device.api.ui.component.ButtonField #paint (net.rim.device.api.ui.Graphics)
    */
    protected void paint (Graphics graphics) {}
    width int = bitmap.getWidth ();
    int size = bitmap.getHeight ();
    Image bitmap b = bitmap;
    If (highlighted)
    b = bitmapHighlight;
    graphics.fillRoundRect (0, 0, getWidth(), getHeight(), 10, 10);
    graphics.drawBitmap (0, 0, width, height, b, 0, 0);
    graphics.setFont (do);
    Super.Paint (Graphics);
    graphics.drawText (label, 0, bitmap.getHeight ());
    }

    }

    If by "the code you posted" you mean advanced buttons, fields and managers, then no, it is not part of any levy JDE.  This has been created separately for reading more advanced developers. You must change the package names here as com.rim... do not work on any real device (works fine in the Simulator, however).

    There was a thread here in this forum about the legality of using the code in this article from book of knowledge - you can read it yourself:

    Legal issues Using - advanced tool buttons, fields and managers

    It wasn't for that resolution, but claim that it was already used in some applications. Personally, I am looking at the source code it orientation rather than a simple copy and paste. New - people claim she has some problems and I've seen questionable code in there in some places, but overall, it's extremely useful.

  • Add or remove the content dynamically list

    Hi, is anyway to add or remove the display content dynamically.

    I want to add content running.

    I just thread http://supportforums.blackberry.com/t5/Java-Development/adding-and-removing-listField-items-dynamica...

    But I don't have that clear.

    Could someone help me to do this?

    Thanks in advance.

    I feel list.invalidate must come after the list. SetSize & reminder.

    Then, you add just one element in the list or the list itself - was the list added to tab2Manager before calling this method? If so, you must not remember add (list). It can als be the problem.

    I would also give some SOP & try... catch inside the race to debug and to know exactly what is causing the problem and where.

  • Remove the JavaScript

    Hello

    I have to make sure that there is no JavaScript code in my PDF documents. Some documents come from the Internet, while others are created using the Adobe PDF of Acrobat X printer. I'll have to deal with multiple documents per week.

    I read in this post Re: remove script on a correction before the flight. However, I couldn't he find in Acrobat X Pro. What is the best way to remove the JavaScript code possible?

    Thank you very much!

    In the upper search box, enter "Javascript" and you should include a list like the following (which is Acrobat 9):

    The one you want is the last of them.

Maybe you are looking for