homepage Welcome to WebmasterWorld Guest from 54.204.68.109
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
textarea problem
why text inside textarea is never placed at the top
smokin




msg:947735
 7:37 am on Jul 14, 2002 (gmt 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

 

Marcia




msg:947736
 7:42 am on Jul 14, 2002 (gmt 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!

smokin




msg:947737
 7:50 am on Jul 14, 2002 (gmt 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

Nick_W




msg:947738
 7:51 am on Jul 14, 2002 (gmt 0)

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

<textarea>$tezt</textarea>

Nick

smokin




msg:947739
 7:59 am on Jul 14, 2002 (gmt 0)

Nick, that is way I have done it also

Lisa




msg:947740
 8:09 am on Jul 14, 2002 (gmt 0)

What does the view source look like? Do you see new lines between <textarea> and $tezt?

Nick_W




msg:947741
 8:15 am on Jul 14, 2002 (gmt 0)

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

Nick

smokin




msg:947742
 8:22 am on Jul 14, 2002 (gmt 0)

Lisa, there are no new lines between <textarea> and $tezt when viewing source.

Brett_Tabke




msg:947743
 2:13 pm on Jul 14, 2002 (gmt 0)

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

Javascript or css on the page?

smokin




msg:947744
 2:25 pm on Jul 14, 2002 (gmt 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

smokin




msg:947745
 2:57 pm on Jul 14, 2002 (gmt 0)

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

smokin

Nick_W




msg:947746
 3:00 pm on Jul 14, 2002 (gmt 0)

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

Nick

smokin




msg:947747
 3:12 pm on Jul 14, 2002 (gmt 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

Nick_W




msg:947748
 3:22 pm on Jul 14, 2002 (gmt 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>

smokin




msg:947749
 3:29 pm on Jul 14, 2002 (gmt 0)

already tried that, still no difference

smokin

Pushycat




msg:947750
 3:29 pm on Jul 14, 2002 (gmt 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.

Nick_W




msg:947751
 3:31 pm on Jul 14, 2002 (gmt 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

Nick_W




msg:947752
 3:34 pm on Jul 14, 2002 (gmt 0)

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

Nick

smokin




msg:947753
 4:35 pm on Jul 14, 2002 (gmt 0)

txt { COLOR: #254E0E; BACKGROUND-COLOR: #ccff99; border-width:2px; border-style: solid; border-color: #254E0E; }

aspdaddy




msg:947754
 9:16 am on Jul 15, 2002 (gmt 0)

Hi,

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved