in Education by
My goal here is to delete the correspondent data in mysql db table using AJAX. So I've generated a table with several rows and want to a non specific row... PHP Code: <?php if(isset($_SESSION['login_status'])){ require 'classes/datahandle.class.php'; $data = new Datahandle(); $query = " SELECT e.place, e.id_station, g.description, ac.max, ac.min, ac.mensagem FROM unit g, tableA ac, station e WHERE client = '" . $_SESSION['user_id'] . "' AND ac.unit=g.field AND ac.id_station=e.id_station "; $result = $data->selectDataQuery($query); $numRows = $data->getAffectedRows(); if($numRows > 0){ ?> <?php while ($alert = mysql_fetch_array($result)) { ?> <?php } ?>
Value 1 Value 2 Value 3 Value 4 Value 5
"/> "/> "/>
<?php }if ($numRows == 0) {?>
Sometext
<?php } } else echo "<meta http-equiv='refresh' content='1; URL=../index.php'>"; ?> JQUERY: <!-- $(document).ready(function() { $(".delete").click(function(){ //AJAX CALL $.post("phpValidationScript.php", { station:$(".stationCons").val(), grandeza:$(".unitCons").val(), consMax:$(".consMax").val(), consMin:$(".consMin").val(), msg:$(".msg").val() }, function(data){ alert(data); }); }); return false; }); //--> My code deletes ONLY the first row... How can I refer to the proper td values? And pass them to the ajax? EDIT: I'm getting this error: TypeError: object is not a function [http://127.0.0.1/somesite/index.php?page=consAlerts:[35] The error refers to the bellow code: $.post("validaConsApagar.php", { estacao:$(this)(".estacaoCons").val(), grandeza:$(this)(".grandezaCons").val()}, function(data){... So this is not a function that means that the syntax is wrong? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
use this operator. $.post("phpValidationScript.php", { station:$(this)(".stationCons").val(), grandeza:$(this)(".unitCons").val(), consMax:$(this)(".consMax").val(), consMin:$(this)(".consMin").val(), msg:$(this)(".msg").val() }, function(data){

Related questions

0 votes
    On a PHP-based web site, I want to send users a download package after they have filled out a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 1, 2022 in Education by JackTerrance
0 votes
    On a PHP-based web site, I want to send users a download package after they have filled out a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 29, 2022 in Education by JackTerrance
0 votes
    How to enable inno-db support on installed instance of MySql? I have installed mysql-5.0.67-win32. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    I have a table like below 11 12 13 11 12 13 11 12 13 After I click on the table, I ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I have a table like below 11 12 13 11 12 13 11 12 13 After I click on the table, I ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I need to take the users input from the select box for Allergen1 once an option is selected and the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    i have one csv file which contains library group and it's data... group consider as sheet and for ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 16, 2022 in Education by JackTerrance
0 votes
    I added a table that I thought I was going to need, but now no longer plan on using it. How ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    I am trying to set text and value for both td tag and input tag at the same time. But after ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I am trying to set text and value for both td tag and input tag at the same time. But after ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    How can I get the td values with jquery? The while loops will generate a few with the same class ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I had to delete all the rows from a log table that contained about 5 million rows. My initial try ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    I had to delete all the rows from a log table that contained about 5 million rows. My initial try ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    Which command clauses is used to delete tuples from a database table? Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    I've come to this code, but from this i have to manually insert all columns and check it by each ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
...