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 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Select multiple values without using options

    Hi All,

    How can i select multiple values in a form without using options.I want to select more than one image from a table and submit those selected values as a request to the next page.I don't want to use the select box for this.
    Can u please help me about this?

    Thanks in advance

  • #2
    New Coder
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    0
    Thanked 2 Times in 2 Posts
    can you be more specific? probably some example code...
    "to select more than one image from a table"?

  • #3
    New Coder
    Join Date
    Jul 2008
    Location
    India
    Posts
    39
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Smile

    Use following code to select multiple image name from the list-
    PHP Code:
    <?
    print "Select Items: <select name=test[] size=5 multiple >
              <option value=item1 >item1</option>
              <option value=item2 >item2</option>
              <option value=item3 >item3</option>
              <option value=item4 >item4</option>
              <option value=item5 >item5</option>
              <option value=item6 >item6</option>
              <option value=item7 >item7</option>
            </select><br>\n"
    ;
    print 
    "<br>\n";
    print 
    "(Shif+Right Mouse) for multiple selection<br>\n";
    print 
    "<br>\n";
    ?>
    I hope this is what u were looking for.

  • #4
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok i will explain....

    I want to select and upload more than one image from a form and the selected values can be send as request to the next page.But when i using select with multiple options it takes a select bar.I dont want to use the select bar and want to display all the images in a table and want to select multiple images from that.

  • #5
    New Coder
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    0
    Thanked 2 Times in 2 Posts
    well, as ssonawa posted
    if you use 'multiple' attribute it becomes a listbox not a dropdownlist
    and you should append '[]' to its name
    btw multiple should have the value 'multiple', not required but bad style and invalid xhtml

  • #6
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No i dont want the select bar.I want to display the predefined images in a table and select among them and want to upload.

  • #7
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If i use like this multiple[].How can i display thumbnail images in the list box.Can u please tell me?

  • #8
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    if you mean that you want to display their actual images for upload into a table and select from them which one's to upload, you could do this....

    put the imahges into a table and use a checkbox beneath each one. the checkbox should pass the value realtive to the image so that the next script can work out which image to upload.

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link


  •  

    Posting Permissions

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