473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

arrange page heading code

Is there anything technically wrong with the way I have the below code
arranged? It works, but is not how I am used to seeing page headings layed
out.
thanks!

<%@LANGUAGE="VBSCRIPT"%>
<% response.buffer = true %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!--#include file="Connections/dbconnect.asp" -->
<%
sname = UCASE(Request.ServerVariables("SERVER_NAME"))
If InStr(sname,"NEWRELEASES") <> 0 then
response.redirect "http://www.mydomain.com/newproduct/"
ElseIf InStr(sname,"SPECIALS") <> 0 then
response.redirect "http://www.mydomain.com/specials/"
End If
%>
<html>
blah blah blah....
Jul 19 '05 #1
2 1424
shank wrote on 12 okt 2003 in microsoft.public.inetserver.asp.general:
Is there anything technically wrong with the way I have the below code
arranged? It works, but is not how I am used to seeing page headings
layed out.
thanks!

<%@LANGUAGE="VBSCRIPT"%>
<% response.buffer = true %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!--#include file="Connections/dbconnect.asp" -->
<%
sname = UCASE(Request.ServerVariables("SERVER_NAME"))
If InStr(sname,"NEWRELEASES") <> 0 then
response.redirect "http://www.mydomain.com/newproduct/"
ElseIf InStr(sname,"SPECIALS") <> 0 then
response.redirect "http://www.mydomain.com/specials/"
End If
%>
<html>
blah blah blah....


I would do the redirects first,
anyway before any output to clientside,
wich the DOCTYPE declaration is.
[In your version are only saved by the buffering.]
If you are only writing for your own machine [set on vbs],
I could do without the langage declaration.

===================================

<%@LANGUAGE="VBSCRIPT"%>
<%
sname = UCASE(Request.ServerVariables("SERVER_NAME"))
If InStr(sname,"NEWRELEASES") <> 0 then
response.redirect "http://www.mydomain.com/newproduct/"
ElseIf InStr(sname,"SPECIALS") <> 0 then
response.redirect "http://www.mydomain.com/specials/"
End If
%>
<% response.buffer = true %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!--#include file="Connections/dbconnect.asp" -->
<html>
blah blah blah....

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
My style is

a) anything in an include needs to be in an function or sub - no inline
code, no HTML

b)

<% @ Declarations here, eg Language=VBScript %>
<%
Option Explicit
%>
<!-- #include files go here -->
<!-- #include files go here -->
<%
' Now do your response redirects if required:
sname = UCASE(Request.ServerVariables("SERVER_NAME"))

If InStr(sname,"NEWRELEASES") <> 0 then
response.redirect "http://www.mydomain.com/newproduct/"
ElseIf InStr(sname,"SPECIALS") <> 0 then
response.redirect "http://www.mydomain.com/specials/"
End If
%>

<! DOCTYPE= >
<html>
HTML content here
</html>

Cheers
Ken
"shank" <sh***@tampabay.rr.com> wrote in message
news:Of****************@TK2MSFTNGP12.phx.gbl...
: Is there anything technically wrong with the way I have the below code
: arranged? It works, but is not how I am used to seeing page headings layed
: out.
: thanks!
:
: <%@LANGUAGE="VBSCRIPT"%>
: <% response.buffer = true %>
: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
: <!--#include file="Connections/dbconnect.asp" -->
: <%
: sname = UCASE(Request.ServerVariables("SERVER_NAME"))
: If InStr(sname,"NEWRELEASES") <> 0 then
: response.redirect "http://www.mydomain.com/newproduct/"
: ElseIf InStr(sname,"SPECIALS") <> 0 then
: response.redirect "http://www.mydomain.com/specials/"
: End If
: %>
: <html>
: blah blah blah....
:
:
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Harlan Messinger | last post by:
Different pages on a web site can vary in the level of header to which they descend. One short page may have only <h1>, or <h1> and <h2>. Another, detailed page, might get all the way down to <h6>....
6
by: The Bicycling Guitarist | last post by:
When I reduce the width of the window of my home page, Firefox makes the <h1> and other text and buttons go UNDERNEATH the graphic in the middle of the page. However yukky Microsoft Internet...
11
by: The Bicycling Guitarist | last post by:
Oh lords and ladies of ciwah, I have already been told by one person that the <h1> on my home page doesn't look like proper semantic markup to them. That person suggested a <p> with style by CSS....
3
by: Jim Heavey | last post by:
Hello, my company has a standard format that I must follow when creating a page. The top portion of the page contains a standard heading which should be placed on each page. This "heading" has a...
4
by: Garry Jones | last post by:
I have recently constructed a website using a lot of php script (self taught). I now wonder if I should have construted the site in a different way. The page contains a header (a.php) and left...
1
by: SSG001 | last post by:
I have printing program in php and html where the php varaibles have been echoed in the tabular format and this table has heading whch should come on evry page now how do i asertain when there...
6
by: phpmagesh | last post by:
Hi to all, I am trying to do some link management in my page, that is i have few contents in my page each have his own headings, like links: > heading 1 > heading 2 > heading 3
1
by: simon2x1 | last post by:
how can i arrange image that i echo from the database to be in 5column and 2 row that is if i have 5 image that is echo on a page the next image that will be added should be in the second row and...
3
by: malcsman | last post by:
Hi there, I think it's best to explain things first.. (it's a sermons archive) I manage a static page which I'd like to automate. This page is an archive that lists mp3s and their notes(pdf) as...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.