Solved

Using untranslated source code.

Posted on 2002-06-26
5
137 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Center Table on Web Page 6 389
Dreamweaver CS6 keyboard shortcut 8 1,044
Edit Muse Website with Dreamweaver 6 1,162
Multiple HTML5 Videos – One player – Dreamweaver CS6 10 267
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

18 Experts available now in Live!

Get 1:1 Help Now