Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

OnClick Popup Div

Posted on 2007-03-29
7
Medium Priority
?
737 Views
Last Modified: 2008-02-01
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.
0
Comment
Question by:B_Dorsey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 18821222
http://www.rodsdot.com/ee/popOverForm.asp

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.

Regards,
Rod
0
 
LVL 29

Accepted Solution

by:
rdivilbiss earned 2000 total points
ID: 18821349
Actually this is probably better for you.

http://www.rodsdot.com/ee/multipleDivisionPops.asp
0
 
LVL 14

Author Comment

by:B_Dorsey
ID: 18822757
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.
0
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
LVL 29

Expert Comment

by:rdivilbiss
ID: 18824019
It works for me in IE7, FF 2, and Opera 9...what browser are you using?
0
 
LVL 14

Author Comment

by:B_Dorsey
ID: 18824909
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.
0
 
LVL 14

Author Comment

by:B_Dorsey
ID: 18824914
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?
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 18825132
Oh that's just a missing return false, which caused the href="#" to execute.

http://www.rodsdot.com/ee/images/multiPop.jpg

It's fixed.

Here is why you experienced the problem in the demo.

http://www.rodsdot.com/ee/Why-JavaScript-In-Hyperlinks-Is-Bad.asp
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question