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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:05:02+00:00 2026-06-14T19:05:02+00:00

Possible Duplicate: Jquery post, response in new window i have a table html in

  • 0

Possible Duplicate:
Jquery post, response in new window

i have a table html in a page called results.php that looks like
GenID
ENSMUSG00000098791
ENSMUSG00000023441
ENSMUSG00000047431

results.php have this function

<script>

function contenidoCelda() 
  {
  var table= $('#tabla_results');
  cells = $('td');
 for (var i=0,len=cells.length; i<len; i++)
   {
    cells[i].onclick = function()
      {
      var formData2 = new FormData(document.getElementById("formulario"));
      formData2.append("gen_id",(this.innerHTML));
      $.ajax({
          type: "POST",
      url: "test.php",
      data: formData2,
      cache: false,
      processData: false, 
      contentType: false, 
      success: function(data)
      {
        alert(data);       
            window.open('test.php', '_blank');

      }
    });

       }
     }
   }

</script>

i whant to use the data i send in the file test.php, not to return this to results.php, use in test.php, to generate the content dinamycally.

this is test.php

<?php
$data = $_POST['gen_id'];
system("mkdir $data");
echo "Hola";
echo $data;
echo '<xmp>';var_dump($data);echo '</xmp>';
?>

<html>
  <link href="css/ui-lightness/jquery-ui-1.9.1.custom.css" rel="stylesheet">
  <script src="js/jquery-1.8.2.js"></script>
  <script src="js/jquery-ui-1.9.1.custom.js"></script>
<body>
<form>

<p id = "testing"> Test page </p>

<?php if($data == "ENSMUSG00000047751") {echo "Good";} else {echo "Bad";}   ?>

</form>
</body>

so here in test.php, it must show Good, if i click that genid in the table
but it show Bad, and returns Good to results.php

the test where i create a dir, whit the genid i click works fine

what i must do?

  • 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-14T19:05:03+00:00Added an answer on June 14, 2026 at 7:05 pm

    In your $.ajax call, try setting:

    $.ajax({
      type: "POST",
      url: "test.php",
      data: "testing123",
      cache: false,
      processData: false, 
      contentType: false, 
    });
    

    And see if dir test123 is created, and echoed back.

    If not, then the problem is in these two lines, specifically with your definition of var formData2:

    var formData2 = new FormData($('#formulario')[0]);
    formData2.append("gen_id",(this.innerHTML));
    

    Check for typing errors, such as the comma in place of the semi-colon:

    var table = document.getElementById('tabla_results'),  <-- THIS IS A COMMA. TYPO?
    cells = table.getElementsByTagName('td');
    

    Also, you have a mix of jQuery and javascript. Why not standardize on jQuery? For example, the two lines above would be written like this in jQuery:

    var table = $('#tabla_results');
    cells = $('td');
    

    Much less typing, yes?

    Also, I’m sure you have, but are you sure you’ve included a link to the jQuery library? Such as:

    <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: how to get GET and POST variables with JQuery? I have the
Possible Duplicate: jQuery AJAX submit form I have a form on a page A,
Possible Duplicate: jquery trigger - ‘change’ function I have a radio button set called
Possible Duplicate: jquery .text doesn’t render HTML elements into the DOM I have an
Possible Duplicate: nearest ancestor node in jQuery html: <div class=post> <h2><a href=# title=>Pellentesque</a></h2> <p><a
Possible Duplicate: jQuery $.get or $.post to catch page load error (eg. 404) Maybe
Possible Duplicate: jQuery: how do I animate a div rotation? I have a div
Possible Duplicate: jQuery won't parse my JSON from AJAX query So I have parsed
Possible Duplicate: jquery data selector I have several elements with class 'connection_name'. Each one
Possible Duplicate: Bind multiple events to jQuery 'live' method I have the following 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.