D-Mack Media Forums

Full Version: Press key enter for submit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I would like to know if some one manage to have the key enter press to convert.

I think is more easy to press enter.

I try to change $valueinputfield by

Code:
$valueinputfield  = '<input style="font-size:'.$valuefontsize.'; background-color:'.$valuebgcolor.'; color:'.$valuefontcolor.'" name="val" type="text" size="'.$valuesize.'" onkeydown="if (event.keyCode == 13) showDataInput()"/>


But it doesn't work

If some one can help me

thank you in advance for your help and your time.

JA

Hi Jean Big Grin,

Don't quit know what you are asking. But if you want to just change the 'text' that is shown on the 'Convert' button, that can easily be changed in the Admin part of the Component or Module. There is a setting called 'Submit button' or 'Submit Button Text' - just change 'Convert' to whatever other text you want.

Let us know if this was not what you were looking for.

Thanks,

D-Mack
Hi D-Mack,

Just to be clearer re my previous messages

On the website I have created, i have an issue when using the CurreencyConverter v 1.0x Module. Indeed, when users press the Convert button, the converted results are not showing. For the amount to be showing, they have to type the amount to be converted a second time and press the Enter key. Only then are the results displayed.

I have not been able to solve the problem by myself. Therefore my question to you

Can you help me ?

Thank you for your time

JA
I’ve looked around and all solutions worked only in IE and I needed it to work in FireFox as well.
<script language="JavaScript">
function disableEnterKey(e)
{
var key;

if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox

if(key == 13)
return false;
else
return true;
}
</script>
Reference URL's