Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Location
    Lahore, Pakistan.
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Page Redirection Help

    Ok so problem is that I'm using an XML generated intro for my website. My intro(index.html) is in the root directory with website home(index2.html).
    Issue is that I want the website to be loaded directly after intro in the same browser tab/window/page instead of a new one. Intro is using XML formatting and the Javascript being used is Asual SwfAddress 2.4 deeplinking for Flash and XML. Let me post some codes here from my website and intro;
    Intro.xml
    Code:
    <link url="index2.html" target="_self" />
    Swfaddress.js 2.4 Where targets are set
    Code:
    {target=typeof target!=UNDEFINED?target:"_self";if(target=="_self"){self.location.href=url}else{if(target=="_top"){_l.href=url}else{if(target=="_blank"){window.open(url)}else{_t.frames[target].location.href=url}}}};this.popup=function(url,name,options,handler){try{var popup=window.open(url,name,eval(options));if(typeof handler!=UNDEFINED){eval(handler)}}catch(ex){}_popup=arguments}
    The intro is a template I'm using and I'm not familiar to its coding. I just want the intro to end and the website to load in the same browser window but its not happening. I've used other target options like 'parent' and 'top' but its not working. Also, on intro page there is a 'skip intro' button but when you click it intro keeps on playing and new window pop opens with the website. You can preview the website at; www.caterpowertrading.com and SWFaddress 2.4 at www.caterpowertrading.com/js/swfaddress.js
    No, its not using AS1-3.
    ~ Desperate Soul.
    PS: Sorry for multiple postings but its actually not!
    Last edited by 2tone; 08-25-2011 at 03:48 AM.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,015
    Thanks
    79
    Thanked 4,436 Times in 4,401 Posts
    That code makes no sense. Is that supposed to be JavaScript coding???

    Code:
    {
        rel="nofollow" 
        target=typeof target!=UNDEFINED?target:"_self";
        if(rel="nofollow" target=="_self")
        {
            self.location.href=url
        }else{
            if(rel="nofollow" target=="_top")
           {
                _l.href=url
           }else{
                if(rel="nofollow" target=="_blank") 
               {
                   window.open(url)
               } else{
                   _t.frames[target].location.href=url
               }
           }
       }
    };
    this.popup=function(url,name,options,handler)
    {
        try{var popup=window.open(url,name,eval(options));
        if(typeof handler!=UNDEFINED)
        {
            eval(handler)
        }
    } catch(ex){ }
    _popup=arguments
    }
    The stuff in red isn't close to legal JavaScript. I don't know why it is showing rel="nofollow" twice each time. It's not that way in my posting.
    Last edited by Old Pedant; 08-25-2011 at 05:24 AM.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    2tone (08-26-2011)

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,015
    Thanks
    79
    Thanked 4,436 Times in 4,401 Posts
    Occurs to me that if it is showing up twice in my code, maybe it isn't there at all in your code.

    What's with this forum display??

    It's not a browser issue. Looked at this thread in both FF and Chrome, and same thing happens.

    WEIRD!

    I think you can ignore my post #2. I think it's just crap in this forum display. Sorry!
    Last edited by Old Pedant; 08-25-2011 at 05:28 AM.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    New to the CF scene
    Join Date
    Aug 2011
    Location
    Lahore, Pakistan.
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    That code makes no sense. Is that supposed to be JavaScript coding???

    Code:
    {
        target=typeof target!=UNDEFINED?target:"_self";
        if( target=="_self")
        {
            self.location.href=url
        }else{
            if(target=="_top")
           {
                _l.href=url
           }else{
                if(target=="_blank") 
               {
                   window.open(url)
               } else{
                   _t.frames[target].location.href=url
               }
           }
       }
    };
    this.popup=function(url,name,options,handler)
    {
        try{var popup=window.open(url,name,eval(options));
        if(typeof handler!=UNDEFINED)
        {
            eval(handler)
        }
    } catch(ex){ }
    _popup=arguments
    }
    The stuff in red isn't close to legal JavaScript. I don't know why it is showing rel="nofollow" twice each time. It's not that way in my posting.
    Thanks alot for the reply, I guess nofollow comes there with posting of Coding-forums, anyways its not my own code. Its Asual - Swf Address 2.4 (http://www.asual.com/swfaddress/) thats widely being used for deeplinking in xml. I thought it was a core Js coding.

  • #5
    New to the CF scene
    Join Date
    Aug 2011
    Location
    Lahore, Pakistan.
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    This is where you can view it: www.caterpowertrading.com/js/swfaddress.js

  • #6
    New to the CF scene
    Join Date
    Aug 2011
    Location
    Lahore, Pakistan.
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ok so I used a timeout onLoad but it's not working either
    Code:
    <body style="margin:0px;overflow:hidden" onLoad=setTimeout("location.href='http://www.caterpowertrading.com/index2.html'",35000>
    Anyone!


  •  

    Posting Permissions

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