Gray out or disable the text box

Hello

I have a drop-down list called CN_Entry_Initials with options of a "C" or a "N". I also called Part_Number to enter a part number in a text box. I want the text box part number be grayed out or disabled until a "C" or an "N" was chosen out of the CN_Entry_Initials of the menu drop down. I have this operation, except that I can't add it to almost anything. I think it's something to do with the way in which I have if statement for this disabled text box, or do I have to change the touch of a button "submit it". Does anyone know how to fix this? Below is the javascript and the drop down menu code menu and the text of the box as well as to add it or submit button. There are additional stuff in Javascript I have on the page, but I don't need to worry about those things because they do not work properly. I have the code text box disabled in the upper part of the javascript in the verify() function code. Thank you.

< SCRIPT LANGUAGE = "JavaScript" >

<!-original: Wayne Nolting ([email protected])->

<!-this script and many more are available free online to->

<!-begin

verify() function

{

If (document.getElementById('CN_Entry_Initials').value is 'C'

|| document.getElementById('CN_Entry_Initials').value == "N")

document.getElementById('Part_Number').disabled = false;

on the other

document.getElementById('Part_Number').disabled = true;

}

{

var PartNum = document. AddECNumber.Part_Number.value;

var regularExpression = new RegExp(/[cC][0-9]/); regular expression to search for a letter C followed by a number

If (RegularExpression.test (partnum) & & document.) AddECNumber.CN_Entry_Initials.value == "N" & & document. AddECNumber.Validation_Qty.value == "") {//this returns true if the entry passes the regular expression

Alert ('enter an amount of Validation for this new custom');

}

Another yew (document. AddECNumber.CN_Entry_Initials.value == "N" & & document. AddECNumber.P_Drive_Docs_Initials.value == 'i') {//this returns true if the entry passes the regular expression

Alert ("you cannot select 'i' for the docs to remove for a new game");

}

Another yew (document. AddECNumber.CN_Entry_Initials.value == "" & & document. AddECNumber.SW_Model_Only.value == '0') {//this returns true if the entry passes the regular expression

Alert ("ECO type required - ew Select (N) or (C) Hanger for eco topic');

}

Another yew (document. AddECNumber.PNR_BOM_Change_Only.value == '1' & & document. AddECNumber.CN_Entry_Initials.value! = 'C' & & (document). AddECNumber.Release_Status_Initials.value == "U".

|| document. AddECNumber.Release_Status_Initials.value == "N")) {//this returns true if the entry passes the regular expression

Alert ("ECO type required - select C Hanger for eco section and select N release status if PNR/BOM change only is Yes");

}

Another yew (document. AddECNumber.PNR_BOM_Change_Only.value == '1' & & document. AddECNumber.CN_Entry_Initials.value == 'C' & & document. AddECNumber.Release_Status_Initials.value == 'U') {//this returns true if the entry passes the regular expression

Alert ("ECO type required - select C Hanger for eco section and select N release status if PNR/BOM change only is Yes");

}

Another yew (document. AddECNumber.Doc_Changes_Only.value == '1' & & document. AddECNumber.CN_Entry_Initials.value! = 'C') {//this returns true if the entry passes the regular expression

Alert ("ECO" type required - Select (C) Hanger for eco section Doc changes only being Yes');

}

<!-ElseIf (text). AddECNumber.P_Drive_Docs_Initials.value is 'i')

'Eco_search.cfm' = Self.Location; ->

on the other

{

document. AddECNumber.submit ();

}

}

-> End

< /script >

< name cfform = "AddECNumber" action = "add_new_ec_number_action.cfm" method = "post" > "

< b >

< class td = "├editer" align = "right" > change or new entry: < table >

< td >

< select name = "CN_Entry_Initials" id = "CN_Entry_Initials" onchange = "verify (); ">

< option value = "" > select < / option >

<! - FILL the BOX WITH P_Drive_Docs_Initials FIELDS - >

< CFOUTPUT QUERY = "ShowCNEntryInitials" >

< option value = "#CN_Entry_Initials #" > #CN_Entry_Initials #.

< / CFOUTPUT >

< / select >

< table >

< /tr >

< b >

< class td = "├editer" align = "right" valign = "middle" > part number: < br > < h6 > (25 characters limit) < / h6 > < table >

< td > < input type = "text" name = "Part_Number" id = "Part_Number" maxlength = "25" size = "27" disabled = "disabled" > < table >

< td > < textarea name = cols "Description" = "30" rows = "3" > < / textarea > < table >

< /tr >

< input type = "button" value = "Add" onclick = "verify (); ">

< / cfform >

Thank you.

Andy


Seems that the braces "{" Javascript function are incorrect, the audit function performs only the feature of toggling the Part_Number text box which is the reason why the alert function worked when you added it in here.

What you can do is to create a separate function which just active / disable the Part_Number text box and add it to the onchange event of the area of selection.

Tags: ColdFusion

Similar Questions

  • Conditionally disable the text box

    I have a text box that I want to disable loading if another value of items is greater than 0.
    I don't want to make the read-only text box, like this poster from right across the page.

    I've tried several things, but to no avail. My last one 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Hello

    Delete

    onload="addLoadEvent();"
    

    You don't need that when you use the addLoadEvent function.

    And where you have this line? It is up to the Page HTML Body attributes, without the HTML page headers.
    In any case, to remove it, you don't need it with addLoadEvent function.

    Best regards, Jari

  • How to disable the text box field

    Please help me out on the following points.

    How to turn off the text area in master form of master detail form

    1. you must mention in which case you want that a field should be disabled

    2. in my example there is an event based deactivation of elements - select list P18_ENABLE_DISABLE, try changing the values. It's exactly what you want. The only difference is that the calculation is triggered when key hidden form element is not null.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • Turn off the text box with the value of the checkbox

    Hello people,

    I am trying to activate or disable the text box with the value of the CHECKBOX, I have got the same thing with the BOX of ELECTION, with the javascript as follows: -.

    HEADER HTML
    ----------------------
    < script type = "text/javascript" >
    function disableOnValue (o)
    {
    If (o.value == 'Y')
    {
    document.getElementById('P2_TEXT_BOX1').disabled = false;
    document.getElementById('P2_TEXT_BOX2').disabled = false;
    document.getElementById('P2_TEXT_BOX3').disabled = false;
    }
    on the other
    {
    document.getElementById('P2_TEXT_BOX1').disabled = true;
    document.getElementById('P2_TEXT_BOX2').disabled = true;
    document.getElementById('P2_TEXT_BOX3').disabled = true;
    }
    }
    < /script >
    ---------------------

    under region Source whose Point display is < b > before < /b > foot and sequence is the last sequence of the entire region
    ----------------
    < script type = "text/javascript" >
    If (document.getElementById('P2_RADIO_BUTTON_0').checked is true)
    {disableOnValue (document.getElementById('P2_RADIO_BUTTON_0')) ;}
    on the other
    {disableOnValue (document.getElementById('P2_RADIO_BUTTON_1')) ;}
    < /script >
    ----------------

    and finally, to the title of point RADIO_BUTTON, HTML Form element attributes: -.
    -----------
    OnChange = "JavaScript:disableOnValue (this); »
    ----------

    the thing above works very well with the help of the RADIOBUTTON, but I want to try same thing with the CHECK_BOX I also tried a few changes but did not have any success so if someone help out me even that will be great and appreciated!


    Thank you

    Kind regards
    Kumar

    I also have the following in the Footer region region:

    <script type="text/javascript">
    x($x('P12_CHECKBOX'));
    </script>
    

    This is just to make sure that the items are disabled when the page is loaded, because the checkbox is deactivated

    Andy

  • Failed to create a 3D text (or 3D nothing else) all options in the 3D Panel are grayed out. With the help of CC 2015.1.2 on Mac Pro

    Failed to create a 3D text (or 3D nothing else) all options in the 3D Panel are grayed out. With the help of CC 2015.1.2 on Mac Pro (end 2013)

    Thanks for the update.

    Go to the Photoshop preferences > 3D > check whether it shows VRAM than 3072 MB

    Look for the system updates and see if there are updates waiting for your graphics card drivers.

    And make sure that the document you are opening is in RGB and CMYK mode not.

  • How do you change the font color in CALL coming OUT of the text boxes in PRO XI?

    How do you change the font color in CALL coming OUT of the text boxes in PRO XI?

    Select it and press Ctrl + E to open the properties bar where the first

    option is the color of the font.

  • Table goes out of alignment in the text box

    I created a very simple table in InDesign CS5 on Windows 7, like this:

    1.png

    However, when you start typing in a cell, it goes like this:

    2.png

    To fix, you make the text bigger or smaller box and then resize it to what it is supposed to be. Also when I do a first page datamerge moves like that too, even if the rest is correct. When you export to PDF it comes out wrong as well. If anyone wants an example file that I can post it here.

    Anyone have any ideas what's causing the alignment change when text is entered into the table?

    Well, I think I see here the rub - if you left me speechless for a while there!

    So, I see that you have the text box that contains your table to help you align your table in the center of your page. (i.e. the box containing the text is organized around the outside of the page and the table is centered lef/right using point centering and up/down by using the command "Center" in the control bar. There is nothing particularly wrong with this method, I think it may be the source of your problems with alignment change unexpectedly.

    Looking at your file, I found that the removal of "Center" and change to the opposite to "align top" took the nervous behavior of the text box. It is more shifted when I tried to type. He however move the entire table to the top of the screen. For now we'll leave it there. Align the Page: Centre from left to right, Center t to b.

    Your final result should be an element that is always perfectly centered on the page, but which can be of type in without any unpredictable jump around!

    Now, we will select the entire area that contains the table. In the paragraph Panel, click "Left aligned". This will move the table to the top left of your document. Now, frame content. Go in the Align Panel.

  • The text color will appear washed out when written in the text boxes. Help?

    As you can see in the first picture, the color of my text becomes faded as it moves to the next text box. I got the color of real black text of the text on the left by copying and pasting my text at random (do not paste in a text box). It seems that when the text is placed in a text box (as seen in the 2nd and 3rd images), it automatically searches faded.

    What I'm doing wrong here?

    Adobe Support Question - Pic 1.PNG

    Adobe Support Question - Pic 2.PNG
    Adobe Support Question - Pic 3.PNG

    I suspect that you have selected the text box and applied transparency as well as the image.

  • Cannot change the text box.

    Adobe Acrobat DC recently auto updated to the latest version, and it seems that the new version does not change the text boxes.

    The screenshot below shows what I mean.  I added a text box and pointed the police to change the size / font style / color, but it is gray just to go out in the toolbar properties (Ctrl + E)

    ADOBE CANNOT EDIT TEXT BOX.JPG

    Has anyone experience this problem?

    Hello

    We have released an update today which solves the problem of the properties toolbar and now you can continue to use it outside of the app commenting as well. Please open Acrobat or Reader DC and visit help > check for updates to ensure that you are on the latest patch.

    Details on the release: https://helpx.adobe.com/acrobat/release-note/acrobat-dc-august-02-2016.html

    Please let us know how it goes.

    Thank you

    -ashu

  • Limit the text to the size of the text box in Acrobat Pro?

    Hello

    I am currently working on a PDF form in Acrobat Pro for a small company, and they asked if there was a way to limit the amount of text that you can put in each text box to the actual size of the box. For example, when entering in your information, the text should be limited to the size of the text box and allows more to be written after that. I already disabled 'Scroll long text' properties tab, but for some reason any it always scrolls when you type beyond the limits of the area. Is there a way to fix this?

    Hello

    You may need to limit the size of the text by making a right click on the text field, and then select Properties.

    The dialog box "Text field properties", go to the 'Options' tab and then enter the number of characters you want in the option "limit of characters.

    Check it out now.

    Kind regards

    Ana Maria

  • copy is break to the next page and don't sink to the bottom of the text box

    I have a document where text is decorated with style sheets and overrides are disabled, but the text is introduced on the next page, rather than sinking to the bottom of the text box. I've had this problem several times in the past but have never figured out how to fix the problem.

    Sometimes it can also happen without reason - simply because the story

    reestablish has no kick.

    If this is the case, of all the stories to recompose: Shift + Enter to open Quick

    Apply, and then by typing "recompose" should show the required element:

    "Recompose all stories." Sometimes white gaps in the

    at the bottom of pages (quite rare).

    Bonus question: does anyone know what is the difference between "redial".

    all the stories"and" recompose all stories immediately "is (since the two

    seems to work immediately!) ?

  • cannot delete the text box entry - break cp8

    I have two text input boxes and a button smartshape on a slide.

    Text entry areas require username, stores the responses into variables. The button moves to the next slide. I don't want the button to pause the slide, but not text entry areas.

    When I uncheck the 'pause after"in the properties of the input synchronization for each of the text boxes, the break is always carried out for each. In fact, icon pause shows still on the layer of the timeline for each as well.

    The result is that my slide stop 3 times instead of once:)

    It's Captivate 8, sensitive project.

    It is for some a bug in CP8, in previous versions you can change the time of the break, but you can disable it. Must be a design fault, using the same properties of timing for each interactive object to CP8 (to make it "clear").

    For me, it makes sense that you can't disable pause in BER, since it must wait for an input from the user. It's the same for question slides, no way to disable the pause, you can move only. For BER you can move with the synchronization properties, which is not yet the case for Question slides where you (still) that slide on the Timeline can move the point of interruption.

    Why should you get this button? If it is designed as a next button, do you want so that it can move without entries in of the TEB? Then set its action to 'go to the next slide", not to continue?

    Lilybiri

  • the text box changes color when you type in a google search and the cursor and the text becomes invisible.

    When I open Firefox, a cursor appears in the search text box, but I have to click on it before I can enter text. When I click on the text box changes color (from teal'c white to a light color) and the slider and I type text is invisible.

    Which may be caused by protection of typing"Comcast constant guard.

    'Configure the Anti-keylogger settings'-> disable

  • I am trying to disable the word box that appears when I run my mouse, literally, anything

    When I run my cursor over any file, image, the sentence, no matter what, a more detailed text box appears to the right of my mouse and I can't understand how to turn it off. It's driving crazy me, it's always in the way. My attention turned to the text box and distracting... Every time.

    See here:
     
     
     

    --
    db·´¯`·...¸><)))º>

    .

    "JPatarak" wrote in message news: 2bcc943f-a890-4a67-8c3d-03d7896288f7...
    When I run my cursor over any file, image, the sentence, no matter what, a more detailed text box appears to the right of my mouse and I can't understand how to turn it off. It's driving crazy me, it's always in the way. My attention turned to the text box and distracting... Every time.

    DB·´¯'·.. ¸ >-))) º > ·´¯'·.. ¸ >-))) º > share nirvana mann

  • Print form fields don't all of the information in the text box

    I work with Adobe Pro.  I created a form to fill out.  When you print this form I get all the information in the text boxes that you want to print.  Anyone out there know how to do this?

    You must set the size of the font of the auto field so that all the text is visible on the screen, and then it will appear in its entirety on the printed page.

Maybe you are looking for

  • Reminders of Panel problem

    I have created a Panel, would later write his callback.but: I deleted this Panel because I felt his need. I have 4 panels working on the project was 5th. I deleted this Panel of .uir also its callback prototype, his handshake, his defination.but on t

  • Download software deskjet 1050a Asus

    Download software from site Web from HP that will allow my new Asus computer laptop info-send for my printer HP deskjet 1050a If Yes please go through stages with me because I need a little help. Thank you in advance. kenmare1

  • Windows 7 - could not connect to the internet

    Our Dell laptop has Windows 7 and since last night I am no longer able to connect to the internet.  I see that my router works (excellent strength) but I can't online.  When I called FIOS they said it was a problem with the Windows 7 update.  I was w

  • I try to buy, but my credit card is not accepted, why? Need help.

    I try to buy, but my credit card is not accepted, why? Need help.

  • Activation problem. Don't know what to do.

    HelloMy Question is: Adobe may disable "Creative Suite 6' in my account, in order to disable it from my PC just died on me almost 12 hours after activating my product? I have to call?I feel sick about it after money, I just spent and don't want to lo