Solved

nothing showing....

Posted on 2000-04-17
11
152 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
Comment Utility
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
Comment Utility
nothing either way.  I know it is getting to the html, but know is being displayed.
0
 
LVL 16

Expert Comment

by:maneshr
Comment Utility
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
 
LVL 2

Author Comment

by:kellyjj
Comment Utility
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
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Author Comment

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

Thanks
0
 
LVL 16

Expert Comment

by:maneshr
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
<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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now