...

View Full Version : MIE 7.0.5 and JS errors and console



Bobafart
01-04-2008, 03:05 AM
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?

A1ien51
01-04-2008, 03:48 AM
There is no console in IE. Post your code...Post the error message

Eric

Bobafart
01-04-2008, 04:12 AM
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:




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




<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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum