aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Frames Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Frames" Watch "Frames" New topic
Author

Frames

Nimmy
Greenhorn

Joined: Apr 12, 2005
Posts: 13
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

Joined: Apr 19, 2005
Posts: 70
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


Satish SN<br />SCJP 1.4 & SCWCD 1.4
Nimmy
Greenhorn

Joined: Apr 12, 2005
Posts: 13
<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

Joined: Apr 19, 2005
Posts: 70
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

Joined: Apr 12, 2005
Posts: 13
Hi kumar satish
It is working now. Thank you



Kathryn
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

"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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Frames
 
Similar Threads
refresh problem using Frames in struts
tomcat localhost:8080 is not working but JSF working fine
Combining two frames into one page
disable frame when working with other frames
frames help