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

Frame with embedded scripts problem

The problem I am having involves the sequence of events between frames in an
html page.

The Pages:

Page A has an imbedded IFrame which displays Page B.

Page A has a radio button which on the onClick event calls a function which
changes the source of the IFrame which contains Page B, and then passes some
variables to Page B.

The Problem:

Page A changes the content of the IFrame, but it appears that the variables
are passed prior to the new content being loaded.

The Question:

How can I send the data to the newly loaded page?

Current Code:

function CandyBox_ChangeBoxSize(newSize){

var newBox = new Array(newSize);

var newPageName = getBoxASPPageName(newSize);
initializeCandyBox(newSize,newBox);
for(var x=0;x<this.size;x++){

newBox[x] = this.BoxContents[x];

}

this.boxImage = newPageName;

this.BoxContents = newBox;
** this is the problem section**
*the source of the frame is changed *

document.frames[CandyBoxFrameName].location.href=this.boxImage;
* then I wish to pass to the new page a variable

document.frames[CandyBoxFrameName].candyArray=this.BoxContents;

* and finaly call a function from the newly loaded content

document.frames['boxIFrame'].showCandies();

Thank you

Jul 20 '05 #1
1 1595
Have you heard of Hot Potatoes? http://web.uvic.ca/hrd/halfbaked/

Try this code:

http://www.CollegeSherbrooke.qc.ca/l...resent-ex1.htm

John
Paul wrote:
The problem I am having involves the sequence of events between frames in an
html page.

The Pages:

Page A has an imbedded IFrame which displays Page B.

Page A has a radio button which on the onClick event calls a function which
changes the source of the IFrame which contains Page B, and then passes some
variables to Page B.

The Problem:

Page A changes the content of the IFrame, but it appears that the variables
are passed prior to the new content being loaded.

The Question:

How can I send the data to the newly loaded page?

Current Code:

function CandyBox_ChangeBoxSize(newSize){

var newBox = new Array(newSize);

var newPageName = getBoxASPPageName(newSize);

initializeCandyBox(newSize,newBox);

for(var x=0;x<this.size;x++){

newBox[x] = this.BoxContents[x];

}

this.boxImage = newPageName;

this.BoxContents = newBox;

** this is the problem section**

*the source of the frame is changed *

document.frames[CandyBoxFrameName].location.href=this.boxImage;

* then I wish to pass to the new page a variable

document.frames[CandyBoxFrameName].candyArray=this.BoxContents;

* and finaly call a function from the newly loaded content

document.frames['boxIFrame'].showCandies();

Thank you


--
John Taylor-Johnston
-----------------------------------------------------------------------------
"If it's not open-source, it's Murphy's Law."

' ' ' Collège de Sherbrooke:
ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/
- Université de Sherbrooke:
http://compcanlit.ca/
819-569-2064
Jul 20 '05 #2

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

Similar topics

0
by: quadric | last post by:
Hi, I have an application that has an embedded/extended Python interpreter. I need to add database capabilities and for reasons to lengthy to explain in this email, also require an embedded...
1
by: E.J.M. Fakkeldij | last post by:
Hello, I'm rather new in javascript programming. I have a frame: <frameset framespacing="0" border="0" rows="47,*" frameborder="0"> <frame name="banner" scrolling="no" noresize...
24
by: Charles Crume | last post by:
Hello; My "index.htm" page has 3 frames (content, navigation bar, and logo). I set the "SRC" of the "logo" frame to a blank gif image and then want to change it's contents after the other two...
11
by: opt_inf_env | last post by:
Hello everybody, I have created a page consisting of two frames. The second frame is made to display "external" sites (i.e. written not by me, for example www.google.com). But I found that some...
0
by: MLH | last post by:
Can I open an embedded object frame (OLE Class: WordPad) from an OPEN form, launching WordPad to edit the text contents, close WordPad & have the changed docment SHOW UP in the embedded object...
4
by: Mike | last post by:
Hi, I took an interest a few months ago in an anti framebreaker javascript. All my research told me that it was impossible. If a website is loaded into a frame/iframe then if it has frame...
4
by: Matt | last post by:
I am no JavaScript guru so please bear with me and be as detailed as possible with your response. I thank you in advance. I have an ASP page that contains form elements. I also have an inline...
1
by: laredotornado | last post by:
Hi, I have this master frameset page <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE>Account Creation</TITLE> <META HTTP-EQUIV="Content-Type"...
5
by: vishnu | last post by:
Hi there, I am embedding python 2.5 on embedded system running on RTOS where I had strict memory constraints. As python is a huge malloc intensive application, I observed huge memory...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.