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 8023297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:31:36+00:00 2026-06-04T22:31:36+00:00

I am using Jquery UI Selectable. The user has the option to dynamically add

  • 0

I am using Jquery UI Selectable. The user has the option to dynamically add new list items to the original setup.

I would like to include a ‘clear’ button that will give the user the ability to clear each individual item they created by clicking on an X input submit (img).

HTML (php)

    if ($this->session->userdata('inactivefilter') == true) {
            $inactivefilter = $this->session->userdata('inactivefilter');
            $i=0;
            foreach ($inactivefilter as $filter)
                {
                    $filterdash = implode('-', explode(' ', $filter));
                    echo "<li class='ui-state-default' id='$filterdash'>$filter</li>";
                    echo "<div id=clear>
                            <form method='POST' action='".base_url()."main/clear_filter'>
                                <input type='image' name='filtervalue' value='$i' src='".base_url()."img/board/icons/clear.png'></input>
                            </form>
                          </div>";
                    $i++;
                }
        }

This is where the list is created. specifically the clear_filter action form.

Clear_filter currently ‘attempts’ to grab the value of ‘$i’ but I don’t know how to pass that correctly.

here is the controller:

    public function clear_filter()
    {
        $i = $_POST['filtervalue'];
        $this->thread_model->clear_filter($i);
    }

I’ll omit the clear_filter model due to its irrelevance to the problem.

Essentially, I just need $i to be picked up based on whatever value is clicked on in the dynamic form on the actual page.

Any help would be appreciated!

  • 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-04T22:31:38+00:00Added an answer on June 4, 2026 at 10:31 pm

    Well, it seems like I just had things a bit backwards.

    The code was more or less correct.

    For Codeigniter, you catch the passed input value=$i by using the name ="filtervalue"

    Change the controller code to :

    $i = $this->input->post('filtervalue');

    and $i is set to whatever value was clicked on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using jQuery UI Selectable for list items in Ordered list, But i just
Using the jQuery UI library selectable(). Links within the selectable list items are not
Using JQuery it possible to clone a Div like this and change add a
I am using jQuery and the widget Selectable to let my user select files
I would like to add a button to the current page using html()-function. This
I am trying to have the functionality of the jQuery selectable list when using
(Original Questions) I am using jquery ui's selectable script to control specific active keywords
I'm working with a list whose items are both selectable (using checkboxes) and sortable
I am using the JQuery UI selectable plugin to select table cells, here is
Using jQuery's dialog I came across the following quirk (tested in FF3): User selects

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.