1

I created a master page and take the menu on the master page.

<li>
   <a href="#">Edit</a>
   <ul>
      <li>
           <a href="#" id="A2" runat="server" onclick="fnEditState()">Edit State</a>
      </li>
   </ul>
</li>

Now I want that Each form open in new tab with closing button. Main purpose is that I could multiple form open on the same time and same window. Please help me

Mahmoud Gamal
  • 78,257
  • 17
  • 139
  • 164
Sumit Kumar
  • 51
  • 1
  • 6
  • 1
    for your a tag use target as blank `Edit State` What does your javascript function `fnEditState()` do?? – Murtaza Dec 28 '11 at 08:23
  • function fnEditState() { window.open("View/updateState.aspx", "", "status=2,scrollbars=1,resizable=1,width=800,height=300"); } right now open in new window. – Sumit Kumar Dec 28 '11 at 08:26
  • 1
    applied `target="_blank"` to your anchor tag? which browser u are using? to open a new window in a tab is your browser setting. nothing to do with your `target="_blank"` this attribute will open the window in new window, **depending on your browser setting it will open in tab, or new window.** – Murtaza Dec 28 '11 at 08:37
  • I want to take a tab panel on the master page. and all form open in new tab not in new window pls help me – Sumit Kumar Dec 28 '11 at 08:39
  • Instead of creating new window create new `
    ` elements using JavaScript. See [this question](http://stackoverflow.com/questions/1328723/how-to-generate-a-simple-popup-using-jquery) for some pointers and examples.
    – Shadow The GPT Wizard Dec 28 '11 at 08:41
  • you are saying you want to create a new tab on your tab panel control placed on master page, and open your page there?? Am i right? – Murtaza Dec 28 '11 at 08:45

2 Answers2

1

If I understand you correctly, you want a new tab to open when you click "Edit State" instead of a popup window?

In that case you could just do:

<a href="View/updateState.aspx" id="A2" runat="server" target="_blank">Edit State</a>
Henrik
  • 117
  • 8
1

here is the answer to open a tab and not new window on click of the link, through window.open

you can just add the below to parameters in your window.open method

modal=yes, alwaysRaised=yes

function fnEditState() {
window.open("View/updateState.aspx", "","status=2, scrollbars=1,resizable=1, width=800,  height=300, modal=yes, alwaysRaised=yes"); 
} 
Murtaza
  • 3,045
  • 2
  • 25
  • 39