HTML : How to refresh the whole page from the frame, working on frames |
HTML : How to refresh the whole page from the frame, working on frames |
scriptscript |
Dec 6 2013, 10:28 AM
Post
#1
|
Group: Members Posts: 2 Joined: 28-May 13 Member No.: 19,214 |
I have a webpage containing 2 frames(say frame1 and frame2).
Code: CODE <!DOCTYPE html> <html> <frameset cols="25%,*,25%"> <frame src="frame_a.htm"> <frame src="frame_b.htm"> </frameset> </html> and a.htm contains Code: CODE <html> <body> <a href="http://www.google.com">Link text A</a> </body> </html> and b.htm contains Code: CODE <html> <body> <a href="http://www.google.com">Link text B</a> </body> </html> My requirement is : If I press on Link text A then that particular href has to be opened freshly in the whole same page but not in that particular frame. If I use hte above code.. If I click on Link text A then href page is opened in that particular frame only. If I click on the link on either of the frame.. then the link has to be opened in the whole same page. Could anyone please help me here... Regards, J |
pandy |
Dec 6 2013, 11:32 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
You need to use target. See http://htmlhelp.com/reference/html40/values.html#frametarget .
|
CharlesEF |
Dec 6 2013, 11:40 AM
Post
#3
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
First, your frames should be named so you know which is which. Then in the href tag you use the target attribute to specify which frame to open the web page in. Example, lets assume frame_a.htm is the menu frame and frame_b.htm is the content frame.
<!DOCTYPE html> <html> <frameset cols="25%,*,25%"> <frame src="frame_a.htm" name="menu"> <frame src="frame_b.htm" name="content"> </frameset> </html> Then all the href's in your menu frame should have href's like this: <a href="http://www.google.com" target="content">Link text B</a> Hope this help, CharlesEF |
pandy |
Dec 6 2013, 12:54 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
It sounds more like he want to new page to open in the full unframed window, me thinks.
|
CharlesEF |
Dec 6 2013, 12:57 PM
Post
#5
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
You may be right, we will have to wait until we hear back from the OP.
|
Frederiek |
Dec 7 2013, 04:18 AM
Post
#6
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Pandy is right. The OP clearly mentioned that.
But then I wonder why using frames in the first place. They are obsolete in HTML5, hence the error reported by the W3C validator: QUOTE The frameset element is obsolete. Use the iframe element and CSS instead, or use server-side includes. |
Lo-Fi Version | Time is now: 24th April 2024 - 04:30 AM |