473,466 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding Spaces in a FormBox

Is there a script that would add a space in front of and behind any
text adding to a form box, it coud be triggered by either an onClick or
onBlur event handler. Any help s appreciated. Thanks Joe

Sep 16 '05 #1
2 1664
Papajo schrieb:
Is there a script that would add a space in front of and behind any
text adding to a form box, it coud be triggered by either an onClick or
onBlur event handler. Any help s appreciated. Thanks Joe


What do you want to get? If it's just about optic, you can use CSS (padding). If
you're in need of real blanks, you can do something like

document.getElementById("ID of the inputelement").value = " " +
document.getElementById("ID of the inputelement").value + " "
Sep 16 '05 #2

Papajo wrote:
Is there a script that would add a space in front of and behind any
text adding to a form box, it coud be triggered by either an onClick or
onBlur event handler. Any help s appreciated. Thanks Joe


Why are you adding spaces to your form box entries? Most people want
to trim out any extra spaces. To add a space you should be able to
just say

onclick="nameoftextbox.value = nameoftextbox.value + ' ';"

Are you trying to parse something out of the form box?

http://www.askblax.com

Sep 17 '05 #3

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

Similar topics

2
by: brenda.stow | last post by:
error msg " An error occured while referencing the object. You tried to run a visual basic procedure that improperly references a property or method of an object" This msg occurs everytime I add a...
5
by: Richard | last post by:
I don't know any thing about c#, I really need to do this in visual c++. I don't manually wrap the dll but since it's called AxInterop.OWC10.dll I assume visual studio has done that for me. ...
4
by: gnewsgroup | last post by:
I searched around, but could not find out why and how to stop this. Ever since I installed Oracle 11g on my machine, Visual Studio will automatically add the following oracle assemblies into my...
8
by: drjay1627 | last post by:
hello, This is my 1st post here! *welcome drjay* Thanks! I look answering questions and getting answers to other! Now that we got that out of the way. I'm trying to read in a string and...
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
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
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,...
1
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
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...
0
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...
0
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...
0
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 ...

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.