Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9102291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:20:55+00:00 2026-06-17T01:20:55+00:00

I’ve got an html table with a number of checkboxes : <table id=webcam-table class=pretty>

  • 0

I’ve got an html table with a number of checkboxes :

<table id="webcam-table" class="pretty">
    <thead>
    <tr>
        <th>Camera Name</th>
        <th>Date Created</th>
        <th>Video Size</th>
        <th>Video Length</th>
        <th><input type="checkbox" name="checkboxselectall" title="Select All" />
        <button type="submit" class="deletebutton" name="delete_video" title="Delete the selected videos">Delete</button></th>
    </tr>
    </thead>
    <tbody>
        <form name="myform" action="">
        <tr >
            <td onclick="DoNav('<?php echo $url; ?>');">
                        <?php echo $this->result_videos[$i]["camera_name"]; ?> 
            </td>
            <td onclick="DoNav('<?php echo $url; ?>');">
                        <?php echo setlocalTime($this->result_videos[$i]["video_datetime"]); ?> 
            </td>
            <td onclick="DoNav('<?php echo $url; ?>');">
                        <?php echo ByteSize($this->result_videos[$i]["video_size"]); ?>
            </td>
            <td onclick="DoNav('<?php echo $url; ?>');">
                        <?php echo strTime($this->result_videos[$i]["video_length"]); ?>
            </td>
            <td>
            <input type="checkbox" value="<?php echo $this->result_videos[$i]["video_name"]; ?>" title="Mark this video for deletion"/>
            </td>
        </tr>

There is a bunch of code I’m omitting that is php code to build the table. Notice the input type checkbox value returns the name of the video. This is necessary to delete the video. My jquery code to process the value of each video:

jQuery(".deletebutton").on("click", function() {
    if (confirm("Are you sure you want to delete the selected videos?"))
    {
        var values = [jQuery('input:checkbox:checked').map(function () {
            return this.value;
        }).get()];
        alert(values);
        var $this = jQuery(this);
        jQuery.ajax({
            url: 'index.php?option=com_recordings&task=deletevideos&videonames=+values+&format=raw',
            type: "POST",
            success: function(data){
                $this.closest("tr").remove();
            }
        });
    }
});

The user can select one or more checkboxes and hit the delete button. This should return the values of the checkboxes (all the video names), they get deleted and I remove the rows in the table.

Here’s the problem. I’m using Joomla component development so I pass the values in the url. The names of the videos are way too long to do this. Someone can select up to 100 video names which makes the url string way too long. Can anyone suggest an alternative?

EDIT: I changed this to an array based on @Dasun feedback. See above for values. If I test this value with:

alert(values);

I get an output that looks like: blah.mp4,foo.mp4,bar.mp4. Which I expect. But each video name is on the query string which I don’t want. Either I’m not creating the array correctly or I don’t understand how you only pass the array object and not the entire contents of the array on the query string.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T01:20:56+00:00Added an answer on June 17, 2026 at 1:20 am

    maybe if you request is a POST in your php code you wil be looking for $_POST[‘videonames’]
    then you shuld pass them as the data parameter of the request.

    also to pass it trought GET it shuld look like

       &videonames[0]=values[0]&videonames[1]=values[1]
    

    maybe this code will work:

       $.ajax({
         type: 'POST',
         url: 'index.php?option=com_recordings&task=deletevideos&format=raw',
         data: { 'videonames': values},
         dataType: 'json',
         success: function(result) {
          alert('done');
         },
         error : function() {
          alert('error');
         } 
         });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
i got an object with contents of html markup in it, for example: string
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using JSon response to parse title,date content and thumbnail images and place
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.