Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 31st, 2005, 11:02 PM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help Pop up window

I need help in prompting a window msg box in asp.net
PromptCreateItem.aspx is a webform.

Private Sub promptmsgbox(ByVal TargetPage As Page)
Dim strScript As String = "<script language=javascript>window.open('PromptCreateItem. aspx?" & "&url=Drinks.aspx"" ','cal','width=220,height=210,left=270,top=180')</script>"
TargetPage.RegisterClientScriptBlock("promptmsgbox ", strScript)

End Sub

When i click on create button, it wil check whether the inserting of record has been sucessful.
If it is sucessful it will ask the user whether he want to create another new item.
If checkstatus = True Then
            promptmsgbox(Page)
End If

I having problem how to response.redirect to the parent page to create the item rather then response redirect the link in the pop up window? KitchenMain.aspx has frame how to target the link to the content frame?

// If user click Yes in the pop up window
Private Sub btnYes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnYes.Click
        Dim url As String
        url = Request.QueryString("url")
        Response.Redirect(url)
End Sub

// If user click No in the pop up window
Private Sub btnNo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNo.Click
        Response.Redirect("KitchenMain.aspx")
    End Sub
:D
 
Old April 13th, 2005, 10:51 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm not 100% sure of what you are asking. Are you saying that based on a button pressed in the popup window, you want to redirect the main window (parent or opener) to a different URL?

If this is the case, then instead of using Response.Redirect, you need to send back some javascript to the popup window page that tells the parent window where to go:

opener.location.href="....";

This will tell the popup window's opener object (the parent window) what location to go to.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Window refresh and window pop up in Java Script Aleksandra Javascript How-To 2 March 2nd, 2007 06:47 PM
Pop Window testsubject General .NET 1 July 2nd, 2006 01:29 PM
pop-up window rajiv_software Classic ASP Basics 1 April 12th, 2005 06:11 AM
pop up window sankar VB How-To 0 July 29th, 2003 01:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.