Pasting into a Webpage Message box

J

joel

I'm working om a Webpage project where I'm copying from a word documen
to a webpage with a box similar to the message box I'm presently typin
in. The webpage doesn't allow modifying the innertext or innerHTML.
saved the word document to HTM file format. I then open the html fil
as a text file and perform a readall. Then simply move it to the outte
html

IE.myobject.outterhtml = fs.readall

This destroys the box and just displays the tagged data. I wa
thinking of just replacing the body protion of the outterhtml but
can't even find the body tags and don't think this will work. An
suggestions on the best approach. I know from looking at the proertie
of the obx object is does allow pasting but not sure the syntax to cop
the data from the DOC into the webpage object
 
T

Tim Williams

Why not post the HTML for the "box" ? It's hard to tell what you mean since
there seem to be multiple interfaces for this newsgroup (for better or
worse...)

Tim
 
J

Joel

It is the yahoo send mail box. It is a container with the boy
id=compose_editorArea

<DIV id=rteContainer class=fields><DIV style="POSITION: relative; WIDTH:
550px" id=compose_palette class="pim richTextEditorComp">
<DIV style="HEIGHT: 30px"></DIV><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: 3px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 3px"
class=DhtmlButtonText title="Spell Check" href="#Spell Check"
unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -27px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 40px"
class=DhtmlButtonText title="Font face" href="#Font face"
unselectable="on"></A>
<DIV style="TOP: 4px; LEFT: 37px" class=RTEDivider></DIV><A
style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -57px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 71px"
class=DhtmlButtonText title="Font size" href="#Font size"
unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -87px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 108px"
class=DhtmlButtonText title=Bold href="#Bold" unselectable="on"></A>
<DIV style="TOP: 4px; LEFT: 105px" class=RTEDivider></DIV><A
style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -117px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 139px"
class=DhtmlButtonText title=Italic href="#Italic" unselectable="on"></A><A
style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -147px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 173px"
class=DhtmlButtonText title=Underline href="#Underline"
unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -177px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 210px"
class=DhtmlButtonText title="Text Color" href="#Text Color"
unselectable="on"></A>
<DIV style="TOP: 4px; LEFT: 207px" class=RTEDivider></DIV><A
style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -207px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 241px"
class=DhtmlButtonText title="Highlight Color" href="#Highlight Color"
unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -237px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 275px"
class=DhtmlButtonText title="Insert Emoticon" href="#Insert Emoticon"
unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -267px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 309px"
class=DhtmlButtonText title="Insert Hyperlink" href="#Insert Hyperlink"
unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -297px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 343px"
class=DhtmlButtonText title="Insert Line" href="#Insert Line"
unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -327px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 380px"
class=DhtmlButtonText title="Change Alignment" href="#Change Alignment"
unselectable="on"></A>
<DIV style="TOP: 4px; LEFT: 377px" class=RTEDivider></DIV><A
style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -357px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 411px"
class=DhtmlButtonText title="Bullets and Numbering" href="#Bullets and
Numbering" unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -387px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 448px"
class=DhtmlButtonText title="Decrease Indent" href="#Decrease Indent"
unselectable="on"></A>
<DIV style="TOP: 4px; LEFT: 445px" class=RTEDivider></DIV><A
style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -417px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 479px"
class=DhtmlButtonText title="Increase Indent" href="#Increase Indent"
unselectable="on"></A><A style="BACKGROUND-IMAGE:
url(http://mail.yimg.com/a/i/us/mg/gr/20070712/rte.gif); POSITION: absolute;
WIDTH: 26px; DISPLAY: block; BACKGROUND-REPEAT: no-repeat;
BACKGROUND-POSITION: -447px 0px; HEIGHT: 20px; TOP: 4px; LEFT: 516px"
class=DhtmlButtonText title=Stationery href="#Stationery"
unselectable="on"></A>
<DIV style="TOP: 4px; LEFT: 513px" class=RTEDivider></DIV></DIV>
<DIV style="POSITION: absolute; PADDING-BOTTOM: 0px; WIDTH: 552px;
MARGIN-BOTTOM: 0px; TOP: -999px" id=spellcontrol class=clearfix>
<DIV id=spellbox class=clearfix>
<DIV id=btnbox class=first>
<DIV style="DISPLAY: none" id=spellmsg></DIV>
<DIV id=correction><LABEL for=spellChange>Change to: </LABEL><INPUT
id=spellChange onkeypress=speller.onKeyPressWord(event);></DIV><SPAN
class="btn split"><BUTTON style="VISIBILITY: visible" id=Change
class=hasdefaultstate type=button value="Change">Change</BUTTON></SPAN><SPAN
class="btn split"><BUTTON style="VISIBILITY: visible" id=Ignore
class=hasdefaultstate type=button value="Ignore">Ignore</BUTTON></SPAN><SPAN
class=btn><BUTTON id=doneButton onclick=spellDone(); type=button
value="Close">Close</BUTTON></SPAN></DIV>
<DIV id=slbox><LABEL id=sugglabel
for=spellSelect>Suggestions: </LABEL><SELECT style="VISIBILITY: visible"
id=spellSelect onchange=spellController.onChangeSuggestions();
size=4></SELECT></DIV></DIV><SELECT style="DISPLAY: none; VISIBILITY:
visible" id=changemenu><OPTION selected value=0>Change this
word</OPTION><OPTION value=1>Change all occurrences</OPTION></SELECT><SELECT
style="DISPLAY: none; VISIBILITY: visible" id=ignoremenu><OPTION selected
value=0>Ignore this word</OPTION><OPTION value=1>Ignore all
occurrences</OPTION></SELECT></DIV><IFRAME style="BORDER-BOTTOM: #b3b6b0 1px
solid; BORDER-LEFT: #b3b6b0 1px solid; BACKGROUND-COLOR: #ffffff; WIDTH:
550px; HEIGHT: 200px; BORDER-TOP: #b3b6b0 1px solid; BORDER-RIGHT: #b3b6b0
1px solid" id=compose_editorArea title="Message Body" tabIndex=6 vspace=0
onload=window.parent.initDoc(); marginHeight=0 src="about:blank"
frameBorder=0 allowTransparency marginWidth=0 hspace=0></IFRAME></DIV>
 
T

Tim Williams

It's an IFRAME, so treat it like a regular frame. You sould be able to get
to the content of the iframe using this:

IE.document.getElementById("compose_editorArea").document

It's hard to say what to do next, since I don't know what's inside the
iframe. Try doing a view-source on it.

Tim


Joel said:
It is the yahoo send mail box. It is a container with the boy
id=compose_editorArea

<IFRAME style="BORDER-BOTTOM: #b3b6b0 1px
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top