Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IE innerHTML strips quote characters.
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
01073392
Message ID:
01075069
Views:
46
>What doesn't work? Restoring the original? This rewrites the tag in the way you describe and works fine (I used outerHTML for simplicity but the same applies to innerHTML)

Try it this way in IE (note no quotes in BTAG when you do it). Also, whjen in firefox I get an undefined - it may be related to outerHTML
<html><body>
<A id="ATAG" onclick=myfunction()>Rewrite Function</A>
<br>
<A id="BTAG" onclick="testfunction()">Test Function</A>
<br>
<A id="CTAG"></A>

<script>
var savedHTML;
function myfunction(){
savedHTML =document.anchors("BTAG").outerHTML
document.anchors("BTAG").outerHTML = savedHTML
document.anchors("CTAG").innerHTML ="Test Function Rewritten";
};
function testfunction(){
document.anchors("CTAG").innerHTML = "Test Function OK" ;
};
function whatisatag(){alert(document.getElementById("ATAG").outerHTML);}
function whatisbtag(){alert(document.getElementById("BTAG").outerHTML);}
</script>
<form><input type="button" value ="What is BTAG?" onclick="whatisbtag();">
<input type="button" value ="What is ATAG?" onclick="whatisatag();"></form>
</body>
</html>
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform