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:
01075204
Views:
41
Hi,

I know that the IE DOM parses it differently - but it doesn't make any difference to the execution. How about an example of what isn't working ?


>>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>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform