473,325 Members | 2,608 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,325 software developers and data experts.

One popup div, multiple documents

I'm having a problem trying to use a single DIV object for a popup menu
when I'm using embedded IFrames. All the IFrames have the same parent
document but I can't make the popup appear inside of each IFrame unless
I appendChild the popup DIV to each individual IFrame document body.
Should I be able to show the popup without having to reparent the popup
object? Are there any tricks to be aware of?

Cliff

Dec 4 '05 #1
3 1913
VK

de*******@gmail.com wrote:
I'm having a problem trying to use a single DIV object for a popup menu
when I'm using embedded IFrames. All the IFrames have the same parent
document but I can't make the popup appear inside of each IFrame unless
I appendChild the popup DIV to each individual IFrame document body.
Should I be able to show the popup without having to reparent the popup
object? Are there any tricks to be aware of?


IFRAME is a separate window-type object with its own document in it. So
any alement (like DIV) can be inside of IFRAME in only one way: *by
being inside* - means being a part of IFRAME document DOM structure.

If by "inside" you mean "atop of a particular iframe" then you can
achieve it by setting myDIV.style.zIndex higher than IFRAME and
locating your DIV atom of the IFRAME.

Dec 4 '05 #2
Here's the function I'm using to try and get the vertical y position of
an anchor element within an IFrame, that is within my document:

MyUtils.findPosY=function(obj)
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
return curtop;
}

I'm calling the function with the Anchor Element and no matter what
I've tried I always get a Y position of 1, not the actual position
within the browser window. Any further ideas?

Cliff.

Dec 11 '05 #3
de*******@gmail.com wrote:
MyUtils.findPosY=function(obj)
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
Instead:

while (obj)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
return curtop;
}

I'm calling the function with the Anchor Element and no matter what
I've tried I always get a Y position of 1, not the actual position
within the browser window. Any further ideas?


You need to test `obj', because you assign `obj.offsetParent' at the
end of each loop.
PointedEars
Dec 11 '05 #4

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

Similar topics

2
by: Moon | last post by:
Seems I still haven't got the hang of all those window generating code in Javascript. I've got a page with about 15 photo thumbnails. When you click on a thumbnail a new window pops up which shows...
38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
3
by: SpamProof | last post by:
I'd like to be able to print multiple documents are once using vb.net. What is the best way to do this with out having to print each document one at a time via a loop . Can't I send them all to...
7
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera...
8
by: Orloff | last post by:
Hi, on most (all?) browsers, when you put the pointer on a <a href="..." title="popup text">this is a link</a> without clicking on the link, there is a popup caption with the "popup text". I...
2
by: AMT2K5 | last post by:
Hello. When I compile my program I recieve lots and lots of the following message which I am trying to decipher. "xxx was declared deprecated". What exactly does that mean?
7
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
0
Pittaman
by: Pittaman | last post by:
Hello, We're developing an application (.NET 2.0) that let's users drop documents in the application and allows users to show some document types "embedded". For example, a textfile would appear...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.