Refresh a parent window???

Discussion in 'ASP .Net' started by Helixpoint, Jul 3, 2003.

  1. Helixpoint

    Helixpoint Guest

    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.
    http://www.helixpoint.com


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

    ______________________
     
    Helixpoint, Jul 3, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    > > 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.
    > > http://www.helixpoint.com
    > >
    > >
    > > Interested in Affordable Email Marketing?
    > > Check out the HelixMailer at http://www.helixpoint.com/helixmailer.asp
    > > If you are interested in becoming a Reseller of HelixPoint products,

    > contact
    > >
    > > ______________________
    > >
    > >

    >
    >
     
    Vidar Petursson, Jul 3, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raj
    Replies:
    3
    Views:
    12,950
    gautamkhosla29
    Jun 11, 2009
  2. Steve Wark
    Replies:
    3
    Views:
    6,621
    bruce barker
    Oct 28, 2004
  3. J P Singh
    Replies:
    3
    Views:
    312
    Howard Rothenburg
    Feb 11, 2004
  4. Bill S.
    Replies:
    2
    Views:
    219
    Bill S.
    May 8, 2004
  5. PWalker
    Replies:
    1
    Views:
    137
    David Lionetti
    Feb 24, 2005
Loading...

Share This Page