This is a discussion on "Modify the DOM?" within the JavaScript Forum section. This forum, and the thread "Modify the DOM? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Modify the DOM?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Modify the DOM?
Hi
I want to send a selected text to the google translator (http://www.google.com/translate_t) and insert the translated text on the fly into the DOM of the page, so that it replaces the old text. Now the problem: I only send the text to google translate and get a text back (without the tags) - but how do I keep the html-tags, so that when I insert the translated text into the DOM, it displays correctly? For example you have "<div>Some text and <b>some bold</b> words.</div>". The user selects "Some text and some bold words.", it gets translated, and inserted back in as "Etwas Text und einige fette Wörter." But the tags are missing and it doesn't display correctly. I do it this way:
Any help would be appreciated. |
|
|
|
||||
|
Re: Modify the DOM?
That would be very confusing
you'd have to send everything in sections and piece it back together i think
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to modify a website | creomte | Starting Out | 3 | Feb 19th, 2008 11:33 |
| [SOLVED] How to modify lists | thewebkid | Web Page Design | 3 | Nov 26th, 2007 12:10 |
| How to Modify Existing SWF file | khwo | Flash & Multimedia Forum | 21 | Oct 28th, 2006 19:26 |
| Can Anyone Modify This Script? | gajlehab | JavaScript Forum | 0 | Jan 20th, 2006 14:27 |
| Cannot modify header information - headers already sent | Tim356 | PHP Forum | 2 | Aug 7th, 2005 22:58 |