Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Warning back button on Win2k3 IIS6 IE 6 ASP

Author  Topic 

modest
Starting Member

32 Posts

Posted - 2006-08-09 : 15:41:54
Hi,

I am having some trouble when the user clicks on the back button (either on the browser or on the ASP/HTML page). When the user clicks the back button, he/she gets the following message:
"This page contains both secure and non secure items. Do you want to display the non secure items?"

Now the user is presented with two choices--Yes or No. Irrespective of what is chosen , the user sees the infamous "This page cannot be displayed" page which is very annoying.

Now if the user hits the browser back button, the expected ASP page is shown or even if he/she clicks on the red (go back) link which is displayed on the bottom of the "This page cannot be displayed" page, the expected ASP page is shown.

Here is the ASP/HTML code which generates the back button which is giving trouble:
Code:

<input type='button' value='Back' onclick='history.back()'>



Now I have seen this problem only with the IE browser.Firefox, Netscape all are working fine. Also this prbolem occurs only on Windows 2003 Machine and not any other version of Windows like Windows XP.
So bascially when you have a combination of:
1.Windows 2003
2. IE 6
on the client side this problem occurs.

Also the server that is hosting the ASP pages has the following specs:
1.Windows 2003 Server
2. SQL SERVER 2005
3. IIS 6 (HTTPS)

I know this is an HTTPS issue since I do get the warning if I use the same ASP/HTML code on a server which does not have HTTPS.

I have already chewed google a lot and I have seen people having this problem, but the cause of thier problem was because they were using IE 5, IE 5.5 - basically lesser version than IE 6.

Please help me in fixing this problem. I would prefer if we can take care of this problem on our side (server side) rather than the public side(client side/user side).

Thank you in advance.

MichaelP
Jedi Yak

2489 Posts

Posted - 2006-08-09 : 16:39:25
Every time I've seen something like this, it's a CSS, Javascript, or image file that's being displayed on the page, but it's not an HTTPS link. Depending on the browser "back" may be "back" to one of these non-https files, thus giving you the error.

Do a view source on your https page and do a search for http. That should help you track down where the issue is.

Michael

<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>

Opinions expressed in this post are not necessarily those of TeleVox Software, inc. All information is provided "AS IS" with no warranties and confers no rights.
Go to Top of Page

modest
Starting Member

32 Posts

Posted - 2006-08-10 : 16:16:37
Actually even I thought that ways, but you know what when I try to view soruce on IE it does not allow me to view it(the option is gray-ed out--disabled) because of HTTPS. For the same page, I can view the source on a non HTTPS server i.e. our development server.

Any more ideas/suggestions?

Thanks
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2006-08-10 : 17:14:40
You can't view source on an HTTPS page? That'd strange. I can with IE6. Maybe try a different browser?

Anyway, just do a view source in development and see if there are any absolute links / includes on that page. Then, track those down to make sure that when the site is HTTPS, the links are HTTPS and not HTTP.

Michael

<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>

Opinions expressed in this post are not necessarily those of TeleVox Software, inc. All information is provided "AS IS" with no warranties and confers no rights.
Go to Top of Page

modest
Starting Member

32 Posts

Posted - 2006-08-10 : 19:08:05
Yeah I know that's strange. I can view the source code in Firefox and other browser but not on IE 6. I am only having problems with IE 6 and Windows 2003 machine in specific as informed in my earlier post. On what version of windows did you try seeing the code through "View source"? Was it Windows XP? I guess if you have a Windows 2003 machine and IE 6 you cannot view the source just like that.

Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2006-08-10 : 19:33:05
Yeah, I'm running XP Pro + IE6.
Windows 2003 is very "locked down" from what I've seen, but I've never tried to view source on our Windows2003 servers.

Were you able to track down the issue?

Michael

<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>

Opinions expressed in this post are not necessarily those of TeleVox Software, inc. All information is provided "AS IS" with no warranties and confers no rights.
Go to Top of Page

modest
Starting Member

32 Posts

Posted - 2006-08-10 : 20:17:57
I inspected the code and I could not find anything obvious. Here is the code:

<% option explicit

'Modified By:
'Date Modified:
'Modification Made:

'Include dbconnect.asp file which establishes the connection to the database.%>
<!--#include file="../dbConnect.asp"-->
<%

'Declare the variables

dim studentID,lastName,regE,result,idLength,selectPersonal
dim RS1,selectCount,RS2,selectAddress,RS3,selectLnameCount,RS4
dim selectList,RS5,intermediateSID,intermediateTerm,showDetailsCalled
dim studentIDTerm

'Check to see if the user has logged in.
if Request.Cookies("gradUser")<> "" then

Response.Write("<html><head><title>Show Application</title>")
Response.Write("<link rel='stylesheet' href='../../images/interface/PageFeel.css' type='text/css'>")
Response.Write("</head><body><p> </p>")
'Retrieve the values from the form.
studentID=Trim(Request.Form("studentID"))
'I use the replace function to replace any single quotes with double qoutes.
lastName=Replace(Trim(Request.Form("lastname")),"'","''")

'If the page is called from the intermediate page, we get the student ID and the term.
'I get the student ID and the term in the format of (EX: 999999999Summer 1998). So I use
'the right and left functions to get the student ID and the term.
studentIDTerm=Trim(Request.Form("studIDTerm"))
if studentIDTerm<>"" then
intermediateSID=left(studentIDTerm,9)
intermediateTerm=right(studentIDTerm,len(studentIDTerm)-9)
end if

'***************************************************************************************
'This sub routine displays page 1 of advanced degree application with the data.
sub showDetails
'Bunch of statements

'
'
'
'
'
'
'
'
'
'
'
'
'
end sub


'***************************************************************************************

'If the page is called from the intermediate page, we will have the student ID and
' the graduation term. so I call the subroutine to display the page 1 of advanced
'degree application.
if studentIDTerm<>"" then
call showDetails
else
'Check to see if either the student ID or last name of the student is provided.
'If both are provided give an error message.
if (studentID="" and lastName="") or (studentID<>"" and lastName<>"") then
Response.Write("<br><br><font color='0000a0'>Please provide either the student ID")
Response.Write(" or the last name of the student and not both.</font>")
Response.Write("<br><br><center><input type='button' value='Back' onclick='history.back()'></center>")

end if

Response.Write("</body></html>")
else %>

<html>
<head>
<title>Incorrect Login</title>
<link rel="stylesheet" href="../../images/interface/PageFeel.css" type="text/css">
</head>
<body>
<p> </p>
<p> </p>
<p><b><font size="3" color="red">Error!!!</font></b>
<br><br>Please log in to access this website.</p>
</body>
</html>

<% end if
'close the connection object.
objconn.close
set objconn=nothing %>


I think the cluprit is the line:

Response.Write("<br><br><center><input type='button' value='Back' onclick='history.back()'></center>")


Because as soon as the user clicks on the back button (generated by the above piece of code), the page crashes. Is guess the 'onClick' tag means that it is a javascript in some sense? How can work around this problem? Can I create a backbutton with some other way?

THanks a lot for your help and follow-up.
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2006-08-10 : 20:29:08
I think there are several different ways to do a javascript back button. I suspect that with Windows 2003's enhanced security, it doesn't allow you to use the history object so a malicious web page can't see where you just came from or something.

Anyway, I'd google for some different javascript to handle the back button.

Michael

<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>

Opinions expressed in this post are not necessarily those of TeleVox Software, inc. All information is provided "AS IS" with no warranties and confers no rights.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-08-11 : 06:20:03
one option is to do a document.location.href
but you must save the path to the previous pages that you visited.




Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

modest
Starting Member

32 Posts

Posted - 2006-08-11 : 14:40:00
If you can give me an example, that will be really great. I did not understand, what do you mean by "you must save the path to the previous pages that you visited." ? As far as I understand does that mean whereever in code, I am having this problem, I will have to save the previous page address?? If that is the case, then it would be too tedious to do on my entire website. There might be atleast 100-200 instances of that.

Thanks
Go to Top of Page
   

- Advertisement -