Jump to content

Going to a specific table row


gevensen

Recommended Posts

  • 2 weeks later...

i have tried

 

$("#reconcile_table tr:eq(45)");   

 

and

 

$("#reconcile_table tr:eq("+TableRow+")");   

 

where TableRow is a number taken from the last click on the row. I put it in a hidden field

then retrieve it for later use?

 

the funny thing is i can use an anchor href and it works I just want to do it as a result of the routine

 

the enitre jquery script is below

 

<script>function select_statement(id){
var Mydata = '';
var lastRow=document.getElementById('lastrow').value;
//alert(TableRow);
var db ="<?php echo $dbname; ?>";
var user ="<?php echo $_SESSION['username']; ?>";	
Mydata=Mydata+"id="+id;
Mydata=Mydata+"&account="+document.getElementById('bank_account').value;
Mydata=Mydata+"&db="+db;	
Mydata=Mydata+"&user="+user;
Mydata=Mydata+"&lastRow="+lastRow;
$("#statement_id").attr("value", id);
$("#account_selection_div").hide();
$("#reconcile_div").show();
$('#reconcile_div').html('<img src="../../sc/images/working.gif" height="20" width="20" />');
//alert(Mydata);
$.ajax( {
	url : 'reconcile/show_reconcile_ajax.php',
	type : 'post',
	data : Mydata,

	  		
	success : function( resp ) {
	var $response=$(resp);
    var reconciled = $response.find('#reconciled_response').html();
    var balance = $response.find('#balance_response').html();
    var i = $response.find('#i_response').html();
    $("#i_value").attr("value", i); // i is the row count in the reconcile table
    var $response=$(resp);
    var start = $response.find('#s_response').html();
    $("#statement_start").attr("value", start);
    var $response=$(resp);
    var end = $response.find('#e_response').html();
    $("#statement_end").attr("value", end);
    $('#reconcile_div').html($('#inner_reconcile_div', resp).html());
   
    if(reconciled>0){
	    // its reconciled
    	$('#button_table').hideColumns(1); // add expense button   
    	$('#button_table').hideColumns(2); // research
    $('#button_table').hideColumns(3); // reconcile button
    $('#button_table').showColumns(4); // reverse button
    $('#reconcile_table').hideColumns(2); // delete in reconcile table
    $('#reconcile_table').hideColumns(9); // edit in reconcile table
    $('#reconcile_table').hideColumns(11); // reconcile in reconcile table
    //alert("reconciled");
       	
    	
    	
    }
    if(reconciled<1){
        // its not reconciled
    	
    	$('#button_table').showColumns(1);	// add expense button
    	$('#button_table').showColumns(2);  // research
    	$('#button_table').hideColumns(3);  // default
    	if(balance<.01){
    	$('#button_table').showColumns(3);  }  // reconcile  
    	$('#button_table').hideColumns(4);  // reverse
    	$('#reconcile_table').showColumns(2); // delete in reconcile table
	    $('#reconcile_table').showColumns(9); // edit in reconcile table
	    $('#reconcile_table').showColumns(11); // reconcile in reconcile table
	    

	    
    }

    
	}
});
$("#reconcile_table tr:eq(45)"); 	 

}

</script>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.