Widget:Testbed: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
Created page with "<includeonly> <script type="text/javascript"> $("#input1").click(function(){ alert('Hi'); }); </script> <table> <tr> <td><input id="input1" type="button" value="Input 1" /></t..."
 
Matt Pijoan (talk | contribs)
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<script type="text/javascript">
<script type="text/javascript">
$(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 16: Line 43:
</tr>
</tr>
</table>
</table>
<div id="outputStuff"></div>
</includeonly>
</includeonly>

Latest revision as of 15:20, 11 October 2013