Open Lightbox from a Jump Menu Support
This FAQ explains how to open DMXzone Lightbox from a jump menu
Question
How can I open Lightbox from a jump menu?
Answer
If you have a jump menu like this one:
<select name="jumpMenu" >
<option value="example1.html" selected>Item1</option>
<option value="example2.html">Item2</option>
<option value="example3.html">Item3</option>
<option value="example4.html">Item4</option>
</select>
Click on the <select> tag of your menu, then select:
Tag Inspector>Behaviors>Add>DMXzone>DMXzone Lightbox>Open DMXzone Lightbox
The Lightbox configuration window will appear. In the URL to Display field paste the following piece of code:
this.options[this.selectedIndex].value
Then customize your Lightbox appearance and click OK when you are done.
Now your menu code should look like this one:
<select name="jumpMenu" onchange="openDMXzoneLightbox('this.options[this.selectedIndex].value', {}, window);return document.MM_returnValue">
<option value="example1.html" selected>Item1</option>
<option value="example2.html">Item2</option>
<option value="example3.html">Item3</option>
<option value="example4.html">Item4</option>
</select>
All you have to do now is to remove the single quotes before and after:
this.options[this.selectedIndex].value
When you remove the quotes your menu code should look like this:
<select name="jumpMenu" onchange="openDMXzoneLightbox(this.options[this.selectedIndex].value, {}, window);return document.MM_returnValue" >
<option value="example1.html" selected>Item1</option>
<option value="example2.html">Item2</option>
<option value="example3.html">Item3</option>
<option value="example4.html">Item4</option>
</select>
Now, when you select an item from the menu, it will appear into a Lightbox window.
*Make sure that the behavior you've just added is onChange.
Comments
Be the first to write a comment
You must me logged in to write a comment.