
Images along with radio buttons
Hi!
I'm using Ajax Linked Select boxes, something like example_7 from Salix.gr. I have database of products and I want to make something to choose a product from database. But I really need to show images along with radio buttons (under button, next to button, above button.. doesn't matter really, I think this is the least problem).
My DB structure looks like this:
CREATE TABLE IF NOT EXISTS `Katalog` (
`ID` int(10) NOT NULL auto_increment,
`Picture` varchar(50) NOT NULL,
`Model` varchar(100) NOT NULL,
`Size` varchar(100) NOT NULL,
`Price` varchar(100) NOT NULL,
`Kategory` varchar(100) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=436 ;
Example of insert:
(23, 'Sirius43.jpg', 'Sirius - 043', '60 - 90 ', '7 850 Kč', 'Sirius')
= Model with ID 23, Name Sirius - 043, picture Sirius43.jpg, etc.
My test page is here, I have chain select running, but I don't know how I can get there an image along with the model names? I want to show Model name and next or above the name/radio button the according image.
[
dvere-zabka.cz]
Can someone help?
Here is also the core of my example_7.php:
$sc_ajax_select_boxes->add_select_box('Katalog','Kategorie','Kategorie','Kategorie','','sel1','sel_id_1','','Kategorie NOT LIKE "Z%"','Vyberte..');
$sc_ajax_select_boxes->add_radio_box('Katalog','Obrazek','Obrazek','Obrazek','','sel2','sel_id_2','');
$sc_ajax_select_boxes->add_select_box('Katalog','Kategorie','Kategorie','Kategorie','','sel3','sel_id_3','','Kategorie LIKE "Z%"','Vyberte..');
$sc_ajax_select_boxes->add_radio_box('Katalog','Model','Model','Model','','sel4','sel_id_4','');
$sc_ajax_select_boxes->link_select_boxes('sel1','sel2', 'Kategorie','');
$sc_ajax_select_boxes->link_select_boxes('sel3','sel4', 'Kategorie','');
$sc_ajax_select_boxes->place_jscripts();
?>
<form name="main" method="POST" action="example_2_posted.php">
<?php
$sc_ajax_select_boxes->show_select_box('sel1');
$sc_ajax_select_boxes->show_select_box('sel2');
$sc_ajax_select_boxes->show_select_box('sel3');
$sc_ajax_select_boxes->show_select_box('sel4');
?>
<input type="submit" value="POST" />
</form>