Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2003
    Location
    Atlanta, Georgia
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Toggle table position

    I have a form with a couple of radio buttons, and depending on which button they click, a different table (form elements) will display. This works, but the tables are in different positions within the form. There must be a way to position the tables in identical locations. I am not very proficient with DIV tags. Can anyone explain how this works?
    Thanks!
    -tdavis

    here is the form: http://www.kenerlyortho.com/forms/page02.html

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 504 Times in 491 Posts
    remove visibility:hidden; from "someoneelse" & "patientinfo" HTML tags

    Code:
    function toggle(e)
       {
    
        if (e.value == "Someone_Else")    {
    
     	 var childId = "someoneelse";
            document.getElementById(childId).style.display = "";
    
    	 var childId = "patientinfo";
            document.getElementById(childId).style.display = "none";
            }
    
          else
    
            {
    
            var childId = "patientinfo";
            document.getElementById(childId).style.display = "";
    
            var childId = "someoneelse";
            document.getElementById(childId).style.display = "none";
    
            }
    
        }

  • #3
    New Coder
    Join Date
    Aug 2003
    Location
    Atlanta, Georgia
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK. I did that. I removed visibility:hidden; from table tags, but that did not have any affect. Are you referring to the javascript?

  • #4
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 504 Times in 491 Posts
    also change your function toggle(e)
    with the ammended function I posted

  • #5
    New Coder
    Join Date
    Aug 2003
    Location
    Atlanta, Georgia
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did not see that! It does work now. I really appreciate the help!
    I need to understand getElementById a little better....

    Thanks again!
    -tdavis


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •