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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:11:37+00:00 2026-06-05T20:11:37+00:00

This is my form: <form id=submitsearch action=Classes/system/main/searchresult.php method=POST> Search by <span style=font-size:15px;>(developer, specialization, profession,major)</span>

  • 0

This is my form:

<form id="submitsearch" action="Classes/system/main/searchresult.php" method="POST">
Search by <span style="font-size:15px;">(developer, specialization, profession,major)</span>
    <input type="text" name="searchbox" id="searchbox" />
    in
    <select style="text-align:center;" name="countrysearch" id="countrylist">
        <option selected="selected" value="0">None</option>
        <option value="1">USA</option>
    </select>
<input style="margin-left:25px;" id="submitSearch" type="submit" value="Search"/>
</form>

and this is the Ajax jquery code:

    $("#submitSearch").click(function(){

    $.ajax({type:'POST', url: 'Classes/requests/search.php', data:$('#submitsearch').serialize(), cache: false, success: function(response) {
        $('#submitsearch').find('#pagePanel').html(response);

});     

Why isn’t it working ? The php file is returning the correct result normaly.

But i want it to load inside another div with an id “pagePanel” without reloading, using ajax.

Any help ? I’m new to Ajax.

Edit:

    $("#submitbutton").click(function(){

    $.ajax({type:'POST', url: 'Classes/system/main/searchresult.php', data:$('#submitsearch').serialize(), cache: false, success: function(response) {
        $('#pagePanel').html(response);

}})});      

This worked out with me.

Thanks for all your help.

  • 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-05T20:11:38+00:00Added an answer on June 5, 2026 at 8:11 pm

    If you have a input of type submit, it will, guess what :), submit the form, and therefore reload the page. Turn it into:

    <input style="margin-left:25px;" id="submitSearch" type="button" value="Search"/>
    

    Then make sure you actually have a pagePanel element in your html.

    And now a couple of suggestions:

    1. don’t id your form #submitsearch and the button as #submitSearch… confusion may arise
    2. you can use AJAX’s .load() instead of .ajax() to get directly the result in the DIV:

    So:

    $("#pagePanel").load('Classes/requests/search.php', {$('#submitsearch').serialize()});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make this form: echo '<form method=post action=ratinghandler.php style=width: 250px> <input type=hidden
This is my search form: <form action= method=get name=search> <input name=s type=text size=40 value=<?php
I have this form: <FORM id=frmVote action=../vote_dir/proccess.php method=post> <table id=tblMain align=center> <tr> <td class=header></td>
i have this form: <form id=myform name=myform action=test.php method=post> <input type=text name=shout-in id=proShoutIn maxlength=80
So I got this form: <form action=welcome.php method=post> <input type=hidden name=secret value=<?php echo getMyValue()
I have this form: <div class=row border-tb> <form id=test-form action=/test/insert method=post class=form-inline offset4 span16>
I have this form in my HTML: <form action=/awe/ChangeTheme/Change method=post> <select id=themes name=themes> ...
I got this form: <form method=post action= accept-charset=utf-8> <p> <label>first_field</label><br /> <input type=text id=first_field
I have this form: <form name=input action=http://s164074194.onlinehome.us/mail.py method=POST> Username: <input type=text name=email /> <input
I have this form: <form action=javascript:; class=iceFrm enctype=application/x-www-form-urlencoded id=frmMainMenu method=post onsubmit=return false;> ..... </form>

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.