www.webdeveloper.com
Results 1 to 3 of 3

Thread: <div></div> tags and ASP positioning?

  1. #1
    Join Date
    Dec 2002
    Posts
    23

    <div></div> tags and ASP positioning?

    Hello

    I have the following CSS between the <head></head> tags:

    <style type="text/css">
    a:link {color:white;}
    a:visited {color:white;}
    a:active {color:white;}
    body { background:black;
    color:white }
    div { font-family: verdana; font-style: normal; }
    </style>

    and further down the page I have a few Response.write statements:

    Response.Write "Please click <a href='javascript:history.back(1)'>here</A> to type in your name"
    elseif strSubject = "" then

    Response.Write "Please click <a href='javascript:history.back(1)'>here</A> to type in your subject</font>"
    elseif strMessage = "" then

    Response.Write "Please click <a href='javascript:history.back(1)'>here</A> to type in your message"
    elseif strEmail = "" then

    Response.Write "Please click <a href='javascript:history.back(1)'>here</A> to type in your Email"
    end if
    Response.End

    Can I ask where SHOULD the <div></div> tags go because I keep getting Times Roman as the font face?

    Furthermore, some people seem to prefer keeping all the <% %> comments in one part of the page, and HTML/CSS in another (it seems tidier that way), while others (many others, in fact), seem to mingle everything together. Are there any tutorials on this anywhere? Can't seem to find much from a Yahoo! search.

    Thanks in advance.

    laTortuga

  2. #2
    Join Date
    Dec 2002
    Posts
    23

    DIV tags

    Hello Dave

    Many thanks for your reply. I liked the Select Case!

    For some reason, though, the entire page is black! It is here: This is the entire code:

    <%@ Language=VBScript %>
    <%option explicit%>
    <!--#include file="DbConn.asp"-->
    <HTML>
    <HEAD>

    <style type="text/css">
    a:link {color:white;}
    a:visited {color:white;}
    a:active {color:white;}
    body { background:black;
    color:white }
    div { font-family: verdana; font-style: normal; font-color: white }

    </style>

    </HEAD>

    <BODY BGCOLOR="BLACK">
    <center>

    <%
    dim objRS, strSQL
    dim strName, strSubject, strMessage, strEmail, strDate, strTime

    strSQL = "SELECT * FROM Forum"
    set objRS = server.CreateObject("ADODB.RecordSet")
    objRS.Open strSQL, objConn,1,2

    strName = Request.Form("txtName")
    strSubject = Request.Form ("txtSubject")
    strMessage = Request.Form ("txtMessage")
    strEmail = Request.Form("txtEmail")
    strDate = (Date)
    strTime = (Time)


    strMessage = Replace(strMessage,chr(10),"<BR>")


    If strName="" or strSubject="" or strMessage="" or strEmail="" Then
    Response.Write "<div>Please click <a href=""" &_
    "javascript:history.go(-1)"">here</A> to type in your "
    Select Case ""
    Case strName Response.Write "Name"
    Case strSubject Response.Write "Subject"
    Case strMessage Response.Write "Message"
    Case Else Response.Write "Email"
    End Select
    Response.Write "</div>" & vbCrLf
    End If
    Response.End


    objRS.AddNew
    objRS("Name") = strName
    objRS("Subject") = strSubject
    objRS("Message") = strMessage
    objRS("Email") = strEmail
    objRS("Date") = strDate
    objRS("Time") = strTime

    objRS.Update

    Response.Write "<center>The guestbook has been updated with your message</center>"
    Response.Write "<center>Please click <a href='gbook.asp'>here</A> to go back to the guestbook</center>"

    %>
    </center>
    </BODY>
    </HTML>

    Can't understand why it should be black! It's here and if you fill in the form, you'll see what I mean:

    http://www.grafik1.net/guest/gsave.asp

    Cheers and thanks for your time.

    laTortuga

  3. #3
    Join Date
    Dec 2002
    Posts
    23

    page colour

    Hello Dave again

    Thanks for your post.

    I've inserted your suggestion, but it hasn't changed anything.

    I'll try messing about with it a bit more and see what happens!

    Cheers

    laTortuga

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles