permaculture playing cards*
The moose likes HTML, CSS and JavaScript and the fly likes Element Shift Problem in Dynamic Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Element Shift Problem in Dynamic Form" Watch "Element Shift Problem in Dynamic Form" New topic
Author

Element Shift Problem in Dynamic Form

Chris Cornelius
Ranch Hand

Joined: Aug 02, 2005
Posts: 48
Hello,

I have a dynamic form wherein if the user selects a certain value in a dropdown select box another selection box appears. The problem is that the text box element in between the two selection boxes shifts when the dynamic select box appears and disappears. Here is the code that I currently am using:



The JavaScript handling the events:



I have tried using:



But still got the same results.

Thanks in advance,

Chris
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Assign a width to your cell?

Eric
Chris Cornelius
Ranch Hand

Joined: Aug 02, 2005
Posts: 48
Eric,

Thanks for the suggestion, but even when I assigned a width to the cell it still shifts to the space where the dynamic select box is hidden. I then assigned a width to the table and then to the cells in the row of the form with the same results.

Chris

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
what is in your class 'hidden'

Eric
Chris Cornelius
Ranch Hand

Joined: Aug 02, 2005
Posts: 48
Eric,

Thanks for your help, I had display: none in the hidden class, so I changed it to visibility: hidden instead and that works.

Chris
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
That is what I was expecting, I did not come out in say it when I realized you were setting the class. Glad you spotted the issue!

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Element Shift Problem in Dynamic Form