473,403 Members | 2,071 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,403 software developers and data experts.

Solution 1 by Julian Turner

Julian, you wrote about a possible solution for my problem, it's a way I
never thought about, it looks perfect.
But onfortunately, I don't know enough about javascript to convert your
solution into a piece of programming.
Could you please help me?
What are the lines, commands, events, for recognizing no further movements?

At the bottom of this message is the description of rous solution.

Thanks,
Simon
I want to know when the carot(cursor) is in the first row of the
textarea(although rows do not really exist, i know) and I want to know
when
the cursor is in the last row of the textarea.

Why do I want to know that?
Because when the cursor is in the first row and the keycode for "arrow-up"
event fires, the focus has to leave the textarea and go to the field above
it.
Same goes for the last row, when the arrow-down is pressed it has to go to
the next field.

And when it's in between the first and last line, nothing should happen
but
goiing up and down the textarea.

Thanks,
Simon
Hi

Two possibilities occurr to me (both non-trivial).

Firstly, I assume that by "last" row, you are including the fact that
the textarea might overflow the actual visual box and so scroll, and
so you are interested in the very end of the text within the textarea.

Solution 1
----------

One solution might be to test whether the cursor "moved". I.e. if you
are at the top or bottom of the text within the text area, pressing
the up or down arrow will produce no further movement. So you could
capture its previous posiition, compare with the new, and if no
change, "assume" that you are in the first or last row.

Jul 27 '07 #1
1 1456
On 30 Jul, 10:28, "Simon" <simon1...@quicknet.nlwrote:
Can you adjust your script just a little bit so that when the textarea still
is empty, the focus stays?
Glad it works for you.

I'll try to have a look at this point.

Regards
Julian

Jul 30 '07 #2

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

Similar topics

3
by: julian maisano | last post by:
I've been looking for "open-source-on-line-stores-php-apache-mysql powered solutions", and I found mainly two: osCommerce Zencart I'm just beginning so I've to choose one of them to give it a...
2
by: Satish | last post by:
Hi All, I would like to convert Julian timestamp to readable time format. WHich C function or c++ function should I use? Thanks, Satish
3
by: Chris Davoli | last post by:
Is there a class that converts from Gregorian date to TRUE Julian Date in ..NET? Any VB.NET examples available? ie; The Julian date is calculated by the number of days since January 1, 4713 BC....
2
by: Paul | last post by:
Hi, I am getting 217 for the julian day for today, but I think it should be 230. Julian day simply increments each day from the beginning of the year. The system day is tuesday aug 17th, which...
11
by: Karl O. Pinc | last post by:
Hi, What's the best way to obtain the Julian day from a postgresql date? PostgreSQL 7.3.4 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 3.2.2 20030222 (Red Hat Linux...
4
by: Bit byte | last post by:
How may I represent dates as Julian dates - I have seen code where julian dates are represented as longs, and other where they are represented as floats. Which is the correct representation? ...
27
by: Chad | last post by:
The problem is: Write a recursive version of the function reverse(s), which reverses the string s in place. In "The C Answer Book", Second Edition, near the bottom of page 95, the authors say...
2
by: jason | last post by:
DOTNET 2.0 VS 2005. My client is saying August 13,2006.. julian date should equal 225. Here's what I'm doing: <%@ Import Namespace="system.globalization" %> <script language="VB"...
4
by: IsdWeb | last post by:
Hello, I am a newbie to coding and need some help. I am trying to figure out why the following code is not producing the correct Julian date. Any suggestions? Also, I am trying to understand...
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
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.