InsertHTML won't work with XML files

I am trying to create a command that writes text to an open
XML file. The command I've created works fine under some
circumstances but not others.
It works if I open an XML file and apply the command without
editing the file. If I make any edits to the file manually and then
apply the command, it doesn't insert anything.
It works fine with HTML files in design view, but in code
view, if I make any edits and then run the command, nothing
happens. If I switch to design view and back again, the command
then works fine.
I tested the built-in Dreamweaver command "Flash Text" on an
XML file (after editing it so it could be used with an XML file),
and the same problem occurs with this command when using it on an
XML file. The problem didn't occur with HTML in code view, though.
Below is the .JS file for my command. The corresponding HTML
file contains only an empty form.
function canAcceptCommand() {
return(true);
function isDOMRequired() {
return false;
function commandButtons()
return new Array( MM.BTN_OK, "cmdOK(); "
, MM.BTN_Cancel, "cmdCancel();");
function cmdOK()
var theDOM = dw.getDocumentDOM('document');
theDOM.insertHTML("test", true);
window.close();
function cmdCancel()
window.close();

I need a function, though, that will insert text at the
cursor location in an open file.
I'm also discovering that the command I created above
functions erratically even when it does deign to insert the text in
an XML file. The text is usually inserted somewher other than where
the cursor is located.

Similar Messages

  • Problem when load more swf files work with xml files into my movie

    hi ;
    I have one flash file & more of swf files which work with xml files .
    when I load one swf file into my flash file  and remove it and load anther one on the same movieclip in my flash file it load the old swf file.
    when i load one on movieclip and remove it and load anther swf  on anther movieclip the file doesn`t work  and stoped.
    when test my flash file to load and remove swf files without xml file it work fine but when repleaced the swf files with other work with xml files the problem hapend.
    thanks;

    YOu should trace the names of the files that are being targeted for loading to see if they agree with what you expect.  If you want help with the coding you will need to show the code that is relevant to your problem (not all of it)

  • Skin Setting not working with XML file

    I am trying to use the Adobe Flash Playback with a flashvars skin setting.  I am pointing this setting to an xml file where I am trying to overide the playButtonOverlay image.  Below is my code.  I am using MVC, so you will see a couple Html Helpers.  The helpers are working just fine.  It is only the skin setting I can't seem to get to work.  Any help would be appreciated.  Thanks, Michael.
    Html File
    <object width="384" height="288" >
         <param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" />
         <param name="flashvars" value="src=<%: Model.VideoFilePath %>&poster=<%: Model.PosterFilePath %>&skin=/Skin/FlashPlayerSkin.xml" />
         <param name="allowFullScreen" value="false" />
         <param name="allowscriptaccess" value="always" />
         <param name="quality" value="high" />
         <param name="wmode" value="transparent" />
         <embed src="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" type="application/x-shockwave-flash"
              allowscriptaccess="always" allowfullscreen="false" width="384" height="288"
              flashvars="src=<%: Model.VideoFilePath %>&poster=<%: Model.PosterFilePath %>&skin=/Skin/FlashPlayerSkin.xml"
              quality="high" wmode="transparent" />
    </object>
    XML File
    <?xml version="1.0" encoding="utf-8" ?>
    <skin>
      <elements basePath="/Content/MFBImages/FlashPlayer/">
        <element id="playButtonOverlayNormal" src="playButtonOverlay.png"/>
        <element id="playButtonOverlayDown" src="playButtonOverlay_down.png"/>
        <element id="playButtonOverlayOver" src="playButtonOverlay_over.png"/>
      </elements>
    </skin>

    Thank you both for replying so quickly.  I still don't seem be having too much luck.  The first thing I did was watched fiddler, and it did show an error with crossdomain.xml.  So I added the below elements to a crossdomain.xml file in my root folder.  I also changed all my paths to be absolute for both the skin flashvar and xml, but still no luck.
    crossdomain.xml
    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-http-request-headers-from domain="*" headers="SOAPAction,Content-Type"/>
    </cross-domain-policy>
    Since I am having trouble with the xml, I decided to try and just put the skin element into the html page where the flash player is located.  I then removed the flashvar skin element out of the player.  Below is my code for the skin element and flashplayer with absolute paths.  The player still seems to use the default overlay play button.  Any other suggestions would help out greatly.
    <skin>
    <elements basePath="http://localhost:1852/Content/MFBImages/FlashPlayer/">
      <element id="playButtonOverlayNormal" src="playButtonOverlay.png"/>
      <element id="playButtonOverlayDown" src="playButtonOverlay_down.png"/>
      <element id="playButtonOverlayOver" src="playButtonOverlay_over.png"/>
    </elements>
    </skin>
    <object width="384" height="288" >
    <param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" />
    <param name="flashvars" value="src=http://localhost:1852/VideoLibrary/Agents/test video.flv&poster=http://localhost:1852/Content/MFBImages/AgentImage/Poster.jpg" />
    <param name="allowFullScreen" value="false" />
    <param name="allowscriptaccess" value="always" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <embed src="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" type="application/x-shockwave-flash"
        allowscriptaccess="always" allowfullscreen="false" width="384" height="288"
        flashvars="src=http://localhost:1852/VideoLibrary/Agents/test video.flv&poster=http://localhost:1852/Content/MFBImages/AgentImage/Poster.jpg"
        quality="high" wmode="transparent" />
    </object>

  • How to work with .XML files with FINAL CUT PRO HD

    Ok so I am a newby, kind of. We filmed a feature using the SONY XDCAM 350. uses the optical 23.3GB disc. I used the camera to copy all the HD files ( .XML ) to an 1TB external drive. Now the drive is readable, everything looks fine, when I select a .XML file. Final Cut Pro HD opens, but then asks to choose a TRANSLATION file. Where do I go from here. I do not understand that command of action it is asking. Newby here, so pity me for awhile.
    Thanks

    my instinct is "No" but thats no (because the app is expecting th efiles to be located on an mounted XDCAM disc that is formated as such) ... but in your situation I'd be inclined to download the XDCAM Transfer app and try for myself
    what you may need to do though is get hold of the discs and a deck and import using the method above
    failing that you have the option of using Flip4Mac's MXF quicktime components ... not cheap.
    this will allow you to select the local XDCAM source media that you've alreday transfered in the native MXF format, and rewrap as Quicktime for editing in FCP
    (a trial version is available for download)
    ... and if thats out of budget, or for whatever reason not an option, you can sit it out and see if the next FCP revision helps you out any with its direct Log and Transfer support for XDCAM. may have the same restrictions though (ie need a properly attached formatted device)
    ... and other than that, you're looking at switching to an NLE with native MXF support (Avid, Edius, Vegas etc)

  • BrowserLab won't work with local files in DW CS5

    Any issue report you make about BrowserLab on these forums should minimally contain the following information. If it doesn't, the first response you get from us will likely just ask for the missing info anyway
    Subject
    A descriptive summary of the issue.
    The body should contain:
    Problem Description
    A brief description of the bug or issue
    Steps to Recreate
    The steps we should follow to reproduce your issue. Minimally include all the following:
    Does the issue happen every time, is it sporadic, or did it only happen once.
    Are you testing on Mac or Windows?
    Are you using the main BrowserLab interface, testing via Dreamweaver integration (and if so, what version of DW), or using the BrowserLab for Firebug add-on?
    What is the URL you're testing against. If it's not public, let us know and let us know if you can send us the page source.
    Expected Results
    Based on the steps you described, what you thought should happen
    Actual Results
    What actually did happen
    Thanks everyone,
    Mark
    Using BrowserLab in DW 11.0 Build 4964, BrowserLab can't seem to work. Some not very intuitive places I have checked include making sure the signon credentials are in the CSLive window in DW.
    In preview local/browser, the following messages are disappointing me:
    Timed Out, Failed to Authenticate with Browserlab
    Session Expired, See Browser
    It is on a Mac, 10.6.7, using DW integrated testing. I can log into browserlab and put a public URL, but I don't think that's going to be much better for me than having VMWare and installing free browsers on Mac and Windows, and given the failures here that would be better for local file checks too. I write this because I wonder if I will be disappointed trying to get this to work and then find out I have to pay a yearly subscription to CSLive to be able to keep using it.
    This is on a private URL and I can send the page source, but I don't think its the page that is causing the issue.
    Expected results:
    Able to preview page in any browser of my choosing
    Actual results:
    Spent the last two hours navigating help, googling possible solutions, getting many errors trying to navigate the Adobe help and forums, continually signing in on each adobe page I open. Expecting to have to reauthenticate to post this message. (Updated extension manager as well).

    Hi,
    First, there is no charge currently for using CSLive and there won't be any charge for another year.
    Second, based on what you're saying about the behavior you're seeing with BrowserLab and the issues you had with continually having to sign onto the Adobe pages, it's a strong indication that you've got cookies disabled in your browser or that something on your machine is deleting/expiring the cookies we are trying to set. What browser/version are you using and what kinds of permissions have you got set for cookies in that browser? Can you check that and change your cookie permissions for Adobe.com at least?
    Let me know if that helps or not,
    Mark

  • Won't Work with .pages file

    Hi,
    I'm going to acrobat.com to try to convert my .pages file into a pdf but it says that it's not supported.  What should I do?

    Hello,
    I'm sorry for the delay in responding to your inquiry.
    It is correct that we don't yet support .pages files for PDF conversion. It is our long term goal to support as many file types as possible. For now, you could try converting your file to a supported file type and then converting to PDF using Acrobat.com.
    Kind Regards,
    Michelle

  • How to work with xml in java ?

    Hello everybody. I am trying to read, write and modify xml file in java. But i don't know what is the best method for work with xml file ? Please give me some examples for read, write and modify it.
    Thanks in advance.

    >
    Hello everybody. I am trying to read, write and modify xml file in java. But i don't know what is the best method for work with xml file ?>'It depends'. I saw some discussions of XML parsing using different J2SE core XML APIs (the J2SE has a selection of ways to deal with XML) where one API was 20 times faster than the other.
    >
    ... Please give me some examples for read, write and modify it. >Please give me a ponie. ;-)
    You will probably need to do a lot of reading, as well as some experimentation, before you decide which XML API is best suited to the particular task you are facing.
    >
    Thanks in advance.>No worries.

  • I have a Canon D60 camera, my raw files won't work with the raw converter in my Photoshop CS5. Do I need CS6?

    Photoshop CS5 won't work with the raw files from my new Canon D60 camera. Do I need CS6?

    A Canon EOS D60? It had support since Camera Raw version 1.0.

  • Oracle reports problem in distribution with xml file

    Hi ,
    I am having problem while I am trying to distribute the file with specifing the destination details in the xml. If I am giving the destination details in url then it is working.
    Ex.
    This is Working
    http://bryxh91:8889/reports/rwservlet?report=devlopersuit/reports/test.jsp&userid=anju/[email protected]&desformat=pdf&destype=file&desname=devlopersuit/reports/output_file.pdf
    Not working :
    http://bryxh91:8889/reports/rwservlet?report=devlopersuit/reports/test.jsp&userid=anju/[email protected]&DISTRIBUTE=YES&destination=devlopersuit/reports/dis_test.xml
    xml file
    <destinations>
    <file id="test" name="output_file.pdf" format="pdf">
    <include scr="mainSection"/>
    </file>
    </destinations>
    Error : REP-34304: Distribution failed to complete; review the distribution lists
    Its been week I tried many things , but not working.
    Right now I am trying to distribute to single file but my goal is to burst and distribute on basis of account number.
    This is the first stage of the project.
    Thanks a lot for the help
    Anju

    Hello
    see answer in Oracle reports problem in distribution with xml file
    Regards

  • Safari won't work with CNN Pipeline and other sites all of a sudden?

    Safari won't work with CNN Pipeline and other sites all of a sudden? A few weeks ago Safari was working OK but now I often have to use Firefox to visit certain webpages.
    Anyone else having this same problem?
    Is there a quick fix?
    I'm using Safari 2.0.4
    Thanks.

    Hi QuickTimeKirk,
    I have WMP version 9, as well. I do not use F4M, for many users f4mac is what helps.
    I find some items work while others do not. I always get an alert about the wmp , which version it is, takes very long to load, I find it is not consistant with Safari, as seems the poster of this topic has found.
    Quoted from ms Mactopia site:
    http://www.microsoft.com/windows/windowsmedia/player/mac/
    Download and find information about Windows Media Player for Mac and playing Windows Media files in your QuickTime Player. Which download is right for you?
    Windows Media Components for QuickTime
    Windows Media Player 9 for Mac OS X
    Windows Media Player 7.1 for Mac
    Important Information
    Microsoft will continue to offer Windows Media Player for Mac as a download free of charge, but has no plans to provide future updates or product support.
    We are pleased to offer Windows Media® Components for Quicktime, by Flip4Mac™, as an alternative for Mac OS X users wanting to play Windows Media Audio and Windows Media Video.
    ~•~
    Validation of the cnn home page using the W3C Validatior, http://validator.w3.org/
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cnn.com%2F
    though 41 errors is not as poor as some, Firefox handles the site better than Safari, imo.
    Some sites just work better with Firefox or an other browser.
    Cheers,
    Eme '~[ )

  • Anyone working with XML in portlets? How?

    Do you work with XML/XSL in a JSP Portlet to build your presentation?
    We are having trouble with german Umlauts and want to know a way for XML in portlets in general.
    Thomas

    Hallo Ingo !
    We use the Oracle XML Parser and XSL transformer in a JSP Portlet. The XML is referenced throu a URL from our XML server.
    The XSL file is in the portlet directory.
    Our Problem is:
    Even if we use encoding attributes set to UTF-8 we are not able to display Umlauts correctly. They are not encoded to HTML Umlauts (e.g. &#252; to &uuml;).
    We tested our code with Apache Xalan and Xerces and everything works fine.
    I think that Oracle XML parser treats things not as they are recommended by W3C.
    Finally we gave up parsing XML with oracle Parser and now use Apache XML/XSL Parsers.
    Or do you know a better way?
    Thomas

  • Working with .wmv files on my new Mac

    Hi everyone,
    I have some videos that I downloaded onto my older pc that I would like to use in iMovie. Does anyone know how I can edit and/or convert it into a format to use on my mac?
    Thanks,
    Karen

    You can use the shareware program ReelBean to convert your .wmv to an mpeg-4 file (I think it does this in the free mode, but if not a license is $15), and then import that iMovie.
    To view the .wmv files, you need the freeware Flip4Mac. I suspect you will need the components installed by Flip4Mac for ReelBean to work with wmv files - not sure, but it won't hurt to install it.
    Hope this helps...

  • Work with office file (.docx, .xlsx)

    Hi!
    How can I open/create/save/change any word file? Can I use some library or must write myself?
    I known that docx file is archive with xml documents, but how I can change, for ex., some paragraph/text/etc.?
    Thanks!

    There are no native controls for working with docx files in Windows Store APIs. You may be able to find a third-party control that does this.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Working with XML and Button

    Hi,
    How are all of you. Well I am new to Flex. But I have started
    building simple applications. One of the top most problem I am
    facing is working with XML and Button. Can you please assist me in
    this. I am explaining my problem:
    I have an external XML file like this:
    <Menu>
    <button>
    <idnt>0</idnt>
    <label>General Health</label>
    <text>General Health pages is currently under
    construction</text>
    </button>
    <button>
    <idnt>1</idnt>
    <label>Mental Health</label>
    <text>Mental Health pages is currently under
    construction</text>
    </button>
    </Menu>
    Now I want to generate Buttons Dynamically from this XML. And
    the second thing which is the most problematic is that how I code
    it so that when I press the Button labled "General Health", it will
    show the same text as in the XML tag coresponding to tag
    "<label>General Health</label>" ?
    I badly need this. I am realy confused on this. Kindly help
    me.
    Regards
    ..::DeX

    Let's assume that variable "node" contains one element of the
    XML. For example,
    <button>
    <idnt>0</idnt>
    <label>General Health</label>
    <text>General Health pages is currently under
    construction</text>
    </button>
    such that node.label would be "General Health", node.idnt
    would be 0, etc.
    You can build a Button like this:
    var b:Button = new Button();
    b.label = node.label;
    b.data = node; // more on this later
    b.width = 60;
    b.height = 26;
    addChild(b); // critical - adds the button to the display
    list so you can see it
    b.addEventHandler( MouseEvent.CLICK, handleClick );
    You must set the button's width and height unless the button
    will be in a container that will size its own children (like Tile).
    Every Flex component has a data property. You can set it to
    whatever you like. For your needs it makes sense to set each
    Button's data property to the node it relates to.
    Now suppose that code above is in a function, createButton:
    private function createButton( node:XML ) : void {
    // code from above
    Here's how to make all the buttons where "menu" is a variable
    that contains your XML:
    for(var k:int=0; k < menu.button; k++) { // menu.button is
    an XMLList
    createButton( menu.button[k] );
    Now to handle the event:
    private function handleEvent( event:MouseEvent ) : void
    var b:Button = event.currentTarget as Button;
    trace( b.data.text);
    When a button is picked, the description element will print
    in the debug console. Replace the trace with whatever code you
    need.

  • "Display the number of found items in the find toolbar" Not work in xml file

    Word count feature that comes with version 32 does not work in xml file.

    This only happens when Firefox uses the "pretty print" layout if there is not XSL stylesheet file.
    * <b>about:config</b> page: layout.xml.prettyprint = false
    *http://mxr.mozilla.org/mozilla-release/source/content/xml/document/src/nsXMLPrettyPrinter.cpp
    *http://mxr.mozilla.org/mozilla-central/source/dom/xml/nsXMLPrettyPrinter.cpp
    *chrome://global/content/xml/XMLPrettyPrint.xml
    *chrome://global/content/xml/XMLPrettyPrint.xsl

Maybe you are looking for

  • Cannot activate adobe photoshop invalid serial number

    I allready run in circles for days now and cannot contact someone from the helfdesk. This is the problem: I bought the suite design and web prem and received a serial-number from techsoup. I also receive a login-code to download the separete installa

  • New home construction -wiring for pc to tv connection

    I want to wire for connecting a pc or apple tv to a television wall location.  If I am not worried about surround sound, would putting a HDMI cable in the wall between the two locations be all that I would need?  Conduit for an HDMI cable probably ta

  • Upon Removing Ubuntu, How can I Extend the C and D Drive in Windows 7?

    Upon Removing Ubuntu, How can I Extend the C and D Drive in Windows 7? Previously, my Computer had Windows 7 and Ubuntu as a dual Boot.  I followed some online instructions on how to Delete Grub (Ubuntu's Startup Boot Menu) and Ubuntu Partitions (<ed

  • Where is my Directory Location in my HHD ?

    when we do this :- CREATE DIRECTORY log_dir AS '/appl/gl/log'; where suppose can i find this[b] directory '/appl/gl/log' in my Hard Disk ?!

  • Programmatic Client Tutorial

    There is a problem with findByKey() when I run the code below. When I run in debug, the ViewObject vo and the custKey look good. The error message I get when it hits findByKey is: java.lang.NoSuchMetthodError: void oracle.jdbc.oracore.OracleTypeADT.i