Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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!

Reply With Quote
  #2 (permalink)  
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.
Reply With Quote
  #3 (permalink)  
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.