Solved

OnClick Popup Div

Posted on 2007-03-29
7
732 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 500 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…
Suggested Courses

636 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