Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 6th, 2008, 04:48 PM
Registered User
 
Join Date: Aug 2007
Location: TALLAHASEE, FL, USA.
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?

Reply With Quote
  #2 (permalink)  
Old November 6th, 2008, 04:53 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
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 -/
Reply With Quote
  #3 (permalink)  
Old November 6th, 2008, 05:20 PM
Registered User
 
Join Date: Aug 2007
Location: TALLAHASEE, FL, USA.
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?

Reply With Quote
  #4 (permalink)  
Old November 6th, 2008, 07:10 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:46 AM.


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