Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

How to set new content beside input field?



4:33 pm on Jan 22, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

How to set new content beside input field using jQuery.

Check sample textarea like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


<textarea required="" onchange="handleInput(this);" onkeyup="handleInput(this); " tabindex="6" cols="30" rows="15" class="" name="" id=""></textarea>



How to set jQuery trigger for this?
Example: when user moves inside input field it will show him on the right hand side also some bordered content.


5:10 pm on Jan 24, 2012 (gmt 0)

I am not sure what you are tying, but if I understand correctly, could you not do something like this?


function handleInput(){
var my_txt;
my_txt = document.getElementById('TxtIn').value;
document.getElementById('label').innerHTML = my_txt;


<textarea required="" onchange="handleInput();" onkeyup="handleInput(); " tabindex="6" cols="30" rows="15" class="" name="TxtIn" id="TxtIn"></textarea> <span id="label"></span>

You can do nearly anything with SPAN label at this point ...


$('#label').append('<span style="....." .... ');



replace html contents of


change CSS ...


pretty powerful stuff

-- Zak

Featured Threads

Hot Threads This Week

Hot Threads This Month