Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

switch link from two url

 
anna yin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Can I have a html with frame ( when do action in the main frame, I also need the top frame send request to another url ( may be different web server) for reload the top frame?
Why I need this, I have two web server to switch the link, and I need keep the session active when I am on the other webserver link and do not want when I come back, time out...

 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anna
In the first frame have an onsubmit java script function that just calls submit on the form in the other frame.
Something like this in the frame that gets submitted should do it for you. This would go in the onsubmit() of the frame that is submitted, it will call the submit method of the other frame.
parent.frameName.document.formName.submit();
frameName si the name of the frame that holds the form you want submitted.
formName is the name of the form you want submitted.
hope that helps
Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic