How to emulate F5 (Refresh) for the currently editeddocument?

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

  1. #1

    Default How to emulate F5 (Refresh) for the currently editeddocument?

    Hi, I have a custom object which makes something like this (in the
    insertObject() function): - checks if a comment like <!--blah(.*)? --> exists
    in the source - if no, inserts a comment like <!--blah1 --> at the end of
    the file, and saves the document. -if yes, returns a message that a comment
    already exists and makes nothing more But if the Code View is currently
    focused, this works only the first time. If I insert the comment and then call
    the function again, it can't find the previously inserted comment, so it
    inserts it once more. The problem does not appear in Design view, if I click
    Design and then back Code View, or if I stay in Code view and hit F5 before the
    second attempt. But if I stay in Code view and call the function again without
    a refresh, it does not behave correctly. So I need to emulate a 'refresh', but
    have no idea how. Tried releaseDocument, but there is no difference. Thanks

    harpo_ Guest

  2. Similar Questions and Discussions

    1. Problem with using func_num_args to emulate get/set?
      I'm using func_num_args to create a get/set type of function. Will this have unpredictable results, or or lead to some sort of problem I'm just not...
    2. Best way to emulate number of requests cap
      Hi all: I want to write a very simple web service that just reads 1 XML file and serves it out to emulate the real web service. However I know...
    3. Emulate a explorer window
      How can i display a web page on top of a current web page without having to open a new internet explorer window. For example you have a calendar text...
    4. Emulate perls local
      Hello Ruby Fans, I'm working on the ruby section of the pleac project, (http://pleac.sourceforge.net) because I think a good way to learn a new...
    5. How can I emulate my browsers HTTP_USER_AGENT?
      Folks, I use Apache/PHP with Webazlier to view the log files. I get a number of user agents (web browsers?) that visit the website - For...
  3. #2

    Default Re: How to emulate F5 (Refresh) for the currently edited document?

    harpo_ wrote:
    > So I need to emulate a 'refresh', but have no idea how.
    Maybe try:

    dom.synchronizeDocument();


    --
    Danilo Celic
    | Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
    | Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
    danilocelic *TMM* Guest

  4. #3

    Default Re: How to emulate F5 (Refresh) for the currently editeddocument?

    simple, isn't it?
    :)
    Thanks a lot Danilo! Now everything works fine.
    harpo_ Guest

  5. #4

    Default Re: How to emulate F5 (Refresh) for the currently editeddocument?

    well I was a bit too quick :) dom.synchronizeDocument() does not help in
    code-only view (as it syncs code <--> design views). So I did it like this:
    theDOM = dw.getDocumentDOM('document'); domView=theDOM.getView();
    if(domView=='code'){theDOM.setView('split')}; theDOM.synchronizeDocument(); //
    do stuff here if(domView != theDOM.getView()){theDOM.setView(domView)};
    //restore old view

    harpo_ 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