...

View Full Version : Select multiple values without using options



sarayu
08-05-2008, 12:01 PM
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

kaos_frack
08-05-2008, 12:15 PM
can you be more specific? probably some example code...
"to select more than one image from a table"?

ssonawa
08-05-2008, 12:39 PM
Use following code to select multiple image name from the list-


<?
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.
:thumbsup:

sarayu
08-05-2008, 12:39 PM
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.

kaos_frack
08-05-2008, 12:47 PM
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

sarayu
08-05-2008, 12:47 PM
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.

sarayu
08-05-2008, 01:21 PM
If i use like this multiple[].How can i display thumbnail images in the list box.Can u please tell me?

bazz
08-05-2008, 07:47 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum