How do I open new links in a JavaScript pop-up window (same window) not a new tab? RRS feed

  • Question

  • I got an ASP.NET solution in which users can click on a hyperlink and have a small JavaScript modal/pop-up window opened. When I tried to open a new link within the pop up window, it would be opened in a new tab of the main window (not the modal window) which did not meet my client's requirements. Here is the hyperlink url property in my webform:

    hyperLink1.NavigateUrl = "javascript:window.open('https:////www.google.com/search?rlz=1C1RLNS_enUS864US870&tbm=shop&q=dietary+supplement+for+diabetes&spell=1&sa=X&ved=0ahUKEwjfjNjg78XpAhXTu54KHckBC4kQBQiXAygA&biw=1680&bih=890', null, 'top = 100,left = 200,width = 1200,height = 800')";

    I just want to ask if it is possible to have the window configured for new links to stay being opened within the same pop-up/modal window not the main window? Or this is something has to do with the browser preferences on opening a new link?

    Any help would be much appreciated!

    • Moved by CoolDadTx Wednesday, May 27, 2020 1:35 PM ASP.NET related
    Tuesday, May 26, 2020 7:33 PM

All replies

  • ASP.NET can be discussed at ASP.NET forums.


    Tuesday, May 26, 2020 7:46 PM