Solved

XML package gives Exception error when passing parms on Onclick

Posted on 2011-03-12
1
575 Views
Last Modified: 2013-12-06
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.
0
Comment
Question by:Kirk48906
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 35119812
Not knowing the package or the syntax in its config, I expect you need to change all & in links inside xml to &amp; also you do not DO anything in tHe onclick so for example onclick="location='csearchs.aspx?CategoryID=0&amp;ManufacturerID=0&amp;SectionID=0&amp;PriceRange=0&amp;SortBy=1&amp;PageSize=12&amp;AndOr=AND&amp;DisplayMode=Grid&amp;Search='+document.getElementById('Search').value;" />
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Result Set to XML 4 55
Why is PHP Storm giving me an undefined constant error? 4 56
Earthlink.net 6 47
Oulook 2016 the owa version - Search engine is wierd 5 55
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question