flyclassic
09-23-2002, 05:37 AM
Hello, in ASP how do i use a IF statement and a for loop? Any Examples
I would like to convert from Javascript to ASP, but in ASP i don't know how to use for command and if, it's different from Javascript and C language
for(i=0;i<objNodeList.length;i++)
{
objNode=objNodeList.item(i);
if(objNode.nodeType ==7)
{
objNewPI = objDOM.createProcessingInstruction("YourApp"," ");
objNewPI.data = objNode.data
objNode.parentNode.replaceChild(objNewPI, objNode);
alert("New Processing Instruction created");
}
}
I would like to convert from Javascript to ASP, but in ASP i don't know how to use for command and if, it's different from Javascript and C language
for(i=0;i<objNodeList.length;i++)
{
objNode=objNodeList.item(i);
if(objNode.nodeType ==7)
{
objNewPI = objDOM.createProcessingInstruction("YourApp"," ");
objNewPI.data = objNode.data
objNode.parentNode.replaceChild(objNewPI, objNode);
alert("New Processing Instruction created");
}
}