Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8844493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:30:04+00:00 2026-06-14T11:30:04+00:00

I have a menu of a elements all of which get text from xml

  • 0

I have a menu of a elements all of which get text from xml file using xslt:

<nav>
  <xsl:for-each select="package">
        <a href="#" onclick="generateContent('{@name}', this);"><xsl:value-of select="@name"/></a>
  </xsl:for-each>
</nav>

Now I would like to generate a div (and append it to website when a link would be clicked) with its content generated from my xml file (using xslt like above).

What would be the best way to do it? My guess would be to do it from JS – from generateContent(..) function; but I am unaware if this is even possible and if I wouldn’t be overcomplicating stuff that way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:30:06+00:00Added an answer on June 14, 2026 at 11:30 am

    I think you’re complicating a simple thing. In my way, you should generate all the html contents including menus and sub-items. Then do some javascript stuff to hide and show the sub-items whenever they should be shown. It requires you to use some CSS and javascript (maybe Jquery) things to get your work done.

    It’s not a good idea to call the xslt again from the onclick delegate because if you generate all the sub-items again and again, everytime user wants to see them, so you don’t have the state all the time regardless of how hard it can be to implement. However in the way I understand your code it seems impossible (or very hard) to do such a thing.

    Hope it helps.

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a menu written here which contains root elements and secondary elements. I
Is it possible to have a multi level dropdown menu by using the elements
Is there a way of receiving all elements which have a oncontextmenu event assigned
I have a selection menu using toggleClass(). to see which menu options were selected:
Say I have textboxes, dropdownlists and submit buttons. They are all inline-elements. Which means
I have a CSS hover menu which works in all browsers except... surprise --
I have menu structure as show here . All item have a background img.
I have the following problem. I have a menu which is 1000px wide. The
All, I created a plugin using the create plugin with a view wizard, which
I have a Menu object (set as the DataContext) which contains many Options (Menu.Options)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.