Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to add text in a textarea and post it to the service
    primarykey
    data
    text
    <p>This is my Link by which my div is visible</p> <pre><code>&lt;a href="javascript:addMethod()"&gt;+ Create a new comment&lt;/a&gt; </code></pre> <p>and method that is called on it is as follows</p> <pre><code>function addMethod() { try { var div = document.getElementById('addComments'); div.style.visibility = "visible"; var textArea = document.getElementById('Textarea1'); textArea.style.visibility = "visible"; var mashupId = _settings.ratedObjectId; var tenantId = _settings.tenantId; var comments = null; var user = { "Id": 2007, "FirstName": "Ufone", "LastName": "", "EmailAddress": "ahmed.ali@vidizmo.com509" }; var ratingInfo = { "Id": 0, "TenantId": tenantId, "UserId": user.Id, "FirstName": user.FirstName, "LastName": user.LastName, "Rating": 0, "EmailAddress": user.EmailAddress, "Comments": comments, "RatedObjectTypeInfo": { "Id": 2 }, "RatingTypeInfo": { "Id": 1 }, "MashupRatingInfo": { "MashupMetaInfoId": mashupId }, "RatedObjectId": mashupId, "TotalCount": 0 }; var url = "http://services.farooq.tv/RatingInfoManagementService/RatingInfoManagementService.svc/ajax/AddRating"; $.ajax({ type: "POST", url: url, data: JSON.stringify(ratingInfo), contentType: "application/json", timeout: 5000, success: function (d) { if (d.comments == true){ console.log(d); alert("Success"); }, error: function (xhr, ajaxOptions, thrownError) { console.log(xhr); } }); } catch (err) { alert(err); } } </code></pre> <p>This is my div and inside it is a text area and buttons</p> <pre><code> &lt;div id="addComments" align="center" style="width:300px; height:300px; visibility:hidden"&gt; &lt;textarea id="Textarea1" style="width:300px; height:300px; visibility:hidden"&gt; &lt;/textarea&gt; &lt;button&gt;Submit&lt;/button&gt; &lt;button&gt;Cancel&lt;/button&gt; &lt;/div&gt; </code></pre> <p>I want to add text in a text area and save it in a variable after submit button is pressed</p> <pre><code>&lt;button&gt;Submit&lt;/button&gt; </code></pre> <p>and the variable in which i want to store the text of a text area is </p> <pre><code>var comments = null; </code></pre> <p>Please help i m new to programming......</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload