Cannot Insert Code in with my Extension.

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

  1. #1

    Default Cannot Insert Code in with my Extension.

    Hey everyone!

    Back with another question.

    I am trying to figure out why I cannot add code to my command extension.
    There is a UI with it, and my custom button code looks like this:

    function commandButtons() {
    return new Array("OK", "window.close()",
    "Insert Code", "objectTag()",
    "Cancel", "window.close()");
    }

    and my objectTag function looks like this:

    function objectTag() {
    return '\n' +'<OBJECT CLASSID="clsid:166F1OOB-3A9R-11FB-8075444553540000" \n'
    + 'CODEBASE="http://www.mysite.com/product/cabs/myproduct.cab#version=1,0,0,0"
    \n' + 'NAME="MyProductName"> \n' + '<PARAM NAME="SRC" VALUE=""> \n' + '<EMBED
    SRC="" HEIGHT="" WIDTH="" NAME="MyProductName"> \n' + '</OBJECT>'
    }

    Why... when I press the button does it not insert the code. In fact nothing
    happends.

    Thanks!

    Jammer Guest

  2. Similar Questions and Discussions

    1. Adding Extension Tab to Insert Bar
      Finally, after much trial and error, I' ve created an extension to insert some code I needed that prompts for input... Now, however, in following...
    2. Insert Object Extension (?) Help for Newbie
      Not quite sure where to begin...I'm rather new at Dreamweaver, and I'm finding a need to have an insert extension written which will automate the...
    3. How do I insert an extension into a DW file.
      I am new to Dreamweaver. I have downloaded Web Photo Album 2.2 for Dreamweaver 8 and MX 2004, V2.2.6 from ... ...
    4. Problem with Insert Flash Extension
      Hi Experts, I am having trouble with the Insert Flash HTML Extension. It is complaining that the HTML was not created by Flash Publish, but it...
    5. Bug in extension-insert tag
      Bob Crawford wrote: The docs say nothing about where the inserted item would be placed, and I would only expect it to be placed as it's own...
  3. #2

    Default Re: Cannot Insert Code in with my Extension.

    Hi Jammer

    you have a window.close() for the OK and the Cancel, of course when you
    click Ok it just close the window and stop.

    They are three pairs but may be two you can use the third for the help or
    else, for each one the first is the button and the other the funcion to
    associate.
    return new Array("OK", "theFunction which inserts the code", "Cancel",
    "window.close()");

    Felix
    P.S. Michael is right, you have to use layers.



    "Jammer" <webforumsuser@macromedia.com> ha scritto nel messaggio
    news:dhro6q$ac5$1@forums.macromedia.com...
    > Hey everyone!
    >
    > Back with another question.
    >
    > I am trying to figure out why I cannot add code to my command extension.
    > There is a UI with it, and my custom button code looks like this:
    >
    > function commandButtons() {
    > return new Array("OK", "window.close()",
    > "Insert Code", "objectTag()",
    > "Cancel", "window.close()");
    > }
    >
    > and my objectTag function looks like this:
    >
    > function objectTag() {
    > return '\n' +'<OBJECT CLASSID="clsid:166F1OOB-3A9R-11FB-8075444553540000"
    > \n'
    > +
    > 'CODEBASE="http://www.mysite.com/product/cabs/myproduct.cab#version=1,0,0,0"
    > \n' + 'NAME="MyProductName"> \n' + '<PARAM NAME="SRC" VALUE=""> \n' +
    > '<EMBED
    > SRC="" HEIGHT="" WIDTH="" NAME="MyProductName"> \n' + '</OBJECT>'
    > }
    >
    > Why... when I press the button does it not insert the code. In fact
    > nothing
    > happends.
    >
    > Thanks!
    >

    Distefano Felice Guest

  4. #3

    Default Re: Cannot Insert Code in with my Extension.

    Ahhhhh... ok. That makes sense.. Thanks!

    Also I found that becuase I was using a command I was not able to use the
    objectTag() function to insert code. I had to use the dom.insertHtml() function.

    Thanks again!

    Jammer 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