View Full Version : Open Window Widget from a select form

04-19-2010, 09:31 AM
1) Script Title: Window widget (v1.1)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

3) Describe problem:
I want to use a standard select dropdown menu to choose what page to open in the the popupwindow. I've tried a lot but can't get it to work.
I'm usind Zend framework but here is some simplified code:

<form action="" method="post">
<option value="page1.html">Option1
<option value="page2.html">Option2
<option value="page3.html">Option3
<input type="button" value="Go" onclick="ajaxwin=dhtmlmodal.open('ajaxbox', 'ajax','ob.options[ob.selectedIndex].value', '#3: Ajax Win Title', 'width=450px,height=300px,left=300px,top=100px,resize=1,scrolling=1');">

As you see I try to pass the value from the selected index into the onclick open() function. This won't work, it only opens a window with no content. If I hard code the "page1.html" in the third open() parameter it works.

Is there a way to solve this?
Would be best if I dont have to submit the form.