You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-dev@incubator.apache.org by Michael Turyn <MT...@nexaweb.com> on 2006/10/19 18:27:30 UTC
Adding a tag to an IE DOM? Changing a title?
I've looked at a couple of ways of setting a browser title using xal
alone.
First I tried setting the /html/head/title element to a new <title/>
element using xmodify on the HTML DOM. The node was replaced, but
neither Firefox nor IE knew that its dom had been altered---I guess---in
any event, the displayed title didn't change. I could find
documentation about this being a known bug in IE, but didn't find
something similar for Firefox, but in any event, this looked like a
blind alley.
I next tried using HTML/Xmodify to insert a <script/> tag into the
<head/>:
<xm:append select="//HTML/HEAD">
<script language="JavaScript"
type="text/javascript"
id="test"
>
document.title="Text area tests:";
</script>
</xm:append>
This works fine under Firefox, but not under IE. The new <script/> node
doesn't show up at all for IE (I'm chekcing using a demoware version of
a product called IEInspectore). Yes, I tried both lower- and upper-case
tag names for the xpath select statement, and for the script tag. I
think it might be a security "feature" designed to plug a hole involving
someone adding malicious scripts to existing code, but that's a wild
guess.
Any ideas?, either for DOM invalidating to get the new title, or for
running a script? I can't do more with this now, but it would be good to
know how to do it.