Click to See Complete Forum and Search --> : XSL/XML and XSQL


hunter101
12-22-2008, 01:34 PM
Hi, i have 2 tables in my oracle databse... one named mp3 player and the other named tracks...
In my xsl page, (which is linked to my XSQL page) i have created a combo box... My question is, how do i get the combo box to display the list of mp3 players from the database, and how do i allow one mp3 player to be selected, which as a result would display all the tracks from that mp3player.
(I have a combo box and an submite button, but they are currenty blank and contain no code).

Sorry if it doesnt make sense, but any help would be very beneficial...
Thanks.

jkmyoung
12-24-2008, 12:15 PM
Populating the combobox should be easily done through xslt. Depending on your xml, loop through the appropriate nodes to create option nodes, eg like
<option value="ACT">ACT</option>
<option value="NSW">NSW</option>
<option value="NT">NT</option>

From there you can either:
1. Submit this form, redirecting to a new page with the details listed OR
2. Automatically display as soon as the user selects a different option.

If you want it to automatically display the next list (without having to click a submit button) you'll need javascript or AJAX. Modify the combobox's onchange method, and create a method to show the appropriate nodes.

This might help somewhat.
http://javascript.about.com/library/blnav8.htm

Either way you should decide how you're going to solve it before rushing to a solution.

hunter101
12-29-2008, 06:37 PM
hi, thanks for you reply.
even though your solution would work, i do belive the correct way to solve it is to use templates and parameters...
i ahve the values in the databse, but they need to be extracted from teh database and displayed in teh combo box.