...

View Full Version : Page Redirection Help



2tone
08-25-2011, 04:32 AM
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 (http://www.asual.com/swfaddress/) deeplinking for Flash and XML. Let me post some codes here from my website and intro;
Intro.xml

<link url="index2.html" target="_self" />
Swfaddress.js 2.4 Where targets are set

{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!

Old Pedant
08-25-2011, 06:22 AM
That code makes no sense. Is that supposed to be JavaScript coding???



{
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.

Old Pedant
08-25-2011, 06:26 AM
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!

2tone
08-26-2011, 01:30 AM
That code makes no sense. Is that supposed to be JavaScript coding???



{
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.

2tone
08-26-2011, 01:31 AM
This is where you can view it: www.caterpowertrading.com/js/swfaddress.js

2tone
08-26-2011, 03:51 PM
Ok so I used a timeout onLoad but it's not working either :(

<body style="margin:0px;overflow:hidden" onLoad=setTimeout("location.href='http://www.caterpowertrading.com/index2.html'",35000>
Anyone!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum