Forums
This topic is locked
Using DW popup window behavior with dropdown menu
Posted 17 Jan 2003 03:36:19
1
has voted
17 Jan 2003 03:36:19 Stephen Britton posted:
I want to create a dropdown menu in Dreamweaver MX that will allow the user to makea selection and then using the on-change command, have a 500 x 350
window pop up. The only thing that I can figure out how to do is
attach the popup behavior directly to the dropdown menu, but I can't
seem to get it to work with the individual options.
I looked at the extensions and checked out ProjectIIV's Jump Menu Magic,
but that doesn't allow you to configure the size of the window.
Any help or suggestions would be appreciated.
- WiLd
Here's the DW MX code (which doesn't do what I want it to do):
<pre id=code><font face=courier size=2 id=code>
<form name="form2" method="post" action="">
<select name="select" onChange="MM_openBrWindow('inside.html','inside','width=500,height=350')">
<option value="inside.html">Inside</option>
<option value="outside.html">Outside</option>
<option value="inbetween.html">In Between</option>
</select>
</form>
</font id=code></pre id=code>
Replies
Replied 17 Jan 2003 16:56:09
17 Jan 2003 16:56:09 Marja Ribbers-de Vroed replied:
I think your best bet would be to write a custom wrapper function for the popup window trigger and let that query the dropdown list first and then feed the lists value to the popup window function.
Eg. something like:
<pre id=code><font face=courier size=2 id=code>
function showWindowFromList() {
var sFile = document.yourForm.yourList.value;
MM_openBrWindow(sFile ,'inside','width=500,height=350')
}
</font id=code></pre id=code>
Put this custom function in a script block in the HEAD section of your page and trigger this function on the onChange event of the list instead of MM_openBrWindow.
Hope this helps.
--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/
Eg. something like:
<pre id=code><font face=courier size=2 id=code>
function showWindowFromList() {
var sFile = document.yourForm.yourList.value;
MM_openBrWindow(sFile ,'inside','width=500,height=350')
}
</font id=code></pre id=code>
Put this custom function in a script block in the HEAD section of your page and trigger this function on the onChange event of the list instead of MM_openBrWindow.
Hope this helps.
--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/
Replied 17 Jan 2003 18:32:23
17 Jan 2003 18:32:23 Stephen Britton replied:
Thank you for the advise Marja! I tried using your code and it didn't work, but it has got me thinking about how to do it. I'll probably wind up writing a custom script (what I should have done in the first place) or maybe find some code in the net.
I also checked out your site. Very nice and you have made some great extensions. I will look forward to seeing your new layers extension.
Thanks again!
- WiLd
I also checked out your site. Very nice and you have made some great extensions. I will look forward to seeing your new layers extension.
Thanks again!
- WiLd