• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validating with struts giving javascript error

tukai chakraborty
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have 2 jsp pages.
When i click a hyperlink,it calls 1st jsp which fetched values from session bean and passes the values to another jsp which basically displays the values along with 2 text boxes.
now when i m validating using struts i m getting a javascript error "parent.bottom.document is null or not an object".
in my struts-config.xml i have mapped my action class with the 2nd jsp.
in case of any errors i m returning to the 1st jsp ,which itself forwards to 2nd jsp.
can anyone explain y this error is coming?
in my applicationresources.properties i hv written
errors.header=<script>var riter=parent.bottom.document;parent.document.open();
riter.write('<html><body>'unable to process errors');
riter.write('</body></html> ;</script>
errors.goodsreceipt.shipname=riter.writer('<li>ship name cannot be blank</li>');
this error is not displayed at the bottom of the page.but u can the value when u VIEW SOURCE the jsp page.
instead it displays the javascript error.
hope i m able to clarify my doubts.
thanx in advance for urs solution
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic