Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
harpo_ #1
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
-
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... -
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... -
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... -
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... -
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... -
danilocelic *TMM* #2
Re: How to emulate F5 (Refresh) for the currently edited document?
harpo_ wrote:
Maybe try:> So I need to emulate a 'refresh', but have no idea how.
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
-
harpo_ #3
Re: How to emulate F5 (Refresh) for the currently editeddocument?
simple, isn't it?
:)
Thanks a lot Danilo! Now everything works fine.
harpo_ Guest
-
harpo_ #4
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



Reply With Quote

