Viewing Redirect

Redirect



User: Raf P. 11 years ago
Is it possible to redirect a page in the navigation menu to another website?

-------------------------------
Kind regards,

Raphael Pairoux
User: Jumbo T. 11 years ago
Have a look :

http://tahafut.hol.es/target/

On the page, the Contact link is created with this script :

<script>
$target = "contact.html";
$destination = "mailto:my.email@provider.nl?SUBJECT=Response";
tar = document.getElementsByTagName('a');
for (var q=0;q<tar.length;q++) {
if ( tar[q].href.indexOf( $target ) >= 0 ){
tar[q].href = $destination;
tar[q].setAttribute("target","_new");
}
}
</script>
User: Raf P. 11 years ago
Made the script changes, pasted the code into the footer. Nothing happened.

<script>

$target = “barbershop.html";
$destination = "http://www.shirlysbarbershop.be/”;

tar = document.getElementsByTagName('a');

for (var i=0;i<tar.length;i++) {

if ( tar[i].href.indexOf( barbershop.html ) >= 0 ){

tar[i].href = http://www.shirlysbarbershop.be;
tar[i].setAttribute("target","_blank");

}

}

-------------------------------
Kind regards,

Raphael Pairoux
User: Raf P. 11 years ago
Made the script changes, pasted the code into the footer. Nothing happened.

<script>

$target = “barbershop.html";
$destination = "http://www.shirlysbarbershop.be/”;

tar = document.getElementsByTagName('a');

for (var i=0;i<tar.length;i++) {

if ( tar[i].href.indexOf( barbershop.html ) >= 0 ){

tar[i].href = http://www.shirlysbarbershop.be;
tar[i].setAttribute("target","_blank");

}

}

-------------------------------
Kind regards,

Raphael Pairoux
User: Jumbo T. 11 years ago
Feel free to improvise and change the code.

But do not cry in public if it does not work.

Do you clients a favour.

Learn what a webpage is.
Learn javascript.

Anything.

Hint : use the variable
User: Raf P. 11 years ago
I'm sorry you feel that way.

-------------------------------
Kind regards,

Raphael Pairoux
User: Roddy 11 years ago
To include a page in the default EverWeb navigation you need to create a black page anyway so why not just insert a redirect in that page.

You can use a meta redirect ...

<meta http-equiv="refresh" content="0;url=http://domain-name.com/page-name.html" />

... or javascript...

<script type="text/javascript">
window.location="http://domain-name.com/page-name.html";
</script>

Paste either one into the blank page's Head Code box in the Page inspector.

-------------------------------
Roddy

Website: http://everwebwidgets.com
Contact: http://everwebwidgets.com/ewWidgets-home/contact.html
NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own.
✔ Best Answer  
User: Raf P. 11 years ago
Thx Roddy.
Works perfect!

-------------------------------
Kind regards,

Raphael Pairoux


Post Reply
You must login or signup to post.