Click to See Complete Forum and Search --> : JScript Request.ServerVariables("url") - lastIndexOf('/')


Captain_Pugwash
May 17th, 2005, 03:49 PM
Can anybody help with this

<%
var jir
var sar
jir = Request.ServerVariables("url")
%>
<%
sar = jir.lastIndexOf('/')
%>
<%= sar %>

This doesn't work and I can not figure out why

This does work

<%
var jir
jir = Request.ServerVariables("url")
%>
<%= jir %>

and produces this

/ProBoat/contact.asp

This works

<%
var jir
var sar
sar = "/ProBoat/contact.asp"
jir = sar.lastIndexOf('/')

%>
<%= jir %>

and produces this

8

any help is much appreciated

James