Conditionally disable text area

I have a text area which I want to disable on load if another items value is greater than 0.
I do not want to make the text area read only, as this dispalys right across the page.
I have tried several things, but to no avail. My latest was
<script type="text/javascript">
function disDescription() {
var aa = $v('P148_ITEM_A')
if (aa > '0')
$x_disableItem('P148_ITEM_B', aa);
<script>
onload="disDescription();
{code}
Cheers
Gus
Edited by: Gus C on Sep 28, 2010 7:58 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Hi,
You have at least one small problem in code. You do not close script tag
Here is sample how you can do it. Place to page HTML header
<script type="text/javascript">
addLoadEvent(function(){var a=$x('P148_ITEM_A');if(a.value*1>0){$x_disableItem(a,true)}});
</script>Regards,
Jari
Edited by: jarola on Sep 28, 2010 6:24 PM
Item name corrected

Similar Messages

  • My 4S has stopped ringing. Voicemail's disabled but if you call me, you'll hear it ring your end but it does nothing at mine and freezes if I make a call. Texts are not being delivered or coming through delayed. Ringer is on, tone enabled - help!

    My iPhone 4S has stopped ringing altogether. Voicemail is disabled but if you call me, you'll hear it ringing at your end but it does nothing my end and freezes in the phone app if I make a call (doesn't ring or connect and doesn't freeze the phone, just the calling part). Texts are not being delivered or coming through delayed. Ringer is on, tone enabled - help!
    I've disabled roaming so it only runs on wifi (this after getting a £4k phone bill...) and I can use Skype, Viber and WhatsApp with no problem at all.
    Would really appreciate any help at all!
    Many thanks.

    Hi there - am with Orange and they said nothing wrong with account and service running normally.  They said if they had cut me off I would've received a text (debatable with current message receiving situation!) and when I called out it would say 'calls from this number are barred'.  Also if you called me it would say something similar.  But it doesn't, it will ring and ring until it rings off but nothing happens at all on my handset. Not even a missed call notification.  If I call out, it will display that it is calling the number but that's it.  If I cancel the call it will constantly display 'ending call'.  If I come out of the phone and go to another app then revist phone it will start calling that last dialled number - without ever getting as far as ringing or connecting.

  • How can I disable resizeable text areas?

    In the beta version, I noticed you added a resize option for multiline text areas. How can I disable this for all the users on my website? Is there something I can write in my CSS to disable it?

    See:
    *http://dev.l-c-n.com/form-controls/resize_textarea.html
    <pre><nowiki>textarea {resize:none}</nowiki></pre>

  • What are the valid values for CPU in conditional disable structure config?

    After diggin' around for some time (but to no avail)...
    Does somebody know the valid values for the CPU (symbol) in the conditional disable structure configuration or where I can find this information?
    Best regards,
    Horst

    Not sure but you can try this:
    http://zone.ni.com/reference/en-XX/help/371361E-01/lvprop/app_apptarget_cpu/
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Cant receive texts on new samsung as all texts are going through to ipad. I cannot disable from my previous iphone as its completely unusable

    Please help! I changed to samsung today and all of my texts are going through to my ipad, if I turn off icloud, imessage and facetime on the ipad I just do not receive the texts fullstop!  I dont have access to my old phone (iphone 5) as I smashed the screen and completely ruined the phone, how do I stop this from happening?

    Contact Applecare, and ask them to assist you in turning off iMessage.  After they remove your iMessage registration from their system, SIGN OUT of all other devices that you have that use iMessage.  After you have signed out on All the devices, you can sign back in using your Apple ID.  Your phone number should no longer be used for imessage.
    AppleCare phone number: (800)-694-7466
    HTH

  • Read Only Display of Radio group and Text area with counter not working

    Hello,
    I am using Apex 3.2, with 10g for the database
    I have this form, with fields that will set to read only when status = 'closed'
    All of the fields display as read only except for 2. I cannot figure out why this is not working correctly.
    1st field is Issues that is a text area with character counter, with a sql query behind it, that is set to null unless the query is pulling in the data.
    2nd field is Status which is a radio group that will not display as read only when status = 'closed'
    I have other fields on the form with the same format and they change to read only when the status = 'closed', I have even copied the pl/sql expression from one field to these fields and it still doesn't work correctly. I have also tried javascript for an on load event, which works, but once I click on the save button, it disables all of the page items, which works correctly, but I purposely forget to enter information, to make sure the validations are firing correctly, which it does, but the script disables everything, not allowing me to correct the errors. The javascript is firing on the on page load event.
    Any help on this is greatly appreciated.
    Mary

    Dung,
    That API seems to have a bug, it returns true/false/null, so you could use 'return not nvl(htmldb_util.current_user_in_group(p_group_name => 'APP Admin'),false)' to get a false value.
    Unfortunately there's another problem: using the read-only attributes for checkbox or radiogroup item makes them hidden. My suggestion would be to create another item that has disabled="disabled" in the HTML Form Element attribute in the item definition and display that item or the non-disabled item alternately, using conditions based on the current_user_in_group logic.
    Scott

  • Conditionally Disable Button

    I read this thread
    Howto disable a button within APEX?
    to conditionally disable a button in a form. And it worked as per the suggestion of user FFS.
    But I want to do something similar to a button showing in a report region. There are different conditions which will show the button in the disabled mode.
    When I tried to repeat the same steps as per the above thread(user FFS comments), I couldn't create a hidden item that will come after the button I want to disable.
    I also wrote this in the page's html header section:
    <script language="JavaScript" type="text/javascript">
    if ($x('P13_EMP').value >'0')
      $x_DisableItem('SAVE');
    </script>Did not disable the button either.
    Please help.
    Using apex3.2, it is an HTML button.
    Thanks,
    RN
    Edited by: RN on Jul 20, 2011 4:05 PM

    I normally just jQuery to disable buttons. See the first response: http://stackoverflow.com/questions/577548/how-can-i-disable-a-button-in-a-jquery-dialog-from-a-function
    I think $x_DisableItem probably isn't working for you because its not an Item. You can create buttons as region buttons or as items (if I recall correctly).
    If you don't have jquery/want to load it it should be able to still do it.
    (untested code, but something to the effect):
    i.e.
    var els = document.getElementsByTagName('input');
    for (i=0;i<els.length;i++){
      if (els.type == 'button'){
    if (els[i].value == 'LABEL'){
    els[i].setAttribute('disabled', true);
    } Someone else might have a more elegant solution ;-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Read-Only text area

    Hi,
    I'm using a text area to display a longer read-only text. It should display only 5 lines and, if the text is longer, it should be scrollable. Works fine as long as I set the attribute Editable to true. But if I set it to No (because it should be read-only), I get the following problems:
    - It does not show only the 5 lines anymore, but the complete text without scrollbars.
    - It shrinks the size of the text area, so that it fits the text inside. You can see that looking at the borders. But I wanted to have the borders at the original size independent of the text.
    Does anyone knows, how to solve that?
    Thanks&Regards
    Matthias

    to the best of my knowledge, if you make it read-only you cannot have the scroll bar enabled. and whatever you explained is the expected behaviour!!
    But, i have a workaround under three conditions:
    1. if you need the scroll bar
    2. if you want the size of it as in the initial state - without disturbing the existing size and format of page
    3. you wish to retain the value
    keep the value of the text area in a temporary object and pass it to the reference attribute on submit of page. (here we are just retaining the value and not making it read-only)
    this helps in keeping the format of page undisturbed!!
    HTH
    Sharma

  • Ignore carriage return in a text area

    Hi
    I've a JTextArea of 3 rows on an applet screen.
    I want to disable the carriage return key on the text area.
    Thanx in advance

    Look at the API documentation for JTextField; it contains an example of a class called UpperCaseField. You could modify this code to ignore line-end characters; the concept works with JTextArea as well as JTextField. This code would prevent people from pasting line-end characters as well as from keying them.

  • Request For Quotation - ME41 - Item texts are not getting copied

    Hi,
    I created one RFQ (Request For Quotation) by copying from the existing one (through t-code ME41). But item texts are not copied.
    How can this issue be resolved..?
    In menu path ( Item --> Texts --> Adopt Text ), "Adopt Text" option is available. But its in disabled mode.

    just use F4 to get a valid entry, it is only grey to prevent manual typing

  • On new version of Yahoo Beta, can't download pictures that come in text area of e-mails--it works in Safari.

    Ever since I started on the new version of Yahoo, called Yahoo Beta, a couple of months ago, the only way I can get photos that come in the text area is to either use reply or forward, then the pictures are revealed. I've written and written Yahoo to no avail (I tried everything they suggested), but what's strange is, the downloads work fine on Safari, in the same version of Yahoo Beta. I've updated everything, emptied the Cache, etc., etc., and still cannot make the pics work on Firefox. And, by the way, they did work on the OLD version of Yahoo. Thanks for any help you can give.
    Carolyn H.

    go to Help Menu -> select "Restart with Add-ons Disabled"
    Firefox will close then it will open up with just basic Firefox. You can enable the Add-ons later. Check and tell if its working.

  • Disable text as black

    When I export my book to PDF some text in some documents prints as low resolution dark black. My documents in InDesign show no sign of this. I read that "disable text as black" could be a potential solution. Where would I find this option -- I don't see it in my output choices. I'm an extreme newbie -- please keep it simple.Thanks.

    I think we are going to need a lot more information, and maybe some screen shots.
    Text as Black is an option you must select, not on bey default, and it is there for when you are printing a document with colored text to a monochrome printer so you get readable solid black text. Text that is colored 100%K only is not as dark in print as text that also has CMY mixed with it. If you are printing color document to a monochrome printer you should set your Appearance of Black settings in the preferences to Output All Blacks as Rich Black or 100K will print as a dark gray (somewhere in low to mid 90% black range) because the 100% black output is used for darker rich black objects.

  • How can I remove the default right click option of the text Area control?

    How can I remove the default right click option of the text Area control?
    Is there any way to disable this control in any of the text controls available?

    The iPhone does not store email addresses for received mail. The iPhone stores all email addressees for sent mail in a list of previous recipients. The list of previous recipients is not synced with Outlook or any address book, but the list of previous recipients is included with the iPhone's backup which is updated by iTunes as the first step during the iTunes sync process. The auto-addrss feature pulls from your contacts on the iPhone and from the list of previous recipients.
    Different from the Mail.app on a Mac, there is no access to the list of previous recipients on the iPhone to remove a previous recipient from the list, or to add a previous recipient to contacts that is not already entered - not at the present time anyway.
    The only way to purge the existing list at the present time is by restoring your iPhone with iTunes as a new iPhone or not from your iPhone's backup.
    Hopefully access to the list of previous recipients will be included with the iOS 5 update.

  • Preventing Child Class Dependency when using conditional disable to specify Class in Development Environment

    Hello
    I am developing an application which I would like to execute on both normal and real-time systems using LabVIEW Proffesional Development System 2012 SP1
    To control how the application interacts with the user, I have created a class which defines the type of user-interface behaviour which should allow me to have nice dialog boxes when the system is executing on a windows machine and have no dialog boxes (or other non-Real-Time friendly code) when operating on a real-time target.
    The parent class is the code that is suitable for Real-Time and the child class is the one with dialog boxes.
    To control which class is loaded, I have a conditional disable structure. This will work fine when the application is built into a executable or real-time executable but the problem arises when I want to use the code during development on the real-time target.
    I find that with the application under a real-time target (RT PXI), the correct conditional-disable case is activated so the parent class is used, but the child classes are also listed under the dependancies - I pressume this is because they exist on the block diagram in the disabled case of the conditional disable diagram.
    This means that I cannot deploy the code to the Real-Time target as it is unhappy with the child class code - even though this will never be run.
    To save posting my real project, I have created an example with a Parent and Child class and a Conditional Disable Flag called "CLASS" to demonstrate the problem.
    If you run Test.vi you will see that the Child class still gets locked (i.e. is a dependancy) during execution even though it is not called.
    So - basically my question is: Is there anything I can do about this or will I just have to do-away with the conditional disable and just put the correct Class constant on the block diagram during testing?
    Thanks in advance
    John.
    Solved!
    Go to Solution.
    Attachments:
    Example Proj.zip ‏18 KB

    I feel your pain.  I ran into a similar problem a short time back.
    Apparently Official NI stance is that you need to put a conditional Disable structure IN EVERY ONE OF YOUR CLASS VIs.  In the Windows VIs, you simply have an empty conditional disable case with the windows code in an appropriate other case and vise versa on the RT.
    I too would much prefer the method you describe...
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • Problem with adding text area in scroll pane

    hi , i have been facing this funny problem , but cant able to get solution.
    the problem is i am trying to add text area in scroll pane , but when i add textarea in scroll pane using scrollpane.add(textarea) that text area remain disable always. i tried making it enable explicility but that code is not working.

    You don't use the add(...) method for JScrollPane. Use:
    a) new JScrollPane( textArea );
    b) scrollPane.getViewport().setView( textArea );

Maybe you are looking for

  • Header and Footer in eText outbount Template

    Output generated with etext template needs Header and Footer margins fixed in Oracle Payments of R12 which has multiple invoices with more than 1 page. The template was designed with 60 lines per page, when generating the output say for example 100 i

  • Depreciation posting start at period 3

    Hi, I have posted an asset acquisition as posting date 31 Jan 2015. Whereby, that would be my period 12/2014. It was noted that depreciation calculation is correct for p12/2014 but as for 2015, the depreciation start from period 3/2015, which is curr

  • Unable to play wmv files in my nokia X6

    I was previously able to play wmv files on my nokia x6 initially. I believe that after upgrading my firmware, I am now not able to play WMV files. Whenever i try it gives error as " unable to play media clip" I have tried to format the phone to facto

  • Are there two clocks in the iMac?

    I have a 3.06 Ghz iMac which is giving me a little problem. It's clock displays the right time, but certain programs seem to think that they are running 4 hours in the future. Mail will say that emails were received 4 hours in the future, and I can't

  • Transaction to view the incoming emails into SAP system

    Hi Experts, Just like SOST for viewing outgoing email from SAP, is there any transaction exist to view the incoming emails into SAP system. Any comments on this concept is most welcome. Thanks in advance, Viven