Link to home
Start Free TrialLog in
Avatar of kellyjj
kellyjj

asked on

nothing showing....

Here is the code for a asp page, that isn't displaying anything

<%
      'Reset their Session ID
      'Session("UserID") = ""
      'Session("UserName") = ""

      'Find out which user this is and validate the password
      dim rs
      set rs = Server.CreateObject("ADODB.Recordset")
      set rs = GetRS("Select * from tblPCP where PCPID = " & Request.QueryString("PCPID"))
      
            
      'if lcase(rs("Password")) = lcase(Request.QueryString("UPass")) then
      '      Session("UserID") = rs("PCPID")
      '      Session("UserName") = rs("UserName")
      'end if
      if Session("UserID") <> "" then


%>

<html>

<head>
<title>CCMedNet</title>
<base target="main">
</head>

<frameset frameborder="0" rows="46, 60, *">
  <frame name="top" scrolling="no" noresize target="bottom" src="banner.htm">
  <frameset frameborder="0" cols="200, *">
 
      <frame name="left" scrolling="no" noresize target="right" src="Combos.asp">
      <frame name="right" scrolling="no" noresize target="bottom" src="months.asp">
      
  </frameset>
  <frame name="bottom" noresize src="details.asp">


  <noframes>
  <body>
  <p>This page uses frames, but your browser doesn't support them.</p>
  </body>
  </noframes>
</frameset>

<%
      else
      
            'They entered an invalid password
%>
<html>
<head>
<title>CCMedNet</title>
</head>
<body>

<p><font face="arial" size="2">The system could not verify the
      password you used on the Setup Form.</font></p>

<p><font face="arial" size="2">Please <a href="javascript:history.back();"><font
      color="#0000FF">click here</font></a> to try again</font></p>

<%
      end if
%>

</html>


any ideas what could be wrong??

Avatar of maneshr
maneshr

does it display nothing when a proper password is entered or when an invalid password is entered or in both the cases?
Avatar of kellyjj

ASKER

nothing either way.  I know it is getting to the html, but know is being displayed.
the only thing that i noticed (i dont know how significant it is) is that the </html> tag is common to both the if and the else part and therefore has been kept outside.

i would suggest that you put the </html> individually in the if and the else and then try the same.

Also the next time you try and dont get any output, look at the souce of that HTML page. If you see the code it means that the HTML tags are being thrown out by your script, but its the browser that is somehow not displaying them.


Also i would suggest you add a Response.Flush before the start of your script.

The Flush method sends buffered output immediately. This method will cause a run-time error if Response.Buffer has not been set to TRUE.

Syntax

Response.Flush
 
Hope that helps.
Avatar of kellyjj

ASKER

any way I can tell what the browser is doing??
BTW  here is the code the browser shows

<html>

<head>
<title></title>
</head>

<body>
</body>
</html>


<html>

<head>
<title>CCMedNet</title>
<base target="main">
</head>

<frameset frameborder="0" rows="46, 60, *">
  <frame name="top" scrolling="no" noresize target="bottom" src="banner.htm">
  <frameset frameborder="0" cols="200, *">
 
      <frame name="left" scrolling="no" noresize target="right" src="Combos.asp">
      <frame name="right" scrolling="no" noresize target="bottom" src="months.asp">
      
  </frameset>
  <frame name="bottom" noresize src="details.asp">


  <noframes>
  <body>
  <p>This page uses frames, but your browser doesn't support them.</p>
  </body>
  </noframes>
</frameset>



</html>
oh !! the problem is due to the HTML tags at the top.

As you can see there is already a set of <html></html> , <title></title> and <body></body> tags appearing EVEN BEFORE your asp file throws its output.

i would suggest that you save this file on your local disk, open it and remove the duplicate lines, save the file and then see it in your browser. i am sure the contents will be right then.

Remove

<html>

                    <head>
                    <title></title>
                    </head>

                    <body>
                    </body>
                    </html>
Avatar of kellyjj

ASKER

ok, so where is the extra html stuff coming from??  How do I get it out??

Thanks
are you using GLOBAL.ASA in your code??

is there any other file that you are calling before the HTML code is being printed?? Probably that might be throwing out the unnecessary code.

Avatar of kellyjj

ASKER

I am using global.asa.  Also I am using inter-dev. Could this be causing a problem? I ask because I looked at other pages that my project spawns ( imagine a *microsoft* product spawning =] )  and they all have the extra html tags at the top.



i feeling is that somewhere in that global.asa a file might be called that prints the unwanted html code. i would suggest that you comment your the global.asa from your code and try it.

Also i would suggest that you edit your code using a text based editor, instead of Visual-interdev.

Those extra lines are not needed when you use <frameset></frameset>
<frame name="top" scrolling="no" noresize target="bottom" src="banner.htm">

You may wanna change the frame name here, top will load it in the parent name if you target that frame, rather than in the frame you currently have named top
ASKER CERTIFIED SOLUTION
Avatar of 890
890

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