I have an issue with certain machines duplicating a popup window called from another asp page. I have tried to amend the code to output the variable to the screen to investigate further but if I make any amendments the code is simply ignored. I know a little vbscript but nothing in regards to javascript and general ASP.
This software has been inherited by a 3rd party, a number of asp pages called start with this code…
<%@ Language=VBScript %>
<%
cPageName = "Change Password"
bCheckLogin = true
bPopUnder = true
%>
<!-- #include file="top.asp" -->
The section in the top.asp which brings up the popup window is this,
<SCRIPT LANGUAGE="JavaScript">
<!--
<% If Not bDisableEnter Then
%>
function IEEvaluateKeyInput() {
var keyCode = event.keyCode;
if (keyCode == 10 || keyCode == 13) {
window.document.forms(0).submit();
} else {
return true;
}
}
var IE = (document.all) ? true : false;
if (IE) {
window.document.onkeypress = IEEvaluateKeyInput;
}
<%
End If
%>
function setup()
{
window.name="MainWindow";
<%
If bPopUnder Then
%>
("popunder.asp", "myPopUnder", "width=300,height=100,status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,alwaysLowered=yes,location=no,directories=no,titlebar=no");
<%
End If
%>
}
// -->
</SCRIPT>
My initial questions are,
1. As stated only certain machines keep opening this popup window - the issue is that when user navigates through pages they can have 20-30 instance of this popunder.asp page appear. I don’t get the same problem as it only appears once for me (the popup is a reminder for the user to logout correctly via an option on the main page).
I am very confused by the variable from the initial page as this is always set to true so in theory all users should have a number of instances appear. Is there an IE option to prevent duplicates?
2. I have tried to amend the If bPopUnder statement and output the variable value via alert(bPopUnder); but this is simply ignored, is my syntax correct?
3. Can the variable written in the initial page be referenced by the sub page. I have noticed that the first asp page states <%@ Language=VBScript %> whereas the function which opens the popup (referenced in #include file syntax) states <SCRIPT LANGUAGE="JavaScript">
I initially checked all IE settings because I do not get the issue of duplicate popups whereas a couple of users do. I couldn’t find anything specific, I can also confirm there versions of IE and Java are the same as mine.
Any help/suggestions would be most grateful
This software has been inherited by a 3rd party, a number of asp pages called start with this code…
<%@ Language=VBScript %>
<%
cPageName = "Change Password"
bCheckLogin = true
bPopUnder = true
%>
<!-- #include file="top.asp" -->
The section in the top.asp which brings up the popup window is this,
<SCRIPT LANGUAGE="JavaScript">
<!--
<% If Not bDisableEnter Then
%>
function IEEvaluateKeyInput() {
var keyCode = event.keyCode;
if (keyCode == 10 || keyCode == 13) {
window.document.forms(0).submit();
} else {
return true;
}
}
var IE = (document.all) ? true : false;
if (IE) {
window.document.onkeypress = IEEvaluateKeyInput;
}
<%
End If
%>
function setup()
{
window.name="MainWindow";
<%
If bPopUnder Then
%>
("popunder.asp", "myPopUnder", "width=300,height=100,status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,alwaysLowered=yes,location=no,directories=no,titlebar=no");
<%
End If
%>
}
// -->
</SCRIPT>
My initial questions are,
1. As stated only certain machines keep opening this popup window - the issue is that when user navigates through pages they can have 20-30 instance of this popunder.asp page appear. I don’t get the same problem as it only appears once for me (the popup is a reminder for the user to logout correctly via an option on the main page).
I am very confused by the variable from the initial page as this is always set to true so in theory all users should have a number of instances appear. Is there an IE option to prevent duplicates?
2. I have tried to amend the If bPopUnder statement and output the variable value via alert(bPopUnder); but this is simply ignored, is my syntax correct?
3. Can the variable written in the initial page be referenced by the sub page. I have noticed that the first asp page states <%@ Language=VBScript %> whereas the function which opens the popup (referenced in #include file syntax) states <SCRIPT LANGUAGE="JavaScript">
I initially checked all IE settings because I do not get the issue of duplicate popups whereas a couple of users do. I couldn’t find anything specific, I can also confirm there versions of IE and Java are the same as mine.
Any help/suggestions would be most grateful