About disable input text by js
i have a group of radio button , and when i click one, i want to disable one input text, can i perform it ? how can i define the js function ?
like:
<TR><TD class="TD1" width=80>
private</TD><TD class="TD2" width=200>
<input type="radio" name="R01010008" value="01010008010000" onclick="jsRioDisabled('R01010008','01010009000000')"checked>in
<input type="radio" name="R01010008" value="01010008020000" onclick="jsRioDisabled('R01010008','01010009000000')">out
</TD></TR>
<TR><TD class="TD1" width=80>
password</TD><TD class="TD2" width=200>
<input type="text" size="20" name="01010009000000" maxlength="20" value="" >
</TD></TR>
3x
function jsRioDisabled() {
if(document.formName.R01010008[0].checked) {
// Do something.
} else if(document.formName.R01010008[0].checked) {
// Do something else.
} else {
// Default action.
}This is just a simple way of doing it...
***Annie***
Similar Messages
-
Validation on Disabled input text
it seems <af:validateRegExp cannot work inside a <af:inputText disabled='true'>, is there any easy way to have this client side validation on a disabled input text in ADF?
I am wondering if you could create a transient attribute in the EO that displays the data from the attribute. The "real" attribute would not be disabled, and would then validate.
You then display the transient attribute on the form, and it would be non-update-able since it is transient.
You could then place entity level validation on the entity (instead of on the attribute) since it is based on a second value in your form. Haven't tested it, but it would seem to be a solution.
Stuart -
Ho to make a read only / disabled input text mandatory?
Hi All,
I'm using ADF to display data for a human task. Part of my requirement is to display a payload attribute as an output text/ read only input text. If this is null, the form should compel the user to choose from a list of values.
How do I make an output text mandatory? Is there another way around this?
I tried creating an input text and making it read only and mandatory, this doesn't work. Apparently, you cant make a disabled/read only input text mandatory?
JDev : 11.1.1.4
Thanks
PPHello! What does mandatory field mean for you? If there should be validation while saving, it will be: faces message will be shown with text, as it is defined in business rules in entity object. If you just wish to see blue “*” in front of label, just use “panelLabelAndMessage” component with “showRequired” property = “true”. If you wish to see some red frame around disabled field or button, if it has null value, I don’t know how to help you, but wish to know how to do that too.
-
Disabling input text component on checking the checkbox
Hi,
I have created INPUT TEXT and CHECKBOX dynamically by the following code.
List<UIComponent> children;
children = pgl.getChildren();
RichPanelGroupLayout pgll;
pgll = new RichPanelGroupLayout();
pgll.setLayout("horizontal");
List<UIComponent> children1;
children1 = pgll.getChildren();
RichInputText it;
it = new RichInputText();
UIComponent cb = new RichSelectBooleanCheckbox();
children1.add(it);
children1.add(cb);
children.add(pgll);
Now on checking the checkbox i shud disable the inputtext box.. can someone help me out in getting it?In the valueChangeListener of the checkbox, set the disable propoerty of the input box to true and call the partial trigger on the input box using AdfFacesContext.addpartialTarget("idoftheinputbox"). Also set the partial submit of the checkbox to true.
-
Hello there i have this code
<af:inputText value="#{bindings.TypeCurrency.inputValue}"
label="Tipo de Cambio:"
required="#{bindings.TypeCurrency.hints.mandatory}"
columns="#{bindings.TypeCurrency.hints.displayWidth}"
maximumLength="#{bindings.TypeCurrency.hints.precision}"
shortDesc="#{bindings.TypeCurrency.hints.tooltip}"
id="it6"
disabled="#{bindings.Money.inputValue==69}"
partialTriggers="monedaId"> The disable EL is not working any clue??Hi,
My guess, maybe because the "==" operator applied on the data type of your input component will not return true if it is comparing values of different precision and scale.
Try using ">" if it works.
disabled="#{bindings.Money.inputValue > 69}"regards,
pino -
Disable Backspace when in input text fields
Im trying to find a way to disable the keyboard backspace
button from going back a page in the site but allowing it to
function as a character delete when needed for typing in an input
text field of a form.
Strangely this problem only occurs for about a minute after
the page is opened....after that it then works correctly. You can
see what I mean by accessing the site's contact page
www.safetybusiness.co.uk
I have found two different sets of code to disable the
Backspace completely, but this then means it doesn't work at all
when wanting to delete in the text field.
Method 1:
<script type="text/javascript">
if (typeof window.event != 'undefined')
document.onkeydown = function()
if (event.srcElement.tagName.toUpperCase() != 'INPUT')
return (event.keyCode != 8);
else
document.onkeypress = function(e)
if (e.target.nodeName.toUpperCase() != 'INPUT')
return (e.keyCode != 8);
</script>
Method 2:
<script>
function checkShortcut()
if(event.keyCode==8 || event.keyCode==13)
return false;
</script>
<body onkeydown="return checkShortcut()">
Anyone know how I can overcome this?The TextField class has a tab order property. You may want to
look into this. As for disabling the backspace key, you can grab
key presses from user input. I'm not 100% on this but you could use
Flash to test the key being pressed. If backspace is pressed, find
out the current object with focus (unsure of this part), if it's an
input box in flash, have flash handle it or if a text box doesn't
have focus, send it out to javascript to have it handle it. -
Disabling a Text Input created through the TEXT TOOL?
Hi There,
I have created a text input area. I havent used the flash
text components. I used the TEXT TOOL. In the properties I set it
to "input" type so that i could input data. All the features works
fine except one. I have to disable the text area when user clicks a
button. I dint get any help from the flash help.
The main objective is that the text input area shouldnt take
input from the user when the button is ON, once the button is off,
the cursor should be at the point where the user left and he can
type thru.
Is this possible? I have achieved this functionality using
the textarea component of Flash, but not using the input text area
created using the TEXT TOOL.
Can anyone help me.use the type property of textfields to change your textfield
to "dynamic "when you want to disable input and assign it to
"input" when you want to enable input. -
Auto unselect disabled input on selecting other text
test html like described below
<pre><nowiki><html>
<body>
<input disabled value="some test text"> some text test<input value="some test text">
</body>
</html></nowiki></pre>
if you dblclick on text disabled input and then dblclick on some other text on page you will see what i mean. Also have this bug on Win7.Hi Vyanky, I don't believe that's possible without some major functionality. The problem, as you probably know, is that it's a lookup with checkboxes. If it was added directly in InfoPath, then it wouldn't be an issue. You should consider adding "Other"
as a separate yes/no field instead. That way you'll be able to add an action rule to it to enable the text box.
cameron rautmann -
Strange:1 Firefox vs. Internet Explorer about Input Text Issue
After a long break, hi everyone,
Here's the case:
1-We have a full flash site hosted on a php+asp mixed web
server.
2-Site is in English and also in Turkish.
3-We have a mail form on "Contact" page.
4-We have 5 input texts which are all has these attributes:
Arial Tur (Exists in Turkish XP SP2 PRO's as default)
Render Text as Html=checked,
Character Embedding=Basic Latin + Latin 1 + Latin Extended A
5-We have a "Send" button, has action:
loadVariables("phpmailer/iletisim.php", this, "POST");
6-We have a html index, published within Flash CS3, beginning
with:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<head>
<META http-equiv=Content-Type content="text/html;
charset=utf-8">
7-IExplorer:7.0.5730.13, Firefox:2.0.0.10,Flash:CS^(Flash9,
AS2)
Here are the problems:
1-When i open the file with internet explorer i can not input
some Turkish characters, but not all of them. When i copy these
characers from notepad and paste, i can see all of them. Firefox
has no problem until here.
2-But for both browsers when i send the form with turkish
characters, i get a messed up mail with unusual characters. I
checked out the sendmail.php (a generic name) file, it mails
turkish characters just fine.
Thanks a lot.
See you on the next chapter of "Strange Things Happening to
me ,I Hope I'm not Alone."I found the solution.
in publish settings, if "transparent windowless" option
selected some of non-western characters can not be shown in dynamic
or input text boxes.
This is a Flash Player 9 bug.
Select "opack windowless" or "window" or use one of older
flash player versions.
Many thanks to you, adobe, for your interest. -
Autosubmit in input text changing other fields
Hi,
I have an af:inputText set to autosubmit. When it gets called it is changing the value of an already set selectonechoice to null. This is causing some major issues in usability. Is this normal behavior? I am using JDeveloper 11.1.1.6
Here is what my page has:
<af:selectOneRadio label="#{makepaymentviewcontrollerBundle.XX}"
requiredMessageDetail="#{makepaymentviewcontrollerBundle.YY}"
id="sor1" showRequired="true"
required="true" layout="horizontal"
autoSubmit="true" immediate="true"
binding="backingBeanScope.YY.sor1"
value="#{backingBeanScope.YY.paymentMethod}">
<af:selectItem label="11" value="11" id="si2"/>
<af:selectItem label="22" value="22" disabled="true"
id="si1"/>
</af:selectOneRadio>
and
<af:inputText label="#{makepaymentviewcontrollerBundle.11}"
id="it4"
validator="#{backingBeanScope.YY.it4_validator}"
required="true"
value="#{backingBeanScope.YY.line1}"
autoSubmit="true" immediate="true" columns="28">
Is there anyway to avoid the behavior that the input text is changing the values of the radio button in the managed bean ?
Edited by: 919315 on Mar 16, 2012 12:11 AM
Edited by: 919315 on Mar 16, 2012 12:14 AMThe problem seems to be that you have the value for the radio button bound to backing bean scope. The docs say this about backing bean scope:
backingBeanScope: Used for managed beans for page fragments and
declarative components only. The object is available for the duration between the
time an HTTP request is sent until a response is sent back to the client. This scope
is needed because there may be more than one page fragment or declarative
component on a page, and to avoid collisions between values, any values must be
kept in separate scope instances. Use backingBeanScope scope for any
managed bean created for a page fragment or declarative component.Backing bean scope (and request scope) beans lose their state in between requests.
John -
How to use a radio button in enabling/disabling a text box in report progra
Hi,
Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.*& Report ZMR_RADIO_BUTTONS
REPORT ZMR_RADIO_BUTTONS.
PARAMETERS : R1 RADIOBUTTON GROUP G1,
R2 RADIOBUTTON GROUP G1.
PARAMETERS : A1 TYPE I,
A2 TYPE I.
AT SELECTION-SCREEN OUTPUT.
*initialization.
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'A1'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 0.
ENDIF.
IF SCREEN-NAME = 'A2'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'A1'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
ENDIF.
IF SCREEN-NAME = 'A2'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 0.
ENDIF.
modify screen.
ENDLOOP.
ENDIF.
START-OF-SELECTION.
*IF R1 = 'X'.
*LOOP AT SCREEN.
IF SCREEN-NAME = 'A1'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
ENDIF.
*ENDLOOP.
*ENDIF.
*IF R2 = 'X'.
*LOOP AT SCREEN.
IF SCREEN-NAME = 'A2'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 0.
ENDIF.
*ENDLOOP.
*ENDIF. -
How to input text in the SAP ERP intial screen.
Hello.
How to input text when I load the SAP ERP system. before log in.
(this screen show me only the ID and password input fields)
I saw the initial screen inclued some user-customized text.
I can not find any information about initial scrren, as before the log in.
If you know how to do, please let me know.
thank you.The problem was solved.
I found notes about this case. notes number is 205487.
process like this:
1) using transaction se61
2) change 'document class' field -> 'General text'
3) input Name field [ZLOGIN_SCREEN_INFO]
4) Click Create button.
5) and u can see the text-editor
6) insert ur message and save.
that's all
If u want more information or erre message, read the notes 205487.
bye -
About updating long text in the document item with bdc of fb02
HI,
I have a question about updating long text in the document item of sap:
Can I directly updating the long text information with the fuction save_text?
The long text is in :
tcode: fb02 -->input document no ... --> Document overview --> select one document
long text --> updating the value.
Becaust I want to update some items in a G/L Account with bdc or other technique, but I found I can't choose the items in the G/L Account with bdc automatically .That means I can't get the selected items and update them.So I try to update them with the function save_text directly (I know the doc no,bukrs,fiscal year ,item no which will decide the long text item).
Who can help me ?Or is there any way to solve the problem? Thanks very much.Yes, you can update directly using SAVE_TEXT.
Check this for the same.
[update long text in FB02|https://forums.sdn.sap.com/click.jspa?searchID=22194840&messageID=5418662] -
is there a way to disable alt text to appear when an image is loading in firefox ? i hate it when my connection is slower to see the text before the image
Hello 100k, this options does not exist, why do not try to make a little faster the image loading ?
go to [http://kb.mozillazine.org/About:config about:config] find the [http://kb.mozillazine.org/Network.http.pipelining network.http.pipelining] and '''double-click on it''' to make it '''true'''.
then, always in about:config, find [http://kb.mozillazine.org/Network.http.pipelining.maxrequests network.http.pipelining.maxrequests] and '''right-click on it''', select '''modify''' and put '''8''' as a value and click '''OK'''.
thank you -
Hi,
I've two questions below,
1. I want to create an ADF input text , which looks like a normal textbox but user cannot input anything in it(same as <input type="text" readonly="true">) . Is there any way to have an input text like that by using adf component? ( I do not want to use disabled="true" because it looks very different and cannot add an error message to that component if it's disabled)
2. I know JSF input text can work as required in #1 by using <h:inputText id="it4" readonly=true/>. But if I use JSF input text , its css style looks very different to other af:inputText on the pages. Is there any way to apply ADF CSS style class to <h:inputText id="it4" readonly=true/>
Thank you for your help!Hi Ajay,
what Sireesha trying to say don't wake up the thread which are slumbering.
Reason, Besides you wont get any chances reply in this thread.some one may ignore it ah old one. so better to avoid that get your answer in faster means please be clear with your question. then there you may hook up this thread. you can say i referred this thread. but no luck.
Thanks.
Maybe you are looking for
-
How to?? show smartform and generate pdf at the same time
hi experts, how can i show the smartform and generate a pdf at the same time?? i have a control parameter gtotf in X and i generate the pdf but i want to show the smartform at the same time?? thx in advance
-
My control center is not colorful in iphone 4 ios7
I have iphone 4 and when i open control center so it's not transparent and my cousine has iphone 4 his control center is colorful ......why ?
-
Save dialog with file type selection
I'd like to give the user a save dialog with a dropdown showing a list of file formats to select from, as is pretty much always the case in normal save dialogs (even if there's only one acceptable file type.) It servers both as giving the user option
-
How to deploy WebService and BPEL to Application Server in EBS R12?
hi all, I have R12 EBS on linux machine. Can i deploy WebService/BPEL to Application Server of EBS? or i must install new application server to deploy WebService and BPEL ? Thanks Benny
-
Securing a Logged In Server to Allow Dropbox Syncing?
I'm a Mac Server 10.8.4 user. I also use Dropbox on the server as a shared folder. Dropbox requires that the user be logged in to maintain updating. This presents a small problem. I don't want to leave the server logged in all the time, but I do not