Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2008, 04:48 PM
Registered User
 
Join Date: Aug 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing selected value in combobox

<select id="DistrictID" name ="Distict" width="10">
        <option> xsl:value-of select= "1"/></option>
    <option><xsl:value-of select= "2"/></option>
    <option><xsl:value-of select= "3"/></option>
    <option><xsl:value-of select= "4"/></option>
    <option><xsl:value-of select= "5"/></option>
    <option><xsl:value-of select= "6"/></option>
    <option><xsl:value-of select= "7"/></option>
    <option><xsl:value-of select= "8"/></option>
</select>

I have created and filled a combobox as showen above.
Now, I need to create a table based on the selected value by the user from the combobox (district). I have created a button underneath the combobox. When the user selects a number and clicks the button, I want to call a function in javascript to retireve the values of selected number in the combobox and create a table. How can I do this?

 
Old November 6th, 2008, 04:53 PM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

What has this got to do with XSLT? If you have a JavaScript question I recommend you ask on a JavaScript forum.

/- Sam Judson : Wrox Technical Editor -/
 
Old November 6th, 2008, 05:20 PM
Registered User
 
Join Date: Aug 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am new to xsl. I am currently working on creating a xsl document to post xml information over the web. javascript is just part of it.

What I need to do when user clicks a submit button, table relevant to the selected item in the combo box should appear at the bottom of the button. The table is created by accessing xml document. Can you share a sample that uses onclick even to create a table?

 
Old November 6th, 2008, 07:10 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

An XSLT stylesheet cannot respond to user input. The stylesheet generates the HTML and exits; once the user starts pressing buttons, XSLT is no longer involved. Of course, it is possible for the Javascript in your (generated) HTML page to respond to user input by firing off another XSLT transformation, if that's what you want to do.

Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid Selected Value RubyRue ASP.NET 1.0 and 1.1 Basics 2 November 5th, 2007 02:48 AM
Display data as per combobox item selected yogeshyl Excel VBA 0 July 28th, 2007 06:17 AM
Filling Combobox with value from other Combobox ayazhoda Access VBA 6 June 5th, 2007 04:58 AM
Can't get the selected value of a combo... gbianchi ASP.NET 1.0 and 1.1 Basics 7 March 3rd, 2006 02:48 PM
syntax error on <option selected="selected"> hamid HTML Code Clinic 1 October 13th, 2004 09:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.