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 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hidden Input Button in a Loop

    Hi,
    I am grabbing a list of emails and names in a for loop where i am using input hidden buttons to use them to post selected values and names. The problem,
    the entire data list is getting displayed in an iframe where these hidden input buttons are getting displayed as empty spaces inside the div due tho which the page is getting dragged and distorted.

    As the loop count increases, the no of input hidden buttons inside the loop increases and the page gets expanded.

    How can i resolve this .

    Thanks for the help in advance
    stranger

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Add a class of "hidden" to the hidden inputs. Then, in the CSS:

    Code:
    input.hidden {
       display: none;
    }
    I have to do this a lot. In a perfect world, you would use an attribute selector so you don't need the extra class:

    Code:
    input[type='hidden'] {
       display: none;
    }
    …but guess who doesn't support it?

  • #3
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    Ummm... let me think about that for a minute...


  • #4
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    If you have images on the page at all, you could use an image map. You would assign the button to a tiny area so you could still find it easily, but no one would know it was there.

    Image maps: http://www.kasparius.com/tutorials/imagemap/how.htm
    you could maybe even apply "cursor:default;" to completely hide it(it will display the regular arrow even though its a link)

    Hope I helped,
    -Adam


    Edit: actually you wouldn't even need an image already... If you do stick with the image maps, but if you dont you could make a 1px by 1px link or transparent gif or something with the cursor hidden...
    Why not thank me?

    http://adamsworld.name


  •  

    Posting Permissions

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