I would like to know how can i use/transform this function in order to get work into a INPUT TEXT...
Actually works if target is a DIV, but i would like use it into a INPUT TEXT...
The code i found and i want to use is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="js/jquery.js" type="text/javascript"></script>
<script language="JavaScript">
$(document).ready(function (){
textWrite("THIS'S A MESSAGE, I WOULD LIKE WRITE IT INTO A INPUT TYPE TEXT", '#write', 50);
});
function textList()
{
max = textList.arguments.length;
for (i = 0; i < max; i++)
this[i] = textList.arguments[i];
}
function textWrite(txt, selector, time)
{
$(selector).empty();
var x = 0; pos = 0;
var tl = new textList
(
txt
);
var l = tl[0].length;
textInterval(selector, tl, l, x, pos, time);
}
function textInterval(selector, tl, l, x, pos, time)
{
var interval =
setInterval(function() {
$(selector).html(tl[x].substring(0,pos));
if(pos++ == l)
clearInterval(interval);
}, time);
}
</script>
<title>Untitled Document</title>
</head>
<body>
<div id="write" /></div>
<input type="text" name="WriteHerePlease" id="WriteHerePlease" />
</body>
</html>
Thank in advance for all the help you can give me.