OnClick Popup Div

On a click, i want a div to popup at that position and only one at a time .... so there might be 5 or 10 of this clickable spots and anytime one of those psots is clicked I want that 1 and only div to show up there.
LVL 14
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Will give you the basic tools.  Code is in the page.

What you want to do is add a var for currentPoped="divId';

When you process the onclick, if currentPoped != "" then hide that div, pop the new div and set currentPoped to that div's ID.

Actually this is probably better for you.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
B_DorseyAuthor Commented:
the second one you provided has a error I think...

if the clickable objects are not in the top part of the window (lets say I have to browse down the page to see them) then when I click them, it moves me to the top of the page and the new div shows up way off position.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

It works for me in IE7, FF 2, and Opera 9...what browser are you using?
B_DorseyAuthor Commented:
its not that its not working, its working incorrectly...

Lets say I have a page that has ALOT of content on it, and I click the link to bring up one of these popups... well it resets the page to the top and puts the popup div near the top.
B_DorseyAuthor Commented:
just to clarify...

go to your page there and scroll it down till you BARELY see the links in that page... then clic one,, does it move the page to the top and the popup dive waaaaay away from the original link?
Oh that's just a missing return false, which caused the href="#" to execute.


It's fixed.

Here is why you experienced the problem in the demo.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.