on 06-13-2007 10:37 AM
Hi all,
I have a form with one dropdown list and one input field. Is it possible when I select an entry in the dropdown list and then the input field is changed automatically to null.?
Thanks and regards,
Dicky
hi,
Have a script function like this
<script language='java'>
function onDNchange(){
document.getElementByID('txtBox').value="";
}
</script>
and the form should be like this
<form name='f1' onchange='javascript:onDNchange()'>
<select id='sOption'>
<option value=1>1</option>
<option value=2>2</option>
</select>
<input type='text' id='txtBox' value='some value'>
</form>
Regards,
Beevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tamil K,
Thanks for your instant reply. But I have never tried java script in the Visual Composer Development Enviroment. Can you describe more details about that?
Thanks and regards,
Dicky
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have given a sample code for ur requirement,but this is not specfic to VC.this is a general concept.u change it as u need.
<script>
function Select()
{
// Getting a Handle for the DropDown for City
var dropDownCity = eval(func("inputfield id"));
dropDownCity.setValue("");
}
</script>
<hbj:dropdownListBox
id="dropdown_city"
onClientSelect="Select()" //function
jsObjectNeeded="true">
<hbj:listBoxItem key="00" value="" />
<hbj:listBoxItem key="HD" value="Heidelberg" />
<hbj:listBoxItem key="WD" value="Walldorf" />
</hbj:dropdownListBox>
Follow the links also
http://help.sap.com/saphelp_nw70/helpdata/en/d0/55074155bcf26fe10000000a1550b0/frameset.htm
Regards,
Tamil K
You can do it VC by coding a formula for the InputField.
More details regarding how to Dynamic Expression refer to the document Page No:154
<a href="
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/63f2052e-0c01-
0010-b9a2-e1f7457a7fbe">https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/63f2052e-0c01-
0010-b9a2-e1f7457a7fbe</a>
Hi,
yes its possible. call a javascript function on selecting dropdown list box item.inside that function make the inputfield value as null.
Regards,
Tamil K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.