• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
couldn't you just use
document.reload();
???/
 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
There's a hole in the bucket, dear Liza, dear Liza, a hole in the bucket, dear liza, a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic