Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default DOM meta tags

    Hi there!

    I'm writing an extension for DW8 that retrieves the contents of a meta tag
    from the current XHTML document:

    <meta name="SKU_Condition" content="some_name" />

    So I've got the following from the Extending DW help and the API ref:

    var dom = dw.getDocumentDOM(); //get the dom of the current document
    var skuCondMeta = dom.getElementsByTagName(???);

    I see that the getElements function returns a list of child tags for a given
    tag type like DIV, IMG, etc.

    Where do I go from here?

    -Scott



    srowe3 Guest

  2. Similar Questions and Discussions

    1. Meta Tags
      I'm using Publisher 2002 sp2. How do I add title, description and keyword meta tags so they get picked up by search engines? I've tried editing...
    2. Meta Tags???
      I made a web page a while back and I remember reading about adding meta tags to the body of page. It was done by opening another small window. Now...
    3. How to use ph to set meta tags ?
      Daniel Szasz <danysz@yahoo.com> wrote: You might also want to make sure that it is quoted: <META NAME="mAuthor" CONTENT="<?echo mAuthor() ?>"...
    4. [PHP] How to use ph to set meta tags ?
      You're close but instead of <? mAuthor() ?> try <?php print mAuthor(); ?> That will print the return value of your function - which by example...
    5. meta tags...
      Hey all, I've put keywords into my .dwt (template files) but I'm curious if the search bots actually see them in the .dwt? Should they be in the...
  3. #2

    Default Re: DOM meta tags

    Okay, here's the solution:

    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 == "some_name")
    alert(skuCondMeta[counter].content);
    }

    srowe3 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139