SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    May 2005
    Location
    London, ON
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Problem with jump-menu in IE

    Hello,

    I have created a small javascript jump menu that is designed to hide/display content depending on the users selection. It works perfectly in firefox, but nothing happens in IE.

    Can anyone help?

    Here is the relevant code:
    The content being changed
    Code:
    <div id="listing" style="padding:0; margin:0; overflow:auto; border:0; width:100&#37;; height:100%;"> 
    <span id="E" style="display:inherit;"><?php require("currentListing/E.html"); ?></span>
    <span id="I" style="display:none;"><?php require("currentListing/I.html"); ?></span>
    <div >
    The jump menu:
    Code:
    <form name="jumpMenu">
    <select name="menu" style="background-color: #FFFFFF; font-size: 9px; font-family: verdana; color:#000000; padding: 0; margin: 0;" size="1" onchange="jump(this.form, this.form.menu.options[this.form.menu.selectedIndex].value)">		
    <option value="0" selected="selected">Select Announcements</option>
    <option value="0">--------------------</option>
    <option value="E">External Announcements</option>
    <option value="I">Internal Announcements</option>	
    </select>
    </form>
    The javascript:
    Code:
    <script language="javascript">
    function jump(form) {
    	var myindex=form.menu.selectedIndex
    	//if we're choosing to see external announcements
    	if (form.menu.options[myindex].value == "E") {
    		//then show the external <span>
    		document.getElementById("E").style.display = 'inherit';
    		document.getElementById("I").style.display = 'none';
    	//if we want the internal
    	} else if (form.menu.options[myindex].value == "I") {
    		//then show the external <span>
    		document.getElementById("I").style.display = 'inherit';
    		document.getElementById("E").style.display = 'none';
    	} else {
    	}
    }
    //-->
    </script>
    Any help is very much appreciated.

    Thanks.
    Ryan Price
    Subscribe to my blog for regular tips and tricks

  2. #2
    SitePoint Addict
    Join Date
    May 2005
    Location
    London, ON
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone?
    Ryan Price
    Subscribe to my blog for regular tips and tricks

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE doesnt recognize display:inherit

    check out http://msdn.microsoft.com/workshop/a...es/display.asp

  4. #4
    SitePoint Addict
    Join Date
    May 2005
    Location
    London, ON
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much.
    Ryan Price
    Subscribe to my blog for regular tips and tricks


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
  •