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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:01:50+00:00 2026-05-26T15:01:50+00:00

i m a beginner… here i m using the jquery for showing search results

  • 0

i m a beginner…

here i m using the jquery for showing search results load in ajax type…

so here i have to pass the keyword and the id of the last result when clicked on the show more result…

but in the jquery that i found, it works on only id… and here i have to pass id and key… and here i have passed the them but now in the jquery i need to split the passed id in jquery…

here i need only id for removing that is in if condition but want to pass both id and keyword…

here is the code….

<script>
$('.more').live("click",function() 
{
//here id value is suppose 25(space)nike but i want 25 for if(ID)
var ID = $(this).attr("id");
if(ID) 
{
   $("#more"+ID).html('<img src="load/moreajax.gif" />');
   $.ajax({
   type: "POST",
   url: "load/ajax_more_search.php",
   data: "lastmsg="+ ID, 
   cache: false,
   success: function(html){
   $("div#updates").append(html);
   $("#more"+ID).remove();
 }
 });
 }
 else
 {
   $(".morebox").html('The End');
 }
 return false;
 });
 });
   </script>

also i need to pass the keyword too….

will split work for this… or it onlr works for urls…?

thanking you

  • 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-26T15:01:50+00:00Added an answer on May 26, 2026 at 3:01 pm

    Yes split will work

    var arr= ID.split(' ');
    alert(arr[0]); // It will give you a ID
    alert(arr[1]); // It will give you a Keyword
    

    EDIT:

    Yes your code is right but if you you need that keyword field on

    ajax_more_search.php

    then you have to pass it with ID.
    For that Change your code.

    data: "lastmsg="+ ID, 
    

    change this with.

    {lastmsg : ID, keyword : arr[1] },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Haskell beginner here. I want to pass a type parameter with JSON, and have
Really beginner question here. I have an NSArray of images which in its last
Beginner question here. I'm going to make a Jquery function that is used to
Beginner here, I have a simple question. In Android what would be the best
Beginner programmer here....hope it makes sense :) I have created a console app that
(R beginner here...) I have a dataset like: > head(q) Date Time System User
iOS beginner here. I'm using the following code to save my facebook accessToken and
Beginner programmer here. So bear with me. I have a simple python program. print
Beginner jquery question. I am using the Tokenizing Autocomplete Text Entry plugin, with the
beginner to python here. I have 2 nested lists that I want to merge:

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.