February 2002

02/06/2002 Wednesday

Alastair has a problem but I don't have the solution. Do you? Here's the situation: he's got an IE-specific web application with a frameset written as an HTC. Within one of the frames is a div into which HTML chunks are written using the innerHTML property. This works fine for HTML and most scripts but there is an issue with scripts (either Javascript or VBScript) when the function names in the current and previous chunks have the same name - the old functions are still available and the new ones aren't. The browser seems to ignore any functions that have the same name as previously defined functions. He's tried pulling all the functions into external .js files and calling the script from both inside and outside the div. He has also tried creating a script element node outside the div and using the DOM to set the src property for the script element. Nothing has worked. Anyone have any idea what is going on and how to fix it? Is it something to do with the use of HTCs?
As an aside, I had a similar problem a couple months ago. I had a div into which I was writing HTML from the server. I was using the standard method of loading the HTML into an iframe and then copying it over to the div using innerHTML (for IE) and cloneNode (for Mozilla). This copied the HTML fine but the scripts weren't reparsed in the context of the div (they were defined in the context of the iframe). So, in my case, none of the scripts worked. Liorean (provider of several 1k DHTML API variants and subsets) sent me the solution - use the DOM to create a script element:


Unfortunately, this hasn't worked for Alastair.
09:10 permalink

Well, February 5 was not the day of reckoning. It was, however, the day of salmon in phyllo.
08:10 permalink

02/05/2002 Tuesday

I should preface this by mentioning that I don't believe in astrology. I have a degree in astrophysics - that's about as anti-astrology as you can get. Anyways, Sherry cut out my horoscope yesterday:

Virgo - Soon you will realize that the time has come to change many aspects of yourself. The universe has been whispering in your ear for months, if not years. Now it is screaming at you to use your superior wisdom and get things straight. February 5 is the day of reckoning.

08:25 permalink