![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Spry select with xml data
Can this be done with Spry and if so, how please?
I would like to have a dropdown select on my page that is populated by the lastname field in my database. Once selected I would like to display a table of the data I selected from the dropdown. I am to connect to an XML datasource and able to connect the dropdown to that last name field. I just don't know how to get the selected last name from the drop down to display. Any help is greatly appreciated. <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="utf-8" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script src="../../../SpryAssets/xpath.js" type="text/javascript"></script> <script src="../../../SpryAssets/SpryData.js" type="text/javascript"></script> <script type="text/javascript"> <!-- var ds1 = new Spry.Data.XMLDataSet("so.xml", "RESULTS/ROW",{distinctOnLoad:true}); --> </script> </head> <body> <p></p> <div spry:region="ds1"> <select name="selectLastName" spry:repeatchildren="ds1"> <option value="{GlobalSubjectLastName}";>{GlobalSubjectLas tName}</option> </select> </div> <p></p> <p></p> <p> </p> <p></p> <p></p> <div spry:region="ds1"> <table> <tr> <th spry:sort="GlobalSubjectFirstName">First Name</th> <th>Middle Name</th> <th spry:sort="GlobalSubjectLastName">Last Name</th> <th> Address</th> <th> City</th> <th> State</th> <th> Age</th> <th>Charge Description</th> </tr> <tr spry:repeat="ds1" spry:setrow="ds1"> <td>{GlobalSubjectFirstName}</td> <td>{GlobalSubjectMiddleName}</td> <td>{GlobalSubjectLastName}</td> <td>{GlobalSubjectAddress}</td> <td>{GlobalSubjectAddressCity}</td> <td>{GlobalSubjectAddressState}</td> <td>{GlobalSubjectAge}</td> <td>{ChargeStatuteDescription}</td> </tr> </table> </div> </body> </html> |
|
|||
|
Re: Spry select with xml data
You have invalid code: <select name="selectLastName" spry:repeatchildren="ds1"> <option value="{GlobalSubjectLastName}";>{GlobalSubjectLas tName}</ option> there should not be a ";" in the select list value, it should be: <select name="selectLastName" spry:repeatchildren="ds1"> <option value="{GlobalSubjectLastName}">{GlobalSubjectLast Name}</ option> not sure if this will fix your problem, just something I noticed. |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|