Forum Moderators: open

Message Too Old, No Replies

Put Text From Input To Text Box

Looking for a way to fill out a form to fill out a text box

         

teamcoltra

1:07 pm on Feb 4, 2009 (gmt 0)

10+ Year Member



I don't know if I am calling this the right thing, and maybe its simple but I am just not finding how to do this:

I want to have a form to fill out, then click "convert to textbox" or some like button and it create a textbox full of the content just entered for instance:

Name ¦=====================¦
Age ¦=====================¦
Location ¦=====================¦

[submit]

(text area)
------------------------------------
Hello my name is (NAME) and I am (age)
from (location)
-------------------------------------

so then you can easily copy and paste that somewhere else.

(the name, age, location, thing is just an example, but if I can figure out how to do THAT then I can use the fields I want to use)

EDIT: Upon further thought, if you want another refrence to what I am talking about, a lot of those "roll your own code" scripts like on flickr and googleads does something similar to this execpt with check boxes... where when you fill out certain fields then they change the code thats in a text box. This is kinda what I want... execpt like above.

teamcoltra

1:45 pm on Feb 4, 2009 (gmt 0)

10+ Year Member



I found this (how to add an emoticon) but don't know how to apply it to my text fields:

<script language="JavaScript">
function insertbbcode(myField, myValue) {
//IE support
if (document.selection) {
myField.focus();
sel = document.selection.createRange();
sel.text = myValue;
}
//MOZILLA/NETSCAPE support
else if (myField.selectionStart ¦¦ myField.selectionStart == '0') {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
myField.value = myField.value.substring(0, startPos)
+ myValue
+ myField.value.substring(endPos, myField.value.length);
} else {
myField.value += myValue;
}
}
</script>