This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
1
failing to load jquery
Post Body
I am trying to load a code in Moodle through jquery I get the following mistak
Uncaught SyntaxError: Invalid or unexpected token
what am I doing wrong?
this is my js file:
function init() {
var search = $('#search').text();
search.click(function() {
// $.ajax({
// type: 'post',
// url: 'manage.php',
// data: {
// source1: "some text",
// source2: "some text 2"
// },
// success: function( data ) {
// console.log( data );
// }
// });
console.log('ok);
});
}
<h1 id="ciao">
<?php echo $COURSE->fullname ?>
</h1>
<a id="marko" href="report2.php">PDF</a>
<form action="manage.php" method="POST">
<select name="ciao">
<?php foreach ($result as $key => $res) { ?>
<option id="search" value="search" name="search">
<?php echo $res->uename ?>
</option>
<?php } ?>
</select>
</form>
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/moodle/comm...