Almost all of the forms and the grids i have on my site are built dynamically using a JSON sent from the server side, currently i have a Grid on my page which has a Add button which allows the user to input the data he wants to add to the Grid, till this point everything works as it should and there are no problem here is the code for this part:
{
Id: 1,
ObjectType: 'Grid',
Childs: [
{
AddButton: {
Id: 2,
ObjectType: 'Button',
onClick: showForm(Id) //the id of the form you want to be shown after you click
}
}
]
}
If the user clicks on the AddButton a form is opened which is the form with the said ID
I tried to explain my situation as best i could, as you can see i am building an engine instead of an static site
So my problem is that i can't think of a good way to get a call back from this showForm ! how can i get the data that is entered, can you give me some ideas ?, how can i add the data entered in this new form as a row to my Grid in a dynamic, engine like manner ?
Thanks.
Aucun commentaire:
Enregistrer un commentaire