Click to See Complete Forum and Search --> : Forms not validating


Nicodemas
08-21-2003, 03:04 AM
I keep trying to validate my pages in XTHML 1.0 Trans, and my forms are throwing errors.

It says the form object cannot exist there, or rules do not allow the form to be there.

the same is occurring for my h5's. may hap I am just not hip on html 4.0+rules and these elements cannot exist in spans?




<?xml version="1.0" encoding="iso-8859-1"?>
<!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>
<link rel="stylesheet" href="style.css" type="text/css" />
<title>:: Admin Page</title>
</head>
<!-- #include virtual="include/QueryDB.asp" -->
<!-- #include virtual="include/functions.asp" -->
<body class="splash">
<img src="/images/shields/52dfw.gif" class="splashShield" alt="" />
<div class="content">
<h2 align="center">Suspense Creation Page</h2>
<hr class="sep" />
<div class="navigationlinks">
<a href="default.asp" class="navigationlinks">Main</a>&raquo;
<a href="http://intranet" class="navigationlinks">Intranet</a>&raquo;
<a href="create_suspense.asp" class="navigationlinks">Create New Suspense</a>&raquo;
<a href="feedback.asp" class="navigationlinks">Send Feedback</a>
</div>

<br /><br /><br /><br /><br /><br />
<p class="intro">Welcome to the 52d Fighter Wing Suspense Creation page in order to create a new suspense, you must provide a short title description (4 words or so), and type out the suspense details in the remarks section of this form. Also, a date that this suspense is due must be provided.</p>
<span style="width:300px; height:250px;">
<form id="frm52FW" action="input_suspense2db.asp" method="post">
<input type="hidden" name="intSuspenseID" value="<%= Session("Suspense_ID")%>" />
<h5>Short Title:</h5>
<input type="text" name="txtTitle" size="35" tabindex="1" /><br />
<h5>Remarks:</h5>
<textarea onclick="this.value=''" onfocus="this.value=''" class="txtarea" rows="5" cols="30" name="txtremarks" tabindex="2">Enter Remarks here</textarea>
</form>
</span>
<span style="width:300px; height:250px; position:relative; top:2px;">
<h5>Select the groups that will receive this tasking:</h5>
<form id="frmAddNewGroup" method="post" action="modGroup.asp?intAction=1">
<select name="select_Groups" size="1" tabindex="3">some server side code</select>
<input type="submit" style="font-size:10px" value="Add" tabindex="4" />
</form> more server side code </span>
</div>
</body>
</html>

Fang
08-21-2003, 04:52 AM
Here's a validating version.
I changed the ">>" in the menu,
the nested "" in value="<%= Session('Suspense_ID')%>"
replaced spans with divs with some CSS to adjust the layout.
The row of <br /> should be changed for CSS in class="navigationlinks".
The first line, xml declaration, is not compulsory and puts IE into quirks mode.

<?xml version="1.0" encoding="iso-8859-1"?>
<!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>
<link rel="stylesheet" href="style.css" type="text/css" />
<title>:: Admin Page</title>
</head>
<!-- #include virtual="include/QueryDB.asp" -->
<!-- #include virtual="include/functions.asp" -->
<body class="splash">
<img src="/images/shields/52dfw.gif" class="splashShield" alt="" />
<div class="content">
<h2 align="center">Suspense Creation Page</h2>
<hr class="sep" />
<div class="navigationlinks">
<a href="default.asp" class="navigationlinks">Main</a>&gt; &gt;
<a href="http://intranet" class="navigationlinks">Intranet</a>&gt; &gt;
<a href="create_suspense.asp" class="navigationlinks">Create New Suspense</a>&gt; &gt;
<a href="feedback.asp" class="navigationlinks">Send Feedback</a>
</div>

<br /><br /><br /><br /><br /><br />
<p class="intro">Welcome to the 52d Fighter Wing Suspense Creation page in order to create a new suspense, you must provide a short title description (4 words or so), and type out the suspense details in the remarks section of this form. Also, a date that this suspense is due must be provided.</p>
<div style="float:left; width:300px; height:250px;">
<form id="frm52FW" action="input_suspense2db.asp" method="post">
<h5 style="margin-top:0px; border:0px solid #00000;">Short Title:</h5>
<input type="text" name="txtTitle" size="35" tabindex="1" /><br />
<h5>Remarks:</h5>
<textarea onclick="this.value=''" onfocus="this.value=''" class="txtarea" rows="5" cols="30" name="txtremarks" tabindex="2">Enter Remarks here</textarea>
<input type="hidden" name="intSuspenseID" value="<%= Session('Suspense_ID')%>" />
</form>
</div>
<div id="secondform">
<h5 style="margin-top:0px; border:0px solid #00000;">Select the groups that will receive this tasking:</h5>
<form id="frmAddNewGroup" method="post" action="modGroup.asp?intAction=1">
<select name="select_Groups" size="1" tabindex="3">
<option value="0">server side options</option>
</select>
<input type="submit" style="font-size:10px" value="Add" tabindex="4" />
</form> more server side code </div>
</div>
</body>
</html>

Charles
08-21-2003, 05:36 AM
The SPAN element is an inline element and as such cannot contain block level elements.