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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:01:59+00:00 2026-05-22T22:01:59+00:00

When I click search button the url parameter is taking care of. I need

  • 0

When I click search button the url parameter is taking care of. I need to change that url parameter name and value using jquery.

per example: search button clicked

http://testsite/_layouts/OSSSearchResults.aspx?k=deana&cs=This%20Site

Replace with:

 http://testsite/_layouts/OSSSearchResults.aspx?k=deana&s=All%20Sites

I can not modify search button functionality, because it is out of the box functionality.

I can do changing url parameter and value. How can we do that?

  • 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-22T22:01:59+00:00Added an answer on May 22, 2026 at 10:01 pm

    Changing the parameter of a URL should be fairly straightfoward:

    var param = window.location.href;
    var param_q = param.split('?');
    var param_ampersand = param_q[1].split('&');
    var param_eq_1 = param_ampersand[0].split('=');
    var param_eq_2 = param_ampersand[1].split('=');
    var new_param_name_1 = 'test';
    var new_param_value_1 = 'example';
    var new_param_name_2 = 'test2';
    var new_param_value_2 = 'example2';
    // avoid infinite loop
    if ((param_eq_1[0] != new_param_name_1 || param_eq_1[1] != new_param_value_1) || (param_eq_2[0] != new_param_name_2 || param_eq_2[1] != new_param_value_2)) window.location = param_q[0] + '?' + new_param_name_1 + '=' + new_param_value_1 + '&' + new_param_name_2 + '=' + new_param_value_2;
    

    This worked for me in Chrome/FF. This just redirects the parameter – not sure if this is what you’re looking for.

    EDIT:

    Added a logic to handle two parameters.

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

Sidebar

Related Questions

Using ASP.NET 3.5 and jQuery UI. When a user clicks the Search button, a
I want to do the search using ajax jquery js, for that I have
I have this code: <script language=javascript> $(function() { $('#items,#button-search').hide(); $(#companies).click(function() { $(this).attr(value,); $('#address,#new-company-form').empty(); });
User click on a link button and it will direct them to a url
I am triggering jqgrid reload on button click and also resetting the page value
i want to run the script behind the button of Google search that means...posting
The work flow: user click the button, a dialog box opens with a search
In following code $('body').delegate('.submit',... passed = search && passed; ... after click on button
I'm using this code: <script type='text/javascript'> $(document).ready(function () { //Check if url hash value
I have the following code making a GET request on a URL: $('#searchButton').click(function() {

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.