Tabs submit

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
Danny
User
Posts: 139

Tabs submit

Post by Danny »

Hi,

At the ADD page and Edit page we create an extra tab and call it "Save"

What we want... when pressing Save tab the page has submit the data to the database.

Has someone a solution ?

Regards,


vincenthung
User
Posts: 88

Post by vincenthung »

You can add a onclick event on the tab, then trigger the submit event of the Edit/Add form.

To submit the form, you can use below code as example.
For example:
$("#f<Table Name>edit").submit();


Danny
User
Posts: 139

Post by Danny »

Hi,

Now we use this code.

$('a[href="#tab_Werknemers17"]').append(" ").append("<i class='glyphicon glyphicon-floppy-disk'></i>");
$('a[href
="#tab_Werknemers17"]').click(function (e) {
$("#fWerknemersedit").submit();
});

This works if there are no more required fields.

It would be nicer if you press the orginal button, then the focus works also to the required fields.

Maybe can some one help me to add the same class of the save button to the new save tab button.

Regards,


vincenthung
User
Posts: 88

Post by vincenthung »

You can try to trigger the "click" event of the original Add/Save button instead of the "submit" event of the form.

For example:
$("#btnAction").click();


Post Reply