Click to See Complete Forum and Search --> : asp before html


aroth
09-26-2003, 01:55 PM
ok I'm not sure if I can explain this effectively or not but I'll try... I have an asp form I am having issues with. Is is correct that asp runs before the html is displayed? My problem is that sometimes the page will start display html before the asp is finished. I posted an example below. Sometimes the page just starts displaying in the middle of the html somewhere losing all of the previous html. If I hit refresh a couple of times then it looks fine

Any thoughts?

<%@ Language=JScript %>
<% ntlogin = getNTLogin();
%>
<!-- #include file="../inc/jobreq.inc" -->
<% if(IsAnyone(ntlogin)) {%>
<html>
<head>
<title>Job Requisitioning - Infolink</title>
</head>
<body>
<script src="/maxnavi_js.asp"></script>
<script src="header.js"></script>
<table class="pageform">
<tr>
<td class="sidenavi" valign="top">&nbsp;<br>
<form name="jobgoto">
<script>
function verifyJobID() {
if ( jobgoto.jobID.value == "" ) {
alert("Please enter a job number.");
return false;
}
}
</script>
<table cellpadding="5" cellspacing="0" style="BORDER: #000000 solid 1px" width="130">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="5">

Ribeyed
09-26-2003, 02:25 PM
Hi,
without seening all the code it looks to me like you have your ASP and HTML nested wrongly resulting in the top part of the HTML not being displayed. Your <HTML> tag is within an ASP if statement meaning that it will either be displayed or not. I would say the <BODY> tag could also be out of place. I would suggest here moving your <HTML> and <BODY> tag out of the middle of your if statement and at least move the <HTML> to second like after your <%@ Language=JScript %> line.

Hope this helps