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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:24:40+00:00 2026-05-17T19:24:40+00:00

I have a problem With a Special AJAX Request. I have a Form with

  • 0

I have a problem With a “Special” AJAX Request. I have a Form with several combos (“Select” tag). I’m loading the items for each combo from a MySQL DB, with a Special class designed for me. Each Combo has a “+” Button (For Open a Pop-Up and Add a new Entry). When the user “Saves” the new value, the AJAX request should run, but, nothing happen. Ah, another detail: When the new value it’s saved in the DB, the pop-up automatically close.

This is The Pop-Up Code (PHP):

<?php
  require ("class\BD.php");
  require ("class\combos.php");
  require ("xajax/xajax_core/xajax.inc.php");
  $Conex = new BD();
  if (isset($_POST['GuardarTipoSist']))
  {
   $Ajax = new xajax();
   function cargarTipoSistema()
   { 
     $Combo = new combos();
     $Combo->setParams('cobTipo',$Conex);
     $Contenido = $Combo->CargarCombo();
     $AjaxResponse = new xajaxResponse();
     $AjaxResponse->assign("cobTipo","innerHTML",$Contenido);
   }
    $Ajax->registerFunction("cargarTipoSistema");
    $TipoSist = $_POST['txtTipoSist'];
    $Query = "INSERT INTO Tipos_Sistemas VALUES(NULL,'$TipoSist')";
    $Conex->query($Query);
    $Ajax->processRequest();
    echo '<script>alert("Guardado Correctamente"); return true; window.close();</script>';
  }
?>

And This is The HTML Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Ingresar Tipo Sistema - GESPROGAN</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <style type="text/css">
    <!--
    .Estilo2 {
        font-size: 16px;
        color: #827BCC;
    }
    .Estilo12 {
        color: #FFFFFF;
        font-size: 10px;
        font-weight: bold;
        font-style: italic;
    }
    -->
    </style></head>
    <script type="text/javascript" language="javascript" src="validaciones.js"></script>
    <body>
    <table width="390" height="270" border="1">
      <tr>
        <td bordercolor="#F0F0F0" background="images/dominios tipo sistema.png" width="380" height="264"><p>&nbsp;</p>
        <p>&nbsp;</p>
        <form name="DomTipoSist" action="dominios_tipo.php" method="POST" onsubmit="return validarIngDatHac(); return true;">
        <table width="371" height="166" border="1" align="center">
          <tr>
            <th width="361" height="160" scope="col"><p class="Estilo2">POR FAVOR INGRESE EL NUEVO TIPO DE SISTEMA </p>
              <table width="341" height="68" border="1">
                <tr>
                  <td height="27" colspan="2">
                    <input id="txtTipoSist" name="txtTipoSist" type="text" size="55"/>
                  </td>
                  </tr>
                <tr>
                  <td width="162" height="33">
                    <div align="center">
                      <input id="GuardarTipoSist" name="GuardarTipoSist" type="submit" value="GUARDAR"/>
                    </div>
                  </td>
                  <td width="163">
                    <div align="center">
                      <input id="Cancelar" name="Cancelar" type="button" value="CANCELAR" onclick="javascript:window.close()"/>
                    </div>
                  </td>
                </tr>
              </table>          
              <p class="Estilo2"><span class="Estilo12"> - GESPROGAN.. <strong><em>&copy; </em></strong>Todos los Derechos Reservados 2010- -</span></p>          
            </th>
          </tr>
        </table>  
        </form>    
       </td>
      </tr>
    </table>
    </body>
    </html>

The AJAX Request shoud reload the Combo in the “Parent-Form”, with all of the entries of the BD (Included the new one).

My Question is, I Can do the AJAX Request in the Pop-Up? Or How Can I Do This?

Thanks in Advance!

PS: Sorry For My English, I’m Not a “Native-Speaker”.

  • 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-17T19:24:40+00:00Added an answer on May 17, 2026 at 7:24 pm

    Run the Ajax request in the main window not in the popup. So for example, when you submit the form in the popup, do a window.opener.cargarTipoSistema();

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

Sidebar

Related Questions

I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names
I have problem with starting processes in impersonated context in ASP.NET 2.0. I am
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have problem with ActionLink. I'd like to pass to my ActionLink parameter for
I have problem when I try insert some data to Informix TEXT column via
I do not have problem as such but I am quite new to Ruby.
I have a problem using the Java search function in Eclipse on a particular
I have a problem with a little .Net web application which uses the Amazon
I have a problem in my project with the .designer which as everyone know

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.