SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to display a drop down grid in html

    Everybody knows how a dropdown menu works where a person clicks on the drop down menu and it displays a drop down list where the user can select an option from the list. What I want to know is that is there a way in html where except displaying a dropdown list can I display a grid instead with the options in the grid? I havn't got any code for this but if anyone knows this is possible and can provide an example of this I would be very greatful and it would be very helpful.

    This link will show you how I want it to be dislayed like but I do not know how this is done.

    Click here

  2. #2
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you google something like 'colour palette javascript' you'll get a lot of examples.

    Or you can create your own in html and attach an onclick event handler to each colour to do whatever you need to with the chosen colour.

  3. #3
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,

    it is not for colors, that is just an example of what the drop down grid looks like. I am putting letters a to z in the grid. I will however do what you said and look through google for colour pallette javascript. For html and on click event do you know to display the grid? will it require creating a table to create the grid?

    Thank You

  4. #4
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are a few ways you could make the grid. In this case you could justify using a table because the grid will be displaying tabular data. Other options to make the grid include using inline elements or floated elements.

  5. #5
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok I will hava a look into this, I don't know if you know from experience but are you allowed to put <option> tags inside a <table> which will be inside a <select> tag? In other words can a table be displayed in a <select> tag?

  6. #6
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by malcolm p View Post
    In other words can a table be displayed in a <select> tag?
    afaik, the only elements allowed in a <select> are <option> elements and you can't display a table inside an <option>

  7. #7
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok thanks for your help, I will do some more research on this


Bookmarks

Posting Permissions

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