Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows VistaWindows XPWindows MeWindows 98Windows 95Virtual PCInternet ExplorerOutlook ExpressWindows MediaSecurity
Related Topics
MS Server ProductsMS OfficePC HardwareMore Topics ...

Windows Forum / Internet Explorer / General Topics / July 2008

Tip: Looking for answers? Try searching our database.

"unknown runtime error" in htc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Hemans - 22 Jun 2008 20:12 GMT
I am trying to use an htc file that generates it's content.
The web page:
<html>
<style TYPE="text/css">
.test { behavior:url(test.htc) }
</style>
<BODY>
<test class="test"></test>
</html>

The htc file:
<script language="javascript">
element.innerHTML = "<b>hello world</b>";
</script>

element.innerHTML generates an "unknown runtime error" any ideas?
Paul Hemans - 23 Jun 2008 01:22 GMT
Appears the xmlns namespace spec is required if you are going to modify
innerHTML in a htc.

>I am trying to use an htc file that generates it's content.
> The web page:
[quoted text clipped - 12 lines]
>
> element.innerHTML generates an "unknown runtime error" any ideas?
trosen - 23 Jul 2008 16:32 GMT
> Appears the xmlns namespace spec is required if you are going to modify
> innerHTML in a htc.

No, not needed

The web page:

<html>
<head>
<style TYPE="text/css">
.htc_test { behavior:url(htc_test.htc) }
</style>
</head>
<body class="htc_test"></body>
</html>

The htc file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<public:component xmlns:public="urn:HTMLComponent" lightweight="true">
<public:attach event="oncontentready" handler="execute" />

<script type="text/javascript">
function execute() {
    element.innerHTML = "<b>hello world</b>";
}
</script>
</public:component>
trosen - 23 Jul 2008 16:39 GMT
My sample contained xmlns: but that is not needed so htc could be simpler:

The htc file:

<?xml>
<public:component>
<public:attach event="oncontentready" handler="execute" />

<script type="text/javascript">
function execute() {
    element.innerHTML = "<b>hello world</b>";
}
</script>
</public:component>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.