Always return to the First Tab

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
smohsen
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

Post by smohsen »

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
Scott Klement
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

Post by Scott Klement »

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?
smohsen
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

Post by smohsen »

I like to always start from first tab regardless which tab I was on last time.
Scott Klement
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

Post by Scott Klement »

Just remove the code that's setting the tab to a different tab. It will default to always starting on the first tab.
smohsen
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

Post by smohsen »

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!
Scott Klement
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

Post by Scott Klement »

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".
smohsen
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

Post by smohsen »

I removed the "ontabclick" property by right clicking and removing it.
Compiled the Display and RPG. Still no luck.
Scott Klement
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

Post by Scott Klement »

So the problem is that you cannot switch to other tabs? What properties do you have set on the tab panel?
smohsen
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

Post by smohsen »

This is the tab property:
Snipping.docx
(30.11 KiB) Downloaded 655 times
Scott Klement
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

Post by Scott Klement »

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:
tabPanel.png
tabPanel.png (43.48 KiB) Viewed 1876 times
I created a tab panel with these settings, and it works fine for me. Are you sure these are the only settings?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests