Relative Content

Tag Archive for javascriptphphtml

How to send multiple checkbox values

I need to get multiple checkbox values from HTML to JavaScript And how I send those data from JavaScript to PHP side to store in our database <div class=”form-group color-option”> <?php $color_rs = Database::search(“SELECT * FROM `color`”); $color_num = $color_rs->num_rows; for ($x = 0; $x < $color_num; $x++) { $color_data = $color_rs->fetch_assoc(); ?> <input type=”checkbox” […]

Calling a javaScript function in a php echo dosnt work

I have a website where, under certain conditions, a PHP file is executed. Within this PHP function, an if statement includes an echo that is supposed to call a JavaScript function. However, instead of executing the JavaScript, it simply displays the code as text. I’ve also tried using a simple alert, but it still doesn’t work. Interestingly, when I access the PHP file directly, without invoking it through the HTML page via a button, it works perfectly fine. What could be causing this issue?

Why is javascript not working on this page?

This is a PHP project, and I’m trying to use JavaScript to toggle my navigation bar in mobile view. By clicking on the navigation bar(hamburger), it will drop down or close the menu using an event listener that toggles the menu’s class. However the function is not been executed on this page.

html5 play video from folder ramdonly

I adapt a script to read random videos from a folder, The script works but still read the same video first, then start the 2nd random videos, I would like to read from the first random video
my script:

html5 play video from folder ramdonly

I adapt a script to read random videos from a folder, The script works but still read the same video first, then start the 2nd random videos, I would like to read from the first random video
my script: