I have made my own custom forums, and i gave the user an option to enter an image url. How can i check the last couple of characters to make sure they are the extentions .gif, .jpg, .png, or .jpeg, with javascript?
Checking A URL
Started by Hip Hop Artist, Aug 05 2008 02:17 AM
2 replies to this topic
#1
Posted 05 August 2008 - 02:17 AM
#2
Posted 05 August 2008 - 12:05 PM
Google the match() function. It uses regex, but would probably be the simplest method and would work like any PHP equivalent.
As usual though, don't rely 100% on the user even having JS enabled.
As usual though, don't rely 100% on the user even having JS enabled.
#3
Posted 05 August 2008 - 01:37 PM
ok thanks.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
