Advertisement

07.24.2008 at 09:48AM PDT, ID: 23592791
[x]
Attachment Details

JavaScript/absolute positioning problem

Asked by Silas2 in WebApplications, JavaScript, Dynamic HTML (DHTML)

I'm just scratching my head over this JavaScript/absolute positioning problem.  I can work around it, but I just don't understand it.
I gave up trying to position with HTML/CSS and decided to cheat using JavaScript.
When I run the line (just trying to set the "left"  property of a button):
        cmdSave.style.left=OverallTable.offsetLeft+OverallTable.offsetWidth-iWidth +"px";
the cmdSave button gets wider, when I am only setting the "left" property.
I can correct this by subsequently running:
        cmdSave.style.width=iWidth;
but I'm afraid my misunderstanding of JavaScript's interaction with HTML will come back to haunt me  somewhere else.Start Free Trial
[+][-]07.24.2008 at 11:19AM PDT, ID: 22081962

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 11:46AM PDT, ID: 22082243

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 06:03PM PDT, ID: 22085160

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.25.2008 at 03:44AM PDT, ID: 22087312

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.25.2008 at 04:43AM PDT, ID: 22087555

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.25.2008 at 06:44PM PDT, ID: 22093408

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.26.2008 at 06:01AM PDT, ID: 22094924

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: WebApplications, JavaScript, Dynamic HTML (DHTML)
Sign Up Now!
Solution Provided By: Silas2
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628