Hi all ,

I have one text box and submit button . I want to submit one by one value into the box and these values will be displayed one by one serially on the page .
ex. aaaa then
    bbbb then
    cccc then will display 


    <input type="text" name="txt" value=""><input type="submit" name="Submit" value="Submit">





Subrata Nandi

You can do this by using AJAX. It's an incredibly useful tool.

Heres a basic example of what i think you're asking:

<script type='text/javascript'>
function addValue(eid,addtoeid){
    var obj = document.getElementById(eid);
    var displayObj = document.getElementById(addtoeid);

    displayObj.innerHTML += obj.value+'<br/>';
    obj.value = '';
    obj.focus();
}
</script>
<input type='text' id='showText'/><a href='javascript:' onclick="addValue('showText','displayHTML');">Add</a><br/>

<div id='displayHTML'></div>

Biiim,

Thanks Biiim. Exactly this is I was looking for.

Subrata

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.