473,890 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inquire again

I posted a similar question quite a while ago, but didn't get positive
answer. Beofore turning to other approaches, I would like to check
again. Following is what I like to do:

Chinese is a tone language. There are four tones that are referred to
as Tone 1 through Tone 4. The language is usually written with an
ideographic script of characters. But there is a less-used alphabetic
writing that consists of the 26 letters for English and 4 diacritics
for the 4 tones.

I like to develop a very simple word processor contained preferably in
a textarea of form. When the numbers 1 to 4 are typed after a letter
spelling, they will become a superscript. This is a must because that
when reading the script, the tone marks are not part of the spelling
process as the letters are. They only indicate a feature of the sound.
Therefore, by nature they are diacritics. If appearing after letter
spellings as regular-sized numbers, they would obstruct the smooth
spelling process. Native speakers of Chinese don't like that.

I know MS Keyboard Layout Creator may accomplish this. But I like to
know whether this can also be done with Javascript, because I intend to
put the program on the Internet for other people to test and discuss
it.

Another thing is that if the numbers 1 to 4 do not immediately follow
an alphabetic letter, they will appear as regular-sized numbers. I
don't think I have the ability to do the programing on the MSKLC.

I am a very slow learner for Javascript, in fact for any programing
language. But I am still interested to learn Javascript for its
usefulness on the Internet. So first of all, I like to know whether or
not this can be accomplished with Javasript, no matter how difficult or
complicated the programing would be.

Thanks in advance.
Dung Ping

Sep 18 '05 #1
2 1471
Dung Ping said the following on 9/18/2005 1:44 PM:
I posted a similar question quite a while ago, but didn't get positive
answer. Beofore turning to other approaches, I would like to check
again. Following is what I like to do:

Chinese is a tone language. There are four tones that are referred to
as Tone 1 through Tone 4. The language is usually written with an
ideographic script of characters. But there is a less-used alphabetic
writing that consists of the 26 letters for English and 4 diacritics
for the 4 tones.

I like to develop a very simple word processor contained preferably in
a textarea of form. When the numbers 1 to 4 are typed after a letter
spelling, they will become a superscript. This is a must because that
when reading the script, the tone marks are not part of the spelling
process as the letters are. They only indicate a feature of the sound.
Therefore, by nature they are diacritics. If appearing after letter
spellings as regular-sized numbers, they would obstruct the smooth
spelling process. Native speakers of Chinese don't like that.
You wouldn't be able to do it in a textarea of a form because you can
not superscript in a text area. Its text-only and making it a
superscript it requires HTML so you can't. What you can do is use a DIV
tag with contentEditable (IE only, MOZ has a comparative feature). Its a
DIV tag that you can edit the content. You would need an onkeydown event
handler on the DIV that checked to see if the key pressed was 1-4 and
replace it with <sup>#</sup>.
Another thing is that if the numbers 1 to 4 do not immediately follow
an alphabetic letter, they will appear as regular-sized numbers. I
don't think I have the ability to do the programing on the MSKLC.


Do you want to allow this:

"This is a 1 test"

Or disallow it?

If you want to allow it, then you add a check in your onkeydown function
to check to see what the previous character was. If it was a space, keep
going. If not, make it superscript.

If you dont want to allow it, then you also handle that in the function.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 18 '05 #2
Randy Webb wrote:
Dung Ping said the following on 9/18/2005 1:44 PM:
I posted a similar question quite a while ago, but didn't get positive
answer. Beofore turning to other approaches, I would like to check
again. Following is what I like to do:

Chinese is a tone language. There are four tones that are referred to
as Tone 1 through Tone 4. The language is usually written with an
ideographic script of characters. But there is a less-used alphabetic
writing that consists of the 26 letters for English and 4 diacritics
for the 4 tones.

I like to develop a very simple word processor contained preferably in
a textarea of form. When the numbers 1 to 4 are typed after a letter
spelling, they will become a superscript. This is a must because that
when reading the script, the tone marks are not part of the spelling
process as the letters are. They only indicate a feature of the sound.
Therefore, by nature they are diacritics. If appearing after letter
spellings as regular-sized numbers, they would obstruct the smooth
spelling process. Native speakers of Chinese don't like that.
You wouldn't be able to do it in a textarea of a form because you can
not superscript in a text area. Its text-only and making it a
superscript it requires HTML so you can't. What you can do is use a DIV
tag with contentEditable (IE only, MOZ has a comparative feature). Its a
DIV tag that you can edit the content. You would need an onkeydown event
handler on the DIV that checked to see if the key pressed was 1-4 and
replace it with <sup>#</sup>.


My understanding is this contenEditable would allow people to type in
an area in the HTML page, just like typing in the textarea of a form.
I will try this step first, then the next. Thanks a lot.
Another thing is that if the numbers 1 to 4 do not immediately follow
an alphabetic letter, they will appear as regular-sized numbers. I
don't think I have the ability to do the programing on the MSKLC.
Do you want to allow this:

"This is a 1 test"

Or disallow it?

If you want to allow it, then you add a check in your onkeydown function
to check to see what the previous character was. If it was a space, keep
going. If not, make it superscript.

If you dont want to allow it, then you also handle that in the function.


--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly


Sep 18 '05 #3

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

Similar topics

7
4069
by: Phil Powell | last post by:
I am having this problem: My PHP script will set a cookie, it's there in my /Cookies folder. I delete the cookie (I have to for testing purposes, the PHP script I run behaves according to this cookie existing or not) and run the script again. Everything runs fine, but the cookie is never set again. Does anyone know why this happens? I am using Win2000 Professional with IE 6. Cookies are being set with PHP and Javascript. Thanx Phil
5
4624
by: Bruce | last post by:
I have a number of forms that do significant work based on variables POSTed from the form. What is the common method of detecting and preventing this work from being done when the form is POSTed as the result of the user clicking the Back or Reload buttons in the browser? --Bruce
7
1918
by: ???????J | last post by:
Javascript may inquire the push down menu value, can I inquire the description? The following example, the variable($answer) can be get the menu1's value. For example, if I select first data, the menu1's value would be 1. Therefore ($answer) would be 1. But If want using javascript get the description(ABC),which javascript command can do it?
1
1457
by: Jiten | last post by:
Hi Cor I spoke with u previously about this problem i had and u gave me some code that helped me. That code worked fine but i have now encountered another issuee that im hoping u may know how to solve What my code below is doin is if a combobox and textbox is not empty, it is adding the items to a listview The listview has 2 columns... Product Quantit What i want to do is to add the product along with the quantity into the...
8
1915
by: jon morgan | last post by:
OK, I'm going to be brave. There is a bug in VS.Net 1.1 that causes random compiler errors. I have raised this issue in posts at least three time in the past couple of months without attracting much interest. But it's driving me nuts. Here's what happens. I'm working on a multi project VB app. happily writing nice inoffensive code - go to compile and the compiler tells me there's a problem in a project I'm not working on. But really...
11
2767
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do understand the objective. This example may represent an interface in need of a bit of refactoring, but it goes to demonstrate the basic idea as I understand it. http://developer.kde.org/documentation/library/cvs-api/kdevelop/html/ast_8h-source.html...
6
2328
by: teedilo | last post by:
We have an application with a SQL Server 2000 back end that is fairly database intensive -- lots of fairly frequent queries, inserts, updates -- the gamut. The application does not make use of performance hogs like cursors, but I know there are lots of ways the application could be made more efficient database-wise. The server code is running VB6 of all things, using COM+ database interfaces. There are some clustered and non-clustered...
34
3287
by: Reinhold Birkenfeld | last post by:
Hi, the arguments in the previous thread were convincing enough, so I made the Path class inherit from str/unicode again. It still can be found in CVS: /python/nondist/sandbox/path/{path.py,test_path.py} One thing is still different, though: a Path instance won't compare to a regular string.
5
3996
by: Mike TI | last post by:
March 24, 2006 Hi all I am new to VB.NET and am using VB.NET 2005. I have an MDI form with a Split Container Control. On demand I am adding and removing User Controls on Panel 2. I am using Show() and Hide(). It works perfectly. The only thing is I would like to remove the User Control from memory instead of hiding. I tried Dispose(), however then I cannot show this
0
9976
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, 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...
1
10904
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9616
agi2029
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...
1
8007
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7159
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();...
0
5834
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6034
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4258
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3266
bsmnconsultancy
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.