Im using window.open(URL,name,specs,replace) to open a new page
it works fine with Chrome V22 and Firefox 12
But when i use it with IE9 it gives me a strange behavior
When i click it open a new page but the original page changes to the main root of the file index
Okay, so there’s the problem. The web browser’ default action is not being cancelled anywhere. Return false from the open_win function to prevent the web browser from performing its default action when you click on the link, so that it is only the scripting that performs your desired action instead.
The other thing that’s not right is that the href attribute is empty. When it’s empty the page reloads. With something in there, commonly “#”, no such trouble occurs.
You need to fix the href attribute of your link. When the href attribute is empty, it causes the page to reload. This occurs regardless of whether you use scripting or not.
When you intend for the link to be controlled with scripting, you should use “#” for the link instead.