Results 1 to 6 of 6

Thread: Frames hell [Resolved]

  1. #1

    Thread Starter
    Hyperactive Member Lil Ms Squirrel's Avatar
    Join Date
    Nov 2004
    Location
    planet squirrel
    Posts
    494

    Resolved Frames hell [Resolved]

    I have a web page which uses frames.

    I know frames are bad, but try telling that to my boss!

    Anyway, in the banner, I have a search box where the user enters a client id and it performs a search when they click the button with the results being returned to the main frame.

    If the user types in the search box and presses enter rather than clicking the button, the main page refreshes to show the search screen instead of the results page.

    What am I doing wrong???
    Last edited by Lil Ms Squirrel; Feb 14th, 2005 at 10:31 AM. Reason: resolved
    Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
    Dr. Seuss

  2. #2
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: Frames hell

    I too am dealing with frames at the moment. Though your problem has nothing to do with frames.

    Pressing <enter> forces postback, which essentially does nothing, but put this code in the page_load of the form with the search and it should work.

    Page.RegisterHiddenField("__EVENTTARGET", "btnSearch")

    Where btnSearch is the name of your search button. And it should work just fine.

    Since you are dealing with frames maybe you could answer one of my questions:

    Is it possible to call a function or button of one frame from another frame?

  3. #3

    Thread Starter
    Hyperactive Member Lil Ms Squirrel's Avatar
    Join Date
    Nov 2004
    Location
    planet squirrel
    Posts
    494

    Re: Frames hell

    Thanks token. Works a treat!

    As for your problem, I have a link to a page that will probably help you. Let me look it out and I'll post it back here.

    Thanks again
    Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
    Dr. Seuss

  4. #4
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: Frames hell [Resolved]

    No problem ms. squirrel. I'm just glad I could help.

    And if you could get back to me with that link that would be great.

  5. #5

    Thread Starter
    Hyperactive Member Lil Ms Squirrel's Avatar
    Join Date
    Nov 2004
    Location
    planet squirrel
    Posts
    494

    Re: Frames hell [Resolved]

    Sorry Token...couldn't find the article I was originally looking for, but this morning when faced with a problem similar to yours, I found some helpful code in this article.

    For my purposes, I have a treeview in the left frame that needs to be refreshed so I've used this code:

    VB Code:
    1. <script language =vbscript>
    2.         Sub RefreshTree()
    3.             parent.frames("contents").location.href = "treeview.aspx"
    4.             parent.frames("main").location.href  = "annualreview.aspx"
    5.         End Sub
    6. </script>
    Then I have this control that calls the script code:

    VB Code:
    1. <asp:HyperLink id="lnkContinue" runat="server" NavigateUrl="javascript:RefreshTree()">Continue</asp:HyperLink></P>

    Hope this helps!
    Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
    Dr. Seuss

  6. #6

    Thread Starter
    Hyperactive Member Lil Ms Squirrel's Avatar
    Join Date
    Nov 2004
    Location
    planet squirrel
    Posts
    494

    Re: Frames hell [Resolved]

    I also found this page full of frame FAQs which was really useful.
    Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
    Dr. Seuss

Posting Permissions

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



Click Here to Expand Forum to Full Width