| JavaScript |
| Back Button
With Frames
|
|
Back buttons are used to return to the previous page. This is the same as using the back button on your browser. Every frame has its own history list of
documents that were loaded into it. To go back in a frame other than
the frame containing the button, the frame name must be specified.
Change ' Example: This
link opens frames example with form buttons <FRAMESET ROWS="25%,75%"> <FRAMESRC="menu.html" NAME="menu" SCROLLING="AUTO" NORESIZE="NORESIZE" > <FRAME SRC="homepage.html" NAME="main" SCROLLING="AUTO" NORESIZE="NORESIZE"><NOFRAMES> <BODY></BODY></NOFRAMES> </FRAMESET>If the back button is in the frame named menu and you want to go back one document in the frame named main, the code would be: Code: For a form button the code would be:<FORM> <INPUT TYPE="BUTTON" VALUE="Go Back" ONCLICK="parent.main.history.go(-1)"> </FORM>For text used as a link the code would be: <A HREF="javascript:parent.main.history.go(-1)">[Go Back]</A>For an image used as a link the code would be: <A HREF="javascript:parent.main.history.go(-1)"> <IMG SRC="http://www.mydomain.com/images/back.gif" BORDER="0"> </A> |