Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

get click coordinates

Posted on 2003-12-11
2
Medium Priority
?
1,069 Views
Last Modified: 2008-03-17
i want to popup a <select> list when the user clicks an <a> link at the (x,y) position he clicks.  does a javascript have access to the coordinates of the input click?
0
Comment
Question by:blpotter
[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
  • 2
2 Comments
 
LVL 16

Accepted Solution

by:
jaysolomon earned 500 total points
ID: 9921489
this want get the coords, but will display a select underneath the link

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
function toggle(obj){
      var objID = document.getElementById(obj);
            objID.style.display = (objID.style.display == "none")?"":"none";
}
// -->
</script>
<style type="text/css">
<!--
div#links {
      position: absolute;
      top: 81px;
      left: 0px;
      width: 166px;
      height: 700px;
      font: 16px Verdana, sans-serif;
      z-index: 100;
}
div#links a {
      display: block;
      text-align: center;
      font: bold 1em sans-serif;
         padding: 5px 10px;
      margin: 0px 0px 1px;
      border-width: 0px;
         text-decoration: none;
      color: #b7b7b7;
      background: #184785;         
      border-right: 5px solid #426eb4;
}
div#links a:hover {
      color: #411;
      background: #426eb4;
         border-right: 5px double #184785;
}
div#links span {
      
         position: relative;
      width: 125px;
         padding: 5px;
      z-index: 100;
         color: #411;
      background: transparent;
         font: 10px Verdana, sans-serif;
      text-align: center;
}
-->
</style>
</head>
<body>
<div id="links">
<a href="#" onclick="toggle('sel');return false;">Select1<span id="sel" style="display: none;"><form name="form1"><select name="sel1"><option>Option1</option><option>Option2</option></select></span></a>
<a href="#" onclick="toggle('sel2');return false;">Select2<span id="sel2" style="display: none;"><form name="form2"><select name="sel2"><option>Option1</option><option>Option2</option></select></span></a>
<a href="#" onclick="toggle('sel3');return false;">Select3<span id="sel3" style="display: none;"><form name="form3"><select name="sel3"><option>Option1</option><option>Option2</option></select></span></a>
</div>
</body>
</html>
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 9921892
Glad to have helped Thanks

jAy
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

609 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