Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

use body onload refresh functionality only once

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

I have a jsp page which generates a image dynamically depending on the parameters passed to it.

There is a problem on to the page . That is

When the page is called for the first time an empty jsp page is displayed so we manually used to refresh the page .

so instead of manually refreshing the page i added body onload refresh functionality .

This works fine (Instead of manually refreshing )


Please tell me how can i use conditional refreshing .

Means i want to use body onload refresh functionality only once that is for first time and not every time the jsp page is refreshed .

Please tell me how to do this




 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this possible ??

My actual question is :

Is there a way to determine if a page was refreshed? I have a function that
is called when the page loads, but when the user refreshes the page it calls
the function again. Is there a way to call the function only when the page
initially loads? I don't want it to load when the user clicks the refresh
button.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i found the solution . If somebody has similar requirements . This is the code .
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would figure out why it is empty the first time and avoid a refresh.

Eric
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean to say that this code has bug and such kind of behaviour is not possible .
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric means that you should try to redesign your application such that there's no need to show an empty page and then refresh it. Actually even I'm not sure why that's required, I've never came across a situation where I had to show an empty page and refresh it...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic