• 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

page keep on refreshing

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I have to get the jsp page on onload. For this I have mentioned onload function in my jsp.

below is my jsp file

this all fields I want to show in jsp. on all method...but problem is the page is keep on refreshing even I have given settimeout function in js.

please help :banghead:
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vinya,

Problem is with javascript code remove settimeout function . you are calling the same function onload from settimeout which is goin in infinite loop. after certain time interval it again calls the onload function.
I think problem is with settimeout function.check it by removin and let me know if the problem persist.

Regards
jatan
 
vinayGuddu Pandey
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a situation like on onload of a page I need to display all the data on a jsp.
Earlier that data get populated on onclick on search button.
But now requirement is onload of that particular jsp page all data should come without pressing search button.

I intend to use JavaScript only
Any help would be appreciated
 
vinayGuddu Pandey
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

jatan bhavsar wrote:Hi Vinya,

Problem is with javascript code remove settimeout function . you are calling the same function onload from settimeout which is goin in infinite loop. after certain time interval it again calls the onload function.
I think problem is with settimeout function.check it by removin and let me know if the problem persist.

Regards
jatan




thanks for the reply but while removing this, that related data page is not coming.
 
jatan bhavsar
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vinay,

Removing settimeout function will definately submit the form but can you explain which page dosent come? try to work javascript definately it will solve your problem.


Second things

all data should come without pressing search button


If all data should come then why dont you fetch the data before action call and then display it. you can show hide the controls on jsp page.

Regards
jatan


 
vinayGuddu Pandey
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jatan,

how is this JavaScript for the same :--


and I will this method in jsp below </head> what you say

like
 
vinayGuddu Pandey
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vinayGuddu Pandey wrote:

I have to get the jsp page on onload. For this I have mentioned onload function in my jsp.

below is my jsp file

this all fields I want to show in jsp. on all method...but problem is the page is keep on refreshing even I have given settimeout function in js.

please help :banghead:




what I did now is I divide the above(main) jsp in 2 parts , in name of mera.jsp and include the child jsp with main one
as

but here I am getting one error as:--
Multiple annotations found at this line:
- Syntax error, insert "}" to complete ClassBody
- Syntax error on token "}", delete this token
- Syntax error, insert "}" to complete Block

the content in mera.jsp is

in this jsp it is not showing any error but the main jsp is getting refresh again and again in output

the js I am using for this is:--


and in mera.jsp I am calling this function(please refer with an above mera.jsp )
but not getting the proper output
please suggest :banghead:
 
vinayGuddu Pandey
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At console while stopping the refreshment of page I ma getting this error


is this related with the tag closing???
 
jatan bhavsar
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vinay,

Have you tried to search what is the meaning of this Error?


Everyone will give you the ideas here you need to code and implement it.

Regards
jatan
reply
    Bookmark Topic Watch Topic
  • New Topic