We help IT Professionals succeed at work.

moving a div

jaggernat
jaggernat asked
on
1,074 Views
Last Modified: 2012-05-05
Hi guys
I have a div like this (testdiv1) which displays a calendar image.

<script language=JavaScript src="/dwpajudgments/js/CalendarPopup.js"></script>

<script language="JavaScript">
  var calendar = new CalendarPopup("testdiv1");
  calendar.setCssPrefix("TEST");
</script>

<div id="testdiv1" style="position:absolute;width:150px;top:35px;left:75px;height:144px;z-index:2;"></div>  
 
      <input type="text" name="startDateā€   size="10" maxlength="10" />
                              <a style="align:left; margin-left:-3px; vertical-align:bottom; text-decoration:none;" id="anchor1"
                               title="calendar.select(document.forms[0].startDate,'anchor1x','MM/dd/yyyy'); return false;"
                        onclick="calendar.select(document.forms[0].startDate1,'anchor1','MM/dd/yyyy'); return false;" href="#" name="anchor1">
      <img style="align:left; border:0px solid #ffffff;" src="/dwpajudgments/images/calendar.gif" />
                              </a>

I have a drop-down field right next to the above calendar.gif image. The problem is when I click on the image the calendar pops up but overlaps with the drop-down field.
Is there any way I can avoid that. I was trying to do that using style="position:absolute;width:150px;top:35px;left:75px;height:144px;z-index:2;  inside the div, but no luck.
Right now the calendar in div displays in the bottom right.
Any ideas how I can make the calendar display on top-right.

Thanks
J
Comment
Watch Question

Top Expert 2007
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
so basically on the image add a onclick event that sets the visiblity to off , then when you close the callendar, set the visibilty back on.

b

Author

Commented:
>>>> basically on the image add a onclick event that sets the visiblity to off , then when you close the callendar, set the visibilty back on.

yes , i was thinking on similar lines. but stuck with the code. any code would help

thanks

Commented:
i would need ot see the form code.
Top Expert 2007

Commented:
No worries - glad to help.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.