Solved

nothing showing....

Posted on 2000-04-17
11
153 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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 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…

895 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

18 Experts available now in Live!

Get 1:1 Help Now