I have this function in my js script.
//handle the deleting of the shoutlines
function delete_shoutline(shoutline_number)
{
//the number of the shoutline we're deleting
var shoutline = shoutline_number;
$.post("shoutbox/delete_ban.php", {shoutline : shoutline_number},
function(result)
{
//show the result, if any
alert(result);
//refresh the page
window.location = window.location;
});
}
//handle the banning of users
function ban_user(user_ban)
{
//the name of the user we are banning
var banned = user_ban;
$.post("shoutbox/delete_ban.php", {banned : user_ban},
function(result)
{
//show the result, if any
alert(result);
//refresh the page
window.location = window.location;
});
}
here are the calls
<a href='javascript: delete_shoutline(SOMEID);' title='Delete' class='delete' onclick=\"return confirm('Are you sure you want to delete this message?');\">x</a><a href='javascript: ban_user(SOMEUSER);' title='Ban' class='ban' onclick=\"return confirm('Are you sure you want to ban this user?');\">o</a>
the function delete_shoutline works great, but when I click the ban link my console pauses and says (anonymous function) members.php (2):1
Paused on exception 'ReferenceError'
and Debugger says Uncaught ReferenceError: SOMEUSER is not defined
I am not the best with js so I really don’t know what this means?
I am not really sure what this means because the function is defined in the js.
You need quotes around the string.