473,394 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Passing variable to iframe

I am having trouble exercising this function, and wondered whether anyone would be kind enough to help.


I have a php/mysql output that i would like to pass to an iframe in order for a form to work better.

This is my code;

Expand|Select|Wrap|Line Numbers
  1. function countyChanged(name)
  2. {
  3. if(frames['editregion'].document.r1.r2.value)
  4.   {frames['editregion'].document.r1.r2.value = name;}
  5.     document.getElementById('listingsearch'+'r1').submit();
  6. }
The
Expand|Select|Wrap|Line Numbers
  1. ('listingsearch'+'r1' )
is my problem, as I can get the variable to pass using a simple form and submit button, but it doesn't work using the onChange command, so I have tried this so as to get the variable passed and the iframe page to refresh in order to activate the php function in the iframe.

Sorry if this sounds confusing.

Can anyone help?
thanks
Feb 11 '07 #1
2 2115
I managed to fix this problem by changing the onchange command to include value in its operator.

So, I got the variable passed to the iframe, and now the function can display its new selection. Now, I need to pass the new variable back to the parent and to another iframe, where it can perform the same thing.

Can anyone offer an idea?

thanks
Feb 11 '07 #2
acoder
16,027 Expert Mod 8TB
See this page for accessing iframes.
Feb 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: sentinel | last post by:
Hi All, Advice gratefully needed....... I am trying to present the same content on multiple sites, but allowing the style and formatting to be changed via an external CSS style sheet. The...
4
by: John MacIntyre | last post by:
Hi, I have a page with a series of child pages loaded into an iframe. When I move from page to page, I store an object containing the child's control data in a variable on the main page, then...
26
by: Dave Hammond | last post by:
In document "A.html" I have defined a function and within the document body have included an IFRAME element who's source is document "B.html". In document "B.html" I am trying to call the function...
1
by: Ryan Ternier | last post by:
I have an ASP page that needs to pass a string object full of HTML to a .NET iframe within that page. The String might be over 5000 characters of HTML. Reason we're doing this is to...
6
by: paul | last post by:
HI! How do we send a variable from an Iframe page back to its parent? I have a script that calculates the iframe's window size but I need to know how to send that value back to its parent so I...
4
by: solomondg1 | last post by:
I want to send a variable from an iframe within a parent page to a swf on the parent page. The following code works: window.document.myflash.SetVariable('variable','value') (my flash is the name...
8
by: docebrown | last post by:
Yes In know this has been covered in other ways, but after searching the forum I did not find a specific solution that fit my application. Maybe I overlooked something, so I'm sory if I did. ...
4
by: moondaddy | last post by:
I have a htm page where I need to pass some data to an aspx page as a means of sending data to the database. I don't need to see the aspx page so I was going to put it in a hidden iframe. This...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.