I have this web application which has integrations into other webapps like Salesforce
.
Now I have a link in Salesforce
which opens a new window of my application, but I would like it to open the link inside the window, where my webapp is already open.
Scenario:
I've looked into target
attribute of links, but they only target named frames and I'm not sure how I could name tab1
to be a valid target.
Any other hints people can give me?
Edit:
tab1
already exists, so I can't actually do the 'open a new window with a name' thing. I'd somehow have to either make tab1
have a name through code (tab1 is opened via URL)
You can give a name to the window you opend.
<a href="#" onclick="window.open('http://www.stackoverflow.com', 'mywin'); return false;">Click here to open window first</a>
<br/>
<a href="#" onclick="window.open('http://www.google.com', 'mywin'); return false;">Open link in specific window</a>
Edit
You can name a window (or tab) on some browsers.
<script>
this.name = "mywin";
</script>
And open a link to the tab.
<a href="http://www.stackoverflow.com" target="mywin">Open link in specific window</a>
It works on IE, but not Chrome...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With