Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
| Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 16th, 2008, 11:28 AM
Authorized User
 
Join Date: Mar 2008
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default reload parent page from included page

Hello everyone,

Is it possible to reload the enclosing .jsp page from a included .jsp page?

i.e if I have a home page home.jsp and it has the line

<%@ include file="../lib/login.jsp" %>

can I reload/refresh home.jsp by clicking a button from login.jsp?

Thanks in advance!

 
Old July 16th, 2008, 02:04 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Would have been better to ask this in the JSP forum, but never mind.

Look, when you use <%@ include ...%> in JSP, the *TEXT* of the specified file is pulled into and becomes *TEXT* in the CURRENT PAGE.

In other words, by the time that the Java Compiler actually converts the page into a ".class" file for the server to work from, the fact that some code came from a <%@ include %> is LONG SINCE FORGOTTEN!!!

So, in the HTML that is sent to the browser, there's really NO DIFFERENCE between HTML generated from the main page and HTML generated from the <%@ include %>!

In short, you would do this exactly the same way you would any place in the code.
    <form><input type=button value="Reload Page" onclick="location.reload();"></form>

Or something along those lines.
 
Old July 24th, 2008, 03:56 PM
Authorized User
 
Join Date: Mar 2008
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply!!that works.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Reload page Tooltip not work - Reload xslt file? ismailc XSLT 10 January 22nd, 2008 10:03 AM
Reload page only once. rupen Javascript How-To 4 September 13th, 2007 06:34 AM
I want page to not reload omersharp ASP.NET 2.0 Professional 0 December 13th, 2006 07:06 PM
Reload ASP page once only pablohoney Classic ASP Basics 2 August 10th, 2005 10:19 PM
Reload a page mivan2001 Javascript How-To 1 July 23rd, 2003 03:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.