CharlieMike73
Programmer
Hi,
I need to find the name of a script and place it in the <form action=""> tag, so when a user submits the form it submits to itself.
<%
Dim Page_Name
Page_Name = Request.ServerVariables("SCRIPT_NAME"
%>
<form name="form1" id="form1" method="post" action="<% response.write Page_Name %>">
When I run the above code I get this...
<form name="form1" id="form1" method="post" action="/m_o/mats/reports/TMP2m2v94wvoj.asp">
I only want the 'TMP2m2v94wvoj.asp' part, how do I do this.
Is there a command I can use in place of SCRIPT_NAME that will give me just the name without the parent folder names?
And if NOT, then can someone post the code I will need to crop everything butthe file name off.
regards,
Charlie
I need to find the name of a script and place it in the <form action=""> tag, so when a user submits the form it submits to itself.
<%
Dim Page_Name
Page_Name = Request.ServerVariables("SCRIPT_NAME"
%>
<form name="form1" id="form1" method="post" action="<% response.write Page_Name %>">
When I run the above code I get this...
<form name="form1" id="form1" method="post" action="/m_o/mats/reports/TMP2m2v94wvoj.asp">
I only want the 'TMP2m2v94wvoj.asp' part, how do I do this.
Is there a command I can use in place of SCRIPT_NAME that will give me just the name without the parent folder names?
And if NOT, then can someone post the code I will need to crop everything butthe file name off.
regards,
Charlie