Yes, it's a JavaScript function using the document.write method to actually
write the page contents. You could include that code in your new
InsertControl (or whatever you called it) JavaScript funtion that writes the
object tag. It is generally placed in the head, so you may have to use
JavScript to generate the entire page.
I see the closing script tag in Outlook Express and on the web forums, so
maybe your news reader is stripping it out. In any case, yes, it needs to
be there. It sounds like there might be a problem in the order in which
things are being written and read in the page. The onViewChanged JS
function is probably being read first and it's object reference is broken
since the map object does not exist yet.
I'm hoping that Autodesk can look at this further and let us know what to do
in this case.
Andy
wrote in message news:5136492@discussion.autodesk.com...
Andy,
I tried that but I can't get it to work at all. The code you included is a
Javascript function, right? And where do you put it: in the head? The body?
A separate js page? I seem to get different error messages if I put the code
in different places.
I notice you don't have an opening document.write('script
language="VBScript"'); in your code, but you do close it. How does that
work? Or did the forum remove that for you?
If I put the document.writes for the VBScript after the document.writes for
the ActiveX, then I get a Javascript error "Type Mismatch:
'onViewChanged'".
It seems like maybe the map object is not getting passed to the javascript,
but I can't tell why.