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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:58:09+00:00 2026-06-13T10:58:09+00:00

I have this HTML form saved as file-001.php : <form action=file-001.php method=post id=select-block class=general-form>

  • 0

I have this HTML form saved as file-001.php :

<form action="file-001.php" method="post" id="select-block" class="general-form">
<input class="clearme" name="Title" value="Title" />
<input type="submit" class="submit-btn" value="SAVE" />
</form>

this form process submitted variables on the same file. but this file file-001.php actually called by jQuery load and located as tab box :

$('a.manage-content-link').click(function (e) {
    var self = $(this),
        file = self.siblings('input[name="block-type"]').val();
    file = file.substring(file.length - 3);
    self.next(".manage-content-wrap").find(".manage-content").load("file-001.php");
    e.preventDefault();
});

but, when I click ‘submit’ button, this form redirects me to single page that is http://example.com/file-001.php

how to make the ‘action’ result on still INSIDE the same tab box. not redirected out from the box?

  • 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-13T10:58:10+00:00Added an answer on June 13, 2026 at 10:58 am

    You can submit the form via ajax

    Since the form doesn’t exist in page when your initial page load code runs, use on() method to account for future form.

    $(document).on('submit', '#select-block', function() {
    
        var data = $(this).serialize();
        var actionUrl = $(this).attr('action');
    
        $.post(actionUrl, data, function(response) {
            /* do something when form submittal completed*/            
        })
    
        return false; /* prevent browser default submit and redirect*/
    });
    

    API References:

    http://api.jquery.com/jQuery.post/

    http://api.jquery.com/on/

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

Sidebar

Related Questions

I have this HTML: <form action='uploadhandle.php' method='POST' enctype=multipart/form-data> <input type='file' class='fileinput' id='photo1' name='photo1'> <input
If have a html form like <form method=POST action=http://.../file.php> <input type=text name=data id=data />
I have this html code <form method=post id=upload_video enctype=multipart/form-data action=/Home/Save> <div id=form_box> <input type=text
I have a html form with the data by this post method 'form id='form1'
I have a html form that sends POST data to php file. In php
I have this HTML dropdown: <form> <input type=text id=realtxt onkeyup=searchSel()> <select id=select name=basic-combo size=1>
i have this html <ul> <li><form action=# name=formName></li> <li><input type=text name=someName /></li> <li><input type=text
I have a html file ('search.html') with a form on it. I have saved
I have this html form which has options: <tr> <td width=30 height=35><font size=3>*List:</td> <td
In my ASP MVC 3 application, I have this form @using (Html.BeginForm()) { <input

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.