View Single Post
Old 07-10-2009, 04:47 PM   PM User | #1
rizzo89
New Coder

 
Join Date: Nov 2008
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
rizzo89 is an unknown quantity at this point
XSLT Combobox Variable Passing

Hi,
I am trying to create a variable that is displayed to the user after a combobox selection is made. I am using PHP to transform the data and that is all working but when the user selects an option it displays their results but, does not keep the selected option in the combobox. I would also like to display it as a title so the user knows where they are at. Here is the xsl that I have so far. I think my main problem is when I do the transformation after the selection, I am returning a dataset and I don't know how to use PHP inside XSLT. Being able to code I would really like to figure out how to pass variables between PHP and XSL.
Any help would be great! Thanks

Code:
<div id="NavID">
<form id="frmID" action="/index.php" method="get"> 
<fieldset>

<select id="choice" name="choice" onchange="this.form.submit()">

  <option value="$cmbSelect"></option>
  <option value="5">Drugs</option>
  <option value="7">Weapons</option>
  <option value="9">Sex</option>
</select>

//How do I get a variable to hold a value between transformations?
<xsl:variable name="cmbSelect">
<xsl:value-of select="@choice" />
</xsl:variable>

<input type="hidden" id="page" name="page" value="suppliers" />
 
 </fieldset>
</form>
</div><!--End Nav-->
rizzo89 is offline   Reply With Quote