Web Analytics Made Easy -
StatCounter Page Redirection Help - CodingForum

Announcement

Collapse
No announcement yet.

Page Redirection Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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; Aug 24, 2011, 11:48 PM.

  • #2
    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; Aug 25, 2011, 01:24 AM.
    Be yourself. No one else is as qualified.

    Comment


    • #3
      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; Aug 25, 2011, 01:28 AM.
      Be yourself. No one else is as qualified.

      Comment


      • #4
        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.

        Comment


        • #5
          This is where you can view it: www.caterpowertrading.com/js/swfaddress.js

          Comment


          • #6
            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!

            Comment

            Working...
            X