Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
help with input and div
Old 10-20-2010, 04:10 PM help with input and div
Junior Talker

Posts: 2
Trades: 0
I'v very new to javascript and need some help. Here's what I need to do:

I need to have a text input with a button, and when the button is clicked the text must be copied to a div. When copying, each character needs to be placed on a separate line within that div container. Before this happens though, the content currently in the div must be cleared.

This probably very simple, but as I said i'm new and confused out the wazoo. Thanks in advance!
hellomoto is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-20-2010, 06:36 PM Re: help with input and div
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
split() the value into an array, then loop through the array and write each element + a <br> to the container.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to help with input and div
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24266 seconds with 12 queries