Javascript Alert Shows Up Twice
I am trying to use a module called disclaimer in Drupal 7 but the Alert 'You must enter the year you were born in.' Shows up twice and then proceeds to redirect to the URL you are
Solution 1:
Because you're returning alert. That will show the alert twice and because you aren't returning false
, will make it continue to the next page.
Try this:
if (optyear == year) {
alert(Drupal.t("You must enter the year you were born in."));
returnfalse;
}
Post a Comment for "Javascript Alert Shows Up Twice"