Click to See Complete Forum and Search --> : Regarding servlets that use Frames in HTML


Joy Ben
September 23rd, 1999, 02:24 AM
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.

Leon
September 23rd, 1999, 05:23 AM
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

unicman
September 23rd, 1999, 08:22 AM
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

unicman
September 23rd, 1999, 08:24 AM
The exact tag is...

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

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