Got a quick one here
I have a textbox on my html page that access some text, but the problem is that the text contains a file extension like .jpg, .html, .wmv etc...
my loop doesn't work
for(var x = 0; x < files.length; x++) {
if (files.charAt(x) == ".")
{mover = mover + files;}
}
files is a variable
a sample input would be
/recent/temp/2/index.jpg
but basically I want just
/recent/temp/2/index
thanks, any help is much appreciated!
I have a textbox on my html page that access some text, but the problem is that the text contains a file extension like .jpg, .html, .wmv etc...
my loop doesn't work
for(var x = 0; x < files.length; x++) {
if (files.charAt(x) == ".")
{mover = mover + files;}
}
files is a variable
a sample input would be
/recent/temp/2/index.jpg
but basically I want just
/recent/temp/2/index
thanks, any help is much appreciated!