Skip to main content
Published: September 07 2006, 5:53:00 PMUpdated: November 28 2020, 2:32:39 PM

How do I handle the ItemSpecifics HTML that results when I do the transformation using the XSL returned from GetAttributesXSL?

Detailed Description

In order to use the HTML returned from the XSL transformation using the XSL returned from GetAttributesXSL, the following steps must be taken:

1. You will need to add the beginning and ending HTML tags around the HTML returned from the transformation to render the Item Specifics form correctly.
2. You will need to add the beginning and ending FORM tags around the HTML returned from the transformation to render and use the ItemSpecifics form correctly.
3. You will need to add a submit button, and activate the submit button so that the form can be submitted.
4. You will need to define the form name, and the submit action target (where your code will handle the Item Specifics form submission).

Here is an example of the implementation that must be done for steps 1, 2 and 3:

HTML that goes before:

    <html><body>
    <script language="javascript">
    function onClick(id)
    {
         document.all('action').value = id;
         document.forms['APIForm'].submit();
    }
    </script>

    <form name="APIForm" id="APIForm" method="post" action="AttributeInfo.aspx">
    <table align="center" border="0"><tr><td><img src="images/ebay.gif"></td></tr><tr><td>


HTML that goes after:

    </td></tr><tr><td align="center">
    <input type="button" name="btSubmit0" value=" Home " id="btSubmit0" onclick="javascript:onClick('home')"/>         <input type="button" name="btSubmit1" value="Continue" id="btSubmit1" onclick="javascript:onClick('addItem')"/>
    </td></tr></table>
    <input type="hidden" name="action" value="display"/>
    </form></body></html>


For implementing steps 1 and 2, you can see we have the opening and closing HTML elements, and we have defined a FORM with opening and closing FORM elements.
For implementing step 3, you can see we have a submit button named "btSubmit1", which when clicked, calls the JavaScript onClick function which then proceeds to submit the form.
For implementing step 4, you can see we have defined a form with the name "APIForm" and the action to be "AttributeInfo.aspx" which is where our application will process the submission of the Item Specifics form.

We now have a functioning Item Specifics form.
Take the HTML that results from the transformation, and put the leading and trailing HTML as shown above, and implement your AttributeInfo.aspx (or whatever your application you have created) to handle the Item Specifics submission.

Please keep in mind that the transformations we are assuming as having been done, are the following:
1. Transform the XML returned from GetAttributesCS using the Attributes_Style.xsl stylesheet (attached to this Knowledge Base entry for your reference)
2. Transfrom the XML resulting from the transformation in step 1 using the XSL returned by the GetAttributesXSL call.



Additional Resources
</a

How well did this answer your question?
Answers others found helpful