Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-14-2011, 06:56 PM #1
- Join Date
- Mar 2010
- Thanked 0 Times in 0 Posts
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 )
<!--#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" />
11-14-2011, 08:37 PM #2
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.