View Full Version : targets a frame width out links

05-03-2004, 06:24 PM
Hello, I want to target a iframe with a button event, like
onClick = ‘open this page in that iframe’

href element has the target property, but there isn’t any of this in the button element.


05-03-2004, 06:32 PM

more or less

05-04-2004, 06:34 AM

onclick="window.open('urlOfPage', 'nameOfTargetIframe')"

05-04-2004, 08:34 AM
The <form> element has a target attribute - if you used that with a submit button you could do it without javsacript.

05-04-2004, 08:48 AM
atferraz just wanted to open a particular page in an iframe. So, submitting the form with a target is not a better approach especially if the main page is also being submitted normally (without target).

05-04-2004, 10:59 PM
I’m sorry. Forgot to mention that the target iframe is on a page.

My default page has a iframe with id=name = “main”.
I loaded a page in that main iframe.
That page has its own iframe with id=name=”temp”. It also has a button that opens a modal Dialog window, where some data is selected.
When that modal dialog gets closed, return an array to its handler with the selected data witch I want to send to the “temp” iframe. So, at this point the data is on client side and I want to send it with url to the server, because the action form method didn’t work at all.

I can target the main iframe, but not the temp one.

onclick="window.open('urlOfPage', 'nameOfTargetIframe')" opens a new window.
onclick="document.frames['framename'].location=page;" only sees the main


05-05-2004, 03:10 AM
Did you change 'nameOfTargetIframe' to 'temp'?