Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo '<input name="checkbox" value="student" type="checkbox" onclick=change(this, "type"); />';
- ?>
- Uncaught SyntaxError: Unexpected token }
- <script>
- function change(cb, year) {
- var value = cb.value;
- var type = cb.checked;
- var yr = year;
- $.ajax( {
- type: 'POST',
- url:"process.php",
- data: { 'data':value, 'type':type, 'yr':yr, },
- success:function(result) {
- console.log("works" + result);
- }
- });
- }
- </script>
- echo '<input name="checkbox" value="student" type="checkbox" onclick="change(this, 'type');" />';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement