On 6/18/07, <b class="gmail_sendername">Indy Singh</b> <<a href="mailto:indy@indigostar.com">indy@indigostar.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello all,<br><br>I have an HTML form where I use several differnt button to trigger<br>different actions, e.g.<br><input type="Submit" NAME="action" VALUE="Open"><br><input type="Submit" NAME="action" VALUE="Close">
<br><br>The problem with this approach is that if the script that processes this<br>has hard coded values "Open" and "Close", then the form can't be altered<br>to support a differnt language. Is there a way for a submit button in
<br>HTML to display differnt text than what gets submitted to a SCI script?</blockquote><div><br>Hi Indy,<br><br>I would just alter the name parameter in your input field .. then you just look for which name is present in the variable stream that gets returned -- you'll only get one of the button's names. You can even look for the pattern /(\w+)_action/ .. then the values (what's actually displayed on the button) can be in whatever language is appropriate.
<br><br>English:<br> <input type="Submit" VALUE="Open" NAME="open_action"><br> <input type="Submit" VALUE="Close" NAME="close_action"><br><br>or<br>
<br>French:<br></div> <input type="Submit" VALUE="Ouvrez" NAME="open_action"><br> <input type="Submit" VALUE="Fermez" NAME="close_action"><br><br>
</div>-- <br>Alex Beamish<br>Toronto, Ontario<br>aka talexb