By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Interframe communication

P: n/a
Hi,

Is it possible to access an array that is in another frame?

Thanks
Nov 26 '07 #1
Share this Question
Share on Google+
20 Replies


P: n/a
Wael wrote:
Is it possible to access an array that is in another frame?
Yes it is possible.
Nov 26 '07 #2

P: n/a
Stevo said the following on 11/26/2007 12:42 AM:
Wael wrote:
>Is it possible to access an array that is in another frame?

Yes it is possible.
Damn, you beat me to it.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 26 '07 #3

P: n/a
Randy Webb wrote:
Stevo said the following on 11/26/2007 12:42 AM:
>Wael wrote:
>>Is it possible to access an array that is in another frame?
Yes it is possible.
Damn, you beat me to it.
Seriously though Mr Wael, here's how you do it.

Go to google.com and type in the following (adding only the word
JavaScript to your original question):

Is it possible to access an array that is in another frame javascript

and choose from the numerous examples of how to access variables in one
frame from another.

This Google thing might turn out to be useful, is it too late to invest?
Nov 26 '07 #4

P: n/a
Stevo said the following on 11/26/2007 3:40 AM:
Randy Webb wrote:
>Stevo said the following on 11/26/2007 12:42 AM:
>>Wael wrote:
Is it possible to access an array that is in another frame?
Yes it is possible.
Damn, you beat me to it.

Seriously though Mr Wael, here's how you do it.

Go to google.com and type in the following (adding only the word
JavaScript to your original question):
Add the word "script" or "javascript" doesn't make a lot of difference
in a Google Search.
Is it possible to access an array that is in another frame javascript

and choose from the numerous examples of how to access variables in one
frame from another.

This Google thing might turn out to be useful, is it too late to invest?
If they could figure out the difference between content and source code,
and then figure out how to count there own statistics properly :)

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 26 '07 #5

P: n/a
On Nov 26, 4:33 am, Randy Webb <HikksNotAtH...@aol.comwrote:
Stevo said the following on 11/26/2007 3:40 AM:
Randy Webb wrote:
Stevo said the following on 11/26/2007 12:42 AM:
Wael wrote:
Is it possible to access an array that is in another frame?
Yes it is possible.
Damn, you beat me to it.
Thanks. I'll try that. I guess when i asked if it was possible, i also
implied the "how" :)))
Nov 27 '07 #6

P: n/a
Wael said the following on 11/26/2007 10:21 PM:
On Nov 26, 4:33 am, Randy Webb <HikksNotAtH...@aol.comwrote:
>Stevo said the following on 11/26/2007 3:40 AM:
>>Randy Webb wrote:
Stevo said the following on 11/26/2007 12:42 AM:
Wael wrote:
>Is it possible to access an array that is in another frame?
Yes it is possible.
Damn, you beat me to it.
Thanks. I'll try that. I guess when i asked if it was possible, i also
implied the "how" :)))
But, but, that isn't what you asked :)

How do I communicate between frames in a browser?

Imagine that, it is a question in this groups FAQ. Number 4.8 to be
specific.

It even answers your specific question about variables in another frame.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 27 '07 #7

P: n/a
But, but, that isn't what you asked :)
>
How do I communicate between frames in a browser?

Imagine that, it is a question in this groups FAQ. Number 4.8 to be
specific.

It even answers your specific question about variables in another frame.
To me this is communication between two frames :) Otherwise, how would
you interpret this? May be there is a new trick to learn and i asked
it by mistake.

Anyway, here is what i've been trying to do for two days now

var reqFrame = window.top.frames(3).frameElement;
alert(reqFrame.src);
or reqFrame.src = "http://www.yahoo.com"

I haven't been able to do anything more useful with this. i can access
objects that either have no value or have values that i am not really
interested in.

I am using google groups, so i don't know how to go to FAQ 4.8

Thanks for having the potential to help ;))
Nov 27 '07 #8

P: n/a
Wael wrote:
var reqFrame = window.top.frames(3).frameElement;
frames isn't a function, so you shouldn't be trying to "call" it with
the parameter value 3. Switch out that (3) and replace it with [3] and
you'll get a bit further.
Nov 27 '07 #9

P: n/a
Telling us "my code doesn't work" is tantamount to me saying "My stereo
doesn't play music, why?" without showing you the stereo or even
explaining that I unplugged the thing.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/- Hide quoted text -

- Show quoted text -
As you can see, the complexity of my page dictates the use of all
those frames.
http://www3.sympatico.ca/sedky69/
Nov 30 '07 #10

P: n/a
Sorry i forgot to mention that the problem are on those two pages
br_frame.html
middle_right_frame.html

what i am trying to do is change an image on the middle_.. html page,
but for now i can't access anything on that page. Just the frame that
contains it.
Nov 30 '07 #11

P: n/a
work your way thru text as such...

The purpose of this library is to allow IFRAME objects to be dragged
around the screen in the same way that popup windows or draggable DIV
tags are often used. Since IFRAME objects always cover form objects,
this makes an ideal solution for a simulated "popup window" on a page
with form objects.

It requires almost no code to function, making it the easiest script to
get up and running quickly!

dragiframe.js


Chace [‡] Daggers

*** Sent via Developersdex http://www.developersdex.com ***
Nov 30 '07 #12

P: n/a
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:24 AM:
>Randy Webb wrote:
>>Thomas 'PointedEars' Lahn said the following on 11/30/2007 11:47 AM:
Wael wrote:
and to make the page look a lively a bit, i was going to have an icon
displayed in the frame that i cannot access.
You don't need frames for that. Probably you don't even need client-side
scripting; :hover could suffice.
http://www.w3.org/TR/CSS21/
Yeah, we all know how well supported :hover is on images in the most
predominant browser on the web. Makes it pretty useless.
You are missing the fact that these are graphical links.

Has nothing to do with whether it is a "graphical link" or not. Telling
someone to use something that is not supports in the most predominant
browser on the web is a wasted effort. It is almost as bad as telling
someone to use an IE-only feature.
IE supports the :hover pseudo-class for `a' elements, too.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Dec 1 '07 #13

P: n/a
Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:43 AM:
Randy Webb wrote:
>Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:24 AM:
>>Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 11/30/2007 11:47 AM:
Wael wrote:
>and to make the page look a lively a bit, i was going to have an icon
>displayed in the frame that i cannot access.
You don't need frames for that. Probably you don't even need client-side
scripting; :hover could suffice.
http://www.w3.org/TR/CSS21/
Yeah, we all know how well supported :hover is on images in the most
predominant browser on the web. Makes it pretty useless.
You are missing the fact that these are graphical links.
Has nothing to do with whether it is a "graphical link" or not. Telling
someone to use something that is not supports in the most predominant
browser on the web is a wasted effort. It is almost as bad as telling
someone to use an IE-only feature.

IE supports the :hover pseudo-class for `a' elements, too.
I will refrain from telling you "No shit, Sherlock" and simply tell you
that a :hover rollovers won't work in IE. The only thing you can do is
style the link itself, not change an image inside the link.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 1 '07 #14

P: n/a
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:43 AM:
>Randy Webb wrote:
>>Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:24 AM:
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 11/30/2007 11:47
AM:
>Wael wrote:
>>and to make the page look a lively a bit, i was going to have
>> an icon displayed in the frame that i cannot access.
>You don't need frames for that. Probably you don't even need
>client-side scripting; :hover could suffice.
>http://www.w3.org/TR/CSS21/
Yeah, we all know how well supported :hover is on images in the
most predominant browser on the web. Makes it pretty useless.
You are missing the fact that these are graphical links.
Has nothing to do with whether it is a "graphical link" or not.
Telling someone to use something that is not supports in the most
predominant browser on the web is a wasted effort. It is almost as
bad as telling someone to use an IE-only feature.
IE supports the :hover pseudo-class for `a' elements, too.

I will refrain from telling you "No shit, Sherlock"
That is wise.
and simply tell you that a :hover rollovers won't work in IE.
You are wrong, they do.
The only thing you can do is style the link itself, not change an image
inside the link.
Exactly, and that behavior is not restricted to IE. Therefore, you should
try http://PointedEars.de/scripts/test/d...Me/hoverMe-css

However, since image display support is separate from CSS support, and
prefecthing does not need to be available, I prefer to use the scripting
approach.

BTW, IE 7 does support :hover for other elements than A. I have tested it
successfully for DIV, P, IMG, DT, and DD elements.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Dec 1 '07 #15

P: n/a
Thomas 'PointedEars' Lahn said the following on 12/1/2007 8:26 AM:
Randy Webb wrote:
>Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:43 AM:
>>Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:24 AM:
Randy Webb wrote:
>Thomas 'PointedEars' Lahn said the following on 11/30/2007 11:47
>AM:
>>Wael wrote:
>>>and to make the page look a lively a bit, i was going to have
>>> an icon displayed in the frame that i cannot access.
>>You don't need frames for that. Probably you don't even need
>>client-side scripting; :hover could suffice.
>>http://www.w3.org/TR/CSS21/
>Yeah, we all know how well supported :hover is on images in the
>most predominant browser on the web. Makes it pretty useless.
You are missing the fact that these are graphical links.
Has nothing to do with whether it is a "graphical link" or not.
Telling someone to use something that is not supports in the most
predominant browser on the web is a wasted effort. It is almost as
bad as telling someone to use an IE-only feature.
IE supports the :hover pseudo-class for `a' elements, too.
I will refrain from telling you "No shit, Sherlock"

That is wise.
Only because I don't want to read your whining.
>and simply tell you that a :hover rollovers won't work in IE.

You are wrong, they do.
>The only thing you can do is style the link itself, not change an image
inside the link.

Exactly, and that behavior is not restricted to IE. Therefore, you should
try http://PointedEars.de/scripts/test/d...Me/hoverMe-css
No thanks, I prefer solid solutions.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 1 '07 #16

P: n/a
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 12/1/2007 8:26 AM:
>Randy Webb wrote:
>>Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:43 AM:
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 12/1/2007 5:24 AM:
>Randy Webb wrote:
>>Thomas 'PointedEars' Lahn said the following on 11/30/2007 11:47
>>AM:
>>>Wael wrote:
>>>>and to make the page look a lively a bit, i was going to have
>>>> an icon displayed in the frame that i cannot access.
>>>You don't need frames for that. Probably you don't even need
>>>client-side scripting; :hover could suffice.
>>>http://www.w3.org/TR/CSS21/
>>Yeah, we all know how well supported :hover is on images in the
>>most predominant browser on the web. Makes it pretty useless.
>You are missing the fact that these are graphical links.
Has nothing to do with whether it is a "graphical link" or not.
Telling someone to use something that is not supports in the most
predominant browser on the web is a wasted effort. It is almost as
bad as telling someone to use an IE-only feature.
IE supports the :hover pseudo-class for `a' elements, too.
I will refrain from telling you "No shit, Sherlock"
That is wise.

Only because I don't want to read your whining.
>>and simply tell you that a :hover rollovers won't work in IE.
You are wrong, they do.
>>The only thing you can do is style the link itself, not change an image
inside the link.
Exactly, and that behavior is not restricted to IE. Therefore, you should
try http://PointedEars.de/scripts/test/d...Me/hoverMe-css

No thanks, I prefer solid solutions.
My solution is the proof that :hover rollovers with images would work in IE,
which proves you wrong. But you are unwilling or incapable of admitting
that. I would not be surprised if you had not even looked at the code
before replying. You have also snipped the provision that I included for my
solution, considering the rest of your behavior, probably intentionally.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Dec 1 '07 #17

P: n/a
<iframe style="position:absolute;left:200px;top:200px;"
src="iframeSRC.html" name="myIFrame"></iframe>

change the iframeSRC.html to your page. Then tinker around with the top
and left to get it where you want it. Then simply target="myIFrame" on
your links to open them in the IFrame.
I am gonna go through all those suggestions and see what works best
for me. I like the idea of having everything on one page. I've tried
the iframes, but i ended up with scrollbars in the main text area.
that's why i had to split the page into multiple frames.

I am not a web programmer that's why i am using an archaic technology.
It is basic html
Dec 1 '07 #18

P: n/a
Thomas 'PointedEars' Lahn said the following on 12/1/2007 10:10 AM:
Randy Webb wrote:
>Thomas 'PointedEars' Lahn said the following on 12/1/2007 8:26 AM:
>>Randy Webb wrote:
<snip>
>>>and simply tell you that a :hover rollovers won't work in IE.
You are wrong, they do.
<sarcasm>
Yes, you are right. I just tested it on IE6 and they work flawlessly there.
</sarcasm>

No, they do not work in IE6.
>>>The only thing you can do is style the link itself, not change an image
inside the link.
Exactly, and that behavior is not restricted to IE. Therefore, you should
try http://PointedEars.de/scripts/test/d...Me/hoverMe-css
No thanks, I prefer solid solutions.

My solution is the proof that :hover rollovers with images would work in IE,
which proves you wrong.
And it works in IE6? I am impressed if it does. My testing shows otherwise.
But you are unwilling or incapable of admitting that.
I would never disagree with them working in IE7. I admit it. I know it.
I never said different.
I would not be surprised if you had not even looked at the code before replying.
Then you are dumber than I thought you were.
You have also snipped the provision that I included for my
solution, considering the rest of your behavior, probably
intentionally.
Which part of it? That you preferred a script solution? If you prefer a
script solution then offering a less-than-optimal CSS solution doesn't
make a lot of sense. Or, the part about testing in IE?

This is what you wrote about testing:
BTW, IE 7 does support :hover for other elements than A. I have tested it
successfully for DIV, P, IMG, DT, and DD elements.
I have tested it successfully for any element in HTML4.01 Strict.
Doesn't mean a whole lot. Perhaps you mean to say you tested it and it
supports it for those elements. All it takes to "successfully test" in
IE is to simply test it. Doesn't mean anything else and I felt no need
to point that out to you. Perhaps you should proof-read what you write
before you post it :)
PointedEars
Are you ever going to fix your broken signature?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 1 '07 #19

P: n/a
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 12/1/2007 10:10 AM:
>Randy Webb wrote:
>>Thomas 'PointedEars' Lahn said the following on 12/1/2007 8:26 AM:
Randy Webb wrote:
and simply tell you that a :hover rollovers won't work in IE.
You are wrong, they do.

<sarcasm>
Yes, you are right. I just tested it on IE6 and they work flawlessly there.
</sarcasm>

No, they do not work in IE6.
I don't know what the problem is with your IE 6, but they work fine here:

http://PointedEars.de/scripts/test/d...oof-of-concept
http://PointedEars.de/scripts/test/d...6-full-version
PointedEars
Dec 1 '07 #20

P: n/a
Wael wrote:
I am not a web programmer that's why i am using an archaic technology.
It is basic html
CSS :hover has nothing to do with programming, as have `div'
and `iframe' elements nothing to do with not being basic HTML.
PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Dec 1 '07 #21

This discussion thread is closed

Replies have been disabled for this discussion.