Note that there are some explanatory texts on larger screens.

plurals
  1. POI want to change the visibility of a div to visible by default it is hidden
    primarykey
    data
    text
    <p>This is my code in which I have set the div visibilty by default hidden</p> <pre><code>&lt;div id="addComments" align="center" style="width:300px; height:300px; visibility:hidden"&gt; &lt;button&gt;Submit&lt;/button&gt; &lt;button&gt;Cancel&lt;/button&gt; &lt;/div&gt; </code></pre> <p>but when I click on this link I want to change the visibility of a div to visible.</p> <p><code>&lt;a href="javascript:addMethod()"&gt;+ Create a new comment&lt;/a&gt;</code></p> <p>the method behind this link is as follows:</p> <pre><code>function addMethod() { try { var obj = document.getElementById('addComments'); obj.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) { console.log(d); if (d == true) { alert("Thank you"); } else { alert("Rewrite"); } }, error: function (xhr, ajaxOptions, thrownError) { console.log(xhr); } }); } catch (err) { alert(err);} } </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.
 

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