PDA

View Full Version : My Textarea jumps!!!


rumbuls13
09-11-2006, 08:39 PM
hi all, i have this annoying textarea problem. when i view my form on the browser and i start typing in the textarea field a problem occurs. i gave the box a maximum characters of 1000 the user can put in the form (using javascript). my character width is: 30
and the number of lines is: 5
if i go below that point the scroll bar appears which i want but then after every letter i type the textarea jumps to the top of the text so i can only view the beginning. the cursor will stay at the end of textarea and i can keep writing but i can NOT see anything im doing and it's just jumping up and down crazily. am i doing something wrong?
how do i fix this annoyingness?
if you need to see the problem in detail i can send you the link.

<textarea name="comments" cols="30" rows="5" class="requiredField" id="textarea" tmt:required="true" tmt:message="Please provide some comments about the restaurant. Comments can only be up to 1000 characters." tmt:errorclass="validateError" tmt:filters="nohtml" tmt:maxlength="1000">You may write up to
1000 characters.</textarea>

chriskq
09-11-2006, 11:52 PM
yes, always try and provide links. makes the problem easier to identify.

are u using divs or tables

rumbuls13
09-12-2006, 03:30 PM
i am using tables. here is the link
http://www.cityvittles.com
the problem happens where it says "comments" text area.

chriskq
09-13-2006, 07:28 AM
Hi Again,
i have just tested on IE6 and FF 1.5, and cant really replicate the problem you described.

I did find one inconsistancy thou, in IE when you start to type in the comments section the overflow: scroll bar appears (vertical) in FF the overflow scrollbar appears horizontally.

was this an issue u where reffering to. Otherwise, cant see any problems

rumbuls13
09-13-2006, 11:58 AM
hmmm that is strange. it still does the jump on my computer. do you think there might be a reason it doesnt work on my computer? do i have some weird setting on? cause when i type in someone else's textarea it works fine on my computer. so it seems to just apply to my form.

also what can i do about the overflow being vertical in IE? i only ever test it on FF so i never noticed the problem your talking about. thanks for bringing it to my attention. why would the horizontal appear in one and not another? thanks!

domedia
09-13-2006, 01:29 PM
I think part of the confusion is your explanation of what you're seeing :)
What I see as well, is that when you start writing in the text area and write until the vertical scroll gets activated, you only see the bottom of the textarea (where the cursor is), when you type, and only for a split second. Because right aftwards the textarea content area scrolls (well more like switches) back to the top, hiding the text you just wrote and your cursor below the scroll. Not sure if I was able to explain this better.... Either this is a really weird cross browser errors (which I'm pretty sure it's not), or it's related to your javascript, which I think it far more likely. I'm not a JS person so I can't help you with that.

dthomsen8
09-14-2006, 11:59 AM
<textarea name="comments" cols="30" rows="5" class="requiredField" id="textarea" tmt:required="true" tmt:message="Please provide some comments about the restaurant. Comments can only be up to 1000 characters." tmt:errorclass="validateError" tmt:filters="nohtml" tmt:maxlength="1000"></textarea>

Your code for the comments appears above. Note the tmt:required="true" and the other tmt: parameters. Tidy says these are proprietary parameters, no doubt related to your JavaScript. Where did you get this code, and your JavaScript to go with it? When you have proprietary parameters, different browsers are likely to do different things with them.

I am no expert on JavaScript or even on forms, but I suspect that the key lies in where the code originated. Is it generated from Dreamweaver 8, or did it come from elesewhere?

rumbuls13
09-14-2006, 02:23 PM
i got the coding some place else. it's called: www.massimocorner.com
they have a link that you can download (it's called tmt validator version 1.3.1) that's where i got the coding.