Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
srowe3 #1
dom vs. document.getElementsByTagName
Okay, since you guys are so helpful and smart, here's another one that's got me
stumped. Why does dom.getElementsByTagName work when assigned to a variable,
but document.getElementsByTagName doesn't? Example below.
function reportSkuCondMeta() {
// Read current document's SKU_Condition meta tag
var dom = dw.getDocumentDOM(); // get the dom of the current document
var skuCondMeta = dom.getElementsByTagName("meta");
for ( counter = 0; counter < skuCondMeta.length; counter++)
{
if (skuCondMeta[counter].name == "SKU_Condition") // now I want the DOM of
the extension form
// the following code returns error "displaySku has no properties"
var displaySku = document.getElementsByTagName("input");
for ( iter = 0; iter < displaySku.length; iter++)
{
if (document.displaySku[iter].name == "sku_cond")
document.displaySku[iter].value = skuCondMeta[counter].content;
}
// the following code runs just fine
/* for ( iter = 0; iter < document.getElementsByTagName("input").length;
iter++)
{
if (document.getElementsByTagName("input")[iter].name == "sku_cond")
document.getElementsByTagName("input")[iter].value =
skuCondMeta[counter].content;
} */
}
}
Of course, for ease of formatting and elegance, I want to do the second of the
two uses of document.getElementsByTagName, but I can't get it to work. Any
ideas on this would be great.
Thanks!
-Scott
srowe3 Guest
-
getElementsByTagName("input").value); // returnsundefined
Please help! The DW API function, getElementsByTagName() doesn't return any values. I'm defining the following form as part of an Insert bar... -
Characters overlapping in pdf document created from a Word document
We are using Adobe Acrobat 6.0, Word and Excel 2002 and Windows 2000. We create a portion of a document in Word and a portion in Excel. Then we print... -
Document security has been removed, document will close
I have opened this document numerous times, and all of a sudden I can no longer open this document. Can some one tell me what I need to do to open... -
The document could not be saved. There was a problem reading this document (109).
Me again. I lied. When I tried to use Acrobat Pro 6 to save a file created in Acrobat 5, I got the "info" box: "The document could not be saved.... -
document tabs vanished / can't maximize document window
I am having the same problem & it also appears & disapears at random. I tried maximizing the document window to no avail. Any ideas will be...



Reply With Quote

