Widget:Testbed: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 3: Line 3:
$(document).ready(function(){
$(document).ready(function(){
$("#input1").click(function(){
$("#input1").click(function(){
alert('Hi');
    var api = new mw.Api();
api.get({
action : 'wbrinsertrating',
username : 'Matt_Pijoan',
                question : 'TestQues',
quality : 5,
format : 'json'
}, {
ok : function (res) {
                alert('Great success');
                }
});
});
});
$("#input2").click(function(){
    var api = new mw.Api();
api.get({
action : 'wbrgetrating',
                question : 'TestQues',
                format : 'json'
        }, {
            ok : function(res){
            alert('Input 2 Sucess');
            }
});
});
});
});
</script>
</script>
Line 18: Line 43:
</tr>
</tr>
</table>
</table>
<div id="outputStuff"></div>
</includeonly>
</includeonly>

Latest revision as of 15:20, 11 October 2013