Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using untranslated source code.

Posted on 2002-06-26
5
Medium Priority
?
142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

722 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