SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Forms & Frames

  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Does anyone know how to set a "target" for a form?

    I've got a search form in the top nav bar which is held within a frame. When the form is submitted it opens up a non frames search results page. So what I need to do is bust out of the frames when the search form is submitted - ie "target = top".

    Does anyone know how to do this?

  2. #2
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use a tiny bit of JavaScript which will destroy the frames in the head of the search-results page.
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.

  3. #3
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Chilliboy, if you add this into the head of your page it should break out of all frames:
    Code:
    <script>
    <!--
    
    /*
    Break-out-of-frames script
    By Website Abstraction (http://wsabstract.com)
    Over 400+ free scripts here!
    Above notice MUST stay entact for use
    */
    
    if (window!= top)
    top.location.href=location.href
    // -->
    </script>
    Script taken from http://wsabstract.com/script/cut36.shtml.

    Hope this helps!

  4. #4
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers for that!

  5. #5
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have no idea whats with th javascript..maybe i got it wrong..but a way would be:
    <form method="post" action="http://domain.com/script.php" target="_blank">

    change _blank to whatever you want.
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


Bookmarks

Posting Permissions

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