« Previous Next »

Thread: Localhost added to link on ASP Page

Last post 10-15-2009 1:42 PM by day10. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 10-15-2009, 11:02 AM

    • day10
    • Not Ranked
    • Joined on 05-15-2007, 10:50 AM
    • Posts 5

    Localhost added to link on ASP Page

    I am usng a locally running ASP page to save text to a DB and display.  When I add standard <A> link, e.g. to http://www.google.com to this text, and the text is later rendered on a page, the link has localhost added to it as follows:

     http://localhost:80//”www.google.com

     I am guessing this is an IIS setting but I cannot find it as yet.

    Appreciate any guidance!

     

    day10

  • 10-15-2009, 12:14 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,237
    • IIS MVPs

    Re: Localhost added to link on ASP Page

    day10:
    I am guessing this is an IIS setting but I cannot find it as yet.

    I don't think so.  Please share your code.

  • 10-15-2009, 1:42 PM In reply to

    • day10
    • Not Ranked
    • Joined on 05-15-2007, 10:50 AM
    • Posts 5

    Re: Localhost added to link on ASP Page

    Code below.  There is a call to the DB whic grabs the text and put it into strText1 (see ****** in code).

     In this case StrText1 = http://www.google.com

     When the page is rendered and you hover the mouse over the link it is:

    http://localhost/advisor_80/”http://www.google.com

    Here is the entire file:

     <html>

    <head>
    <meta CONTENT="3; URL=acvs_user_Information.asp">
    <title>TITLE</title>
    <script language="JavaScript" src="navigation.js"></script>
    <script Language="JavaScript">
    function save() {
         document.location = "acvs_user_cemeteryinforesponse.asp";
    }
    </script>
    <link rel="stylesheet" href="<%=Session("StyleSheet")%>" type="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <style>
    .imgstyle { margin: 40px; padding: 15px;}
    </style>

    <body marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">

    <%
      dim strText1, strImage1, strText2, strMovie1

      strBurial = Session("Burial")
      if strBurial = "1" then
       strType = "1B"
      else
       strType = "1C"
      end if

      Set objHome = Server.CreateObject("FamilyAdvisor.Home")
      objHome.OpenByID CInt(Session("UserFHID"))


      objHome.Designs.GetDesign 16, Session("UserNumber")
         *******strText1 = objHome.Designs("GenericInfo"& mid(strType,1,1) &"")********
         strImage1 = objHome.Designs("GenericImage"& mid(strType,1,1) &"")
         strTitle = objHome.Designs("GenericTitle"& mid(strType,1,1) &"")
         strPicture = "images/fhimages/" & strImage1

     

      'Get image data
      strCSS = Session("StyleSheet")
      'response.write strCSS & "<BR>"
      'strCurrent = "changer" & Session("userFHID") & ".css<BR>"
      'response.write "changer" & Session("userFHID") & ".css<BR>"
      'response.end
      if strCSS = "changer" & Session("userFHID") & ".css" then
         strCSS = "changer.css"
      end if

      Set dConn = Server.CreateObject("ADODB.Connection")
      dConn.Open Application("DirectorDSN")
      set rs1 = dConn.Execute("SELECT IntroLeft, IntroMid, IntroRight FROM tblSiteTemplates WHERE CSSName = '" & strCSS & "'")
      %>

    <!-- #INCLUDE file="navMenu.inc" -->
    <%

    'remove service/product info screens
    RemoveMenu("b49")
    RemoveMenu("c45")
    Call DisplayMenu %>
    <div style="left: 133px; POSITION: absolute; TOP: 28px; z-index: -1">
    <table Height="70" width="100%" background="images/templates/toptitle_edge.gif" CELLSPACING="0">
    <tr>
         <td></td>
    </tr>
    </table>
    </div>
    <img src="images/templates/blank_top_info_image.gif" style="LEFT: 129px; POSITION: absolute; TOP: 28px; z-index: -1" id="imgServSelect" name="imgServSelect">
    <div style="LEFT: 147px; POSITION: absolute; TOP: 36px; z-index: 2"><font size="+4" style="Palatino Linotype" color="#C6A09F"><i><%=strTitle%></i></font></div>


    <div style="left: 140px; position: absolute; top: 120px">
    <table align="center" width="100%" border="0" class="clsInfoText">
    <tr>
     <%if strImage1 <> "None" then%>
      <!-- #INCLUDE file="imagewidth.inc" -->
      <%
         Set dConn = Server.CreateObject("ADODB.Connection")
        dConn.Open Application("DirectorDSN")
      'grab necessary data to adjust casket image for widescreens
      set rs = dConn.Execute("SELECT ScreenType, ScreenWidth FROM tblFuneralHome WHERE fhID = " & Session("UserFHID") &" ;")
      if not rs.eof then
        strScreenType = rs("ScreenType")
        strScreenWidth = rs("ScreenWidth")
      end if
      strImageWidth = (Session("ImageWidth") * .8)
      strImageHeight = Session("ImageHeight") %>
            <% if (strScreenType = "W" AND strScreenWidth = "800") OR (strScreenType = "W" AND strScreenWidth = "1024") then %>
      <td><img src="images/fhimages/<%= strImage1 %>" id="img1" name="img1" style="float:right" class="imgstyle" width="<%=strImageWidth%>" height="<%=strImageHeight%>"><br><br><%=strText1%></td>
            <% else %>
      <td><img src="images/fhimages/<%= strImage1 %>" id="img1" name="img1" style="float:right" class="imgstyle"><br><br><%=strText1%></td>
      <% end if %>
     <%else%>
      <td><%=strText1%></td>
     <%end if%>
    </tr>
    </table>
    </body>
    </html>

  • 10-15-2009, 2:37 PM In reply to

    • day10
    • Not Ranked
    • Joined on 05-15-2007, 10:50 AM
    • Posts 5

    Re: Localhost added to link on ASP Page

    Thanks for your reply.  After I posted the code the obvious hit me and I saw the problwm.  I am slow today......

    Thanks again!

Page 1 of 1 (4 items)
Microsoft Communities