473,397 Members | 1,972 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.

1 Link opening 2 pages in two iframes each on different seperate pages More options

SHC
I'm in need of some javascript to load two pages into two seperate
iframes which are on two seperate and different pages.

Rather complicated I know (and easier done in one frameset), but
caused by some limitation issues of SharePoint.
To help:
Link is on thumbnails.htm
iFrame1 is on intro.htm
iFrame2 is on details.htm
Page for iframe1 is cd_summary.htm
Page for iframe2 is cd_content.htm
Any help would be most gratefully appreciated.
SHC

Mar 29 '07 #1
7 3934
On 29 Mar, 13:50, "SHC" <stu...@hall-cooper.me.ukwrote:
I'm in need of some javascript to load two pages into two seperate
iframes which are on two seperate and different pages.

Rather complicated I know (and easier done in one frameset), but
caused by some limitation issues of SharePoint.

To help:

Link is on thumbnails.htm
iFrame1 is on intro.htm
iFrame2 is on details.htm
Page for iframe1 is cd_summary.htm
Page for iframe2 is cd_content.htm

Any help would be most gratefully appreciated.

SHC
do you mean

<html><body>
<iframe id="iframe1" src="intro.htm"></iframe>
<iframe id="iframe2" src="details.htm"></iframe>
</body></html>

or that the three pages are open at once in three tabs, or windows.

or that there a three frames in a framset (pages intro and details),
that these two child frames have iframes within them which you need to
change
if the first then
var if1 = document.getElementById('iframe1');
var if2 = document.getElementById('iframe2');
if1.src='cd_summary.htm';
if2.src='cd_content.htm';
should do it.

Mar 29 '07 #2
On 29 Mar, 13:50, "SHC" <stu...@hall-cooper.me.ukwrote:
I'm in need of some javascript to load two pages into two seperate
iframes which are on two seperate and different pages.

Rather complicated I know (and easier done in one frameset), but
caused by some limitation issues of SharePoint.

To help:

Link is on thumbnails.htm
iFrame1 is on intro.htm
iFrame2 is on details.htm
Page for iframe1 is cd_summary.htm
Page for iframe2 is cd_content.htm

Any help would be most gratefully appreciated.

SHC
i suppose you could mean that you are on thumbnails.htm and you want
to click on
<a href="intro.htm">intro</a>
<a href="details.htm">details</a>
each of which have an iframe in them which you want to set to
cd_summary.htm and cd_content.htm respectively.

Mar 29 '07 #3
SHC
On 29 Mar, 14:55, "shimmyshack" <matt.fa...@gmail.comwrote:
On 29 Mar, 13:50, "SHC" <stu...@hall-cooper.me.ukwrote:


I'm in need of some javascript to load two pages into two seperate
iframes which are on two seperate and different pages.
Rather complicated I know (and easier done in one frameset), but
caused by some limitation issues of SharePoint.
To help:
Link is on thumbnails.htm
iFrame1 is on intro.htm
iFrame2 is on details.htm
Page for iframe1 is cd_summary.htm
Page for iframe2 is cd_content.htm
Any help would be most gratefully appreciated.
SHC

i suppose you could mean that you are on thumbnails.htm and you want
to click on
<a href="intro.htm">intro</a>
<a href="details.htm">details</a>
each of which have an iframe in them which you want to set to
cd_summary.htm and cd_content.htm respectively.- Hide quoted text -

- Show quoted text -
An example of what I'm trying to do, is using the following structure,

thumbnails.htm :
<a target="iFrame1" href="cd_summary_001.htm"><img src="cd_001.gif"></
a>
<a target="iFrame1" href="cd_summary_002.htm"><img src="cd_002.gif"></
a>

intro.htm :
<body><iframe width="635" height="628" name="iFrame1" id="iFrame1"
frameborder="1">Your browser does not support inline frames or is
currently configured not to display inline frames.</iframe></body>

details.htm :
<body><iframe width="635" height="628" name="iFrame2" id="iFrame2"
frameborder="1">Your browser does not support inline frames or is
currently configured not to display inline frames.</iframe></body>

This structure works for changing the content in iFrame1 on intro.htm
to the appropriate cd_summary htm page, but I need a way of changing
iFrame 2 on details.htm at the same time to the appropriate cd_content
page (i.e. cd_content_001.htm or cd_content_002.htm)

Does this make things any clearer?
SHC

Mar 29 '07 #4
On 29 Mar, 15:23, "SHC" <stu...@hall-cooper.me.ukwrote:
On 29 Mar, 14:55, "shimmyshack" <matt.fa...@gmail.comwrote:
On 29 Mar, 13:50, "SHC" <stu...@hall-cooper.me.ukwrote:
I'm in need of some javascript to load two pages into two seperate
iframes which are on two seperate and different pages.
Rather complicated I know (and easier done in one frameset), but
caused by some limitation issues of SharePoint.
To help:
Link is on thumbnails.htm
iFrame1 is on intro.htm
iFrame2 is on details.htm
Page for iframe1 is cd_summary.htm
Page for iframe2 is cd_content.htm
Any help would be most gratefully appreciated.
SHC
i suppose you could mean that you are on thumbnails.htm and you want
to click on
<a href="intro.htm">intro</a>
<a href="details.htm">details</a>
each of which have an iframe in them which you want to set to
cd_summary.htm and cd_content.htm respectively.- Hide quoted text -
- Show quoted text -

An example of what I'm trying to do, is using the following structure,

thumbnails.htm :
<a target="iFrame1" href="cd_summary_001.htm"><img src="cd_001.gif"></
a>
<a target="iFrame1" href="cd_summary_002.htm"><img src="cd_002.gif"></
a>

intro.htm :
<body><iframe width="635" height="628" name="iFrame1" id="iFrame1"
frameborder="1">Your browser does not support inline frames or is
currently configured not to display inline frames.</iframe></body>

details.htm :
<body><iframe width="635" height="628" name="iFrame2" id="iFrame2"
frameborder="1">Your browser does not support inline frames or is
currently configured not to display inline frames.</iframe></body>

This structure works for changing the content in iFrame1 on intro.htm
to the appropriate cd_summary htm page, but I need a way of changing
iFrame 2 on details.htm at the same time to the appropriate cd_content
page (i.e. cd_content_001.htm or cd_content_002.htm)

Does this make things any clearer?
SHC
yeah sure, what you need to know though is that it won't be
accessible, however from what Ive seen of sharepoint, - it isnt an
accessible platform, so here we go
there are a few ways, here are 2

1) inside the summary.htm you have some javascript that is hard coded
to load the parent.iframe2.src='cd_details_002.htm', so that when the
summary iframe loads it loads the details iframe. (which would require
that you hard code the details page into each summary page

2) you create a function which takes the value of the link you click
on and sets both iframes accordingly, we dont bother with the target
attribute anymore

<html>
<head>
<script type="text/javascript">
//say you have just clicked cd_summary_002.htm
//and your intro.htm for that cd is cd_summary_002.htm
//and the details file is cd_details_002.htm
function changeIframe2Src( cd_summary_url )
{
//loads cd_summary_002.htm into iframe1
document.getElementById('iframe1').src = cd_summary_url;
//loads cd_details_002.htm into iframe2
document.getElementById('iframe2').src =
cd_summary_url.replace('summary','details');
return false;
}
</script>
</head>
<body>
<a href="cd_summary_002.htm"
onclick="changeIframe2Src(this.href);return false;"><img
src="cd_002.gif"></a>
<br />
<iframe id="iframe1">iframe1</iframe>
<iframe id="iframe2">iframe2</iframe>
</body>
</html>

Mar 29 '07 #5
shimmyshack said the following on 3/29/2007 11:52 AM:

<snip>
//loads cd_summary_002.htm into iframe1
document.getElementById('iframe1').src = cd_summary_url;
//loads cd_details_002.htm into iframe2
document.getElementById('iframe2').src =
Did you test setting the src property of an IFrame? I bet you didn't.
And, why are people steadily falling into the gEBI crutch when a better
method exists?

document.frames['iframe2'].location.href = somethingElse

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 29 '07 #6
On 29 Mar, 17:29, Randy Webb <HikksNotAtH...@aol.comwrote:
shimmyshack said the following on 3/29/2007 11:52 AM:

<snip>
//loads cd_summary_002.htm into iframe1
document.getElementById('iframe1').src = cd_summary_url;
//loads cd_details_002.htm into iframe2
document.getElementById('iframe2').src =

Did you test setting the src property of an IFrame? I bet you didn't.
And, why are people steadily falling into the gEBI crutch when a better
method exists?

document.frames['iframe2'].location.href = somethingElse

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
Hiya Randy,
I did actually [only as in does it work], it's IE6/7, Op9 and FF2; but
personally I wouldn't even go this way at all, it's a fudge to fix a
cludge! I hate all things like this, iframes, onclicks etc.. prefering
simple simple code with the fix as an include somewhere in the head.
I do admit to using the gEBI alot more than perhaps I should, it can
be useful to send to people whose code is "under developement" because
no matter where they plonk the next thing, and change the order etc..
the reference is unchanged, but I take your point.

Mar 29 '07 #7
"Randy Webb" <Hi************@aol.comwrote in message
news:Ua********************@giganews.com...
shimmyshack said the following on 3/29/2007 11:52 AM:

<snip>
>//loads cd_summary_002.htm into iframe1
document.getElementById('iframe1').src = cd_summary_url;
//loads cd_details_002.htm into iframe2
document.getElementById('iframe2').src =

Did you test setting the src property of an IFrame? I bet you didn't. And, why are
people steadily falling into the gEBI crutch when a better method exists?

document.frames['iframe2'].location.href = somethingElse
Shouldn't that be:

window.frames['iframe2'].location.href = somethingElse; // ...?

-Lost
Mar 29 '07 #8

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

Similar topics

2
by: faktujaa | last post by:
Hi All, I have to avoid cyclic reference in my DLLS. One way is to move the code to the common DLL. But now since i have written a lot of code, it would take a whole lot of time to do this. The...
2
by: faktujaa | last post by:
Hi All, I have to avoid cyclic reference in my DLLS. One way is to move the code to the common DLL. But now since i have written a lot of code, it would take a whole lot of time to do this. The...
3
by: CJ | last post by:
I have a page with a bunch of iframes (which make up a tab control). At least one of these iframes contains an aspx page, which in turn contains a .ascx component. This component then contains a...
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...
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
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
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...
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.