473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Editable IFRAME

I have an editable Iframe control that I am using to allow users to
input formated text into a database for later viewing. One feature I
am toying with is the ability to vertically align their text. The idea
is to have a button for TOP, MIDDLE, and BOTTOM in which each will move
the text to the desired location within the box. So far I have tried
two ways to accomplish this. One is with a DIV around the text and
when the button is clicked it moves the DIV based on how high the DIV
has become. The other way I have attempted this is with a TABLE which
covers the entire iframe. When the buttons are clicked the appropriate
location is set in the cells valign property.

With the DIV attempt the body of the iframe has contentEditable turned
off and the DIV turned on. This would restrict the user from typing
outside of the DIV. The problem is that when the user clicks on the
iframe but outside of the DIV the cursor is gone. The user could also
hit ctrl-a on the keyboard to select all and eventually delete the DIV.
With the TABLE attempt the body of the iframe has contentEditable
turned on sice the TABLE seemed to not have that property. With the
body being off the table couldnt be edited. The problem here is that
the user can now type outside of the table and also delete the table
much easer than the DIV.

Both of these are no good. I want to be able to vertically align the
text inside the iframe but I'm running out of ideas on how it might be
possible. Anyone got any input on how this might be accomplished?
Thanks to anyone who can shoot an idea my way.

Nov 7 '05 #1
1 2165
Thanks to anyone who viewed my post. I'm sure everyone who read it at
least half way through said what the hell is this guy talking about.
But thank you for at least reading that far. I finally solved my own
problem by turning designMode off on the iframe and leaving the
contentEditable property on the div set to true. Doing this, the div
can not be deleted and the cursor doesnt appear to come up missing when
the user clicks outside of the div. Plus I can vertically align the
div by giving setting the top property in its stylesheet.

Thanks again.

Nov 8 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: laura | last post by:
Can anyone help me to decide the best way to do this please. I'm writing an intranet and I need to put something like a non-editable scrolling text box on the home page where daily announcements...
7
by: deko | last post by:
SELECT tblTxAcct.TxAcctName, tblTxType.TxTypeName, Nz(qryTxAcctListCt.TxCount, 0) AS TxCt FROM (tblTxAcct INNER JOIN tblTxType ON tblTxAcct.TxType_ID=tblTxType.TxType_ID) LEFT JOIN qryTxAcctListCt...
8
by: pmud | last post by:
Hi, I have 2 questions: 1. I have an editable data grid with 21 columns. I need to edit only 2 cloumns in this data grid. But when the grid is displayed in Edit mode, all the columns show long...
6
by: Hako | last post by:
Hello All, I have a function to set readonly or editable of a textctrl. I'd like to make the textctrl initial set readonly and use other event funciton to set editable of the textctrl but it...
0
by: muchinger | last post by:
All, I create 2 combo boxes on a page: an editable one and a non-editable one. Both of them have the same string items which are too long to entirely fit into the combo box. E. g. the size of...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
2
by: sahista | last post by:
Hello. I create an iframe on the fly, set it to editable designMode='on' and insert into iframe.contentWindow.childNodes.childNodes some innerHTML. Ok... that all works fine in IE but in...
1
by: sss123456 | last post by:
Hi, i have a iframe and calling a php inside that, and the is a conext menu by which i'm perfoming task to set colour of selected text on diif conditions. this is working fine in IE, but in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.