admin管理员组

文章数量:1394065

Afternoon all.

Another hour, another question!

I have the following bit of jquery up and running that essentially 'resets' control contents.

tbxProdAC.Attributes.Add ("onclick", "$('#txtbxHowMany').val(''); SetRadioFocus('" + radProd.ClientID + "');");

I have a gridview that pops up occasionally (don't worry, I have got that bit under control!) so what I would like to do is amend the above code so that when I click on txtProdAC, GridView1 is removed.

Further to this, how would one implement a checked/unchecked function with jquery i.e. if tbxProdAC was click, radiobutton1 is unchecked?

Again, as always, apologies for my ignorance.

Afternoon all.

Another hour, another question!

I have the following bit of jquery up and running that essentially 'resets' control contents.

tbxProdAC.Attributes.Add ("onclick", "$('#txtbxHowMany').val(''); SetRadioFocus('" + radProd.ClientID + "');");

I have a gridview that pops up occasionally (don't worry, I have got that bit under control!) so what I would like to do is amend the above code so that when I click on txtProdAC, GridView1 is removed.

Further to this, how would one implement a checked/unchecked function with jquery i.e. if tbxProdAC was click, radiobutton1 is unchecked?

Again, as always, apologies for my ignorance.

Share Improve this question asked Nov 30, 2009 at 15:58 MrDeanMrDean 3055 gold badges8 silver badges23 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 2
$("#tbxProdAC").click(function(){

    $('#GridView1').remove(); // or .toggle() to show/hide
    $("#" + radProd.ClientID).attr("checked",false);

});

Try this:

$("tbxProdAC").click(function(){
    //id gridview ending with 'GridView'
    $("table[id$='GridView']").html("");
});

Regards

本文标签: Clear gridview using javascriptjqueryStack Overflow