Aug 27, 2002 #1 UncleCake Technical User Feb 4, 2002 355 US Hi, Is there a way to get the page or file name with VB or JavaScript that a user is currently on? For instance, ContactUs.htm. -Uncle Cake
Hi, Is there a way to get the page or file name with VB or JavaScript that a user is currently on? For instance, ContactUs.htm. -Uncle Cake
Aug 27, 2002 #2 onpnt Programmer Dec 11, 2001 7,778 US via javascript <html> <head> <script language="JavaScript"> <!-- /* This script gets the URL of the current page, then extracts the file name and path from the URL */ var URL = unescape(location.href) // get current URL in plain ASCII var xstart = URL.lastIndexOf("/" + 1 var xend = URL.length var hereName = URL.substring(xstart,xend) var herePath = URL.substring(0,xstart) document.write("The name of the current file is: " + hereName) document.write("The path of the current file is: " + herePath) // --> </script> </head> <body> </body> </html> URL From http://web.bentley.edu/empl/c/rcrooks/toolbox/javascript/js_026.html Was it something I said? admin@onpntwebdesigns.com Upvote 0 Downvote
via javascript <html> <head> <script language="JavaScript"> <!-- /* This script gets the URL of the current page, then extracts the file name and path from the URL */ var URL = unescape(location.href) // get current URL in plain ASCII var xstart = URL.lastIndexOf("/" + 1 var xend = URL.length var hereName = URL.substring(xstart,xend) var herePath = URL.substring(0,xstart) document.write("The name of the current file is: " + hereName) document.write("The path of the current file is: " + herePath) // --> </script> </head> <body> </body> </html> URL From http://web.bentley.edu/empl/c/rcrooks/toolbox/javascript/js_026.html Was it something I said? admin@onpntwebdesigns.com
Aug 27, 2002 Thread starter #3 UncleCake Technical User Feb 4, 2002 355 US Thanks onpnt, I think that this will work! -Uncle Cake Upvote 0 Downvote
Aug 27, 2002 #4 fillup07 Vendor Apr 1, 2002 62 US Via VBscript and ASP: <% url = request.servervariables("HTTP_HOST" & "/" & request.servervariables("URL" response.write url %> Much easier. -Phil fillup07@hotmail.com Upvote 0 Downvote
Via VBscript and ASP: <% url = request.servervariables("HTTP_HOST" & "/" & request.servervariables("URL" response.write url %> Much easier. -Phil fillup07@hotmail.com