Changing the value of a textfield using JQuery?
I'm using the following function to try to change a textfield to contain the folder's ID.
function changeAction(folder_id) {
alert(hi);
$('#folder_id').val(folder_id);
}
This is the html part
<a id="open" class="open" onclick="ch开发者_如何学GoangeAction(<?=$folder->id?>);">
and for some reason it refuses to work. It refuses to even alert me (was testing to see if the function is bieng called at all, it would seem it is not.)
Any ideas?
Thanks in advance,
Alex
use changeAction('<?=$folder->id?>') small change also put your hi in inverted comma's
精彩评论