Created
May 3, 2024 15:38
-
-
Save codeeshop-oc/8f4d096b138bb86050401addb77bc5b1 to your computer and use it in GitHub Desktop.
Select multiple tables in adminer.php using javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Blog - https://codeeshop.medium.com/how-to-select-multiple-tables-in-adminer-php-using-javascript-dcdb0eb3bf44 | |
Youtube Video - https://youtu.be/yF3WIENZVOY | |
*/ | |
if ($('#jquerycdn') == null || !$('#jquerycdn').length) { | |
var s = document.createElement("script"); | |
s.type = "text/javascript"; | |
s.id = "jquerycdn"; | |
s.src = "https://code.jquery.com/jquery-2.2.4.min.js"; | |
$("head").append(s); | |
s.onload = afterJqueryLoad | |
} | |
// Function to execute after jQuery loads | |
function afterJqueryLoad() { | |
// Tables | |
const adminerCheckboxes = [ | |
`ps_address`, | |
`ps_address_format`, | |
] | |
$(document).ready(function() { | |
for (let i = adminerCheckboxes.length - 1; i >= 0; i--) { | |
$(`table tbody [value="${adminerCheckboxes[i]}"]`).trigger('click') | |
$(`table tbody [value="${adminerCheckboxes[i]}"]`).parent().parent().next().trigger('click') | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Blog - https://codeeshop.medium.com/how-to-select-multiple-tables-in-adminer-php-using-javascript-dcdb0eb3bf44
Youtube Video - https://youtu.be/yF3WIENZVOY