Link to home
Start Free TrialLog in
Avatar of spinone_owner
spinone_owner

asked on

ASP transitional validation errors

I am trying to modify the asp code in Visual Basic.  I have encountered many errors today.  Luckily I've found solved most of them but I have several that still are unsolved!  Can someone look at the errors and show me the correct way the code is supposed to be written.  

Here are the errors:
       1) validation(XHTML 1.0 Transitional) Element 'tr' cannot be nested with element 'body'
       2) validation(XHTML 1.0 Transitional) Attribute 'margin-left' is not a valid attribute of element 'input'
        3) validation(XHTML 1.0 Transitional) Attribute 'border-style' is not a valid attribute of element 'input'
       4) validation(XHTML 1.0 Transitional) Attribute 'style' can be specified only once in a tag
       5) validation(XHTML 1.0 Transitional) Attribute 'align' is not a valid attribute of element 'input'


Thank you for your help!
-d
ASKER CERTIFIED SOLUTION
Avatar of BogoJoker
BogoJoker

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Most of the errors above are actually not compile errors, but rather HTML validation errors (right now you are validating for XHTML -- and your pages aren't XHTML compliant).  You can turn this off by going to tools->options and under the text editor->html->validation option disable validation.  This will cause almost all of these errors to disappear.

Also try changing the Target Schema for validation dropdown value to IE6. You can find this dropdown in the HTML Source Editing toolbar


Cheers
 ^_^
BUGS
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of spinone_owner
spinone_owner

ASKER

I've still got to look at the code and make the modifications.   Here is the code as it stands.  I have 21 errors within this code.  They are the five errors I listed above.  Thanks for you help.


<!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><title>Frequency Input
</title><link href="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css" rel="stylesheet" type="text/css" /><link href="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css" rel="stylesheet" type="text/css" /></head>
<body bgcolor="#dfedff">
    <form name="form1" method="post" action="freqinput.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
</div>

<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
// -->
</script>


<div style="text-align: center"/>
        <img alt="Image1" title="YAt Intranet" src="YATLogo.jpg" style="height:40px;width:150px;border-width:0px;" />
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp;<strong> &nbsp; &nbsp;</strong><span style="font-size: 24pt"/><strong> &nbsp; &nbsp;
            Die Status Reports<br />
        </strong><span style="font-size: 12pt; text-decoration: underline"> </span>
       
          <br />
            <br />
 <strong></strong>  
  <asp:panel id="Panel1" runat="server" borderstyle="solid" BorderWidth="1px" Height="24px" Width="631px">
 
      
                <a id="HyperLink3" href="home.aspx" style="font-size:10pt;">Home</a>&nbsp;
                &nbsp;<a id="HyperLink4" href="assembly.aspx" style="font-size:10pt;">Assembly</a>
                &nbsp;
                <a id="HyperLink5" href="stamping.aspx" style="font-size:10pt;">Stamping</a>
                &nbsp;
                <a id="HyperLink6" href="assembly.aspx" style="font-size:10pt;">PM</a>
                &nbsp;
                <a id="HyperLink7" href="stamping.aspx" style="font-size:10pt;">Tool & Die</a>
                &nbsp;
                <a id="HyperLink8" href="home.aspx" style="font-size:10pt;">Human Resources</a>
                &nbsp;
                <a id="HyperLink9" href="stamping.aspx" style="display:inline;font-size:10pt;width:102px;">Material Control</a>&nbsp;
                <a id="HyperLink10" href="home.aspx" style="font-size:10pt;">MIS</a>&nbsp;
                <a id="HyperLink11" href="stamping.aspx" style="font-size:10pt;">Various</a></asp:panel>
</form>
           
   
   &nbsp ; <br />
            Top 20 by Frequency&nbsp;<br />
            <span style="font-size: 12pt"><strong>Enter the specific dates for the frequency report:<br />
            </strong>
                Start Date:&nbsp; </span>
            <asp:textbox id="txtstart" runat="server" ValidationGroup="yyyy/mm/dd"> </asp:textbox> <span style="font-size: 12pt"/>
                &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; End Date:&nbsp; &nbsp;<asp:textbox id="txtend" runat="server"></asp:textbox><br />
                <br />
                &nbsp;
                <input type="submit" name="btnfreqrpt" value="Frequency Report" id="btnfreqrpt" /><br />
                <br />
               
<link rel="stylesheet" type="text/css" href="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css"/>
<table id="mycrystalreportviewer" cellpadding="0" cellspacing="0" style="display:inline;height:826px;width:600px;"/>
  <tr><td></td></tr>
<div style="width: 600px; height: 826px;position:relative"/>
      <input name="mycrystalreportviewer$ctl01" type="hidden"/>
<script type="text/javascript" language="Javascript">
var decimalSep =".";
var groupSep = ",";
</script>
<span class="" style="border-style:None;">The report you requested requires further information.</span></></>
<p></p>
<hr class="" style="border-style:None;"/>
<script type="text/javascript" language="JavaScript" src="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/js/KeyDownEvent.js"></script>
<script type="text/javascript" language="JavaScript" src="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/js/strings_en.js"></script>
<script type="text/javascript" language="JavaScript" src="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/js/dt_param.js"></script>
<script type="text/javascript" language="JavaScript" src="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/js/prompts_param.js"></script>
<script type="text/javascript" language="JavaScript" src="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/js/calendar_param.js"></script>
<script type="text/javascript" language="JavaScript">
function submitParameterValues()
{
    if (prepareParameterSubmit())
       javascript:__doPostBack('mycrystalreportviewer$ctl01','crprompt=param');
}
function prepareParameterSubmit()
{
  var inform = document.getElementById("form1");
  return setPromptValues ( inform );
}
</script>
<p><span class="" style="border-style:None;">Parameter Field(s)</span></p>
<table cellspacing='0' cellpadding='0' style=''/>  <tr><td colspan='2' nowrap="nowrap"> <span class="" style="border-style:None;"> Please enter the start date </span> </td></tr>
  <tr style="padding-top:2px"><td align="Left" valign="top" nowrap="nowrap" style="padding-top:4px"> <span class="" style="border-style:None;"> Value&nbsp;  </span> </td>
      <td nowrap="nowrap"><input class="" border-style=["Inset"],["2px"];margin-left= "2px";  type="text" name="StartDate0DiscreteValue" value="" readonly="readonly" maxlength="255" style="width:200px"/><input type="hidden" name="StartDate0DiscreteValueHidden" value="" /><a style="margin-left:2px;margin-right:2px" href="javascript:doNothing()" onclick="DateTimeFormat=false;setDateField('form1', 'StartDate0DiscreteValue', 'StartDate0DiscreteValueHidden');top.newWin = window.open('/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/html/calendar.html','cal','resizable=yes,dependent=yes,width=230,height=240,screenX=200,screenY=300,titlebar=yes')"><img alt="Calendar" src="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/images/toolbar/calendar.gif" border="0"/></a></><script type="text/javascript"language="javascript" >document.write(CreateTimeEditables("StartDate0", "DiscreteValue", true, "", "", 0, 0, 0));</script>
 
</td>
  </tr>
  <tr style="padding-top:2px"><td align="Left" valign="top" nowrap="nowrap" style="padding-top:4px"> <span class="" style="border-style:None;">  </span> </td>
      <td nowrap="nowrap"></td></tr>
 <tr><td nowrap="nowrap" height='15' colspan='2'></td></tr>  <tr><td colspan='2' nowrap="nowrap"> <span class="" style="border-style:None;"> Please enter the end date </span> </td></tr>
  <tr style="padding-top:2px"><td align="Left" valign="top" nowrap="nowrap" style="padding-top:4px"> <span class="" style="border-style:None;"> Value&nbsp;  </span> </td>
      <td nowrap="nowrap"><input class="" style="border-style:Inset;border:[2px];margin-left:2px;"  type="text" name="EndDate1DiscreteValue" value="" readonly="readonly" maxlength="255" style="width:200px"/><input  type="hidden" name="EndDate1DiscreteValueHidden" value=""/><a style="margin-left:2px;margin-right:2px" href="javascript:doNothing()" onclick="DateTimeFormat=false;setDateField('form1', 'EndDate1DiscreteValue', 'EndDate1DiscreteValueHidden');top.newWin = window.open('/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/html/calendar.html','cal','resizable=yes,dependent=yes,width=230,height=240,screenX=200,screenY=300,titlebar=yes')"><img alt="Calendar" src="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/images/toolbar/calendar.gif" border="0"/></a></><script type="text/javascript" language="javascript" >document.write(CreateTimeEditables("EndDate1", "DiscreteValue", true, "", "", 0, 0, 0));</br></script>
 
</td>
  </tr>
  <tr style="padding-top:2px"><td align="Left" valign="top" nowrap="nowrap" style="padding-top:4px"> <span class="" style="border-style:None;">  </span> </td>
      <td nowrap="nowrap"></td></tr>
 <tr><td nowrap="nowrap" height='15' colspan='2'></td></tr>  <tr><td colspan='2' nowrap="nowrap"> <span class="" style="border-style:None;">    </span> </td></tr>
  <tr style="padding-top:2px"><td align="Left" valign="top" nowrap="nowrap" style="padding-top:4px"> <span class="" style="border-style:None;"> Value&nbsp;  </span> </td>
      <td nowrap="nowrap"><input class="" style="border-style:Inset;border:[2px];margin-left:2px;"  type="text" name="2DiscreteValue" value=""  maxlength="255" style="width:200px"/><input  type="hidden" name="2DiscreteValueHidden" value="" /><br/>
 
</td>
  </tr>
  <tr style="padding-top:2px"><td align="Left" valign="top" nowrap="nowrap" style="padding-top:4px"> <span class="" style="border-style:None;">  </span> </td>
      <td nowrap="nowrap"></td></tr>
 <tr><td nowrap="nowrap" height='15' colspan='2'></td></tr><!-- hidden fields -->
<input type="Hidden" name="promptex-StartDate0" value=""/><input type="Hidden" name="promptex-EndDate1" value=""/><input type="Hidden" name="promptex-2" value=""/><!-- setting functions for each parameter -->
<script type="text/javascript">
var isAlreadySubmitted = false;
function setPromptValues ( inform )
{
  if(!setPromptSingleValue(inform, "dt","StartDate0")) return false;
  if(!setPromptSingleValue(inform, "dt","EndDate1")) return false;
  if(!setPromptSingleValue(inform, "text","2")) return false;
  if ( isAlreadySubmitted )scr
    return false;
  isAlreadySubmitted = true;
  return true;
}
</script>
<div>
 <table>
  <tr><td></td><td align='Right'>
    <input class="" style="border-style:Outset;border:[2px];margin-left:2px;" align='center'type="button" value="Submit" onclick="javascript:submitParameterValues()"/>
  </td></tr>
</table>



               
   &nbsp;&nbsp;
  <span></span></div>
   
<div id="mycrystalreportviewer_ctl01">

      <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBAKvst6wCALE2qDzBgKG+5Y+As2vvc8BnaMv1fA0I9j9ljGHcjSOi35JA/Q=" />
</div>
</body>
</html>
@spinone_owner

Did you try what i had suggested ?
Bugs-  
    Yes, I finally figured out the exact place you were speaking of.    (it was worded differently)  I turned it off all but one error disappeared.  When I built and complied the page at go this error:

Control 'txtstart' of type 'TextBox' must be placed inside a form tag with runat=server.

Any suggestions to fix this?
Thanks for you help.
When I go to switch to design view (visual studio 2005) the errors come back and it will not let me switch views.  
Ok I'm down to two errors.  I got the code fixed to stop that control error.  Yet I still need to switch to design view to get a few things straight.  There are a few remaining errors keeping me for switching over.

The following code is giving me an error:

1)
<link rel="stylesheet" type="text/css" href="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css"/>
     Error: Element link cannot be nested within element 'body'
2)
<body bgcolor="#dfedff">
     Error:  Text is not allowed between opening / closing tags for element body

Thanks!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The body error did not go away, but it was able to switch to design view.  I then could readd my crystal report viewer.  Yet I crysal report source is throwing an errors.  1) Unknown server tag CR:CrystalReportViewer 2) Unknown server tag CR:CrystalReportSource.  
                  Here is the code:

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"
        Height="812px" ReportSourceID="freqreport" Width="1199px" />
    <CR:CrystalReportSource ID="freqreport" runat="server">
        <Report FileName="freqfinal.rpt">
        </Report>
    </CR:CrystalReportSource>

Hmm...

I don't know what to tell you about that. I have never used Crystal Reports Viewer on a web page. It might be better to post that as a question in another section (ASP.NET, C# or VB.NET, Crystal Reports...) The only thing I can think is that something is not referenced properly in the .Net Project.