Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#180 Template's HTML Form handling is not multilanguage compliant

enhancement
open
nobody
translation (1)
5
2004-10-23
2003-11-25
tobozo
No

There is no way to alter the value of the submit buttons
without breaking the form system. The tags <input
type=submit name=submit> are causing this.

Because 'submit' is a reserved function name in
javascript, the function submit() won't work.

Same thing for storyAdmin, topicAdmin, etc, etc. ..

Here's a little explanation of the problem

http://archives.hwg.org/hwg-
languages/000e01bfd18a$23700860$4596a8c0@kpurtell

Here's a little hack that will put the submit value in the
URL instead of in the POST data (worked fine on a
0.7.2) :

first I remove all input tags called 'submit', then I add
this javascript assuming I'm using a <form name=myform>

<script type="text/javascript">
function subForm(action) {
document.myform.action = '{ACTION_URL}?
submit='+action;
document.myform.submit();
}
</script>

So I can use a href link instead of the submit button :
<a href="javascript:subForm('save');" >Save me!</a>

hope this helps

tbz

Discussion

  • tobozo
    tobozo
    2003-11-25

    • summary: Template's HTML Form handling is not language compliant --> Template's HTML Form handling is not multilanguage compliant
     
  • Joe Stewart
    Joe Stewart
    2004-10-23

    • labels: 103598 --> translation