Welcome, Guest
  • Page:
  • 1

TOPIC: script FF_

script FF_ 3 years, 6 months ago #1523

i have a textfield where i want to check if the value is integer and 3 or higher. There is a script that checks if the value is integer - but not if its 3 or higher.
I tried and tried but don't find the solution....

this is the script i want to manipulate:



function ff_integeramount(element, message)
{
var ex = /(^-?\d\d*$)/;
if (!ex.test(element.value)) {
if (message=='') message = element.name+" \n";
ff_validationFocus(element.name);
return message;
} // if
return '';
} // ff_integeramount



Thanx for help

Tanja
  • tanja
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0

Re:script FF_ 3 years, 6 months ago #1534

Haven't tested this to see if it works, but you could try -

function ff_integeramount(element, message)
{
var ex = /(^-?\d\d*$)/;
if ((!ex.test(element.value)) && ((element.value)<3)) {
if (message=='') message = element.name+" \n";
ff_validationFocus(element.name);
return message;
} // if
return '';
} // ff_integeramount
  • avfguy
Last Edit: 3 years, 6 months ago by .

Re:script FF_ 3 years, 6 months ago #1539

hey,

thanx for your idea. i tried it - it doesn't work.
(no error message at all...)

tanni
  • tanni
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.27 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany