Click here to Skip to main content
15,881,737 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
when i pass a value to textbox using javascript its working fine first time before update data, after the update table will be refreshed. then i couldn't pass value to textbox in the same way, but its working if i refresh the browser.
PHP
<div id="div_for_values"><a href="#" key_id="<?php echo $lang_id; ?>" key_value="<?php echo $lang_name; ?>">Edit</a></div>

Javascript
JavaScript
$(function(){
        $("#div_for_values  a").click(function(){
			var key_id = $(this).attr("key_id");
			var key_value = $(this).attr("key_value");
			//alert(key_id);
           $('#txt_name_id').val(key_id);
		   $('#txt_name').val(key_value);
           return false;
        })
    });
Posted
Updated 8-Apr-15 2:19am
v2
Comments
ZurdoDev 8-Apr-15 8:20am    
Need more info. We can't see any of the code of "after the update table." Also debug the code, see if it still fires and what happens.
W Balboos, GHB 8-Apr-15 8:24am    
Posting ONCE is enough. If you have changes, modify your original post.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900