CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 1999
    Posts
    2

    Regarding servlets that use Frames in HTML

    hi,

    i have a servlet that generates HTML page with two FRAMES. Each frame inturn are servlets creating pages.
    the bottom frame is a Form. And there is a res.setHeader("Refresh" , "1; URL=...") function in the servlet that has created the bottom Form page.

    like for example: <a href="http://home/servlet/sampleServlet" target="_top"> click here </a>
    will execute the sampleServlet(a servlet program) in full browser window only when user clicks this link.
    same thing i want to achieve using
    res.setHeader("Refresh" , "1; URL:http://home/servlet/sampleServlet"); where in the sampleServlet will execute after 1sec automatically.

    how do i do this.
    joy ben.




  2. #2
    Join Date
    Sep 1999
    Location
    Sofia, Bulgaria
    Posts
    48

    Re: Regarding servlets that use Frames in HTML

    You can hook on a button from the down frame
    and start a script like the following:

    function myLink(){
    parent.frame1.location.href='http://blabla1';
    parent.frame2.location.href='http://blabla2';
    }

    this function should be holded by the second frame (frame2) or u can face some problems probably


  3. #3
    Join Date
    May 1999
    Location
    Pune, MH, India.
    Posts
    453

    Re: Regarding servlets that use Frames in HTML

    Well u r setting header in the lower frame page to refresh after some time, and u want to get the whole (2 frames) getting refreshed after that time.

    Instead why don't u try giving 'meta' tag in the page having definitions of these two frames. If u specify 'meta' tag with 'refresh' (i don't know the exact name) with the same delay and URL, it will refresh the whole frameset after that delay.

    - UnicMan
    http://members.tripod.com/unicman

  4. #4
    Join Date
    May 1999
    Location
    Pune, MH, India.
    Posts
    453

    Re: Regarding servlets that use Frames in HTML

    The exact tag is...

    <META HTTP-EQUIV="Refresh" CONTENT="1;url=http://url_u_need">

    - UnicMan
    http://members.tripod.com/unicman

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

Featured