Code Exploiter
Due to the above mentioned problem the IE 7 throws an error if you account Mozilla based browser using window.addEventListener you'll get the same error in Firefox also.
So it looks like I got two JS scripts that are wrong. It works in IE 6 and Fire Fox. I just upgraded to IE 7 and it doesn't work returning with a script error. Perhaps I did not catch the ! symbol when I was using IE 6.
I was about to paste the code last night but the forum had to shut down for an hour for clean up.
Here's the code:
Code:
function hlightpagelink(){
var url=location.href
if(url.indexOf('r50v2/raptor_50v2_collective_servo_tip.htm')>-1)
document.getElementById('raptor_50v2_collective_servo_tip_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_engine_fan_hub_tip.htm')>-1)
document.getElementById('raptor_50v2_engine_fan_hub_tip_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_flybar_control_arm_tip.htm')>-1)
document.getElementById('raptor_50v2_flybar_control_arm_tip_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_pitch_control_arm_tip.htm')>-1)
document.getElementById('raptor_50v2_pitch_control_arm_tip_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_swash_plate_level_tip.htm')>-1)
document.getElementById('raptor_50v2_swash_plate_level_tip_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_tail_rotor_hub_tip.htm')>-1)
document.getElementById('raptor_50v2_tail_rotor_hub_tip_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_aileron_linkage.htm')>-1)
document.getElementById('raptor_50v2_aileron_linkage_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_elevator_linkage.htm')>-1)
document.getElementById('raptor_50v2_elevator_linkage_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_collective_linkage.htm')>-1)
document.getElementById('raptor_50v2_collective_linkage_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_throttle_linkage.htm')>-1)
document.getElementById('raptor_50v2_throttle_linkage_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_rudder_linkage.htm')>-1)
document.getElementById('raptor_50v2_rudder_linkage_link').className='onthispage'
if(url.indexOf('r50v2/raptor_50v2_manual.htm')>-1)
document.getElementById('raptor_50v2_manual_link').className='onthispage'
if(url.indexOf('electronics/fut_9chps_switch_assign.htm')>-1)
document.getElementById('fut_9chps_switch_assign_link').className='onthispage'
}
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", hlightpagelink, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", hlightpagelink );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
hlightpagelink();
};
}
else
window.onload = hlightpagelink;
}
Code:
sfHover = function() {
var sfEls = document.getElementById("mainnav").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
sfHover = function() {
var sfEls = document.getElementById("vnav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
Bookmarks