Results 1 to 4 of 4

Thread: dropdown iframe not working

  1. #1
    Join Date
    Oct 2005

    Exclamation dropdown iframe not working

    I cant get this to work and I don't know why. I want the links in the menu to load in the iframe. But i'm having many difficulties...

    <form name="dropdown">
    <select name="menu1">
    <option value="#">SELECT:</option>

    <option value="blah/blah.jpg" target="black">blah 1</option>

    </select> <input type="button" value="Go" onClick="parent.black.location.href=document.dropdown.menu1.options[document.dropdown.menu1.selectedIndex].value">

    <div id="floatframe">
    <iframe width="300" height="225" src="Old/black.html" name="black" align=center frameborder=7> </iframe></div>

    If you can help, please send answer or new script (in html plz, no css or java) to jordan_43_mhs@yahoo.com for a quicker response.

  2. #2
    Join Date
    Oct 2005
    ok screw it. If anyone has a java answer that'll work. I need some help. Anyone?

  3. #3
    Join Date
    Jul 2005
    Try using:
    <input value="Go!" type="button" onClick="document.frames[0].location.href(document.dropdown.menu1.options[document.dropdown.menu1.selectedIndex].value)">
    for the button.

  4. #4
    Join Date
    Jan 2005
    Notice the parts in bold:

    <input type="button" value="Go" onClick="parent.black.location.href=document.dropdown.menu1.options[document.dropdown.menu1.selectedIndex].value">

    And then:

    <iframe width="300" height="225" src="Old/black.html" name="black" align=center frameborder=7> </iframe>

    SRC and HREF are not the same thing. Also, give your iframe an ID:

    here are how the two lines should be:

    <input type="button" value="Go" onClick="document.getElementById('black').src=document.dropdown.menu1.options[document.dropdown.menu1.selectedIndex].value">


    <iframe name="black" id="black" width="300" height="225" src="Old/black.html" align=center frameborder=7> </iframe>
    Last edited by konithomimo; 10-14-2005 at 07:00 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles