Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Element Shift Problem in Dynamic Form

 
Chris Cornelius
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assign a width to your cell?

Eric
 
Chris Cornelius
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is in your class 'hidden'

Eric
 
Chris Cornelius
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic