Using javascript to set Struts select list headerKey and headerValue -


i have struts select list use javascript set selected option default headerkey , headervalue specified when creating item. unable option set. under select list:

struts select list

<s:select id="relationshiptypeid" name="relationshiptypelist" headerkey= "0" headervalue="select relationship type" list="relationshiptypelist" listkey="id" listvalue="relationshipname"/> 

javascript

this not work sets display item 0 default headerkey , headervalue.

  document.getelementbyid('relationshiptypeid').value = 0; 

this worked me after posted question

document.getelementbyid('relationshiptypeid').setattribute('value',0); 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -