Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question best place to put an ASP action in page doc.

    I inherited responsiblity for a website. It was built with classic ASP and I don't really know it, but I can modify / manipulate for the simple tasks. Recently I discovered the site, built in 2008-2009, is quirking with IE 7 / 8/ 9. Even though there is a <!DOCTYPE> declared. But the original company built it with an ASP include and snippet before the <!DOCTYPE>. I can pull these snippets, but then their action fails.

    Where is best place to put these action? (see below first ~12 lines)

    My ideas: in head after <meta> before <link ... Or might it be better at the bottom of page like scripts? Another location?



    How the page begins presently (and breaks IE )

    Code:
    <!--#include file="store/pc/include-metatags.asp"-->
    <!-- 'default to order tab or not --> 
    <%
    Dim tab1, tab5, switchtabs
    switchtabs = Trim(request.querystring("o"))
    if isnumeric(switchtabs) then
    	tab1="style='display:none'"
    	tab5="style='display:block'"
      else
    	tab1="style='display:block'"
    	tab5="style='display:none'"
    end if
    %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    Thanks

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,028
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    If the code in the #include file is pure ASP (no HTML generated), then it shouldn't matter where it is.

    But, yes, I usually put my code like that in the <head>, just in case it needs to dump in some <style> or <script> coding. Without seeing the code in the #include, it's hard to tell for sure, but you could/should certainly try that.

    Certainly it will *NOT* work at the bottom of the page.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

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