Making a textarea look like a sheet of line paper

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Making a textarea look like a sheet of line paper

Post by daedalus__ »

I need to make a textarea look like this:

__________________________
__________________________
__________________________
__________________________

Similar to a sheet of paper or what they look like in Lynx.

I have a couple of different ideas on how to create the illusion of this but nothing solid.

Any ideas?

I was thinking about using multiple input fields and some JS to move the cursor.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

why not just style it with a background image (of lines) and a line-height that works with those lines.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

That's a great idea! Thanks burrito!
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

Is there a way to get the ID of an element?
User avatar
wtf
Forum Contributor
Posts: 331
Joined: Thu Nov 03, 2005 5:27 pm

Post by wtf »

Code: Select all

document.getElementById( 'elementid' )
?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

wtf wrote:

Code: Select all

document.getElementById( 'elementid' )
?
I believe that's the oposite of what he needs... he said get the id not get the element by the id.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

The Ninja Space Goat wrote:
wtf wrote:

Code: Select all

document.getElementById( 'elementid' )
?
I believe that's the oposite of what he needs... he said get the id not get the element by the id.
Yes, that is what I meant. :D

I can not find anything about it.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You could try googling 'get the ID of an element'. It was not incredibly helpful, but there was one link that might help ...


http://www.faqts.com/knowledge_base/vie ... /aid/20744
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

I did google.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

element.id property oughta do it.
Post Reply