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

Navigation Problem, Please Help me

 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a form. on submitting that form, i need to do two types of actions

1. if validation errors occurs i need to redirect to the same form with errors in the same window.

2. if no validation errors then i need to save the form information and close the window.

Can anybody have suggestions?

My question is how to from javascript that no validation errors occured from struts side?

Thanks,
Srilakshmi
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a file called closeWindow.htm with the following tag:


(The above on load should be all one word with no spaces, but for some reason the the program used by javarach wouldn't let me post it as one word)

Follow the normal procedure for a struts action: Create two local forwards, for "success" and "failure". Have "failure" forward back to the original jsp and have your "success" forward to closeWindow.htm.
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Merrill. I will try and let you know how it worked.

Is there anything direct method? without the closeWindow
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks All!!

It worked perfect!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic