Welcome to WebmasterWorld Guest from 54.167.46.29

Forum Moderators: ocean10000

Message Too Old, No Replies

textarea problem

why text inside textarea is never placed at the top

     
7:37 am on Jul 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


Greetings all,

I have a minor problem in that whenever I place dynamically generated text inside a textarea (rows=7 cols=20), the text is always positioned in the middle of the textarea. I would like to know how I can postion this text at the top of the textarea. Any ideas guys?

Thanks in advance for any solutions provided.

Smokin

7:42 am on July 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 29, 2000
posts:12095
votes: 0


smokin, since this is the HTML forum and you mentioned dynamically generated text, what scripting language are you using?

Oh, and welcome to the board!

7:50 am on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


Thanks Marcia,

I am currently using ASP. Sorry for posting in the wrong forum, I just assume that this was a HTML bug.

Umar

7:51 am on July 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


The text must be inserted directly after the <textarea> tag like this:

<textarea>$tezt</textarea>

Nick

7:59 am on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


Nick, that is way I have done it also
8:09 am on July 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 6, 2002
posts:1092
votes: 0


What does the view source look like? Do you see new lines between <textarea> and $tezt?
8:15 am on July 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Yeah, let's see the code. This really shouldn't be a problem....

Nick

8:22 am on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


Lisa, there are no new lines between <textarea> and $tezt when viewing source.
2:13 pm on July 14, 2002 (gmt 0)

Administrator from US 

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 21, 1999
posts:38047
votes: 11


Then there is something interfering. <textarea>value</textarea> should display top left in the form window.

Javascript or css on the page?

2:25 pm on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


yes there is javascript:

<TEXTAREA rows=7 cols=20 name="message" class="txt" style="font-weight: 600;" onfocus="document.frmContact.message.style.background='#FFFFFF', document.frmContact.enquiry.disabled=false" onblur="document.frmContact.message.style.background='silver'">

do you think this could be the problem?

Smokin

2:57 pm on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


I took out the javascript but it didnt make a difference. any other ideas?

smokin

3:00 pm on July 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


can you show the whole code from <textarea> to </textarea>?

Nick

3:12 pm on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


Here you go Nick:
<%if Request("enquiry") = "Send Comments" then
%>
<td>
<TEXTAREA rows=7 cols=20 name="message" class="txt" style="font-weight: 600;" onfocus="document.frmContact.message.style.background='#FFFFFF', document.frmContact.enquiry.disabled=false" onblur="document.frmContact.message.style.background='silver'">
Thank you for your comments..
</TEXTAREA>
</td>
<%else%>
<td>
<TEXTAREA rows=7 cols=20 name="message" class="txt" onfocus="document.frmContact.message.style.background='#FFFFFF', document.frmContact.enquiry.disabled=false" onblur="document.frmContact.message.style.background='silver'">
</TEXTAREA>
</td>
<%end if%>

smokin

3:22 pm on July 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Try this:

<TEXTAREA rows=7 cols=20 name="message" class="txt" style="font-weight: 600;" onfocus="document.frmContact.message.style.background='#FFFFFF', document.frmContact.enquiry.disabled=false" onblur="document.frmContact.message.style.background='silver'">Thank you for your comments..</TEXTAREA>

3:29 pm on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


already tried that, still no difference

smokin

3:29 pm on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:May 21, 2002
posts:50
votes: 0


Shoouldn't the CSS also be posted? I mean, his basic problem stated that text inside a textarea is positioned in the middle. I suspect there is a text-align:middle or something like that in the txt class he's assigning to the textarea.
3:31 pm on July 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Quite possibly but the fact that the message text is on a new line suggests a simpler explanation. Guess we wait and see....

Nick

3:34 pm on July 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Oops, missed Smokin's reply. Yeah, let's see the css!

Nick

4:35 pm on July 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:July 3, 2002
posts:82
votes: 0


txt { COLOR: #254E0E; BACKGROUND-COLOR: #ccff99; border-width:2px; border-style: solid; border-color: #254E0E; }
9:16 am on July 15, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 13, 2002
posts:2162
votes: 0


Hi,

Did you make the form in Vis Interdev?
If so check if there are tab characters inserted in the html.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members