• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 491
  • Last Modified:

Pass Variable from IFrame to Another Frame

Hello:

I have an IFrame inside another frame. On the IFrame Page I have a drop box. When I select a value from the drop down box I want it to pas the value to the frame named contents.

<form target="contents" method="POST" action="Data.asp">
<select name="AnyYear" size="2" style="font-family: Arial; font-size: 10pt" onchange="this.form.action='';this.form.submit();">
<%
Do While Not rs.EOF
%>
<option value="<%=rs("AYear")%>"><%=rs("AYear")%></option>
<%
rs.MoveNext
Loop
%>
</select>
</form>
0
RecipeDan
Asked:
RecipeDan
  • 3
  • 3
1 Solution
 
ZvonkoSystems architectCommented:
"I want it to pas the value to the frame named contents."
Does you ask how to set some field in the form located in the "contents" frame page?

That would be like this:
<select name="AnyYear" size="2" onchange="parent.frames.contents.document.yourFormName.yourFieldName.value=this.value" >


0
 
RecipeDanAuthor Commented:
Hello:

I am gettin this error message:

parent.frames.contents.document is null or not an object

<select name="AnyYear" size="2" onchange="parent.frames.contents.document.theForm.AnyYear.value=this.value" >


0
 
ZvonkoSystems architectCommented:
What browser do you use for testing?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
RecipeDanAuthor Commented:
Internet Explorer 6.0
0
 
ZvonkoSystems architectCommented:
Then it has to work.
Show me please your frameset definition.
Also check wether this works:

<select name="AnyYear" size="2" onchange="parent.top.frames.contents.document.yourFormName.yourFieldName.value=this.value" >

Especially look for exact target frame naming. It has to be: contents
Exact same name, all lowercase characters.


0
 
RecipeDanAuthor Commented:
Hi Zvonko:

I thought I closed this....any way it works.

Thanks for your help

Dan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now