/    Sign up×
Community /Pin to ProfileBookmark

AJAX page refresh

I need some help with this one:

I’ve developed a photo gallery for users to create their own galleries and upload photos. A user will view a list of galleries (and create and delete them) from one page. From this page the user can click a RADIO button to get a new JSP presented that shows thumbnails of all pictures in that gallery. If the user happens to be the owner of that gallery he/she can delete individual pictures and change picture titles via AJAX. Under the covers this all works great. When the user clicks OK after a picture delete or a title change the AJAX will contact my servlet and the servlet does it’s thing correctly but what I can’t get to work is a page refresh.

Since I use AJAX to contact a servlet and that servlet removes the pictures and whatnot the HTML in the browser needs to be resent so that the changes appear to the user. The problem is when I do a redirect in the servlet the browser must cache the HTML and I can’t get an updated page without hitting the refresh button…which is not acceptable…

Any help would be appreciated.

Oh, I apologize for the ‘wordy’ nature of this thread…I type fast so I am usually guilty of providing too much useless information…

?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @code_e spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...