aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How do i RELOAD a page within itself.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How do i RELOAD a page within itself...." Watch "How do i RELOAD a page within itself...." New topic
Author

How do i RELOAD a page within itself....

Gabriel Fox
Ranch Hand

Joined: Oct 17, 2001
Posts: 170
I am writing a JSP(Java server page), i need to regenerate a dropdown list using a block of codes which is on top of the page,after carrying out some functions at the bottom of the same page.
To avoid the later action from taking effect after the next submit.
I need to RELOAD the page JUST after executing this action.
Please , how do i reload a page within itself.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Gabriel
If it is javascript that is creating the list in the dropdown then after you create the new options in the list just call
history.go(0), this reloads the current page. If you're using frames you'l have to do something like this:
parent.frame.history.go(0)
hope that helps
Dave


Dave
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
couldn't you just use
document.reload();
???/
Gabriel Fox
Ranch Hand

Joined: Oct 17, 2001
Posts: 170
Thanks Dave and Al ian for your prompt reply.The Select-option is NOT generated using JavaScript,but from an initially populated
Hashtable(a Java class which stores some key=value pair using unique keys).Please, i am giving a more detailed explanation of the problem.If U can help please....

I am writing a JSP which removes items from a top LIST box to
dynamically generate a Table below on the same page.
And removing rows from the table to add back to the Top List.
This is working well, EXCEPT that on removing one or more rows
the items contained in the removed rows are not added to the top
List immediately.Since the code generating the List
(dynamically from a Query) as been by-passed before removing the
rows. So, the items removed are added on display after the next
request(submission of the form).

Please, how can i RELOAD the page within itself to go back to
the Logic (scriptlet block)on top which generate the list
before any next request.
Note: the Top list is generated using a HashTable (in java.util package) and the Table with each row (containing an item removed from the Top List(i.e. select) and a checkbox + textfield) is also generated by a second Hashtable.
[This message has been edited by Gabriel Fox (edited November 27, 2001).]
Gabriel Fox
Ranch Hand

Joined: Oct 17, 2001
Posts: 170

I had to re-arrange my business logic within the JSP:
Processing of Top and bottom Hashtable came before display
of List .Then the table display was at the tail end.Cheers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do i RELOAD a page within itself....