473,836 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Highlight selection of <DIV>'s text content in a Modal Dialog

A Modal Dialog does not allow us to highlight the text content inside
<DIV> tag unless I use a <textarea> tag to display that text content.
However, the situation of my software makes it impossible to use
<textarea> and Modeless dialog. I am really stuck!!!

Is there any trick to make <DIV> or <SPAN>'s content be selectable in a
Modal dialog?

Thanks in advance,

Tung Chau

Jul 23 '05 #1
3 4368

tu********@yaho o.com wrote:

A Modal Dialog does not allow us to highlight the text content inside
<DIV> tag unless I use a <textarea> tag to display that text content.
However, the situation of my software makes it impossible to use
<textarea> and Modeless dialog. I am really stuck!!!

Is there any trick to make <DIV> or <SPAN>'s content be selectable in a
Modal dialog?

Perhaps if you put your dialog page in an iframe e.g. newDialog.html is
<title>dialog title</title>
<style type="text/css">
html, body { margin: 0; padding: 0; }
<iframe width="100%" height="100%" src="originalDi alog.html">
then inside the iframe text selection is possible if call
window.showModa lDialog('newDia log.html')
but I haven't tried that.

It seems like a bug if text selection in the dialog doesn't work, you
might want to search the MS knowledge base if that is known and
workarounds are suggested.

Martin Honnen
Jul 23 '05 #2
Just wanted to add one more point. The reason I do not want to make my
<DIV> editable because I do not want the user to be able to edit the
content inside my DIV, but just to select the content.

Tung Chau.

Jul 23 '05 #3
Thanks Martin. I tested that and it didn't work. No matter the DIV is
in iframe or not, as long as it is loaded into a Modal Dialog
container, it won't be selectable.

Tung Chau

Jul 23 '05 #4

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

Similar topics

by: Philo | last post by:
How do I select all <div> tags except those which contain a <table> tag somewhere within them? Example XML: <********************** sample input ***********************> <txtSectionBody> <div> <span>
by: OM | last post by:
I've found out that I can use <div id = "variable"><div> to change text and pictures on mouseovers. All I have to do is change "variable" to be the HTML text I want. I can even change the text to have images. Is this method recommended? Should I be doing it another way?
by: Jens Kristensen | last post by:
I have a problem displaying a divbox containing a html-textarea - everything works fine with "normal" characters. However, when the textarea contains special chars like <P> or ' , the box fails to show: function show(divbox) { divbox.style.display=''; } <div id="divbox" style="display:none" >
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to put either tag inside an HTML <TD> and have the same kind of scrolling effect. This would allow me to fill the screen and have the size of the scrolling box change on resize. Thanks in advance.
by: Gregory | last post by:
Hi all. A quick question. In normal XHTML pages, you can put text inside of a <div> element, and all goes well. Essentially, im trying to port over some XHTML stuff into asp.net, but add in dynamic generation, blah, blah, blah. So i need to be able to add text to a div from the code behind. Any way
by: Ruskin Hardie | last post by:
There is an iframe in my document that is hidden, which is the target for a submitted form. When the form is submitted, some javascript sets a hidden div, to displaying, eg: document.getElementById('hiddendiv').style.display = ''; This div, simply has the words "building csv file, please wait", and is used, because their is no indication in IE, as to what is happening, when the user clicks on 'Results in CSV format', to return a report...
by: Stan R. | last post by:
Greetings. I have a couple of questions concerning CSS layouts, as apposed to the old <tablemethod for creating layouts . Even after spending the last few days searching all over Google Groups, I haven't not been able to find a solution to my collective dilemma, and I hope some of you fine folks here in these neck of the UseNet woods might be able to share some wisdom with a fellow coder. My questions are in regard to what are the proper...
by: plumba | last post by:
Let me explain.... I have a form (most of which you guys have helped me with!!). The initial problem I was having is that it was holding the data in the fields after submit, I resolved this by putting the whole form in a set of <div> tags and the form now collapses after they click submit. Perfect!! But, have set some mandatory fields using java, and I need to it validate the these fields before it collapses the form - otherwise it says...
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF editor. A fellow member of the PCG has helped me by creating a bit of Javascript to emulate the scrolling and using Google I've now gotten it into a state where it almost passes the W3C Markup Validation Service. However, the one error, Error Line 166,...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.