• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Keeping your tab place - cfform

LEGEND ,
Oct 03, 2006 Oct 03, 2006

Copy link to clipboard

Copied

Is there a way to maintain the tab you are on after submitting a form that
returns to the same page and after the form reloads?


TOPICS
Advanced techniques

Views

218

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2006 Oct 04, 2006

Copy link to clipboard

Copied

LATEST
one way could be to pass the tab state in a hidden form field:

you would need to set a variable to the current tab state

<cfset tabname = "thetabid">


then add a hidden field to your form

<form>
...
<input type="hidden" name="tabtoload"
value="<cfoutput>#tabname#</cfoutput>">
</form>


then towards the top of the page, when it it reloaded, check to see that
a value is passed, and if so call the right tab. note, not sure how
you're doing the tabs so alter that part....

<cfparam name="form.tabtoload" default="">
<cfif LEN(form.tabtoload) GT 0>
<!--- call tab --->
<!--- insert appropriate code here.... --->
<cfoutput>#form.tabtoload#</cfoutput>
<cfif>


hope that helps. im sure there are other ways to do it too.....



Wally Kolcz wrote:
> Is there a way to maintain the tab you are on after submitting a form that
> returns to the same page and after the form reloads?
>
>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation