Re: how to call a java script function in a child window from the



Well, the problem is...

The htm in the parent window (knows the proper setting for a form) and needs
to issue that setting to a form in the child window, effecting an alteration
of a text value. The child window displays a contact form that is to be
customized by the parent window (the product htm) to represent a request for
a instock notification.

I was trying to from the parent window script>
winname.form-name.form-element-name.value = "backordered";</script>

Word of mouth (unverified source) told me parent to child form alteration is
impossible for security reasons.

So I'm trying to put
<script>
function wateva(){
winname.form-name.form-element-name.value = "backordered";
}
</script>
on the child and then call wateva() from the parent. My best attempt
resulted in a permission denied...

So, What now...?

Thanks,
Dan


"Steve Easton" wrote:

> call the function with an onload event in the opening body tag of the child.
>
> <body onload="setform()">
>
> --
> Steve Easton
> Microsoft MVP FrontPage
> 95isalive
> This site is best viewed............
> ........................with a computer
>
> "Frank H. Shaw" <FrankHShaw@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:601CC9B6-A300-4D58-A00C-97A33CCD045D@xxxxxxxxxxxxxxxx
> > how to call a java script function in a child window from the parent?
> >
> > The function in the child window is setform();
> >
> > Here's the script in the child:
> >
> > <script id="setformscript">
> > function setform(){
> > this.document.forms[0].comments.value="Please BACKORDER for me: U.S. DIVERS
> > COZUMEL SEABREEZE SET";
> > }
> > </script>
> >
> >
> > And the parent:
> >
> > <script language="JavaScript">
> > function newWindow(){
> > win2 = window.open("order.htm","win2");
> > }
> > function test(){
> > if (window.win2)
> > alert('mywindow exists');
> > else
> > alert('mywindow does not exist');
> > }
> > window.win2.document.GetElementById.setformscript = "setform();";
> > </script>
> >
> > The purpose is to set a form element by remote from the parent window. The
> > parameter that needs to be applied is on the child window. I'm wrestling
> > with the text necessary to effect the call, I think...
> >
> > Please let me know if you have any info to offer,
> > thanks,
> > Dan
>
>
>
.



Relevant Pages

  • Re: How to "reload" a child window?
    ... upon certain event occurs at the child window, ... Add event listeners to objects living in the "child window", ... I don't know what you mean be "call a script". ... evangelism: XHTML 1.0 Strict ...
    (comp.lang.javascript)
  • Re: How to "reload" a child window?
    ... upon certain event occurs at the child window, ... Add event listeners to objects living in the "child window", ... I don't know what you mean be "call a script". ...     evangelism: XHTML 1.0 Strict ...
    (comp.lang.javascript)
  • Re: Are VBA userforms always child of Windows desktop?
    ... When I load a modeless userform then in Spy++ the treeview suggests that the form is a child of the desktop. ... Retrieves the parent window. ...
    (microsoft.public.excel.programming)
  • Re: PostBack
    ... > different from the standard implementation. ... > window in javascript. ... >> I want to call dopostback of parent window from child window. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: WM_NOTIFY routing
    ... When a control has an event (such as UI ... parent window by sending a WM_NOTIFY message to it. ... >> WM_NOTIFY is sent from the child window to its parent. ...
    (microsoft.public.vc.mfc.docview)

Loading