Solved

Using untranslated source code.

Posted on 2002-06-26
5
135 Views
Last Modified: 2010-04-25
I want to use the DOM to manipulate the untranslated source code seen in the code view.  However, dw.getDocumentDOM('document') returns the DOM for the translated code.  How do I get around this?
    Thanks,

      -Josh Brown
0
Comment
Question by:ElPoojmar
5 Comments
 
LVL 23

Expert Comment

by:Zeffer
Comment Utility
isn't that the point of using the getDocumentDOM..
to return the tree of objects..which you then edit?

also this NOTE from DW help..

If the argument is "document", the caller must be applyBehavior(), deleteBehavior(), objectTag(), or any function in a command or Property Inspector file in order to perform edits to the document.

(and an example)..

The following code snippet uses dreamweaver.getDocumentDOM() to access the background color of the current document:

var theDOM = dreamweaver.getDocumentDOM("document");
theDOM.body.bgcolor = "#000000";

hope this helps

Z

0
 

Author Comment

by:ElPoojmar
Comment Utility
There are things in dreamweaver called translators, which
translate the code seen in the code view to something else (such as an image tag) before it is displayed in the design view.  So you can tell dreamweaver to translate

<made_up_tag>

to

<img src="made_up_tag.gif">

So that there is some visible representation of the new tag in design view, while the code view still contains only the original tag.  However, the object theDOM = dreamweaver.getDocumentDOM('document') is the DOM for the TRANSLATED code, so if I place my cursor on the tag "<made_up_tag>" in the code view, theDOM.getSelectedNode().tagName is "IMG" not "MADE_UP_TAG".

I want to know how to get the DOM for the untranslated code (ie the code you see in the code view).
0
 
LVL 23

Expert Comment

by:Zeffer
Comment Utility
Beautifully explained.
It would seem that translating capabilities are called
with the DOM and need to be separated from it.
I  don't know how you would do this..but search at..
http://www.oreillynet.com/
there might be a solution there..good luck

Z
0
 
LVL 5

Expert Comment

by:zenlion420
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

zenlion420
EE Page Editor
0
 

Accepted Solution

by:
YensidMod earned 0 total points
Comment Utility
This question is PAQed and  200 points refunded.

YensidMod
Community Support Moderator
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now