• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 111
  • Last Modified:

not update get statement using jquery

HI,

I have the following code

$(".cambiarClientes").click(function(){
		
		$(this).html('<form action="cambioWebPortal.php" method="GET"><input type="text" id="infoClientes" name="infoClientes" value="'+$(this).html()+'"><input type="hidden" name="eventoPertenece" value="'+ $(this).attr("eventoPertenece") +'"><input type="hidden" name="infoFeeder" value="'+ $(this).closest("tr").find("td:eq(5)").html() +'"><input type="hidden" name="infoTipo" value="'+ $(this).closest("tr").find("td:eq(3)").html() +'"><input  type="submit" value="Cambiar"></form>');
		
		$(this).closest("tr").find("td:eq(5)").html('<input type="text" value="'+$(this).closest("tr").find("td:eq(5)").html()+'">');	
		
		$(this).closest("tr").find("td:eq(3)").html('<input type="text" value="'+$(this).closest("tr").find("td:eq(3)").html()+'">');	
			
			$(this).unbind("click");
	});

Open in new window


I need to send the updated parameter in the td:eq5 and the td:eq3 to the cambioWebPortal.php, but sends the initial acquired value, any idea?
0
joyacv2
Asked:
joyacv2
  • 5
  • 4
1 Solution
 
GaryCommented:
Rendered table html and required values again.
0
 
joyacv2Author Commented:
Hi,

Can you explain a little bit?
0
 
GaryCommented:
Post your html and indicate the data you want like in the last question.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
joyacv2Author Commented:
the table is created by a php file,

In the code that i post, when you click a cell, then this grabs the info of two other cells and put in a hidden input, before i click the submit button i change the value of the input of the other cells, but it doesn't refresh the values of the hidden input in the form
0
 
GaryCommented:
Can you post the HTML, something is not making sense to me.
0
 
joyacv2Author Commented:
hi,

the problem is that the html is integrated with two many pages to create the table,

i will try to explain a little bit more

1. I have a table with some columns, suppose 5 columns
2. Click the first cell of the first row and then it's convert to a form that have an input box with a button
3. inside this form this grab the html of the next two cells of this first row and put in hidden input
4. Convert the text of the next two cells into input box with his actual value
5. If i pressed the submit button of the first cell, only the value that sends with any change is the value of the first cell, the other two cells goto the the get statement with this initial value, if i change the value of this two cells before pressed the submit button, the value that sends is the initial,

sorry for the problem with the html table code, thanks
0
 
GaryCommented:
0
 
joyacv2Author Commented:
yes,

but not update, my solution is to put all inside the form, but i prefer individually by cell
0
 
GaryCommented:
You cannot have a FORM around a group of TD cells or even around the TR tag.

Look at this
http://jsfiddle.net/GaryC123/4bew45e9/1/

It creates an hidden input for the last two columns and changes in those text boxes are made in the hidden input as they happen
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now