开发者

How to check if a webpage is loaded or not in the browser window,when redirecting from a different website?

开发者 https://www.devze.com 2023-02-10 15:38 出处:网络
My requirement is that I have a few hyperlinks on a webpage and when the user clicks on these hyperlinks I should redirect the user to an asp.net web page(Default.aspx) in a different website.

My requirement is that I have a few hyperlinks on a webpage and when the user clicks on these hyperlinks I should redirect the user to an asp.net web page(Default.aspx) in a different website.

For the 1st time when the user clicks on one of the hyperlinks it will launch a new browser window with the Default.aspx loaded and then if the user clicks on some other hyperlink I want to redirect the user to the existing browser window(in which deafult.aspx is already loaded)with the content related to this particular hyperlink loaded,instead of launching a new browser window/tab.

But 开发者_如何学CI am not sure of how to achieve this.I wonder if I can add some js to the asp.net Default.aspx page to achieve this.

Please could someone put me in the right direction?

Thanks


It sounds like the target property of the <a> tag will serve your purposes. Try:

<a href="http://somedomain.com/default.aspx" target="unique_name1">Link 1</a>
<a href="http://someotherdomain.com/default.aspx" target="unique_name2">Link 2</a>

Any clicks on the link subsequent to the first one should not result in additional windows.

0

精彩评论

暂无评论...
验证码 换一张
取 消