• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Validation for portions of a special URL string

This message has been removed by user's request. 2 years 3 hours ago #41986

  • e1baa5e4b796521191eb58cb1555ca33@RSJOOMLA_DELETED
  • e1baa5e4b796521191eb58cb1555ca33@RSJOOMLA_DELETED's Avatar
This message has been removed by user's request.
The administrator has disabled public write access.

This message has been removed by user's request. 1 year 11 months ago #42025

  • e1baa5e4b796521191eb58cb1555ca33@RSJOOMLA_DELETED
  • e1baa5e4b796521191eb58cb1555ca33@RSJOOMLA_DELETED's Avatar
This message has been removed by user's request.
The administrator has disabled public write access.

Validation for portions of a special URL string 1 year 11 months ago #42039

  • iceferret
  • iceferret's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 213
  • Thank you received: 57
I have a script which I use to ask people not to put a street or road name in a house name/number field, you could adapt that. Here it is for what it's worth
function check_val() {
   var bad_words = ['road', 'rd', 'Rd', 'Road',
     'street', 'Street', 'st', 'St',
     'avenue', 'Avenue', 'ave', 'Ave',
     'lane', 'Lane'
   ];
   var check_text = document.getElementById("Housename or Number").value;
   var error = 0;
 
   if (check_text.split(' ').some(part => bad_words.includes(part))) {
     error = error + 1;
   }
 
   if (error > 0) {
 
     alert("IMPORTANT\n\nOnly enter your housename or number in this field Please.\nStreets, roads etc go in the next field");
   }
 }

in the field attributes/additional attributes enter onblur="check_val();" when you shift focus off the field it pops up an alert. You could equally use onKeyUp, I use onblur simply because house names might have st or rd as part of them which triggered the alert.
If you can keep your head when all about you are losing theirs, then you obviously don't understand the situation!
The administrator has disabled public write access.

This message has been removed by user's request. 1 year 11 months ago #42041

  • e1baa5e4b796521191eb58cb1555ca33@RSJOOMLA_DELETED
  • e1baa5e4b796521191eb58cb1555ca33@RSJOOMLA_DELETED's Avatar
This message has been removed by user's request.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!