I want to add a textarea to page where I could add new text by typing inside that textarea and save it on server (not only cookies). Page will be replicate multiply times with different context distincted by e.g. name and other content. I want to change textarea separately on every page and do not overwrite it on every page.
My textarea code so far:
<div id="descriptionDiv" style="float:right;">
<form id="addDescription-form">
<fieldset>
<input type="textarea" id="descriptionTextboxID" name="descriptionTextbox" style="width:400px;height:75px" class="text ui-widget-content ui-corner-right" placeholder="Short description" ></input></p>
<button type="submit" value="Submit" onClick="addText()">Save</button>
</fieldset>
</form>
</div>
And draft of addText() function looks like that so far:
function addText() {
var descriptionContent = $("#descriptionTextboxID").val();
$("#addDescription-form #descriptionTextboxID").val(descriptionContent); }
On every page will be unique name. Could I use it to distinct textarea context? So far I have problem to save my new value on server too, when I refresh page I see a placeholder again instead of a new value.