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

textarea prefills with 10 tab stops

Claus Mygind
571 512MB
I create a textarea on my form like this
Expand|Select|Wrap|Line Numbers
  1. <textarea 
  2.  name="CNTNOTES" 
  3.  id="CNTNOTES" 
  4.  rows="10" cols="80" 
  5.  onChange="DataChanged();" 
  6.  wrap="VIRTUAL">
  7.  <?php echo ($loadData) ? $c["CNTNOTES"] :""; ?>
  8. </textarea>
  9.  
when the page loads, the php snippet determines if the page is being loaded with or without data.

If there is no data present, the text area gets ten blank tab stops inserted, see picture (number are just there for illustration but are the actual tab stops inserted).



If I remove the php code snippet then I still get 5 tab stops included.


How can I prevent these blank tab stops from being inserted?
May 9 '11 #1

✓ answered by JKing

Do you have tabs and or white space in your code? Specifically after wrap="VIRTUAL">

Try formatting it all on one line.
Expand|Select|Wrap|Line Numbers
  1. <textarea name="CNTNOTES" id="CNTNOTES" rows="10" cols="80" onChange="DataChanged();" wrap="VIRTUAL"><?php echo ($loadData) ? $c["CNTNOTES"] :""; ?></textarea>
  2.  

2 3245
JKing
1,206 Expert 1GB
Do you have tabs and or white space in your code? Specifically after wrap="VIRTUAL">

Try formatting it all on one line.
Expand|Select|Wrap|Line Numbers
  1. <textarea name="CNTNOTES" id="CNTNOTES" rows="10" cols="80" onChange="DataChanged();" wrap="VIRTUAL"><?php echo ($loadData) ? $c["CNTNOTES"] :""; ?></textarea>
  2.  
May 9 '11 #2
Claus Mygind
571 512MB
Just what the doctor ordered. That was exactly how I had formatted it in my old code and now I know why. I cannot thank you enough
May 9 '11 #3

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

Similar topics

4
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go,...
1
by: Volt | last post by:
is there any way to select and mark part of text in textarea by regular expression? i need to select the first string in textarea whitch is like xxxxx,xxx where x is any character
5
by: Jesper Rønn-Jensen | last post by:
I have a textarea that must be limited to 70 characters. No big deal -- at least so I thought. * Textarea must not exceed 70 characters * Exceeding content must be cut off * Must work on input by...
11
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
4
by: TJS | last post by:
can the rows and columns of a textarea element with an id be changed on the fly ? if so is there an example ?
6
by: wperry1 | last post by:
I am writing a small database utility to catalog all of my favorite ASM/JS/VBS... functions and scripts on an asp page. Everything is going smoothly except for one thing that I can't quite seem to...
6
by: Tony | last post by:
The w3schools HTML tag reference for <textarea> http://www.w3schools.com/tags/tag_textarea.asp says that the attributes 'cols' and 'rows' are REQUIRED attributes for the textarea tag. Looking at...
3
by: MikeK | last post by:
Ok, I've been noodling with this for several days now and I'm starting to go crazy. Does Apple's Safari browser support drag events on Textarea elements? The few specs and docs I've found seem to...
3
by: FunkHouse9 | last post by:
I'm working on a form to collect data in a textarea which and am trying to keep returns and spaces. I have a couple of functions that I Frankensteined together to replace returns with <br> and to...
2
by: Chuck | last post by:
Hello, I am looking for a sample script that prefills a textfield, so that the user can select an option as s/he types characters. For example, in gmail as you start typing the first so many...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.