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

  • SEARCH
  • Home
  • 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 6130665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:53:05+00:00 2026-05-23T16:53:05+00:00

I need to modify some code already in place. There’s a block of code

  • 0

I need to modify some code already in place. There’s a block of code that filters a JQuery list using the URL to populate the search input.

E.g.

http://***/store/mobile/page/productList.page?search=football

Automatically enters “football” in the search bar.

Now I’d need to filter the list, without using the search bar.

So lets say my URL would look something like this :

http://***/store/mobile/page/productList.page?football

This would filter the list with football without using the search bar.

Here’s the code I need to change. Please tell me if my question is unclear.

$('div[data-url*="productList"]').live("pageshow", function() {

  filterValue = getParameterByName("search", location.search);

  if (filterValue) {

    $('input[data-type="search"]').val(filterValue);
  }

  refreshList();
});

and:

 $.each(catalog.products,
      function(index, value) {

          if ((!filterValue )
                  || value.name.toUpperCase().indexOf(filterValue.toUpperCase()) != -1
                  || value.brand.toUpperCase().indexOf(filterValue.toUpperCase()) != -1)

          {
              items.push('<li id="' + index + '">' +
                      '<a data-identity="productId"  href="./details.page?productId=' + index + '" >' +
                      '<img class="ui-li-thumb" src="' + value.thumbnail + '"/>' +
                      '<p>' + value.brand + '</p>' +
                      '<h3>' + value.name + '</h3>' +
                      '<span class="ui-li-count">' + value.price + ' $</span></li>') +
              '</a>';
          }

      });
  • 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-05-23T16:53:06+00:00Added an answer on May 23, 2026 at 4:53 pm

    if there will always be only 1 parameter after ? than you could simply get it from page location in javascript, e.g.

    var url = document.location;
    var params = url.split("?");
    
    filterValue = params[params.length-1]
    if (filterValue) {
    
        $('input[data-type="search"]').val(filterValue);
    }
    
    refreshList();
    

    example: http://jsfiddle.net/yPgPc/

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

Sidebar

Related Questions

I need to modify some legacy code that was written in classic ASP (VBscript).
I have some JSF code that currently works (as shown below), and I need
However strange it sounds I need to modify some Groovy code by modifying how
I need some software to explore and modify some SQLite databases. Does anything similar
I need to modify a php search script so that it can handle multiple
We have an issue where we need to modify keys for users that are
I had to modify some open source code to use in a C project.
I am new to R development, and have to modify some existing code. Specifically,
I have some (php) code that performs critical updates on an InnoDB table. I'm
Due to constraints beyond the scope of this post, I need to modify some

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.