[advanced search]
Results from the most recent live auction are here.
22 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 10-10-2003, 07:37 AM   · #1
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
JavaScript window.location.replace issue

Alright, I can't figure out what is wrong with this code!

You will notice I added alert boxes, but they didn't help.

I narrowed the problem down to the window.location.replace on line 209.

Please help!!!
---------------------------------------------------------------------
<%@ LANGUAGE="VBSCRIPT" %>
<% OPTION EXPLICIT %>
<% Response.Buffer = True %>
<%
Response.Write "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"">"
Response.Write "<HTML>"
Response.Write "<HEAD>"
Response.Write "<meta http-equiv=""Content-Type"" content=""text/html; charset=windows-1252"">"
Response.Write "<TITLE>***** **** ******** Website</TITLE>"
Response.Write "</HEAD>"
Response.Write "<BODY BGCOLOR=""#999999"" TEXT=""#FFFFFF"" LINK=""#FFFFFF"" ALINK=""#FFFFFF"" VLINK=""#FFFFFF"">"
Response.Flush

Response.Write "<P ALIGN=""center"">Please wait while we perform an extensive check on the program and computer you are using.<BR>"
Response.Write "This is needed to ensure that features you don't support are disabled.</P>"
Response.Write "<P ALIGN=""center"">If you are stuck on this page and have not been redirected for 2 minutes or more, your computer program is too old to view our website.<BR>"
Response.Write "Please click <A HREF=""sorry.htm""><b>here</b></a> for more information about this problem.</P>"
Response.Flush
%>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
var bad;
bad = false;

var status;
status = true;

if (!navigator.userAgent)
{
bad = true;
}

var gecko;
var geckobuild;

function geckos()
{
var agt;
agt = navigator.userAgent.toLowerCase();

if (agt.indexOf("gecko") != - 1)
{
var geckoind;
geckoind = agt.indexOf("gecko");
var geckostr;
geckostr = agt.substring(geckoind,geckoind+14);

gecko = true;
var splitg;
splitg = geckostr.split("/");
var gy;
var gm;
var gd;

gy = splitg[1].substr(0,4);
gm = splitg[1].substr(4,2);
gd = splitg[1].substr(6,2);

geckobuild = gd + ":" + gm + ":" + gy;
} else {
gecko = false;
geckobuild = "N/A";
}
}

geckos();

var dhtml;
var javascript;
var cookiesen;
var frames1;
var forms1;
var images1;
var iframes;

if (document.getElementById)
{
dhtml = "A";
} else {
if (document.all || document.layers)
{
dhtml = "B";
} else {
dhtml = "F";
}
}

javascript = "C";
//-->
</SCRIPT>
<NOSCRIPT>
<P ALIGN="center">An error occured. &nbsp;Please click the link above.</P>
</NOSCRIPT>

<SCRIPT LANGUAGE="JavaScript1.1" TYPE="text/javascript">
<!--
javascript = "B";
//-->
</SCRIPT>
<NOSCRIPT>
<B></B>
</NOSCRIPT>

<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
<!--
javascript = "A";
//-->
</SCRIPT>
<NOSCRIPT>
<B></B>
</NOSCRIPT>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
if (bad == true)
{
javascript = "D";
}

document.cookie = "testing=hello";
var tmpvar = document.cookie;
if (tmpvar.indexOf("testing=hello") != -1)
{
cookiesen = true;
document.cookie = "";
} else {
cookiesen = false;
}

if (document.frames)
{
frames1 = true;
} else {
frames1 = false;
}

if (document.forms)
{
forms1 = true;
} else {
forms1 = false;
}

if (document.images)
{
images1 = true;
} else {
images1 = false;
}

var loopingt;
loopingt = 0;

iframes = true;
if (javascript == "C")
{
document.write("<BR><HR><BR><P ALIGN="center"><A HREF="sorry.htm">Click here for more information</A></P><P ALIGN="center">Your browser does not support JavaScript 1.1 or JavaScript 1.2. &nbsp;You must update it to view our website.</P><BR><BR>");
}

if (cookiesen == false)
{
document.write("<BR><HR><BR><P ALIGN="center"><A HREF="sorry.htm">Click here for more information</A></P><P ALIGN="center">Your browser does not have Cookies Enabled. &nbsp;You must enable them to view our website.<BR>");
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To enable cookies in Netscape click the TOOLS menu from the top of your screen, move your mouse over COOKIES MANAGER and click UNBLOCK COOKIES FROM THIS SITE.<BR><BR>");
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To enable cookies in Internet Explorer click the TOOLS menu from the top of your screen and click INTERNET OPTIONS. &nbsp;Now select the PRIVACY tab, and modify your settings to accept cookies.</P><BR><BR>");
}

if (frames1 == false)
{
document.write("<BR><HR><BR><P ALIGN="center"><A HREF="sorry.htm">Click here for more information</A></P><P ALIGN="center">Your browser does not support FRAMES, which allows us to show you more than 1 page at once. &nbsp;It is required to view this website. &nbsp;For more information, click the link above.</P><BR><BR>");
}

if (forms1 == false)
{
document.write("<BR><HR><BR><P ALIGN="center"><A HREF="sorry.htm">Click here for more information</A></P><P ALIGN="center">Your browser does not support FORMS, which allows us to obtain information from you. &nbsp;This feature is required to view this website. &nbsp;For more information, click the link above.</P><BR><BR>");
}

if (images1 == false)
{
document.write("<BR><HR><BR><P ALIGN="center"><A HREF="sorry.htm">Click here for more information</A></P><P ALIGN="center">Your browser does not support IMAGES, and our website requires it. &nbsp;For more information, click the link above.</P><BR><BR>");
}

if (iframes == false)
{
document.write("<BR><HR><BR><P ALIGN="center"><A HREF="sorry.htm">Click here for more information</A></P><P ALIGN="center">Your browser does not support IFRAMES, an advanced version of FRAMES. &nbsp;It is required to view this website. &nbsp;For more information, click the link above.</P><BR><BR>");
}

if (javascript == "B" || javascript == "A")
{
if (cookiesen == true)
{
if (frames1 == true)
{
if (forms1 == true)
{
if (images1 == true)
{
if (iframes == true)
{
document.cookie = "gecko=" + gecko;
document.cookie = "geckobuild=" + geckobuild;
document.cookie = "dhtml=" + dhtml;
document.cookie = "javascript=" + javascript;
document.cookie = "cookiesen=" + cookiesen;
document.cookie = "frames1=" + frames1;
document.cookie = "forms1=" + forms1;
document.cookie = "images1=" + images1;
document.cookie = "iframes=" + iframes;
document.cookie = "welcome=afgw2qxypfghtuybnslpowfjharq52rf7a21ve7f25 hadfh7s3ag6r8s7agsd4v7as687w86gw7t";
window.location.replace("http://www.mywebsite.com/directory/file.asp");
} else {
alert("oops7");
}
} else {
alert("oops6");
}
} else {
alert("oops5");
}
} else {
alert("oops4");
}
} else {
alert("oops3");
}
} else {
alert("oops2");
}
//-->
</SCRIPT>
<NOSCRIPT>
<B></B>
</NOSCRIPT>
<%
Response.Write "</BODY>"
Response.Write "</HTML>"
Response.Flush
%>
---------------------------------------------------------------------


Please register or log-in into NamePros to hide ads
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
domainsubway.com Proof is in the Parking Proof is in the Parking
Advertise your business at NamePros
All times are GMT -7. The time now is 07:47 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0