tame4tex
06-06-2005, 02:51 AM
The code below takes the script name of a page (which is always an asp file) and substitutes the asp extension with html and then inserts the file in the <frame> tag.
This code works file for a url such as
www.somesite.com/file.asp
But if the url includes an index eg
www.somesite.com/file.asp#position1
how do I get the #position1 added to the file name that is used in the <frame> tag?
Is there a server variable for # info?
Any help would be greatly appreciated!
<%
dim fname
fname=Request.ServerVariables("script_name")
fname=Replace(fname, "asp", "html")
%>
<FRAMESET Rows="33,*,50" Border=0 Frameborder=0 Framemargin=0>
<FRAME SRC="/header.asp" NAME="header" Marginheight=0 Marginwidth=0 Scrolling=no>
<% response.write("<FRAME SRC='" & fname & "' NAME='main' Marginheight=0 Marginwidth=0 Scrolling=auto>") %>
<FRAME SRC="/footer.asp" NAME="footer" Marginheight=0 Marginwidth=0 Scrolling=no>
</FRAMESET>
This code works file for a url such as
www.somesite.com/file.asp
But if the url includes an index eg
www.somesite.com/file.asp#position1
how do I get the #position1 added to the file name that is used in the <frame> tag?
Is there a server variable for # info?
Any help would be greatly appreciated!
<%
dim fname
fname=Request.ServerVariables("script_name")
fname=Replace(fname, "asp", "html")
%>
<FRAMESET Rows="33,*,50" Border=0 Frameborder=0 Framemargin=0>
<FRAME SRC="/header.asp" NAME="header" Marginheight=0 Marginwidth=0 Scrolling=no>
<% response.write("<FRAME SRC='" & fname & "' NAME='main' Marginheight=0 Marginwidth=0 Scrolling=auto>") %>
<FRAME SRC="/footer.asp" NAME="footer" Marginheight=0 Marginwidth=0 Scrolling=no>
</FRAMESET>