473,387 Members | 1,516 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,387 software developers and data experts.

Restricting user input

1
Strange question coming ...

I need to be able to provide the user the ability to insert appropriate text (not free-form) at a point in a file.

I was thinking of loading the file into a text area input. There would be an additional set of buttons for each of the pieces of text to be inserted. The user could navigate using their cursor within the text area to the point within the text area where text insertion is to occur. They would then press the appropriate button for that text to be inserted at the cursor.

This raises some challenges! The text could easily be loaded and the entire field disabled, but how would the (presumably) Javascript then be able to insert text at the cursor point? Any help will be much appreciated.
Aug 31 '06 #1
2 1212
acoder
16,027 Expert Mod 8TB
This thread should help.
May 12 '08 #2
dlite922
1,584 Expert 1GB
Strange question coming ...

I need to be able to provide the user the ability to insert appropriate text (not free-form) at a point in a file.

I was thinking of loading the file into a text area input. There would be an additional set of buttons for each of the pieces of text to be inserted. The user could navigate using their cursor within the text area to the point within the text area where text insertion is to occur. They would then press the appropriate button for that text to be inserted at the cursor.

This raises some challenges! The text could easily be loaded and the entire field disabled, but how would the (presumably) Javascript then be able to insert text at the cursor point? Any help will be much appreciated.
There's a couple of ways to tackle this problem, assuming the position in the file is predefined

You can just display the content as a text and display it. At the appropriate spot, insert a text area or text box for the user to make their additions. In your case its not free-form, so it could be a drop down box.

You can then string it together server-side.

Or try disabling the text area and insert the appropriate text there with javascript, it should let you even if disabled.

Good luck,

Dan
May 13 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Xenophobe | last post by:
I have a popup window (required by the client) containing a form and would like to prevent users from accessing it directly. They are instead required to access the page via a hyperlink on another...
5
by: Jeremy Langworthy | last post by:
Hi I have two "totals" inputs whose values are dynamically calculated. For obvious reasons I don't want users to be able to edit the information in these. However, I do want this total passed to...
3
by: volume | last post by:
Restricting a windows textbox (edit item) to digits only. Is there a windows option, using .NET C#, to only allow a user to enter digits ONLY? If so, what is the flag or setting? If no, what is...
2
by: chuckdfoster | last post by:
I have a page that users upload files. Is there a way to restrict the file types that they can upload? thanks, -- Chuck Foster Programmer Analyst Eclipsys Corporation - St. Vincent Health...
2
by: W. Adam | last post by:
I have a form which displays info. On top of it there is a text box for input box which lets you put number from 1 thu 112.I need to verify that the number entered by the user is within the range...
1
by: Piper707 | last post by:
Hi, I'd like to know if there are any more ways of restricting an XML document to having only non-empty tags (containing Strings). I can think of 2 ways: 1) <xs:simpleType name="tagName">
26
by: Patient Guy | last post by:
The code below shows the familiar way of restricting a function to be a method of a constructed object: function aConstructor(arg) { if (typeof(arg) == "undefined") return (null);...
2
by: hollykatong | last post by:
hello, is there a way to restricting a textbox input wherein it will only accept two integer with decimal places? for example if i enter 90 or 90.1234 it will allow me and when i try to type 890...
8
by: sneddo | last post by:
Ok I am trying to do the above, I have got a script that will restrict the length but it requires the user to enter the field and hit a key, before it will work. This would normaly be find, but...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.