Open a new window inside the existing window instead of open New window and new tab

Answered Open a new window inside the existing window instead of open New window and new tab

  • 18 มิถุนายน 2555 13:59
     
     

    Hi,

      I have asp.net application. I am using Vs 2008 and .net Framework 3.5. My default browser is IE 8. I am using javascript for browser compatability.

    In my javascript file, they are using property window.location.href.

    When i am trying to click the menu , it will open in new window. I dont want to open new window and new tab.

    I want to open with in same existing window.

    How its possible?

    Also i want to hide the adreesbar, status bar in IE 8 . How its possible?.

    Regards

    Dileep Sanker

ตอบทั้งหมด

  • 18 มิถุนายน 2555 14:23
     
      มีโค้ด

    Please try with "_newtab"

    window.open('newtab.html','_newtab');

    Normally it should work but javascript may not able to overwrite client browser default settings.

  • 19 มิถุนายน 2555 5:42
     
     

    Hi,

        I want to open with in Existing window and not opened in new window.

  • 19 มิถุนายน 2555 5:45
     
      มีโค้ด

    Aww, my bad.

    Please use this

    window.location = "http://www.microsoft.com/";

    
    


    • แก้ไขโดย TinMgAye 19 มิถุนายน 2555 5:45
    •  
  • 19 มิถุนายน 2555 5:53
     
     คำตอบ มีโค้ด

    For showing / hiding of address bar and status bar cannot be done on existing browser [especially for IE].

    But you can manage it when you open a new browser window like this

    window.open("http://www.microsoft.com/","_blank",  "toolbars=no,menubar=no,location=no,scrollbars=no,resizable=no,status=no");  

    Hope this helps.

    • ทำเครื่องหมายเป็นคำตอบโดย Alexander SunModerator 8 กรกฎาคม 2555 15:46
    •