Control placement of DHTML window using position:relative

Posted on 2005-04-23
Last Modified: 2008-02-26

I am using a DHTML popup window script from
on a form.

A link exists on every line that will popup the window. I am trying to popup the window next to a particular form text field, but it doesn't seem straightforward. The window should top align and right justify as follows

WINDOW Text Box Link to popup window

Any ideas?
Question by:BrentNJ
    LVL 2

    Assisted Solution

    Use CSS to set the position of the text bo.  If you set the box like this:

    style="position:absolute; top:100px; left:100px;"

    Then set your window popup to coordinates offset to the box and everything should line up.

    Author Comment

    I don't think that I want to use set position on the text box since it could change depending on font settings on the users computer.

    How would I specify to line up the popup next to the text box?

    There is a position line in the script, but I'm not sure how to change it properly.

    LVL 25

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
    Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
    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…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now