[thelist] JAVASCRIPT and IFRAMEs

Tom Dell'Aringa pixelmech at yahoo.com
Mon Jul 29 15:41:01 CDT 2002


Phil, have you tried using the frames array?

i.e.: self.opener.frames[0].etc..

Iframe is just a frame and ref'd the same way. I'm not sure this will
work since the document holding the iframe may not actually be the
opener (thus the error.)

Usually these types of errors are always object ref. errors.
Depending on your target browser, your ref. may have to change. IE4+
and NN6+ should recognize the frames array.

Let us know if that works...

Tom
--- Phil Essing <essing at vdl2.com> wrote:
> Please ignore my last message, it included an error.
>
> I have a real doozy of a problem, that I'm hoping one of you
> Javascript
> gurus, out there, will be able to help me with.  Ok, on my main
> HTML
> page I have an IFRAME that loads another HTML document.  Within
> this
> second document (contained in the IFRAME) I have an SSI which
> contains a
> form.  In this form there is a link which opens a popup calendar,
> with
> each date hyperlinked.  When the user clicks a date, the value
> needs to
> be passed to the appropriate form fields.
>
> The problem:
>
> Trying to pass the values back to the form will not work using <a
> href="#"
> onClick="self.opener.document.formname.fieldname.value">day</a>.
> The
> code works outside of the IFRAME, because self.opener is apparent.
> Within the IFRAME, however, I get the following error:
> "self.opener.document.formname.fieldname.value" is not an object.
>
> So, my question is: how do I pass this value back to a form
> contained
> within an IFRAME document?
>
> -phil
>
>
------------------------------------------------------------------------
> -----------------
> Phil Essing
> User Interface Specialist
> phil at sector404.org
>
> VDL2 inc.
> 700, rue Wellington  .  Montreal, QC  .  H3C 1T4
> tel.: 514.599.5712  .  fax: 514.599.5724
>
------------------------------------------------------------------------
> -----------------
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



More information about the thelist mailing list