Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post

    MIE 7.0.5 and JS errors and console

    Site works great with FF.. tested it on MIE and I get a JS error.

    Can't seem to find the console in the options.

    Clicking the little error icon in the bottom left of the browser pops open a little dialog box which doesn't give me much information about the error.

    How do I open the console in MIE to get more information about the JS error?

    Did I mention the JS works great in FF?

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    There is no console in IE. Post your code...Post the error message

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • Users who have thanked A1ien51 for this post:

    Bobafart (01-04-2008)

  • #3
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post
    no console in IE? jesus.

    I am trying to make an XHR/AJAX menu that allows the user to pick his/her news display styles. Click one of 3 icons and you can choose one of 3 news display styles.

    fyi: I am using Yahoo!'s YUI library to do the XHR

    ok here is the code:

    Code:
    <script language="javascript">
    <!-- Display style Code -->
    function displayStyle(newsDisplayType){
    	// set the checkmark to the active setup
    	if(newsDisplayType==0){
    		document.getElementById('newsDisplayClassic').innerHTML = '<img src="http://www.gabbr.com/img/icons/icon_newsDisplayCheckmark.png" width="32" height="26">';
    		document.getElementById('newsDisplayTabularCondensed').innerHTML = '';
    		document.getElementById('newsDisplayTabular').innerHTML = '';
    	}else if(newsDisplayType==1){
    		document.getElementById('newsDisplayTabular').innerHTML = '<img src="http://www.gabbr.com/img/icons/icon_newsDisplayCheckmark.png" width="32" height="26">';
    		document.getElementById('newsDisplayClassic').innerHTML = '';
    		document.getElementById('newsDisplayTabularCondensed').innerHTML = '';
    	}else if(newsDisplayType==2){
    		document.getElementById('newsDisplayTabularCondensed').innerHTML = '<img src="http://www.gabbr.com/img/icons/icon_newsDisplayCheckmark.png" width="32" height="26">';
    		document.getElementById('newsDisplayTabular').innerHTML = '';
    		document.getElementById('newsDisplayClassic').innerHTML = '';
    			
    	}
      document.getElementById('newsDisplayTypeDiv').innerHTML = '<img src="http://www.gabbr.com/img/loading.gif">';
    	
    		var sUrl = "ajax/displayNewsStyle.php?newsDisplayType=" + newsDisplayType;
    		var successHandler = function(o){
    			var root = o.responseXML.documentElement;	
    			document.getElementById('newsDisplayTypeDiv').innerHTML = root.getElementsByTagName('newsDisplayFile')[0].firstChild.nodeValue;								
    		}
    		var failureHandler = function(o){
    			// alert("failure");						
    		}
    		
    		var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, { success:successHandler, failure:failureHandler });
    
    	
    }
    YAHOO.namespace('newspage.container');
    YAHOO.newspage.container.init = function() {
    		// refer to function in custom js file tabviewNewsNavbar.js
    		tabview('new');
    				displayStyle(2);
    		}
    YAHOO.util.Event.addListener(window, "load", YAHOO.newspage.container.init);
    </script>
    and in the body:

    Code:
    		       			       	<p id="selectNewsDisplay" style="margin-left:10px;margin-bottom:20px;">
    		       			       		<span id="newsDisplayClassic" style="float:left;margin-left:0px;position:relative;background: url('http://www.gabbr.com/img/icons/icon_newsDisplayClassic.png');background-repeat: no-repeat;cursor:pointer;width:32px;height:26px;" onClick="displayStyle(0);">&nbsp;</span>
    		       			       		<span id="newsDisplayTabular" style="float:left;margin-left:27px;position:relative;background: url('http://www.gabbr.com/img/icons/icon_newsDisplayTabular.png');background-repeat: no-repeat;cursor:pointer;width:32px;height:26px;" onClick="displayStyle(1);" >&nbsp;</span>
    		       			       		<span id="newsDisplayTabularCondensed" style="float:left;margin-left:27px;position:relative;background: url('http://www.gabbr.com/img/icons/icon_newsDisplayTabularCondensed.png');background-repeat: no-repeat;cursor:pointer;width:32px;height:26px;" onClick="displayStyle(2);">&nbsp;</span>
    		       			       	</p>
    I pm'd you a link to try to test it live:



    click on any of the 3 news display icons in the top right of the site to see what I mean.
    Last edited by Bobafart; 01-04-2008 at 05:24 AM.


  •  

    Posting Permissions

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