Question

Redirect in Java script not working

Asked by: rghunt

We have a simple frame based website.  http://www.onlinetechhelp.com/  When you enter you need to check a box saying you agree to the disclaimer. This sets the cookie so you don't have to do this the next time.  You will jump straight to the home page http://www.onlinetechhelp.com/support/home.htm  The problem is that initially it goes to http://www.onlinetechhelp.com/home.htm which is wrong.  If you close and re-enter it finds the correct path.  I don't speak Java and but I want to find the right line to redirect it to the right path the first time.  The script below is from the file called disclaimer.htm  near to the bottom there is a "redirect" statement but that has no effect.  I feel like I am overlooking something simple.  Help!

Gordon

       </textarea></td>
                </tr>
                <tr>
                  <td height="1" colspan="3" valign="top">&nbsp;</td>
                </tr>
                <tr>
                  <td width="26" height="21" valign="top" class="bodycopy"> <input name="checkbox" type="checkbox" onChange="MM_validateForm('textarea','','R');return document.MM_returnValue" value="yes"></td>
                  <td colspan="2" align="left" valign="top" class="bodycopy">I
                    have read and agree to the terms above </td>
                </tr>
                <tr>
                  <td width="26" height="21" valign="top" class="bodycopy"> <input name="publicCheckBox" type="checkbox" onChange="MM_validateForm('textarea','','R');return document.MM_returnValue" value="yes"></td>
                  <td colspan="2" align="left" valign="top" class="bodycopy">I
                    am using public computer</td>
                </tr>
                <tr>
                  <td height="21" colspan="2" valign="top" class="bodycopy">&nbsp;</td>
                  <td width="304" height="21" valign="top" class="bodycopy"><a href="tech_help.htm" target="_self">I
                    do not agree to terms</a></td>
                </tr>
              </table></td>
            </tr>
          </table>
          <table width="336" height="26" border="0" align="left" cellpadding="0" cellspacing="0">
            <tr>
              <td width="144"><input name="Submit" type="button" value="Submit" onClick="JavaScript:validateCheck()">
              </td>
              <td align="right">&nbsp; </td>
            </tr>
        </table></td>
    </tr>
  </table>
  <input type=hidden name="redirect" value="http://www.onlinetechhelp.com/support/home.htm">
  <input type=hidden name="required" value="checkbox">
</form>
<script>
<!--
if(getcookie("ritwik"))
{
      parent.window.location.href="support/home.htm";
}
//-->
</script>
<!-- <form action="home.htm" method="post" name="form1" onSubmit="MM_validateForm('textarea','','R');return document.MM_returnValue">
 -->
</body>
</html>

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-09-20 at 10:19:47ID21996593
Topics

Miscellaneous Web Development

,

Windows Batch Scripting

Participating Experts
1
Points
500
Comments
5

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Onchange
    Hi Experts, I have 2 related problems. First some background... I have a form and when a field called 'DateCompleted' is updated, a checkbox is automatically checked using the following onchange code <script language="JavaScript"> function chkCPCheck(ctr...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: b0lsc0ttPosted on 2006-09-20 at 10:24:32ID: 17562677

rghunt,

Look in the rest of the HTML for the form tag (the opening tag) or the JavaScript code that has the function validateCheck.  Post that code here.

Let me know if you have any questions or need more information.

b0lsc0tt

 

by: rghuntPosted on 2006-09-20 at 10:41:26ID: 17562822

This is the rest of the disclaimer.htm file...

(Below it is index.htm)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Welcome to the Online Technical Support Center!</title>
<meta name="description" content="The MPA Technical Support Center features a unique Troubleshooting Guide to help you pinpoint precisely why your car won't start. Our Technical Support Center also features starter & alternator catalogs, installation guides and technical bulletins to help you get your car back on the road!">
<meta name="keywords" content="MPA, Motorcar Parts of America, quality built, quality-built, qualitybuilt, troubleshooting, troubleshooting guide, wizard, troubleshooting wizard, tech center, tech support, technical center, technical support, online tech center, online tech support, online technical center, online technical support, online, tech, technical, quality built to last, starter, starters, alternator, alternators, starters and alternators, starters & alternators, Motorcar Parts & Accessories, Motorcar Parts and Accessories, QB Premium, QB Supreme, charging system, auto parts, aftermarket, aftermarket parts, automotive parts, professional installers, Duralast, ProStart, Ultima, Autolite, AC Delco">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="bodycopy.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
<!--

function MM_callJS(jsStr) { //v2.0
 // return eval(jsStr)
 
}
function validateCheck() { //v2.0
 // return eval(jsStr)
 if(document.form1.checkbox.checked)
 {
      if(document.form1.publicCheckBox.checked)
      {
         parent.window.location.href="setCookie.php?public=1";
      }
      else
      {
         parent.window.location.href="setCookie.php";
      }
 }
 else
 {
       MM_popupMsg('You must agree to the terms above');
       return false;
 }
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->

function getcookie(cookiename) {
 var cookiestring=""+document.cookie;
 var index1=cookiestring.indexOf(cookiename);
 if (index1==-1 || cookiename=="") return "";
 var index2=cookiestring.indexOf(';',index1);
 if (index2==-1) index2=cookiestring.length;
 return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
<link href="bodycopy.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
      background-image: url(rightlinebg.gif);
}
-->
</style></head>

<body>
<form name="form1">
  <table width="400" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="16" valign="top">&nbsp;</td>
      <td width="594"><table width="399" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="334" valign="top">
              <p class="bodycopy"><strong> Welcome to the Online Technical Support Center</strong></p>
              <p class="bodycopy">The Online Technical Support Center features a unique Diagnostic Troubleshooting Guide to help you pinpoint precisely why your car won't start. It also features starter &amp; alternator catalogs, installation guides and technical bulletins to help you get your car back on the road! </p>
              <p class="bodycopy">The Online Technical Support Center is a free service that requires all users to read and agree to the Terms of Use.</p></td>
            <td width="65" rowspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td height="19">&nbsp;</td>
          </tr>
        </table>
          <table width="341" height="192" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
            <tr>
              <td width="337"><table width="331" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
                <tr>
                  <td height="1" colspan="3" valign="top" bgcolor="#FFFFCC">&nbsp;</td>
                </tr>
                <tr>
                  <td height="1" colspan="3" valign="top" bgcolor="#ECE96C" class="bodycopy">
                    <p align="center"><strong> Our Terms of Use</strong></p></td>
                </tr>
                <tr>
                  <td height="2" colspan="3" bgcolor="#FFFFCC">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="3"> <textarea name="textarea" cols="50" rows="10" wrap="VIRTUAL">Terms of Use.  The Online Technical Support Center website (“Website”) was designed as a guide to help identify and remedy problems with your vehicle's starter, alternator, battery or electrical system.  This website was created for informational purposes only.  The following Terms of Use govern your use of the Website and the materials accessible on or from this site—including any emails or phone calls to or from the Company or its Technical Support Center.  Please read these Terms of Use carefully before accessing any part of the Website.  By acknowledging your acceptance of these Terms of Use, you acknowledge that a contract exists between you and the Company and that you are agreeing to be bound by these Terms of Use.  If you do not agree with these Terms of Use, you will not be able to access the Website.

Liability Statement.  Motorcar Parts of America (“The Company”) shall in no way be liable for any special, indirect, or consequential damages or any damages whatsoever to any vehicle or persons resulting from use of this website.  Because there is no way the Company can foresee every possible underhood configuration for every vehicle, please consult your owner's manual for technical information specific to your vehicle before beginning any work.

Intellectual Property.  The information on this Website, including without limitation all design, text, images, white papers, press releases and other information, is protected under United States and other copyright laws and is owned by the Company or used under license from the copyright owner.  The information may not, except under written license, be copied, reproduced, transmitted, displayed, performed, distributed, rented, sublicensed, altered, stored for subsequent use or otherwise used in whole or in part in any manner without prior written consent, except to the extent such use is authorized under the United States copyright laws. trademarks, logos, images and service marks used on this site are the property of the Company and may not be used without permission from the Company and then only with proper acknowledgment.

Confidential Information.  The Company discourages you from sending or posting to the Web site any information that you consider to be confidential or proprietary.  Please note that if you do send or post any such information or material, the Company will assume that it is not confidential.  By sending or posting any information or material, you grant the Company an unrestricted, irrevocable, worldwide, non-exclusive license to use, reproduce, display, perform, modify, transmit and distribute those materials or information, and you agree that the Company is free to use any ideas, concepts, know-how or techniques that you send or post for any purpose, including to create derivative works therefrom.

No Representations and Warranties.  While the Company attempts to make sure that only accurate and up-to-date information is presented on this Website, the Company assumes no responsibility for, and makes no representations with respect to, the accuracy of the information presented here.  The Company cannot guarantee or warrant that the content, files, or information available on or for downloading from this Website will be free from infection, viruses, worms, Trojan horses or other codes that manifest contaminating or destructive properties.  Therefore, all materials and information are presented "AS IS" and you understand and agree that any content, files, or information downloaded or otherwise obtained through the use of this Website is at your own discretion and risk and that you will be solely responsible for any damage to your computer system or loss of data that results from the download or use of such content, files, or information.  THE COMPANY EXPRESSLY DISCLAIMS ANY IMPLIED OR EXPRESS WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RELATING TO SUCH MATERIAL.  IN NO EVENT SHALL THE COMPANY BE LIABLE FOR ANY CLAIM, LOSS, INJURY, OR DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION SPECIAL, INDIRECT, CONSEQUENTIAL OR INCIDENTAL DAMAGES, INCLUDING WITHOUT LIMITATION DAMAGES, HOWEVER CAUSED AND ON ANY THEORY RESULTING FROM THE USE OF OR INABILITY TO USE, OR RELIANCE ON, THE WEBSITE OR THE INFORMATION PRESENTED THEREON OR DOWNLOADED THEREFROM, INCLUDING WITHOUT LIMITATION LOSS OF PROFITS OR REVENUES, EVEN IF THE COMPANY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Privacy.  The Company recognizes and respects the privacy of users of this Web site.  When you choose to provide us with information about yourself, the Company will act in a responsible manner.  The Company may store and disclose personal information as allowed or required by applicable law, including making disclosures that are necessary or advisable to (a) protect the rights, safety or property of the Company or others and (b) conform to legal or regulatory requirements.  Without your express approval, however, the Company will not trade, sell or rent your personal information but may collect and/or provide aggregate statistics about its Web site and users to other parties.  The Company has no intention of collecting data from individuals under 13 years of age.  When you view certain parts of the Web site, information may be stored on your computer.  This information will be in the form of a "Cookie" or similar file and will permit tailoring of the Web site to better match your interests and/or preferences.  This site, however, contains links to other Web sites and the Company does not control the privacy policies of those sites.  See Linking.  This privacy statement only applies to information collected and maintained by the Company.

Linking By the Company.  As a convenience, this Web site contains links to other sites that are not controlled by, or affiliated or associated with, the Company.  Accordingly, the Company does not make any representations concerning the privacy practices or terms of use of such sites, nor does the Company control or guarantee the accuracy, integrity or quality of the data, text, software, music, sound, photographs, graphics, videos, messages or materials available on such sites.  The inclusion or exclusion of a site does not imply endorsement by the Company of the site, the site's provider or the information on the site.

Linking and Framing Prohibited.  You agree not to establish a link between any other web site and this Web site, or permit anyone else to establish such a link, either to the home page or to any other page herein. You agree not to frame any page or portion of this Web site. The creation and/or the facilitation of the creation of links and/or frames to this Web site is expressly prohibited and will be grounds for termination of your access to this Web site.

Governing Law.  The internal laws of the State of California, without reference to any choice of law provisions, shall govern any claims relating to this Web site or to the materials on it.  the Company may revise these Terms of Use at any time.  Revisions will be posted on this "Terms of Use" page and users are responsible for reviewing this page from time to time to ensure compliance.  Use of this Web site after revisions have been posted will signify your consent to and agreement to be bound by the revised Terms of Use.  You may terminate this Agreement at any time by refraining from using the Company Web site.

2004 Motorcar Parts of America, Inc.  All Rights Reserved.



      </textarea></td>
                </tr>
                <tr>
                  <td height="1" colspan="3" valign="top">&nbsp;</td>
                </tr>
                <tr>
                  <td width="26" height="21" valign="top" class="bodycopy"> <input name="checkbox" type="checkbox" onChange="MM_validateForm('textarea','','R');return document.MM_returnValue" value="yes"></td>
                  <td colspan="2" align="left" valign="top" class="bodycopy">I
                    have read and agree to the terms above </td>
                </tr>
                <tr>
                  <td width="26" height="21" valign="top" class="bodycopy"> <input name="publicCheckBox" type="checkbox" onChange="MM_validateForm('textarea','','R');return document.MM_returnValue" value="yes"></td>
                  <td colspan="2" align="left" valign="top" class="bodycopy">I
                    am using public computer</td>
                </tr>
                <tr>
                  <td height="21" colspan="2" valign="top" class="bodycopy">&nbsp;</td>
                  <td width="304" height="21" valign="top" class="bodycopy"><a href="tech_help.htm" target="_self">I
                    do not agree to terms</a></td>
                </tr>
              </table></td>
            </tr>
          </table>
          <table width="336" height="26" border="0" align="left" cellpadding="0" cellspacing="0">
            <tr>
              <td width="144"><input name="Submit" type="button" value="Submit" onClick="JavaScript:validateCheck()">
              </td>
              <td align="right">&nbsp; </td>
            </tr>
        </table></td>
    </tr>
  </table>
  <input type=hidden name="redirect" value="http://www.onlinetechhelp.com/support/home.htm">
  <input type=hidden name="required" value="checkbox">
</form>
<script>
<!--
if(getcookie("ritwik"))
{
      parent.window.location.href="support/home.htm";
}
//-->
</script>
<!-- <form action="home.htm" method="post" name="form1" onSubmit="MM_validateForm('textarea','','R');return document.MM_returnValue">
 -->
</body>
</html>



______________

index.htm
______________

<?
/*      $cookievar = $_COOKIE["OnlineTech"];
      if(!isset($cookievar))
      {
            setcookie("OnlineTech","$site");
      }*/
      $cookievar=trim($cookievar);
      if($cookievar == "mpa")
      {
      
            $headerImage = "mpa_header.gif";
      }
      else if($cookievar == "qba")
      {
            $headerImage = "qb_header.gif";
      }
      else
      {
            $headerImage = "blank_header.gif";
      
      }
      ?>
      <html>
<head>
<title>Welcome to the Online Technical Support Center!</title>
<meta name="description" content="The MPA Technical Support Center features a unique Troubleshooting Guide to help you pinpoint precisely why your car won't start. Our Technical Support Center also features starter & alternator catalogs, installation guides and technical bulletins to help you get your car back on the road!">
<meta name="keywords" content="MPA, Motorcar Parts of America, quality built, quality-built, qualitybuilt, troubleshooting, troubleshooting guide, wizard, troubleshooting wizard, tech center, tech support, technical center, technical support, online tech center, online tech support, online technical center, online technical support, online, tech, technical, quality built to last, starter, starters, alternator, alternators, starters and alternators, starters & alternators, Motorcar Parts & Accessories, Motorcar Parts and Accessories, QB Premium, QB Supreme, charging system, auto parts, aftermarket, aftermarket parts, automotive parts, professional installers, Duralast, ProStart, Ultima, Autolite, AC Delco">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>



<body>
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="support/art/mpa_header.gif" width="799" height="70" border="0" usemap="#Map"></td>
  </tr>
</table>
<p>&nbsp;</p>
<map name="Map">
  <area shape="rect" coords="13,16,60,39" href="support/home.htm" target="_parent">
</map>
</body>
</html>

 

by: b0lsc0ttPosted on 2006-09-20 at 10:46:54ID: 17562859

Look for a file named setcookie.php.  It looks like the JavaScript function redirects to that page, probably to set the cookie.  That page is the next step and may do the redirect to the incorrect page.  Post the code here or look for a line that specifies that old file or has the word location in it.

Let me know if you have any questions.  Thanks for the info.

 

by: rghuntPosted on 2006-09-20 at 12:01:53ID: 17563465

This is setCookie.php

<?php
if($public)
{
      setcookie ("public", "first",time()+1800);  /* expire in 30 minutes */
      setcookie ("ritwik", "first",time()+1800);  /* expire in 30 minutes */
}
else
{
      setcookie ("ritwik", "first",time()+(24*60*60*180));  /* expire in 180 days*/
}
header("Location: home.htm");
/*
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function getexpirydate( nodays){
var UTCstring;
Today = new Date();
nomilli=Date.parse(Today);
Today.setTime(nomilli+nodays*24*60*60*1000);
UTCstring = Today.toUTCString();
return UTCstring;
}
function getcookie(cookiename) {
 var cookiestring=""+document.cookie;
 var index1=cookiestring.indexOf(cookiename);
 if (index1==-1 || cookiename=="") return "";
 var index2=cookiestring.indexOf(';',index1);
 if (index2==-1) index2=cookiestring.length;
 return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}
function setcookie(name,value,duration){
cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration);
document.cookie=cookiestring;
if(!getcookie(name)){
return false;
}
else{
return true;
}
}

//-->
</SCRIPT>


</HEAD>

<BODY>
<script>
<!--
if(getcookie("ritwik"))
{
      document.write("<B>Welcome Back!</B>"+getcookie("ritwik"));
}
else
{
//      setcookie("ritwik","ritwik",180);
      document.write("<B>Welcome!</B>");

}

//-->
</script>
</BODY>
</HTML>
*/
?>

 

by: b0lsc0ttPosted on 2006-09-20 at 13:24:41ID: 17564158

The line header("Location: home.htm"); needs to be changed.  Add the support folder and it should correct your problem.  The correct line should be ...

header("Location: support/home.htm");

Let me know if that doesn't work or if you have a question.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...