Re: access parent window object from inside iframe
From: Michael Harris \(MVP\) ("Michael)
Date: 03/09/04
- Next message: Michael Harris \(MVP\): "Re: Dictionary Object (vbscript for asp)"
- Previous message: Vijay R Gangolli [MSFT]: "RE: access parent window object from inside iframe"
- In reply to: JP: "access parent window object from inside iframe"
- Next in thread: DavidL: "Re: access parent window object from inside iframe"
- Reply: DavidL: "Re: access parent window object from inside iframe"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Mar 2004 19:45:30 -0800
> From PageB.htm how can I write to the Hidden Input's value
> (hMssg.value="something new")?
>
> From within PageB.htm I've tried
> <script type=text/vbscript lang=vbscript>
> window.parent.document.forms("fMssg",0).elements("hMssg").value =
> "GO" </script>
I would try it with only the string index into the forms collection:
window.parent.document.forms("fMssg").elements("hMssg").value = "GO"
The second integer argument, iSubIndex, is (according to the
documentation)...
"...
iSubIndex Optional. Position of an element to retrieve. This parameter is
used when vIndex is a string. The method uses the string to construct a
collection of all elements that have a name or id property equal to the
string, and then retrieves from this collection the element at the position
specified by iSubIndex.
..."
Given that you include .elements("hMssg") to reference the element, I don't
see how you would need iSubIndex.
>
> But I get an error message "Error: Object required
> 'window.parent.document.forms(...)'"
>
> Any help would be appreciated.
> JP
-- Michael Harris Microsoft.MVP.Scripting Seattle WA US
- Next message: Michael Harris \(MVP\): "Re: Dictionary Object (vbscript for asp)"
- Previous message: Vijay R Gangolli [MSFT]: "RE: access parent window object from inside iframe"
- In reply to: JP: "access parent window object from inside iframe"
- Next in thread: DavidL: "Re: access parent window object from inside iframe"
- Reply: DavidL: "Re: access parent window object from inside iframe"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|