Reputation: 15797
Please see the code below:
tc.Attributes.Add("onclick", "this.style.backgroundColor='goldenrod'; open('ds://123','_blank','')")
tc references TableCell:https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.tablecell(v=vs.110).aspx
The code opens an application client (person: 123). However, a new Internet Explorer Window is also opened. How do I stop the new Internet Explorer window from opening?
Upvotes: 1
Views: 35
Reputation: 1074158
You're explicitly asking for another window to be opened, by calling window.open
.
Instead, if the ds:
protocol handler will launch something else anyway, you may just want to assign to location
, e.g. change
open('ds://123','_blank','')
to
location = 'ds://123';
Just check that relative links within the page still work after you've clicked that to launch the client.
If that doesn't work, create a zero-height iframe
and set its src
:
document.getElementById("the-iframe-id").src = "ds://123";
Upvotes: 2