XML package gives Exception error when passing parms on Onclick
Posted on 2011-03-12
I'm really new to what I'm asking about and I'm not sure I'm using the correct terms.
We are moving a website from an older version to the newest code that came out and several of the modules that were added onto the store front's old software had to be upgraded. In the upgrades the replacement modules are interfacing differently and the XML packages needed to be modified. What I thought was going to be plug and go has turn out to be a long search for a solution that led me here.
I'm trying to insert a form into a XML package and in this form will be a search box. When the user clicks the go button I need to pass a series of parameters that are hidden back to the ASPX via the onclick function.
The code in the XML file looks like this:
... onclick="csearchs.aspx?CategoryID=0&ManufacturerID=0&SectionID=0&PriceRange=0&SortBy=1&PageSize=12&AndOr=AND&DisplayMode=Grid&Search='+document.getElementById('Search').value;" />
When the page is called and the XML package executed I get an error that is:
Error in XmlPackage(.Load), Package=[product.simplepart-min.xml.config], Msg=[Exception='=' is an unexpected token. The expected token is ';'. Line 278, position 144.<br/>]
This line position corresponds to the "=" after ManufacturerID. What is the miss here?
This code works just fine on the master page, but when placed here in the XML package it fails with the error.
It has to be something really simple, but being the novice I am, I don't know where to look for an answer.