on 08-03-2005 4:13 PM
How do i set the htmlb Dropdown selection in the Javascript with the value selected? It getz populated with Model from bean.
<hbj:dropdownListBox
id = "myDdBox1"
disabled = "false"
model = "myBean.model"
selection = "<%=myBean.getSelection()%>"
jsObjectNeeded = "TRUE"
onClientSelect = "Event()">
</hbj:dropdownListBox><br><br>
<script>
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var dropdown = eval(func("myDdBox1"));
what shud i do here??
</script>
Shud i add this also?
var form = document.all(htmlb_formid);
form.submit();
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var dropdown = eval(func("myDdBox1"));
//you need to provide the index
dropdown.setSelectedIndex("1");
//or you can set the value
dropdown.setValue("elephant");
Message was edited by: Prakash Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But did u notice the htmlb dropdown, itz getting values from the model.
if i set dropdown.setValue(cookie);after reading the cookie value which i set immediately when i select something from dropdown..Itz not showing the value in the dropdown..Howz it possible to stick the value selected al the times in the dropdown?
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.