Loading Drop-Down Menus with content


#1

I want to create a drop-down menu in which the drop-down menu’s content is loaded in from a online file.

I want to be able to use that drop-down menu in several different Hype projects, and to be able to change all of their contents by changing that one single file.

I’m not very good at writing JavaScript code, so how would I go about doing this in Hype?


(Mark Hunte) #2

Have a look at this thread:


(Christophe) #3

You can also use a dynamic language like WebDNA. The content of your drop-down menu can either be an included file or a database content. To do this, you will have to make WebDNA interpret .js because your code is in your XXXXX_hype_generated_script.js
So, let’s say your menu has three items, text1, text2 and text3: just build your Hype page and write this for each Hype button: [text1], [text2] and [text3]
When the page is loaded from the visitor browser, WebDNA interprets the tags on the server and replace them with the actual content. Next time you want to change the menu, you just change the actual content in the included file or in the WebDNA database, and that’s it. No need to change the Hype page.