Jump to content

wallyson

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by wallyson

  1. Thanks man, but I get a "cant use key word param here" when trying to make the convert, do you know any other tricks with working with other languages variables? thanks Andrew
  2. Holiday is in the XML file.pass is sent from another function called showHolidays.pass will be a holiday.then in the xsl the the Holiday element will check pass and if they equal, it will print out that country.It works when you type in the name of a country, but i dont wnat it to that obviously. Some wierd reason it wont check agiasnt that Jscript Variable. This goal is easy, i have an xml file with countries and holidays, im making it sort through them.what you dont see is the drop down were the user selects a month.then all the holidays in that month are shown.then you click on a holidaythen the countries show up that celebrate that holiday.its messing up at the showing the countries part. and thats why i posted.
  3. Here is snippet of my xml :<Holidays> <Months> <Data> <Name>August</Name> </Data> </Months> <Days> <Data> <Day>1</Day> <Holiday>Emancipation Day</Holiday> <Country>(BRB, JAM, TTO)</Country> </Data> <Data> <Day>1</Day> <Holiday>Parents Day</Holiday> <Country>(COG)</Country> </Data>............................................Ok here is a Jscript function in my XSL code:function showCountries(pass){ var results =''; var sendtoDIVid = "requests"; switch(pass) { case pass: results +='<p style="color: Navy">Countrys</p>'+ '<p style="color: Navy">'+pass+' 2006</p>'+ '<ul>'+']]><xsl:for-each select="Holidays/Days/Data[Holiday = '+pass+']"><![CDATA['+ '<li style="color: navy">'+']]><xsl:value-of select="Country"/><[CDATA[</li>'+ ']]></xsl:for-each><![CDATA['+ '</ul>'+ '</table>'; document.getElementById(sendtoDIVid).innerHTML = results; break; default: }}]]></script>...............................................Ok the pass variable comes in and has a holiday for example 'Emancipation Day', that variable is then Checked agaisnt Holiday, then it will print out the country that celebrates 'Emancipation Day'.Well it doesnt work, I know my logic is right becuase if type in 'Emancipation Day'where [Holiday = 'pass'] is at (so: [Holiday = 'Emancipation Day']) it works.How do I get that Jscript variable to work?PS. I already tried writing it so that pass had single quotes " ' " around it.Please help.
×
×
  • Create New...