SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Florida
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to keep the same page on parent?

    I have this script:
    $category_depth = 'top';
    if (isset($cPath) && tep_not_null($cPath)) {

    if ( $cPath == 41 ) // replace number with cPath number
    {
    ?>
    <SCRIPT LANGUAGE="JavaScript">
    window.open ('http://www.domain.com/index.php?cPath=41')
    onClick=window.location=('index.php')
    </SCRIPT>

    when I click the category 41 on the parent company, it opens a new window with the link. Works ok.
    What I want is instead of getting the index.php page of the parent site, how can I keep the same page the visitor is browing when he clicked on the category 41.
    thanks
    greg

  2. #2
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    <?
    if ( $cPath == 41 ) // replace number with cPath number
    {
    ?>
    <SCRIPT LANGUAGE="JavaScript">
    window.location.href='http://www.domain.com/index.php?cPath=41';
    </SCRIPT>
    <?
    }
    ?>

    Good Luck!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •