Solved

Using untranslated source code.

Posted on 2002-06-26
5
136 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
ID: 7115320
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
ID: 7116716
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
ID: 7117357
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
ID: 9834705
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
ID: 9879865
This question is PAQed and  200 points refunded.

YensidMod
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 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

17 Experts available now in Live!

Get 1:1 Help Now