Answered
Reload current document?
Running DW8, building an insertObject() extension; 2 problems
that appear related to loading the current document.
Problem 1:
DW maintains the current document as it was loaded, even after making a change to it and saving; I have to reload the document (manually) for it to be treated properly with extension.
Here's what's going on:
I have a JavaScript function that reads a meta tag content in the current document. Between function calls, I change the meta tag content and save the file. DW still refers to the old content.
Problem 2:
The insertObject() function does not run if the document has unsaved or saved changes.
Here's what's going on:
My insertObject() function inserts a line of text into the current document. It will run the first time on the document, when the document has not been edited. Thereafter, it fails, even if the changes have been saved.
I've tried calling dw.releaseDocument(dom); at the end of each function explicitly, to no avail.
When I run example code from the Extending Dreamweaver reference, it works as expected.
Any ideas?
Problem 1:
DW maintains the current document as it was loaded, even after making a change to it and saving; I have to reload the document (manually) for it to be treated properly with extension.
Here's what's going on:
I have a JavaScript function that reads a meta tag content in the current document. Between function calls, I change the meta tag content and save the file. DW still refers to the old content.
Problem 2:
The insertObject() function does not run if the document has unsaved or saved changes.
Here's what's going on:
My insertObject() function inserts a line of text into the current document. It will run the first time on the document, when the document has not been edited. Thereafter, it fails, even if the changes have been saved.
I've tried calling dw.releaseDocument(dom); at the end of each function explicitly, to no avail.
When I run example code from the Extending Dreamweaver reference, it works as expected.
Any ideas?