how to update elements in modal popup by using java script
-
hi am new to ajax,am facing a big problem, my requirement is to add the item details to the grid,by using modal popup. In the modal popup i give a option to search the itemname this search details will be shown on grid in the same modal popup,in that grid i added button for selecting rows. once the user click the select button, i want to assign the values in the modal popup textbox, by using java script fucntion. My problem is javascript fucntion working well, i tried by alert fucnction working fine but the function shopModalPopup(itmid,itmno,itmdesc,onhand){ ********** working ************* alert(itmid); alert(itmno); alert(itmdesc); ********** not working ************* document.getElementById('itemid').value=itemid; document.getElementById('itemno').value=itmno; document.getElementById('itmdesc').value=itmdesc; document.getElementById('onhand').value=onhand; ********** not working ************* $get("<%=this.itemid.ClientID %>").value = itemid; $get("<%=this.itemno.ClientID %>").value =itmno; $get("<%=this.itemdesc.ClientID %>").value =itmno; $get("<%=this.onhand.ClientID %>").value =onhand; }
-
hi am new to ajax,am facing a big problem, my requirement is to add the item details to the grid,by using modal popup. In the modal popup i give a option to search the itemname this search details will be shown on grid in the same modal popup,in that grid i added button for selecting rows. once the user click the select button, i want to assign the values in the modal popup textbox, by using java script fucntion. My problem is javascript fucntion working well, i tried by alert fucnction working fine but the function shopModalPopup(itmid,itmno,itmdesc,onhand){ ********** working ************* alert(itmid); alert(itmno); alert(itmdesc); ********** not working ************* document.getElementById('itemid').value=itemid; document.getElementById('itemno').value=itmno; document.getElementById('itmdesc').value=itmdesc; document.getElementById('onhand').value=onhand; ********** not working ************* $get("<%=this.itemid.ClientID %>").value = itemid; $get("<%=this.itemno.ClientID %>").value =itmno; $get("<%=this.itemdesc.ClientID %>").value =itmno; $get("<%=this.onhand.ClientID %>").value =onhand; }
does it work if you use innerHTML?
document.getElementById('<%=this.itemid.ClientID%>').innerHTML = itemid;
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
-
hi am new to ajax,am facing a big problem, my requirement is to add the item details to the grid,by using modal popup. In the modal popup i give a option to search the itemname this search details will be shown on grid in the same modal popup,in that grid i added button for selecting rows. once the user click the select button, i want to assign the values in the modal popup textbox, by using java script fucntion. My problem is javascript fucntion working well, i tried by alert fucnction working fine but the function shopModalPopup(itmid,itmno,itmdesc,onhand){ ********** working ************* alert(itmid); alert(itmno); alert(itmdesc); ********** not working ************* document.getElementById('itemid').value=itemid; document.getElementById('itemno').value=itmno; document.getElementById('itmdesc').value=itmdesc; document.getElementById('onhand').value=onhand; ********** not working ************* $get("<%=this.itemid.ClientID %>").value = itemid; $get("<%=this.itemno.ClientID %>").value =itmno; $get("<%=this.itemdesc.ClientID %>").value =itmno; $get("<%=this.onhand.ClientID %>").value =onhand; }
have you used
document.getElementById('<%=this.itemid.ClientID %>').value = itemid;
Also check what browser renders. If it is input, you can use value, if its container you use innerHTML.. :cool:Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
does it work if you use innerHTML?
document.getElementById('<%=this.itemid.ClientID%>').innerHTML = itemid;
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
Thanks for your reply i tried your code document.getElementById('<%=this.itemno.ClientID%>').innerHTML = itmno; but still the value is not visible in textbox. view soruce look like this <td> <input name="itemno" id="itemno" style="height: 21px; width: 263px;" type="text"><input>E-4005 "E-4005" is my itemno it is not visible in textbox.
-
does it work if you use innerHTML?
document.getElementById('<%=this.itemid.ClientID%>').innerHTML = itemid;
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
-
Hey Zapss, Great! I probably skimmed through the question too quickly, but I wasn't sure what type of control you were using. I just remember having an asp:label control one time and the .value would not change! I then stumbled across an article where someone mentioned that the label is putting a "" tag on the html and you need to use innerHTML to change what is displayed.
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.