Hey Brett,

Thanks for the response.  I tried RegisterClientScriptBlock like you said but 
the postback does not occur.  It looks to me like my syntax is kind of screwy 
but I'm no javascript expert.

Thanks,
Bob

-------------- Original message -------------- 
From: "Brett Stinson" <[EMAIL PROTECTED]> 
Bob:
Have you tried it using RegisterClientScriptBlock rather than
RegisterStartupScript?

-- 
[EMAIL PROTECTED]

On 10/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Peter,
>
> Thanks for the reply. The window.close javascript you sent me works great.
> But I am still having trouble forcing the postback of my parent page when
> the child page closes. Here is my code:
>
> Sub CloseWindow()
> ClientScript.RegisterStartupScript(GetType(String), "AddProduct", "<script
> language=""JavaScript"">" & vbCrLf & _
> vbTab & "PopupWindow=window.close('" & "AddProduct.aspx" & "');" & vbCrLf
> & "PopupWindow.focus();" & "<" & "/script>")
> ClientScript.RegisterStartupScript(GetType(String), "Parent", "<script
> language=""JavaScript"">window.opener.forms[0].submit();</script>")
> End Sub
>
> Like I said, the first registerstartupscript works since the child window
> does now close when I call this subroutine. But the postback of my parent
> page is not happening. I am sure my syntax is wrong but I don't know where.
>
> Thanks,
> bob
>
> -------------- Original message --------------
> From: "Peter Brunone" <[EMAIL PROTECTED] <peter.brunone%40gmail.com>>
>
> Hi Bob,
>
> Each of these can be accomplished with a line of Javascript. To reload
> the parent window:
>
> window.opener.forms[0].submit();
>
> ...and then to close the current (child) window:
>
> window.close();
>
> Of course these have to be done from the child window, but that's no
> problem; you can use RegisterStartupScript, or even just a Literal (or if
> you want to get really ugly, just Response.Write the JS out) after the
> child
> form posts back.
>
> Cheers,
>
> Peter
>
> On 9/27/06, [EMAIL PROTECTED] <rherrmann05%40comcast.net> <
> [EMAIL PROTECTED] <rherrmann05%40comcast.net>> wrote:
> >
> > Hi all,
> >
> > I have a popup window that I call from my asp.net page. The popup window
> > page displays a gridview control with a list of items. I have a
> linkbutton
> > control on each row of the gridview. When the user clicks the
> linkbutton, I
> > do some updating of a SQL table. This all works fine. But I want to do 2
> > more things when the user clicks the linkbutton:
> >
> > 1. I want to close the popup window.
> >
> > 2. I want to force a postback of my main page. I need this because I
> want
> > to display the result of the database change I made using the popup
> window.
> >
> > Can anyone help?
> >
> > Thanks,
> > Bob
> >
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> 
>

[Non-text portions of this message have been removed]


 

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNet2/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/AspNet2/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to