• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get a variable from jsp inside iframe to its parent jsp

 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i have a iframe inside a parent jsp, 'm using struts2 how to access the child jsp's variable in parent jsp?

for ex: if i set a variable

<s:set name="X" value="Y"/>

how do i retrieve the value X in parent jsp?

Thanks in advance.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frames are a client side phenomenon.
To the server, they're different webpages generated from different requests.
You'll either need to store the value in a session scoped variable or use client side coding to pass the value between frames.

If you want the take the second route, let us know and we'll move this thread to our HTML/Javascript forum for you.
 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yup... i got the point ben thanks a lot for the fast repy...


javaranch rocks !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic