DMXzone Tabs Support Product Page

Answered

Submit form and go to next tab

Asked 22 Apr 2012 16:32:12
2
have this question
22 Apr 2012 16:32:12 Willy Gelin posted:
On a DMX Tab page I have one form and one update record on each tab. I would like the form to update the db and go to next tab on submit so I added go to next tab dmxzone behaviou to the form tag like this


<form action="<?php echo $editFormAction; ?>" method="POST" name="form1" id="form1" onsubmit="dmxTabsAction('dmxTabs1', 'nextTab');return document.MM_returnValue">



Now it does not update the db, just goes to next tab. Without the "onsubmit" db is updated.

What can I do?

Replies

Replied 24 Apr 2012 06:40:11
24 Apr 2012 06:40:11 Teodor Kuduschiev replied:
Hello Willy,

Unfortunately this won't be possible using onsubmit.
You can just add a button in your form that redirects to the next tab when clicked.
Replied 24 Apr 2012 08:02:50
24 Apr 2012 08:02:50 Willy Gelin replied:
AS in your video lesson I have a redirect.html page that I link to after update record. It goes in the Dreamweaver code like:

$updateGoTo = "redirect.html";
  • Can I change the link to a specific tab.
  • Or link to a specific or "next" tab in a custom "redirectToTab.html"


Can I link to a specific tab from anothe page than the tab page it self at all?
Replied 15 May 2012 07:37:19
15 May 2012 07:37:19 Willy Gelin replied:
Could you please respond to my last question above aked 3 weeks ago.
Replied 23 May 2012 19:05:17
23 May 2012 19:05:17 Willy Gelin replied:
Ok, this is what I came up with so far.
I can link to a specific tab from an other page with

<a href="tabPage.php?#dmxTabs1-3">Tab 2</a>


Then I thought I would be able to link from a Dreamweaver insert record behavior with

$insertGoTo = "tabPage.php?#dmxTabs1-3";


But first tab opens after insert. So I linked to a third page named toTab2.php

With this content

header("Location: tabPage.php?#dmxTabs1-3");


Now specified tab opens after insert bahavior, then I made a toTab3.php an so on.

Seemes that I have a working insert and go to next tab but a bit weird I think...

A better solution anyone?

Reply to this topic