Forum
Calc Builder Support
Calc Builder supportForums
No se permite escribir sin estar logado. Por favor, login
Enter key 06.03.2012 18:09
Hi, I am using version 0.1.1.
I have two option lists in my calculation page.
When "Enter" key is pressed after selecting items from the option lists, we are directed to a results page instead of showing the results of the ajax request on the same page.
The results page is a white page consisting only the calculation results.
Is it possible to have the results shown on the same page instead of being directed to the results page when enter key is pressed from the keyboard.
The "calculate" button works as we wish.
We need the "enter" key to work like clicking "calculate" button.
Please let us know if you can understand why this may happen.
Thank you in advance.
Oguz
I have two option lists in my calculation page.
When "Enter" key is pressed after selecting items from the option lists, we are directed to a results page instead of showing the results of the ajax request on the same page.
The results page is a white page consisting only the calculation results.
Is it possible to have the results shown on the same page instead of being directed to the results page when enter key is pressed from the keyboard.
The "calculate" button works as we wish.
We need the "enter" key to work like clicking "calculate" button.
Please let us know if you can understand why this may happen.
Thank you in advance.
Oguz
Re: Enter key 06.03.2012 18:49
Hello,
This issue can be solve by doing this:
- Add onsubmit="return false" to form tag (line 295) as follows
This avoid form to get submitted.
- Add some javascript to avoid Enter in fields. You can add this lines inside window.addEvent('load', function().... (line 147) :
$$('#calc_adminForm input[type=text]').each(function(el) {
el.addEvent('keydown',function(e) {
if (e.key=='enter'){
e.stop();
e.stopPropagation();
}
}.bind(el));
});
Hope this helps. Regards,
Moonsoft Team
Moonsoft Team
www.moonsoft.es
This issue can be solve by doing this:
- Add onsubmit="return false" to form tag (line 295) as follows
This avoid form to get submitted.
- Add some javascript to avoid Enter in fields. You can add this lines inside window.addEvent('load', function().... (line 147) :
$$('#calc_adminForm input[type=text]').each(function(el) {
el.addEvent('keydown',function(e) {
if (e.key=='enter'){
e.stop();
e.stopPropagation();
}
}.bind(el));
});
Hope this helps. Regards,
Moonsoft Team
Moonsoft Team
www.moonsoft.es