Always return to the First Tab
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Always return to the First Tab
Hello,
In order to return to last selected tab I am doing the following and it is working great.
But my users like to always return to the First tab. I am not sure how to accomplish that. I would appreciate any help you can offer.
Ontabclick event I am doing this:
sessionStorage.setItem("MYSCREEN_LASTTAB", tab);
And in the screen's "onload" event, I am doing this:
var lastTab = sessionStorage.getItem("MYSCREEN_LASTTAB");
if (lastTab) {
setTab("TabPanel1", lastTab);
}
Thank you,
Sayed Mohsen
In order to return to last selected tab I am doing the following and it is working great.
But my users like to always return to the First tab. I am not sure how to accomplish that. I would appreciate any help you can offer.
Ontabclick event I am doing this:
sessionStorage.setItem("MYSCREEN_LASTTAB", tab);
And in the screen's "onload" event, I am doing this:
var lastTab = sessionStorage.getItem("MYSCREEN_LASTTAB");
if (lastTab) {
setTab("TabPanel1", lastTab);
}
Thank you,
Sayed Mohsen
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Always return to the First Tab
I guess I'm not sure what you're asking. You've got special code that sets the tab back to the last one used -- what do you want it to do instead? Are you saying you don't want it to use that code anymore, and you're not sure how to remove the code?
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Re: Always return to the First Tab
I like to always start from first tab regardless which tab I was on last time.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Always return to the First Tab
Just remove the code that's setting the tab to a different tab. It will default to always starting on the first tab.
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Re: Always return to the First Tab
I have removed the codes. Now I am always starting from 1st tab but can not switch from the 1st tab to 2nd or 3rd tab.
If I click on the 2nd or 3rd tab it immediately returns to 1st tab.
I must not be doing something right!
If I click on the 2nd or 3rd tab it immediately returns to 1st tab.
I must not be doing something right!
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Always return to the First Tab
It sounds like you set the "ontabclick" property to a blank value instead of removing it.
Right-click the "ontabclick" property and choose "remove property value".
Right-click the "ontabclick" property and choose "remove property value".
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Re: Always return to the First Tab
I removed the "ontabclick" property by right clicking and removing it.
Compiled the Display and RPG. Still no luck.
Compiled the Display and RPG. Still no luck.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Always return to the First Tab
So the problem is that you cannot switch to other tabs? What properties do you have set on the tab panel?
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Re: Always return to the First Tab
This is the tab property:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Always return to the First Tab
For the convenience of people reading this thread, so you don't have to download and open smohsen's Word document... it only contains an image. Here's that image:
I created a tab panel with these settings, and it works fine for me. Are you sure these are the only settings?
I created a tab panel with these settings, and it works fine for me. Are you sure these are the only settings?
Who is online
Users browsing this forum: No registered users and 4 guests