Results 1 to 3 of 3

Thread: Chained select menu issue

  1. #1
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Chained select menu issue

    1) Script Title: Chained Select Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Inside chainedmenu.js, try replacing the below function:

    Code:
    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:

    Code:
    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:

    Code:
    <iframe name="myiframe" style="width: 90%; height: 300px; border:1px solid black"></iframe>
    DD Admin

  3. #3
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Thank you

    Thank you for your help, Its work. Thanks again

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •