Refresh a parent window???

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Refresh a parent window???

    I have a frameset. left and main. Inside the main frame I have a IFRAME. I
    need to refresh the main frame when I post a form inside the IFRAME. I am
    trying the code below with no luck??


    Private Sub addMachine_Click(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles addMachine.Click

    Dim sScript As New System.Text.StringBuilder
    sScript.Append("<SCRIPT language=""javascript"">" & vbCrLf)
    sScript.Append("parent.window.opener.location =
    parent.window.opener.location;" & vbCrLf)
    sScript.Append("</SCRIPT>" & vbCrLf)
    RegisterClientScriptBlock("ForceDefaultToScript", sScript.ToString)
    End Sub


    --

    ______________________
    David Fetrow
    HelixPoint LLC.
    [url]http://www.helixpoint.com[/url]
    [email]davef@helixpoint.com[/email]

    Interested in Affordable Email Marketing?
    Check out the HelixMailer at [url]http://www.helixpoint.com/helixmailer.asp[/url]
    If you are interested in becoming a Reseller of HelixPoint products, contact
    [email]davef@helixpoint.com[/email]
    ______________________


    Helixpoint Guest

  2. Similar Questions and Discussions

    1. Close a pop-up, and refresh it's parent window
      I would like to replace the CFLocation tag in this block of code, and have it instead: Generate an alert box to close the window, and refresh the...
    2. How to refresh a parent grid?
      Greetings all, I have a nested datagrid setup. When one updates the child grid using edit, it also updates a field in the parent grid (the parent...
    3. can a popup window return data to parent window?
      Is it possible to do the following in php: I want to have a main form open. In the form I want a button that will open a popup window so the user...
    4. refresh parent window on close showModalDialog?
      Is it possible to make the parent window refresh when a modal dialog is closed? I know I can use window.opener.location.reload(true); for a...
    5. Refresh Parent window from child window causes problems
      Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence...
  3. #2

    Default Re: Refresh a parent window???

    Hi

    If you want to refresh the whole frameset then this is ok...
    If you only want to refresh the frame/document the iframe is located in

    parent.location.href = "pagetogo.aspx";
    Or
    parent.location.reload(true);


    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Internet Client & Controls MVP
    ==============================
    "Helixpoint" <dave@helixpoint.com> wrote in message
    news:eJnri7WQDHA.1556@TK2MSFTNGP10.phx.gbl...
    > This works:)
    >
    > Private Sub addMachine_Click(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles addMachine.Click
    >
    > Dim sScript As New System.Text.StringBuilder
    >
    > sScript.Append("<SCRIPT language=""javascript"">" & vbCrLf)
    >
    > sScript.Append("top.main.location = top.main.location;" & vbCrLf)
    >
    > sScript.Append("</SCRIPT>" & vbCrLf)
    >
    > RegisterClientScriptBlock("ForceDefaultToScript", sScript.ToString)
    >
    > End Sub
    >
    > "Helixpoint" <dave@helixpoint.com> wrote in message
    > news:eoZlQvWQDHA.3880@tk2msftngp13.phx.gbl...
    > > I have a frameset. left and main. Inside the main frame I have a IFRAME.
    I
    > > need to refresh the main frame when I post a form inside the IFRAME. I
    am
    > > trying the code below with no luck??
    > >
    > >
    > > Private Sub addMachine_Click(ByVal sender As System.Object, ByVal e As
    > > System.EventArgs) Handles addMachine.Click
    > >
    > > Dim sScript As New System.Text.StringBuilder
    > > sScript.Append("<SCRIPT language=""javascript"">" & vbCrLf)
    > > sScript.Append("parent.window.opener.location =
    > > parent.window.opener.location;" & vbCrLf)
    > > sScript.Append("</SCRIPT>" & vbCrLf)
    > > RegisterClientScriptBlock("ForceDefaultToScript", sScript.ToString)
    > > End Sub
    > >
    > >
    > > --
    > >
    > > ______________________
    > > David Fetrow
    > > HelixPoint LLC.
    > > [url]http://www.helixpoint.com[/url]
    > > [email]davef@helixpoint.com[/email]
    > >
    > > Interested in Affordable Email Marketing?
    > > Check out the HelixMailer at [url]http://www.helixpoint.com/helixmailer.asp[/url]
    > > If you are interested in becoming a Reseller of HelixPoint products,
    > contact
    > > [email]davef@helixpoint.com[/email]
    > > ______________________
    > >
    > >
    >
    >

    Vidar Petursson Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139