javascript "eval" problem

3mors

HampCake Studios
i have this piece of js code:
Code:
string = "document.getElementById(\"infouser1\").innerHTML = \"<a href=\"idcard.html\">idcard<\/a>\";";
eval(string);
it works perfectly on safari and mac ie, but on ie for windows i get an unknown runtime error.
the problem is <a that has to be written inside infouser1 tag.
i've already tried to escape the < usign \< but without luck.

any help?
thank u.
 
the ";"; is correct

the ";" belongs to the string that has to be evaled
the second ; is for string line
 
Back
Top