I am using the following to set up a textarea for the input of the body of an email.

<td valign="top"><textarea name="zbody" id = "zbody" class="stylefont_textarea" tabindex = "3" onfocus="gotostart()" cols="40" rows="10"><?php echo $sig?></textarea></td>

the php inserts a "signature" into the textarea. When I tab to it, the cursor goes to the end of the text. I want it to be at the beginning.
I have tried some javascript with TextRange without success. Any suggestions please? (not necesarily using javascript)

Recommended Answers

All 2 Replies

where is your gotostart() function?

The gostart() function I tried played around with the TextRange function but nothing seemed to work, so I ditched it. Can you suggest some other way of solving the problem please?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.