Open website in new tab when my page...

User 1743776 Photo


Registered User
74 posts

When my page MYPAGE.html loads, i want another website WWW.COFFEECUP.COM (for example) to automatically open in a new window/tab but user to remain in MYPAGE.

Where do I place code in latest release of SD?

Possible code example:

onload="myFunction()"

<script>
function myFunction() {
window.open("https://www.coffeecup.com");
}
</script>
Live in a steady joy!
User 187934 Photo


Senior Advisor
20,269 posts
Online Now

Hi Dick,
Try putting in the Footer section.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 1743776 Photo


Registered User
74 posts

Thanks. Tried it but it didn't do anything. Anyway, I did something differently and it works fine for what I wanted to accomplish.
Live in a steady joy!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.