struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgi <gi...@gmx.ch>
Subject html:select and JavaScript problem
Date Mon, 03 Dec 2001 10:59:07 GMT
Hello struts-user,

  I want to write a selected element from a PullDown in a text form. I
  use a JavaScript funktion to do this. This funktion is excecuted
  when someone click on a element from the PullDown. (or perhaps not
  excecuted?)
  The problem is now, nothing is written in the text field.

JavaScript funktion in the header area:

<script language="JavaScript">
<!--
  function setArtist(artistStr){
    document.forms[0].artist.value=artistStr;
  }
//-->
</script>


PullDown and text field:

<html:text property="artist" size="40"/>
<html:select property="artist" onclick="javascript:setArtist(value);">
  <html:options collection="artist" property="value" labelProperty="label"/>
</html:select>



Have someone a idea to solve this problem???


-- 
Best regards,
 rgi                          mailto:giger@gmx.ch


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message