You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Steve A Drake <sa...@comet.ucar.edu> on 2001/03/14 21:18:25 UTC

html:submit

 I'm having a problem with the html:submit tag. The scenario is that I
have a number of select menus, each of which invokes form.submit() on the
onchange event, i.e.:

<html:select property="databaseTables" onchange="form.submit()">


The problem is that the html:submit tag creates a Submit input type with
the name "submit". I think this name is conflicting with the 
form.submit() Javascript function. The html:submit tag :

<html:submit>
  <bean:message key="button.submit"/>
</html:submit>

creates an input type that looks like:

<input type="submit" name="submit" value="Start Search">

By hardwiring the input type (not using the html:submit tag) with a "name"
attribute other than "submit", the select menus properly invoke
form.submit(). Otherwise, the select menus generate the Javascript error:

Javascript Error: form.submit is not a function

Any advice is appreciated.