Solved

Do you know how to convert 3 classic ASP lines that have errors because they are outdated?

Posted on 2010-11-24
3
892 Views
Last Modified: 2012-06-27
I am trying to debug a classic ASP application using VS2005.

I placed the following ASP file into VS2005.

Do you know how I can resolve the following errors and warnings on 3 lines in the code section that follows?

Line 8 generates the following messages:

Validation (XHTML 1.0 Transitional): Attribute 'leftmargin' is not a valid attribute of element 'body'.                       c:\inetpub\wwwroot\MyWeb\default.asp            http://localhost/MyWeb/

Validation (XHTML 1.0 Transitional): Attribute 'topmargin' is not a valid attribute of element 'body'.                       c:\inetpub\wwwroot\MyWeb\default.asp            http://localhost/MyWeb/

Validation (XHTML 1.0 Transitional): Attribute 'marginwidth' is not a valid attribute of element 'body'.                       c:\inetpub\wwwroot\MyWeb\default.asp            http://localhost/MyWeb/

Validation (XHTML 1.0 Transitional): Attribute 'marginheight' is not a valid attribute of element 'body'.                       c:\inetpub\wwwroot\MyWeb\default.asp            http://localhost/MyWeb/

Validation (XHTML 1.0 Transitional): Text is not allowed between the opening and closing tags for element body'.      c:\inetpub\wwwroot\MyWeb\default.asp                  http://localhost/MyWeb/

------

Line 12  generates the following messages:

Validation (XHTML 1.0 Transitional): Attribute 'width' is considered outdated. A newer construct is recommended.      c:\inetpub\wwwroot\MyWeb\default.asp            http://localhost/MyWeb/


Validation (XHTML 1.0 Transitional): Attribute values must be enclosed in quotation marks.                                         c:\inetpub\wwwroot\MyWeb\default.asp      
http://localhost/MyWeb/

Validation (XHTML 1.0 Transitional): Element 'img' is missing required attribute 'alt'.                                                           c:\inetpub\wwwroot\MyWeb\default.asp      
http://localhost/MyWeb/

Validation (XHTML 1.0 Transitional): Empty elements such as 'img' must end with />.                                                           c:\inetpub\wwwroot\MyWeb\default.asp      
http://localhost/MyWeb/

--------

Line 13  generates the following messages:

Validation (XHTML 1.0 Transitional): Attribute 'width' is considered outdated. A newer construct is recommended. c:\inetpub\wwwroot\MyWeb\default.asp            http://localhost/MyWeb/

Validation (XHTML 1.0 Transitional): Attribute values must be enclosed in quotation marks.                                   c:\inetpub\wwwroot\MyWeb\default.asp      
http://localhost/MyWeb/

Validation (XHTML 1.0 Transitional): Element 'font' is considered outdated. A newer construct is recommended. c:\inetpub\wwwroot\MyWeb\default.asp            http://localhost/MyWeb/




Line 8: 
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bgBlueDark">
	<tr> 

Line 12: 		<td width="30%" align=left> <img height="42" src="images/hdr_y_logo.gif" width="152"></td>

Line 13:		<td width="70%" align="center"><font color=white></font></td>

		<td>&nbsp;</td>
	</tr>
	<tr> 
		<td width="730" colspan="2"><img src="images/transpix.gif" width="1" height="1" vspace="1"></td>
		<td><img src="images/transpix.gif" width="1" height="1" vspace="1"></td>
	</tr>
	<tr> 
		<td class="bgBlueDark" width="730" colspan="2"> 
		</td>
		<td class="bgBlueDark"> 
		</td>
	</tr>
	</table>

Open in new window

0
Comment
Question by:zimmer9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34209951
Mostly they are expecting you to use CSS styles in the head section like below.  You can also define the width of an element in CSS in the class that is applied to the element.  Attribute values quoted and 'alt' attribute added to <img> tags.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Untitled</title>
<style type="text/css">
<!-- 
body { margin: 0;}
.whitetext { color: #ffffff;} 
-->
</style>
</head>
<!-- Line 8:  -->
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bgBlueDark">
	<tr> 
		<td width="30%" align=left>
		<img height="42" src="images/hdr_y_logo.gif" width="152" alt="" /></td>
		<td width="70%" align="center" class="whitetext"><!-- <font color="white"></font> --></td>
		<td>&nbsp;</td>
	</tr>
	<tr> 
		<td width="730" colspan="2">
		<img src="images/transpix.gif" width="1" height="1" vspace="1" /></td>
		<td><img src="images/transpix.gif" width="1" height="1" vspace="1" alt="" /></td>
	</tr>
	<tr> 
		<td class="bgBlueDark" width="730" colspan="2"> 
		</td>
		<td class="bgBlueDark"> 
		</td>
	</tr>
</table>

</body>
</html>

Open in new window

0
 
LVL 29

Accepted Solution

by:
sammySeltzer earned 500 total points
ID: 34209974
replace leftmargin = "0" with
style="margin-left: 0; top-margin:0; margin-height:0;"

then for image:


<img height="42" src="images/hdr_y_logo.gif" width="152" alt="my image">
0
 
LVL 3

Expert Comment

by:rajuare
ID: 34211138
1) Good solution is don't use the VS2005 ... you have lot of head ache for using VS2005 for ASP.
2) Best practice is use "Response.write" and print vaiable name line by line .... you could resolve all problem in AEAP

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connection to multiple databases 13 45
Hide cell in a table 2 45
Want an individual results display div 8 61
Help with IIS intermittent hangs on Windows 2012 5 67
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question