473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Load on Parent Frame


Hi,

I have a frame set with 3 windows. (top,left and center). My main
webpages are loaded in the center frame. What i want is really quite
simple (But no idea how to do ??).

When a certain page is loaded to the center frame, instead i want that
page to replace the whole frameset and get loaded fully in the window.
Can i use an onload to call a javascript to say that this page needs to
be loaded in the parent window.

Thanks for the trouble
Rose

Jul 23 '05 #1
4 4763
Rose Girl wrote:
When a certain page is loaded to the center frame, instead i want that
page to replace the whole frameset and get loaded fully in the window.
Can i use an onload to call a javascript to say that this page needs to
be loaded in the parent window.
onload = function() {
if (top.location != self.location)
top.location = self.location;
};

Thanks for the trouble


Want some more? ;-)

Daniel
Jul 23 '05 #2
Thanks. It worked

Jul 23 '05 #3
Hi, can you figure out this problem for me too
(It might be a struts or jsp problem)

I need some help on this. My application is based on Struts.
I have a jsp page. I have a button (normal html button)

<input name="button" type="button" value="Save"
onclick="javascript:validate();" />

The onclick event calls a javascript function. If there are errors the
script returns false; I submit the page using like this.

document.forms['forgotPasswordForm'].submit();

The problem is when the focus is on a text field, and when i press the
enter key, the page gets submits.
(There are no coding for keyboard entries)

I want to stop this as non validated data is passed to the struts
action classes.

What may be the reason. Does it has anything to do with Struts.

Thanks for your time
Rose Girl

Jul 23 '05 #4
Rose Girl wrote:
<input name="button" type="button" value="Save"
onclick="javascript:validate();" />
Content of the onclick attribut is allready defined as script. So using
the pseudo-protokoll "javascript:" isn't necessary (or even wrong).

onclick="validate()"

The problem is when the focus is on a text field, and when i press the
enter key, the page gets submits.
(There are no coding for keyboard entries)

I want to stop this as non validated data is passed to the struts
action classes.


You may use onsubmit
http://msdn.microsoft.com/workshop/a...s/onsubmit.asp

Daniel
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: vk | last post by:
I have a situation where I have 3 frames. The first frame is dynamic and contains javascript variables for use throughout the frameset page and the other frames. Everything works fine...except...
1
by: Stuart Wexler | last post by:
Let's say I have a frameset page and I want to preselect an option in a select box from the parent frame. So the parent frame would programmatically change the select box in the child frame. ...
1
by: jake_allen_no_spam | last post by:
Hi All, I am working on a web page with frames, "menuFrame" on the left and "textFrame" on the right. When I load the menu on the left I would like to load the text with a default page on the...
6
by: adnanx82 | last post by:
Hi, I was wondering if anyone knew how to perform the following 2 tasks in Javascript: 1) distinguish between frames and iframes (during an onload event for example) 2) figure out whether a...
2
by: Amadelle | last post by:
Hi all, I have multiple frames which I would like to get the query string from within one of the subframes. But when I do HttpContext.Current.Request.QueryString or Request.QueryString ...
16
by: janders | last post by:
Hey all, I've got a document that I want to ensure always get loaded into the top level document and not into a frame or iframe. I've got it figured out how to detect if the document is loaded...
4
by: many_years_after | last post by:
Hi, pythoners: My wxPython program includes a panel whose parent is a frame. The panel has a button. When I click the button , I want to let the frame destroy. How to implement it? Could the...
11
by: tdmailbox | last post by:
I have a website that I subscribe to that allows me to track tasks. I have an extra computer with a big monitor that i want to always display the task list. the problem is after so many hours I...
1
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.