Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

set ajax response in parent window field without refreshing the parent window

 
Deeps Mistry
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a popup window with form fields Date and Cash and a Submit button. On click of submit button, i call an ajax function which then passes the control to struts action class. I do db fetching over here and set the ajax response.

I want to set the ajax response in my parent window form field, but it is not happening.

Here is my code:

pop up jsp:


Action Class:


pop up window gets closed, but parent window field does not change, also i am not getting the alerts which i have put inside function processStateChange().
I have to refresh the parent window to show up the value, but i dont want that.

What am i doing wrong?

Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is you child window cached, hence why you are not getting the alert?

eric
 
Deeps Mistry
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:Is you child window cached, hence why you are not getting the alert?

eric


Hey, how can i find out whether my child window is cached or not?

Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make a change to the file and see if you can see it OR just clear your cache

Eric
 
Deeps Mistry
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:Make a change to the file and see if you can see it OR just clear your cache

Eric

Hey, i added a line in the file, but was not able to see it, had to refresh the page manually to see the changes.

How do i clear my cache? in my jsp ?

Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want the pages to be cache, makes it faster for your users. That is why you need to use proper caching headers.

For development, you just need to clear your cache and set your browser up to not cache files.

Eric
 
Deeps Mistry
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:You want the pages to be cache, makes it faster for your users. That is why you need to use proper caching headers.

For development, you just need to clear your cache and set your browser up to not cache files.

Eric

Hey Eric, i am a little confused over here. How do i solve my caching problem?



Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Easiest solution is to do Ctrl-R in Firefox or Ctrl-f5 in IE.

You can look at your browser settings and there is ways to set up your browser to not cache.

You can just clear your cache manually.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic