Javascrpt Code Management

Go down

Solved Javascrpt Code Management

Post by Norton on March 30th 2016, 6:31 pm

I cant seem to get the redirect script operational in my forum after posting Quick replies. I've submitted the code in each of the options; "In the Home Page">"Sub forums">"topics. I get redirected to the information page.

Code:

(function() {
for (var meta = document.getElementsByTagName('META'), i = 0, j = meta.length; i < j; i++) {
if (meta[i].httpEquiv && /refresh/i.test(meta[i].httpEquiv)) {
window.location.href = meta[i].content.replace(/^.*;url=/, '');
break;
}
}
}());

After entering a quick reply it directs to the information page.
Javascrpt Code Management Redire10


Last edited by Norton on March 30th 2016, 10:52 pm; edited 1 time in total
Norton
Norton
Forumember

Male Posts : 160
Reputation : 8
Language : English
Location : Ontario Canada

http://Norfolk Friends forumotion.net

Back to top Go down

Solved Re: Javascrpt Code Management

Post by Norton on March 30th 2016, 6:41 pm

@Norton wrote:I cant seem to get the redirect script operational in my forum after posting Quick replies. I've submitted the code in each of the options; "In the Home Page">"Sub forums">"topics. I get redirected to the information page.

Code:

(function() {
for (var meta = document.getElementsByTagName('META'), i = 0, j = meta.length; i < j; i++) {
if (meta[i].httpEquiv && /refresh/i.test(meta[i].httpEquiv)) {
window.location.href = meta[i].content.replace(/^.*;url=/, '');
break;
}
}
}());

After entering a quick reply it directs to the information page.
Javascrpt Code Management Redire10

Am I expecting too much. I just posted here on this forum and it directs back to the information page after posting a reply?
Norton
Norton
Forumember

Male Posts : 160
Reputation : 8
Language : English
Location : Ontario Canada

http://Norfolk Friends forumotion.net

Back to top Go down

Solved Re: Javascrpt Code Management

Post by APE on March 30th 2016, 7:00 pm

  
@Norton
Please don't double post.
Your post needs to be separated by at least 24 hours before bumping.
Please use the edit button instead!   Javascrpt Code Management Edit1610


My PM's are closed I am away on leave
Javascrpt Code Management Left1212Javascrpt Code Management Center11Javascrpt Code Management Right112
Javascrpt Code Management Ape_b110
Javascrpt Code Management Ape1010
APE
APE
Administrator
Administrator

Male Posts : 14604
Reputation : 1596
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Javascrpt Code Management

Post by SLGray on March 30th 2016, 7:21 pm

Is this the tutorial you used:  https://help.forumotion.com/t144929-immediate-redirection?highlight=redirection ?

Is JavaScript Management activated?


Javascrpt Code Management Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 46133
Reputation : 3254
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

Solved Re: Javascrpt Code Management

Post by Norton on March 30th 2016, 10:52 pm

@SLGray
Yes that was the tutorial I followed and JSM was activated.
I recently installed Fire Fox until MS Edge has a little more security with the final release late this spring. Through the process of (browsers) elimination, I traced my (Immediate redirect) problem down to Fire Fox. FF was blocking page redirects. Changed FF permissions and all is well on this forum and my own.

Thanks again for your timely response.

Topic marked solved by member.
Norton
Norton
Forumember

Male Posts : 160
Reputation : 8
Language : English
Location : Ontario Canada

http://Norfolk Friends forumotion.net

Back to top Go down

Solved Re: Javascrpt Code Management

Post by SLGray on March 30th 2016, 10:56 pm

You're welcome.

Topic solved and archived


Javascrpt Code Management Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 46133
Reputation : 3254
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum