Solved

nothing showing....

Posted on 2000-04-17
11
155 Views
Last Modified: 2011-10-03
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??

0
Comment
Question by:kellyjj
11 Comments
 
LVL 16

Expert Comment

by:maneshr
ID: 2723602
does it display nothing when a proper password is entered or when an invalid password is entered or in both the cases?
0
 
LVL 2

Author Comment

by:kellyjj
ID: 2723666
nothing either way.  I know it is getting to the html, but know is being displayed.
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2723721
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.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 2

Author Comment

by:kellyjj
ID: 2723764
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>
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2723846
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>
0
 
LVL 2

Author Comment

by:kellyjj
ID: 2723871
ok, so where is the extra html stuff coming from??  How do I get it out??

Thanks
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2724091
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.

0
 
LVL 2

Author Comment

by:kellyjj
ID: 2724227
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.



0
 
LVL 16

Expert Comment

by:maneshr
ID: 2724428
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>
0
 
LVL 2

Expert Comment

by:Hooligan
ID: 2724979
<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
0
 
LVL 1

Accepted Solution

by:
890 earned 100 total points
ID: 2725160
At the top of your page/code put <code>

like so
<code>
<% 'Reset their Session ID
'Session("UserID") = "" 
'Session("UserName") = "" 

and at the end of your code/page put </code>

</frameset>
</html>
</code>
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Create CSS Animation for Page Transitions 4 39
How to get bootstrap element to collapse at wider screen width 3 41
Do alert on select 6 15
Search Item in Table 2 23
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

830 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