Welcome, Guest
  • Page:
  • 1

TOPIC: script FF_

script FF_ 3 years, 10 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, 10 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, 10 months ago by .

Re:script FF_ 3 years, 10 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.39 seconds

Facebook Discount - 40% Off!

Fans of our Facebook page here are entitled to get a 1-year-subscription for the price of a 6-months!

Steps to take:

  • Become a fan on Facebook (Like) here
  • Purchase a 6-months-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of your like and we'll upgrade to the 1-year-subscription

Joomla!® Forms Discount - 40% Off!

Already purchased a forms extension from a different vendor but your requirements changed and now you need a forms extension that is capable of more than just the standards? We help you to keep the costs for a change under control: Get a 40% discount on our professional membership plan! -- meaning timely unlimited access to all current and future commercial extensions, breezingforms themes & apps and Joomla!® templates at crosstec.de, including 1 year of support -- without any website limitations -- Just prove that you previously purchased another forms extension for Joomla!® from a different vendor and you are qualified.

Steps to take:

  • Purchase a 1-year-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of the purchase for the other form vendor and we'll upgrade to the professional-subscription

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany

Imprint