View Full Version : Chained select menu issue
jackcall
09-27-2010, 08:36 AM
1) Script Title: Chained Select Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/chainedmenu/index.htm
3) Describe problem: This is the script that I looking for, but I need some help in showing the selected document in an iframe bellow the chined select menu form. Thx
ddadmin
09-27-2010, 09:53 PM
Inside chainedmenu.js, try replacing the below function:
function goListGroup(){
for (i=arguments.length-1;i>=0; i--){
if (arguments[i].selectedIndex!=-1){
var selectedOptionvalue=arguments[i].options[arguments[i].selectedIndex].value
if (selectedOptionvalue!=""){
if (onclickaction=="alert")
alert(selectedOptionvalue)
else if (newwindow==1)
window.open(selectedOptionvalue)
else
window.location=selectedOptionvalue
break
}
}
}
}
with the following instead:
function goListGroup(){
for (i=arguments.length-1;i>=0; i--){
if (arguments[i].selectedIndex!=-1){
var selectedOptionvalue=arguments[i].options[arguments[i].selectedIndex].value
if (selectedOptionvalue!=""){
var myiframe=window.frames["myiframe"]
myiframe.location.replace(selectedOptionvalue)
break
}
}
}
}
where "myiframe" in red is the name of your IFRAME on the page, such as:
<iframe name="myiframe" style="width: 90%; height: 300px; border:1px solid black"></iframe>
jackcall
09-28-2010, 01:03 AM
Thank you for your help, Its work. Thanks again
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.