[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Applying XSL and Javascript to XMLDOMNode objects
Scenario: creating an on-line form on the fly from datastore using XML and XSL Exert from XML I am working with to dynamically create form is: <RECORD> <INTRODUCTION>Please complete all sections of the form before submitting</INTRODUCTION> <SECTIONNAME>User Details</SECTIONNAME> <QUESTION>Name</QUESTION> <ANSWERTYPE>text</ANSWERTYPE> <DESCRIPTION></DESCRIPTION> <VALIDATION>Required</VALIDATION> </RECORD> <RECORD> <INTRODUCTION>Please complete all sections of the form before submitting</INTRODUCTION> <SECTIONNAME>User Details</SECTIONNAME> <QUESTION>Department</QUESTION> <ANSWERTYPE>radio</ANSWERTYPE> <DESCRIPTION>Information Systems</DESCRIPTION> <VALIDATION>Required</VALIDATION> </RECORD> Exert from XSL record template for this particular section is as follows: <xsl:when match=".//ANSWERTYPE[.='text']"> <input > <xsl:attribute name="class"><xsl:eval>funcValidation(this)</xsl:eval></xsl:attribute> <xsl:attribute name="id"><xsl:value-of select="."/></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="."/></xsl:attribute> </input> </xsl:when> Problem: need to write a JavaScript function ( as referenced above at funcValidation) called locally when parsing the <ANSWERTYPE> element. Function will assign the value of <VALIDATION> to the class attribute of the <input> tag. However using Javascript how the heckas can I do this at run-time (using IE4)? Beer to the man that can. Clare 02/23/00 19:18:05 ------------------------------------------------------------------------------ Part of the Halifax Group, Halifax Group plc, Registered in England No. 2367076. Registered Office: Trinity Road, Halifax, West Yorkshire HX1 2RG. Represents only the Halifax Financial Services Marketing Group for the purposes of advising on and selling life assurance, pensions and unit trust business. The Marketing Group is regulated by the Personal Investment Authority. Switchboard 01422 333333. ============================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|