Still can't get this to work...
function checkemail(what)
{
return ! (
what == ""
|| /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/.test(what)
|| what.indexOf('.') == -1
|| what.indexOf('@') == -1
|| what.slice(what.lastIndexOf('.')+1,what.length).length < 2
||...
Can you help as to how I would do this?
tsuji - not sure I understand what you mean by "And you tolerate yourself to produce such thing?"
Apologies all, quite new to javascript and the code I used was just copied after a google search.
Thanks
Apologies, this is the actual code I'm using. Field names are different, both fields are in form "ff".
if (document.ff.ref1email.value != "")
{
var str = new String(document.ff.ref1email.value);
var isOK = true;
rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
if(...
Here's the code. The first email field is ref1email and the second field is ref2email. If ref1email is not a valid email address the alert pops up. If ref1email address amended so correct, form submitted and passes through without any alert that ref2email is invalid.
if...
Hi
I have an email field in my form where javascript email validation works fine on submit. I've recently added another email field but some reason the email validation now doesn't work.
Any ideas?
$mon=$mon+1;
$count=$mon+11;
for ( $x=$mon; $x<=$count; $x++ ) {
if ($x > 12) {
$nextmonth = $x-12;
} else {
$nextmonth = $x;
}
Got there in the end. Thanks for all your help!
What's the easiest way of printing this month followed by all the subsequent months, so showing 12 months in total, i.e. -
May 2010
June 2010
etc
etc
March 2011
April 2011
Great thanks for that, it worked. Just had to replace the AND with WHERE.
SELECT COUNT(*) AS howmany
FROM taskvolsnew
WHERE vol NOT IN
( SELECT volref
FROM volunteers_types
WHERE voltype = '4' )
it's irrelevant how many types the vol is - whenever they are on task it should just be a count of one.
need to exclude voltype 4 vols from the count for all tasks they have ever been on
really appreciate the help rudy...
"tasks" table has date of the task along with various other info (site, leader, tasktype, etc, etc)
"taskvolsnew" table contains id's of all the vols that were on a particular task (multiple vols on a task)
"volunteers_types" table contains the voltype id's...
It still doesn't return the correct count even if the join to the tasks table is taken out. A volunteer can be multiple "types", so for a volunteer that is not type '4' but is type 3, 6 and 9 for example it is counting them 3 times, rather than once.
Hi
I'm trying to count the total number of workdays for all volunteers that are not "Type 4" volunteers. A volunteer can be multiple types, hence I think why I'm getting a much larger count than expected.
SELECT COUNT(taskvolsnew.vol) AS howmany
FROM taskvolsnew
LEFT JOIN tasks
ON...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.