473,396 Members | 1,780 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,396 software developers and data experts.

Calling a Function From Another Page

I have an iframe inside of a parent page. How do I call the onChange
function in the parent page from the ddlProfileNames dropdown in the
iframe page?
Thanks.

code in parent page:

<SCRIPT>
function ordering(sorder)
{
// first, hide all the divs
for ( var d = 1; d <= 16; ++d )
document.getElementById("DIV"+d).style.display = "none";

// then, find where the first DIV is going to go:
var node = document.getElementById("HERE");
var x = 0;
var y = 0;
while ( node != null )
{
x += node.offsetLeft;
y += node.offsetTop;
node = node.offsetParent;
}
var ord = sorder.split(",");
for ( var o = 0; o < ord.length; ++o )
{
var dv = document.getElementById(ord[o]);
dv.style.left = x;
dv.style.top = y;
dv.style.display = "block";
y += dv.scrollHeight + 8; // 8 to account for 4px border
}
}

// start things off:
ordering("Div1,Div2,Div3,Div4,Div5,Div6,Div7,Div8, Div9,Div10,Div11,Div12,Div13,Div14,Div15,Div16");
</SCRIPT>


code in iframe:

<FORM name="frmProfileNames">
<SELECT class="smalltext" id="ddlProfileNames"
onChange="ordering(this.options[this.selectedIndex].value);">
<option value="value1">value1</option>
</SELECT>
</FORM>

Feb 17 '06 #1
1 4721
parent.FunctionName();

Feb 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bob Murdoch | last post by:
I have an ASP application that calls a COM function to create a custom report as an Excel file. This works in a synchronous fashion, as long as the report does not take too long to create. If...
18
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes...
17
by: Bill Grigg | last post by:
I have been successfully calling DLL's using VC++ 6.0 and also using VC++7.1 (.NET). I only mention this because I have never felt comfortable with the process, but nonetheless it did work....
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
2
by: Harold | last post by:
I have page A with form field and a button and when button is clicked it opens page B in another window. Page B has a treeview control and that is all. When something is selected I want the page...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
2
by: Gunawan | last post by:
I have define event handler call btnFind_Click protected void btnFind_Click(object sender, EventArgs e) { .... }
2
by: eholz1 | last post by:
Hello PHP Group, I have a php page that calls another php page to load a image from a database (mysql) in to the calling page. It works like this: first_view.php has <img src="image.php?img=5"...
8
eragon
by: eragon | last post by:
-------- This question has not been fully answered. Please help me! -------- Hello. I have a php login page that calls a function to determine if the username and password is correct. it is...
8
by: Yansky | last post by:
If I have the following function: function foo(){ alert('hi'); } and I don't need to pass any parameters to it, is calling it this way:
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.