Get absolute URL??

Results 1 to 3 of 3

Thread: Get absolute URL??

  1. #1
    Eitan Davis Guest

    Default Get absolute URL??

    Anyone know how to retrieve an absolute url from a web site??<BR>I am trying to open a saved recordset at the client&#039s side,<BR>using client script such as:<BR> set rs = CreateObject("ADODB.Recordset") <BR> "/MyWeb/"<BR>but the open method only works when I hard code the full URL.<BR>I couldn&#039t find any sesssion variable that returns the absolute <BR>URL, so that ANY HELP WOULD BE APPRECIATED!!<BR><BR>Thanks in advance,<BR>Eitan Davis

  2. #2
    Shadao Shai Guest

    Default RE: Get absolute URL??

    You should use the Request.ServerVariables collection<BR>to retrieve the info from the http headers. Here is a script<BR>that gives a few details on the url, server name and port:<BR><BR>&#060;%<BR><BR><BR>Response.write("Re ferer URL: " & request.servervariables("HTTP_REFERER") & "&lt;br&gt;")<BR>Response.write("URL: " & request.servervariables("URL") & "&lt;br&gt;")<BR>Response.write("Server name: " & request.servervariables("SERVER_NAME") & "&lt;br&gt;")<BR>Response.write("Port: " & request.servervariables("SERVER_PORT") & "&lt;br&gt;")<BR><BR>%&#062;<BR><BR>*note - there is no line break in the code. The messageboard is<BR>causing it to wrap.

  3. #3
    Eitan Guest

    Default RE: Get absolute URL??

    Thanks for your reply,<BR>I&#039m not certain whether any server variable returns the FULL url<BR>(that is "http://..."). however, since I need the url on the client side , I&#039ll simply get the Self.Location property.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts