lofaifa Posted March 14, 2012 Share Posted March 14, 2012 i have this tag : <p class="test"></p> i wanna fill up this tag with data from an ajax file .. i tried this : function rate(value){ var rate=value; $.post('public/ajax/rate.php',{rate:rate},function(data){ //nothings wrong with beta var beta=data; $('.test').attr('value',beta); }); } doesnt work ! Quote Link to comment https://forums.phpfreaks.com/topic/258937-fill-a-tag-using-javascript/ Share on other sites More sharing options...
smerny Posted March 14, 2012 Share Posted March 14, 2012 you mean you want to change the inner html of the tag i think? $('.test').html(beta); Quote Link to comment https://forums.phpfreaks.com/topic/258937-fill-a-tag-using-javascript/#findComment-1327431 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.