garethtnash
asked on
comment out a line of ASP VBScript code
Hello Experts,
I am developing a website that allows the owner to enter their Google Analytics tracking code, without needing to edit the design, IO'm using a database to store the value for the analytics JavaScript and a conditional statement to determine whether to parse the JavaScript -or not--
<% If Florist.Fields.Item("Analy tics").Val ue <> "" then%><%=(Florist.Fields.I tem("Analy tics").Val ue)%><%End if%>
As per Googles instructions I'm include the Google JavaScript in this case the variable stored in <%=(Florist.Fields.Item("A nalytics") .Value)%> just before the closing </head> tag
As per below.
Problem is I'm a split Code View / Design View developer, and when I include this line just before the closing </head> tag, so just after the include CSS tags, It removes all styling from the design view.
To overcome this I have tried storing <% If Florist.Fields.Item("Analy tics").Val ue <> "" then%><%=(Florist.Fields.I tem("Analy tics").Val ue)%><%End if%> in an external file and then referencing the file with an include -
<!--#include virtual="/Scripts/analytic s.asp" -->
Which works fine, but still leaves me with the style being removed.
Is there something wrong with the way I have built my code below?
Can I comment out the code in - <!--#include virtual="/Scripts/analytic s.asp" -->
in other words the code"<% If Florist.Fields.Item("Analy tics").Val ue <> "" then%><%=(Florist.Fields.I tem("Analy tics").Val ue)%><%End if%>" until such time as the design element is complete?
I know it works fine in a browser, just don't really want to keep having to preview in browser..
Any thoughts really appreciated
I am developing a website that allows the owner to enter their Google Analytics tracking code, without needing to edit the design, IO'm using a database to store the value for the analytics JavaScript and a conditional statement to determine whether to parse the JavaScript -or not--
<% If Florist.Fields.Item("Analy
As per Googles instructions I'm include the Google JavaScript in this case the variable stored in <%=(Florist.Fields.Item("A
As per below.
Problem is I'm a split Code View / Design View developer, and when I include this line just before the closing </head> tag, so just after the include CSS tags, It removes all styling from the design view.
To overcome this I have tried storing <% If Florist.Fields.Item("Analy
<!--#include virtual="/Scripts/analytic
Which works fine, but still leaves me with the style being removed.
Is there something wrong with the way I have built my code below?
Can I comment out the code in - <!--#include virtual="/Scripts/analytic
in other words the code"<% If Florist.Fields.Item("Analy
I know it works fine in a browser, just don't really want to keep having to preview in browser..
Any thoughts really appreciated
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=(Florist.Fields.Item("metatitle").Value)%></title>
<meta name="language" content="EN" />
<meta name="Keywords" content="<%=(Florist.Fields.Item("metakeywords").Value)%>" />
<meta name="Description" content="<%=(Florist.Fields.Item("metadescription").Value)%>" />
<base href="<%=(Florist.Fields.Item("domainname").Value)%>" />
<link href="/styles/maindesign.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/catalogue.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/footer.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/topnavbar.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/columnnav.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/telefloristfacebooketc.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/paypalbuyflowers.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/orderby.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/topbarcart.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/topphone.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/homepagetext.css" rel="stylesheet" type="text/css" media="all" />
<link href="/styles/specialnav.css" rel="stylesheet" type="text/css" media="all" />
<link href="../WA_eCart/CSS/eC_Simple_Moab_Arial.css" rel="stylesheet" type="text/css" />
<% If Florist.Fields.Item("Analytics").Value <> "" then%><%=(Florist.Fields.Item("Analytics").Value)%><%End if%>
</head>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
garethtnash,
know the feeling. glad I could help.
know the feeling. glad I could help.
ASKER