javascript - How to make profile and post/image/video public or private on the same time i have example -
as can see our post can public,private or custom on facebook. how can same php coding? changes instant on fb. please refer me code or solution.
<script type="text/javascript"> (function($){ try { $('#post-visibility-display').text('<?php echo $visibility_trans; ?>'); $('#hidden-post-visibility').val('<?php echo $visibility; ?>'); $('#visibility-radio-<?php echo $visibility; ?>').attr('checked', true); } catch(err){} }) (jquery); </script>
}
there different ways of implementing this, like-
first table contain 3 columns user_id, post, visibility_status. visibility_status 0 public,1 private.
<script> $(document).ready(function(){ $("#mybutton").click(function(){ var post=$("#mytext").html(); var status=("#rad").val(); $.ajax({ here ajax request insert records...... }) }) }) <script> <textarea id="mytext"></textarea> public <input type="radio" id="rad" value="0" checked='true' /> private <input type="radio" id="rad" value="1" />
Comments
Post a Comment