Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to open a new pop up from an already open pop-up

Status
Not open for further replies.
Jul 28, 2011
167
NG
Hi all,
I'm actually working on a project and on a deadline. THe issue is that I have a page that calls
window.open()
everything works fine. But the issue is that I want to call another window.open() from within the already open window but nothing happens. Can anyone help me with an appropriate solution?

Thanks
 
Hi

You gave no details, so we can only guess. My guess it that you are passing the save value for [tt]window.open()[/tt]'s 2[sup]nd[/sup] parameter. The second parameter is the name of the window in which to open the page. If a window with that name exists, the page is opened into that. If no window with that name exists, a new window is opened, the name is assigned and the page is opened into it.


Feherke.
 
Ok,

In one page of my site, I use something like this:
Code:
 <script type="text/javascript">
        function goToReport(what) {
            window.open(what, "reportName", "height=200, width=300")
        }
    </script>
A control like this

<asp:Hyperlink ID="hypPip" runat="server" onclick="goToReport('theReports.aspx?report=PIP')" NavigateUrl="Javascript:;">Paper-In-Process </asp:Hyperlink>

can then call the function above to open theReports.aspx page.

The problem is that in theReports.aspx, I have another control like this
<asp:LinkButton ID="lnkCurrAll" runat="server" onclientclick="goToUrl('Dates.aspx')">All</asp:LinkButton>
which should call another another window.open function like this
Code:
function goToUrl(val) {
    mywindow = window.open(val, "Reports", "height=600, width=1100, menubar=1, resizable=1, location=0,status=1,scrollbars=1")
    mywindow.moveTo(5, 5);
}
Which is also supposed to open another page, but each time I call this second nothing happens. What should I do
 
Hi

Those scripts are working for me. But that is all I can check.

Please do not post server-side code when debugging client-side problems. Post the generated HTML as the browser receives it and as it is displayed by the browser's View Source command.

Would also be helpful to know in which browsers you tried that code and in which browsers it fails. And please confirm that while "nothing happens" there are neither messages in the browsers' error console.


Feherke.
 
I tried this in i.e8, i.e9, firefox and get thesame issues.
The first open window just cant open another window with window.open
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top