Sunday, April 4, 2010

link to panel on seperate page

Hello:

I am trying to link from my menu bar to a specific panel on a different page.?I attempted to use this where hc_menu is my anchor to the specific panel (4) and heartlandcafe.html is the page.

%26lt;a href=''HeartlandCafe.html#hc_menu'' onclick=''TabbedPanels2.showPanel(4); return false;''%26gt; Menu%26lt;/a%26gt;

The link will bring me to the site, but wont open my specific panel.

I saw a thread with my exact question leading to this site: http://labs.adobe.com/technologies/spry/samples/utils/URLUtilsSample.html?span> but could not understand what I was supposed to do.?Can someone provide a translation??I would greatly appreciate it!

Thanks,

Matt

link to panel on seperate page

Hi Matt,

change

%26lt;a href=''HeartlandCafe.html#hc_menu'' onclick=''TabbedPanels2.showPanel(4); return false;''%26gt; Menu%26lt;/a%26gt;

to

%26lt;a href=''HeartlandCafe.html?panel=4%26gt; Menu%26lt;/a%26gt;

Then in the new page add

%26lt;script src=''SpryAssets/spryURLUtils.js'' type=''text/javascript''%26gt;%26lt;/script%26gt;

to the %26lt;head%26gt; section and add

%26lt;script type=''text/javascript''%26gt;
%26lt;!--
//The defaultTab value checks to see if the url param is defined. If it is not, it sets it to 0.
var TabbedPanels2 = new Spry.Widget.TabbedPanels(''TabbedPanels1'', {defaultTab:(params.panel ? params.panel : 0)});
//--%26gt;
%26lt;/script%26gt;
to just above %26lt;/body%26gt;

For further info go to
http://labs.adobe.com/technologies/spry/samples/utils/URLUtilsSample.html?panel= 3#examples

I hope this helps.

Ben

link to panel on seperate page

David Powers did a nice tutorial on SpryURLUtils : foundationphp.com/tutorials/spry_url_utils.php It should help you out.

Thank you so much.?The link to the tutorial was what finally made it come together.?I appreciate the help from both of you.?Have a great day

-Matt

No comments:

Post a Comment