• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Frames

 
Nimmy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one page which contains two frames. There is a link in first frame and while cliking that link I want to load another page in the same window.
Can we do that while using frames.


Thanks in advance

Kathryn
 
Satish SN
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Kathryn ,

using javascript u can do that example

if ur using a form object then u can set the properties

.target = 'frame name' to load the response to the following frame

if u could post the code then i could give u good solution
 
Nimmy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<HTML>
<HEAD>
<TITLE>Masters</TITLE>
</HEAD>

<frameset rows="12%,88%">
<frame bordercolor="#000000" noresize="noresize" src="header.jsp" scrolling="no">
<frame bordercolor="#000000" noresize="noresize" src="body.jsp" scrolling="no">
</frameset>

</HTML>


This is my first jsp file with two frames.


header.jsp
<HTML>
<HEAD>
<TITLE>Masters</TITLE>
</HEAD>

<a href="newPage.jsp"> Next Page</a>

</HTML>


Now if I click on Next Page it is displaying in the same frame. I want this to get displayed in the whole window not in the second frame.
 
Satish SN
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u change the anchor to some thing like this

<a href="newPage.jsp"> Next Page</a>

<a href="newPage.jsp" target="_parent"> Next Page</a>
 
Nimmy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kumar satish
It is working now. Thank you



Kathryn
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"nKathryn",

You have already recevied two warnings to adjust your display name to conform to JavaRanch standards in this topic.

This is not optional. Accounts with invalid display names are removed.

Read the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

bear
Forum bartender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic