Hi,
this code doesn't work on iMAc, can somebody help me?
This is the error:
test for equality (==) mistyped as assignment (=)? Assuming equality test.
while (tinf = findNamedTagString(text, tagname))
.......................................................^
function removeTagParamsString(text, tagname, paramlist)
{
var tinf;
var params;
var newtag;
while (tinf = findNamedTagString(text, tagname))
{
params = getTagParams(tinf[2]);
newtag = '<!!' + tagname;
for (a = 0; a < paramlist.length; a++)
{
for (b = 0; b < params[0].length; b++)
{
if (paramlist[a] == params[0])
{
newtag = newtag + ' ' + params[0] + '=';
if (params[1].indexOf("'") == -1)
newtag = newtag + "'" + params[1] + "'";
else
newtag = newtag + '"' + params[1] + '"';
}
}
}
newtag = newtag + '>';
text = text.substr(0, tinf[0]) + newtag + text.substr(tinf[1] + 1);
}
Thanks for any help.
Mike
this code doesn't work on iMAc, can somebody help me?
This is the error:
test for equality (==) mistyped as assignment (=)? Assuming equality test.
while (tinf = findNamedTagString(text, tagname))
.......................................................^
function removeTagParamsString(text, tagname, paramlist)
{
var tinf;
var params;
var newtag;
while (tinf = findNamedTagString(text, tagname))
{
params = getTagParams(tinf[2]);
newtag = '<!!' + tagname;
for (a = 0; a < paramlist.length; a++)
{
for (b = 0; b < params[0].length; b++)
{
if (paramlist[a] == params[0])
{
newtag = newtag + ' ' + params[0] + '=';
if (params[1].indexOf("'") == -1)
newtag = newtag + "'" + params[1] + "'";
else
newtag = newtag + '"' + params[1] + '"';
}
}
}
newtag = newtag + '>';
text = text.substr(0, tinf[0]) + newtag + text.substr(tinf[1] + 1);
}
Thanks for any help.
Mike