Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: pass parameter with Jscript pass parameter with JscriptTo: NULL Date: 4/7/2007 9:08:00 AM
<%@LANGUAGE = JScript%>
<%
function XmlG(id)
{
var xmldom = new ActiveXObject("Microsoft.XMLDOM");
xmldom.async = false;
xmldom.load(Server.MapPath("tutte_ctg.xml"));
var leggi = xmldom.getElementsByTagName("BuildSearchForm/
Categories/Category[ID = id]/Name");
Response.Write (id);
for (var i=0; i<leggi.length; i++)
{
Response.Write("<li>" + leggi[i].text + "</li>");
}
}
%>
<%=XmlG("3")%>
My trouble is: the value is not diplayed
instead if I call manually
var leggi = xmldom.getElementsByTagName("BuildSearchForm/Categories/
Category[ID = 4/Name");
the right value is returned...
then Response.Write (id);
return 3 as called from <%=XmlG("3")%>
I suppose its a typcasting problem
about the xml:
<BuildSearchForm>
<Categories>
<Category>
<ID>
<![CDATA[ 3
]]>
</ID>
<Name>
<![CDATA[ 3 Stelle
]]>
</Name>
</Category>
</Categories>
<BuildSearchForm>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
