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

text within textarea shifted after redisplay form

After a redisplay of the form, caused by errors in other fields, the
text which is in the "Observ" textarea is shifted (some 8 places) to
the right (and this each time after a redisplay). The code used in case
of redisplay is :

<tr>
<td align="right">
Observations :
</td>
<td>
<textarea align="left" cols="50" rows="10" name="Observ">
<? echo $Observ ;?></textarea>
</td>
</tr>

Does anyone has a clue what is causing the shift and how to solve it ?

Thanks in advance

Jun 14 '06 #1
4 2249
In article <11********************@g10g2000cwb.googlegroups.c om>,
ru****@belgacom.net says...
After a redisplay of the form, caused by errors in other fields, the
text which is in the "Observ" textarea is shifted (some 8 places) to
the right (and this each time after a redisplay). The code used in case
of redisplay is :

<tr>
<td align="right">
Observations :
</td>
<td>
<textarea align="left" cols="50" rows="10" name="Observ">
<? echo $Observ ;?></textarea>
</td>
</tr>

Does anyone has a clue what is causing the shift and how to solve it ?

Thanks in advance


<textarea blah blah><? echo $Observ ;?></textarea>

All on one line. The HTML is including the indent whitespace of your code.

GM

Jun 14 '06 #2
Rik
rukkie wrote:
After a redisplay of the form, caused by errors in other fields, the
text which is in the "Observ" textarea is shifted (some 8 places) to
the right (and this each time after a redisplay). The code used in
case of redisplay is :

<tr>
<td align="right">
Observations :
</td>
<td>
<textarea align="left" cols="50" rows="10" name="Observ">
<? echo $Observ ;?></textarea>
</td>
</tr>

Does anyone has a clue what is causing the shift and how to solve it ?


Not without the cause of the errors.
Perhaps usefull pointers:
- using <?php is preferred instead of <?
- what does $_REQUEST['Observ'] do?
- are there any actions/errors which can alter $Observ?
- PHP has nothing to do with displaying, that's all HTML (/&CSS), so, what
does you HTML source say?
- I definitely count 8 spaces before <?, so displaying a linebreak, and 8
spaces, may be just correct behaviour.

In short:
What does this code do:
<textarea><?php echo $_REQUEST['Observ'] ;?></textarea>

Grtz,
--
Rik Wasmus
Jun 14 '06 #3

Geoff Muldoon schreef:
In article <11********************@g10g2000cwb.googlegroups.c om>,
ru****@belgacom.net says...
After a redisplay of the form, caused by errors in other fields, the
text which is in the "Observ" textarea is shifted (some 8 places) to
the right (and this each time after a redisplay). The code used in case
of redisplay is :

<tr>
<td align="right">
Observations :
</td>
<td>
<textarea align="left" cols="50" rows="10" name="Observ">
<? echo $Observ ;?></textarea>
</td>
</tr>

Does anyone has a clue what is causing the shift and how to solve it ?

Thanks in advance


<textarea blah blah><? echo $Observ ;?></textarea>

All on one line. The HTML is including the indent whitespace of your code.

GM


Thanks for the quick response. Getting rid of the indent is solvind the
problem !!!

Jun 14 '06 #4
Data should be htmlspecialchar()ed also if used in textarea.
It prevents user from entering '</textarea>' and break the form.

Jun 14 '06 #5

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

Similar topics

5
by: Andrew V. Romero | last post by:
At work we have an excel file that contains the list of medications and their corresponding strengths. I would like to save the excel file as a text list and paste this list into a javascript...
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
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
1
by: IkBenHet | last post by:
Hello, I found this script to create a simple rich text form (http://programmabilities.com/xml/index.php?id=17): <html> <head> <title>Rich Text Editor</title> </head> <body>
23
by: shank | last post by:
I have the below code found on an ASP site. <% arrName = Split(Request("TextArea"),",") %> <% For i = LBound(arrName) To UBound(arrName) Response.Write "ID: " & arrName(i) & "<br>" Next %>
4
by: Adnan Siddiqi | last post by:
Hi Pardon me if I am not making any sense.What I want to know the cordinates of selected text by user so that i can save/retrieve them later.is It possible.I am lookig for both IE and Firefox...
11
by: karen987 | last post by:
I have a web page which used to work fine until i added a rich text editor. the pages are in ASP and it is a news weblog, with a comments section where people click the headline of a comment and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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
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
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
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.