Click to See Complete Forum and Search --> : String operations in JavaScript


sly-phy
11-19-2003, 11:42 PM
I am trying to get the path of the current document

document.location gives me '...folder/subfolder/docname.htm'

whereas I only want '.../folder/subfolder'

is there a way to do this?

Gollum
11-20-2003, 04:05 AM
alert("...folder/subfolder/docname.htm".match(/.+(?=\/)/));