Isaac
asked on
XML Nav bar
My question deals with XML and flash, so I hope I can post this question here.
I did a drop down menu using xml and I was able to use flash but I can link my home button to my home page. This is the code.
vb<?xml version="1.0"?>
<NAV main_onColor="#000000" main_offColor="#ff6600" sub_onColor="#000000" sub_offColor="#666666" navWidth="150" fadeTime="0" lineWidth="150" main_y_padding="4" sub_y_padding="2" sub_indent="10">
<MAIN text="HOME" URL="home.html" expand="true" >
<SUB text="Current State" URL="currentstate.html"></ SUB>
<SUB text="Mission" URL="mission.html"></SUB>
<SUB text="Who We Are" URL="whoweare.html"></SUB>
<SUB text="Background" URL="background.html"></SU B>
<SUB text="Leadership" URL="leadership.html"></SU B>
<SUB text="World Policy Philosophy" URL="worldpophil.html"></S UB>
</MAIN>
</NAV>
I did a drop down menu using xml and I was able to use flash but I can link my home button to my home page. This is the code.
vb<?xml version="1.0"?>
<NAV main_onColor="#000000" main_offColor="#ff6600" sub_onColor="#000000" sub_offColor="#666666" navWidth="150" fadeTime="0" lineWidth="150" main_y_padding="4" sub_y_padding="2" sub_indent="10">
<MAIN text="HOME" URL="home.html" expand="true" >
<SUB text="Current State" URL="currentstate.html"></
<SUB text="Mission" URL="mission.html"></SUB>
<SUB text="Who We Are" URL="whoweare.html"></SUB>
<SUB text="Background" URL="background.html"></SU
<SUB text="Leadership" URL="leadership.html"></SU
<SUB text="World Policy Philosophy" URL="worldpophil.html"></S
</MAIN>
</NAV>
ASKER
I TRIED that Mike but it didn't show my sub menu. It only showed the home. Thanks anyway.
Something is strange here, because it should have shown a "Home" and an "About". You click on home, it goes home, you click on About and it epands to show the Subs for About...I did notice a small mistake in my code. This tag:
<MAIN text="HOME" URL="home.html" expand="true" ></MAIN>
should have been like:
<MAIN text="HOME" URL="home.html" ></MAIN>
Like so:
<?xml version="1.0"?>
<NAV main_onColor="#000000" main_offColor="#ff6600" sub_onColor="#000000" sub_offColor="#666666" navWidth="150" fadeTime="0" lineWidth="150" main_y_padding="4" sub_y_padding="2" sub_indent="10">
<MAIN text="HOME" URL="home.html" ></MAIN>
<MAIN text="About" expand="true">
<SUB text="Current State" URL="currentstate.html"></ SUB>
<SUB text="Mission" URL="mission.html"></SUB>
<SUB text="Who We Are" URL="whoweare.html"></SUB>
<SUB text="Background" URL="background.html"></SU B>
<SUB text="Leadership" URL="leadership.html"></SU B>
<SUB text="World Policy Philosophy" URL="worldpophil.html"></S UB>
</MAIN>
<MAIN text="Some Other Category" URL="mycategory.html"></MA IN>
</NAV>
The problem is you're wanting a click on Home to both navigate to another page, and expand the category, which are mutually exclusive actions.
Regards,
Mike Sharp
<MAIN text="HOME" URL="home.html" expand="true" ></MAIN>
should have been like:
<MAIN text="HOME" URL="home.html" ></MAIN>
Like so:
<?xml version="1.0"?>
<NAV main_onColor="#000000" main_offColor="#ff6600" sub_onColor="#000000" sub_offColor="#666666" navWidth="150" fadeTime="0" lineWidth="150" main_y_padding="4" sub_y_padding="2" sub_indent="10">
<MAIN text="HOME" URL="home.html" ></MAIN>
<MAIN text="About" expand="true">
<SUB text="Current State" URL="currentstate.html"></
<SUB text="Mission" URL="mission.html"></SUB>
<SUB text="Who We Are" URL="whoweare.html"></SUB>
<SUB text="Background" URL="background.html"></SU
<SUB text="Leadership" URL="leadership.html"></SU
<SUB text="World Policy Philosophy" URL="worldpophil.html"></S
</MAIN>
<MAIN text="Some Other Category" URL="mycategory.html"></MA
</NAV>
The problem is you're wanting a click on Home to both navigate to another page, and expand the category, which are mutually exclusive actions.
Regards,
Mike Sharp
ASKER
I don't think this will work. I want the home to go to the home page and expand at the same time.
Right, but that doesn't make sense, does it? The problem is you're wanting a click on Home to both navigate to another page, and expand the category, which are mutually exclusive actions. If you did this in straight HTML, you can have both an onclick and an href on an anchor tag. The onclick is executed first, then the page navigates...which loses the original result of the onclick.
You'd somehow need to maintain the state of the menu (with a query string, probably) so that when you navigate to the home page, your menu is then shown expanded. I've seen this done with frames (because you're actually navigating a separate frame, not the one with the menu).
Regards,
Mike Sharp
You'd somehow need to maintain the state of the menu (with a query string, probably) so that when you navigate to the home page, your menu is then shown expanded. I've seen this done with frames (because you're actually navigating a separate frame, not the one with the menu).
Regards,
Mike Sharp
ASKER
I will give you the points if you tell me what is the code in straight HTML?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<?xml version="1.0"?>
<NAV main_onColor="#000000" main_offColor="#ff6600" sub_onColor="#000000" sub_offColor="#666666" navWidth="150" fadeTime="0" lineWidth="150" main_y_padding="4" sub_y_padding="2" sub_indent="10">
<MAIN text="HOME" URL="home.html" expand="true" ></MAIN>
<MAIN text="About" expand="true">
<SUB text="Current State" URL="currentstate.html"></
<SUB text="Mission" URL="mission.html"></SUB>
<SUB text="Who We Are" URL="whoweare.html"></SUB>
<SUB text="Background" URL="background.html"></SU
<SUB text="Leadership" URL="leadership.html"></SU
<SUB text="World Policy Philosophy" URL="worldpophil.html"></S
</MAIN>
<MAIN text="Some Other Category" URL="mycategory.html"></MA
</NAV>
etc.
Regards,
Mike Sharp